Merge pull request 'use_external_url' (#5) from use_external_url into main
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6m46s

Reviewed-on: #5
This commit was merged in pull request #5.
This commit is contained in:
2025-07-31 18:27:38 +00:00
2 changed files with 290 additions and 289 deletions
+288 -288
View File
@@ -1,288 +1,288 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Scaled up</title> <title>Scaled up</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Varela+Round"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Varela+Round">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<style> <style>
@charset "UTF-8"; @charset "UTF-8";
.m-b-xs { .m-b-xs {
margin-bottom: 2%; margin-bottom: 2%;
} }
.m-b-md { .m-b-md {
margin-bottom: 10%; margin-bottom: 10%;
} }
.m-t-xs { .m-t-xs {
margin-top: 2%; margin-top: 2%;
} }
.m-t-sm { .m-t-sm {
margin-top: 5%; margin-top: 5%;
} }
* { * {
outline: 0 !important; outline: 0 !important;
} }
body { body {
padding: 2% 0; padding: 2% 0;
background-color: #37404a; background-color: #37404a;
} }
h1 { h1 {
font-family: "Roboto", sans-serif; font-family: "Roboto", sans-serif;
font-size: 2.2em; font-size: 2.2em;
font-weight: 300; font-weight: 300;
color: #85ffc7; color: #85ffc7;
text-transform: uppercase; text-transform: uppercase;
} }
p { p {
font-family: "Roboto", sans-serif; font-family: "Roboto", sans-serif;
font-size: 1.1em; font-size: 1.1em;
font-weight: 300; font-weight: 300;
color: #fff; color: #fff;
} }
a { a {
color: #fff; color: #fff;
} }
a:hover { a:hover {
text-decoration: none; text-decoration: none;
color: #fff; color: #fff;
} }
#survey-form label, #survey-form label,
#survey-form .labels { #survey-form .labels {
display: block; display: block;
margin-bottom: 2%; margin-bottom: 2%;
font-family: "Roboto", sans-serif; font-family: "Roboto", sans-serif;
font-size: 1.1em; font-size: 1.1em;
font-weight: 300; font-weight: 300;
color: #fff; color: #fff;
letter-spacing: 0.5px; letter-spacing: 0.5px;
} }
#survey-form input::-webkit-input-placeholder { #survey-form input::-webkit-input-placeholder {
color: transparent !important; color: transparent !important;
} }
#survey-form input::-moz-placeholder { #survey-form input::-moz-placeholder {
color: transparent !important; color: transparent !important;
} }
#survey-form input:-ms-input-placeholder { #survey-form input:-ms-input-placeholder {
color: transparent !important; color: transparent !important;
} }
#survey-form input:-moz-placeholder { #survey-form input:-moz-placeholder {
color: transparent !important; color: transparent !important;
} }
#survey-form input, #survey-form input,
#survey-form select { #survey-form select {
display: block; display: block;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
outline: none; outline: none;
border: 2px solid #333; border: 2px solid #333;
} }
#survey-form input { #survey-form input {
margin-top: 1.5%; margin-top: 1.5%;
padding: 0 0 5px 0; padding: 0 0 5px 0;
background: transparent; background: transparent;
border: none; border: none;
outline: none; outline: none;
border-bottom: 2px solid #fff; border-bottom: 2px solid #fff;
font-size: 1.1em; font-size: 1.1em;
font-weight: 300; font-weight: 300;
color: #85ffc7; color: #85ffc7;
} }
#survey-form input:focus { #survey-form input:focus {
border-color: #85ffc7; border-color: #85ffc7;
} }
#survey-form [type=checkbox], #survey-form [type=checkbox],
#survey-form [type=radio] { #survey-form [type=radio] {
display: inline-block; display: inline-block;
width: auto; width: auto;
margin: 0px 10px 0 0; margin: 0px 10px 0 0;
} }
#survey-form [type=checkbox], #survey-form [type=checkbox],
#survey-form [type=radio] { #survey-form [type=radio] {
display: inline-block; display: inline-block;
margin: 0 10px 0 0 !important; margin: 0 10px 0 0 !important;
position: relative; position: relative;
top: 5px; top: 5px;
right: 0; right: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
-webkit-appearance: none; -webkit-appearance: none;
-moz-appearance: none; -moz-appearance: none;
-o-appearance: none; -o-appearance: none;
appearance: none; appearance: none;
height: 23px; height: 23px;
width: 23px; width: 23px;
transition: all 0.15s ease-out 0s; transition: all 0.15s ease-out 0s;
background: #37404a; background: #37404a;
color: #fff; color: #fff;
cursor: pointer; cursor: pointer;
outline: none; outline: none;
z-index: 1000; z-index: 1000;
border: 1px solid #fff; border: 1px solid #fff;
} }
#survey-form [type=checkbox]:hover, #survey-form [type=checkbox]:hover,
#survey-form [type=radio]:hover { #survey-form [type=radio]:hover {
border-color: #85ffc7; border-color: #85ffc7;
} }
#survey-form [type=checkbox]:checked:before, #survey-form [type=checkbox]:checked:before,
#survey-form [type=radio]:checked:before { #survey-form [type=radio]:checked:before {
display: inline-block; display: inline-block;
height: 21px; height: 21px;
width: 21px; width: 21px;
position: relative; position: relative;
left: 0; left: 0;
bottom: 0; bottom: 0;
content: ""; content: "";
text-align: center; text-align: center;
font-family: "Glyphicons Halflings"; font-family: "Glyphicons Halflings";
line-height: 20px; line-height: 20px;
font-size: 15px; font-size: 15px;
color: #85ffc7; color: #85ffc7;
} }
#survey-form [type=checkbox]:focus, #survey-form [type=checkbox]:focus,
#survey-form [type=radio]:focus { #survey-form [type=radio]:focus {
outline: none; outline: none;
border-color: #fff; border-color: #fff;
} }
#survey-form [type=radio] { #survey-form [type=radio] {
border-radius: 50%; border-radius: 50%;
} }
#survey-form [type=radio]:after { #survey-form [type=radio]:after {
border-radius: 50%; border-radius: 50%;
} }
#survey-form [type=number] { #survey-form [type=number] {
width: 45px; width: 45px;
} }
#survey-form [type=number]::-webkit-inner-spin-button, #survey-form [type=number]::-webkit-outer-spin-button { #survey-form [type=number]::-webkit-inner-spin-button, #survey-form [type=number]::-webkit-outer-spin-button {
-webkit-appearance: none; -webkit-appearance: none;
-moz-appearance: none; -moz-appearance: none;
appearance: none; appearance: none;
margin: 0; margin: 0;
} }
#survey-form select { #survey-form select {
height: 40px; height: 40px;
padding-left: 5px; padding-left: 5px;
background-color: #37404a; background-color: #37404a;
border: 2px solid #fff; border: 2px solid #fff;
color: #85ffc7; color: #85ffc7;
} }
#survey-form select option { #survey-form select option {
padding: 5px 10px; padding: 5px 10px;
font-weight: 300; font-weight: 300;
cursor: pointer; cursor: pointer;
} }
#survey-form select option:hover { #survey-form select option:hover {
background-color: #85ffc7; background-color: #85ffc7;
} }
#survey-form textarea { #survey-form textarea {
resize: none; resize: none;
margin-top: 2%; margin-top: 2%;
padding: 10px 10px 0px 20px; padding: 10px 10px 0px 20px;
width: 100%; width: 100%;
height: 90px; height: 90px;
color: #85ffc7; color: #85ffc7;
background-color: #37404a; background-color: #37404a;
border: 2px solid #fff; border: 2px solid #fff;
} }
#survey-form .btn { #survey-form .btn {
display: inline-block; display: inline-block;
position: relative; position: relative;
width: 100%; width: 100%;
margin: 3% 0 0 0; margin: 3% 0 0 0;
height: 45px; height: 45px;
text-transform: uppercase; text-transform: uppercase;
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
border: 3px solid #85ffc7; border: 3px solid #85ffc7;
border-radius: 0; border-radius: 0;
font-weight: 500; font-weight: 500;
font-size: 1.2em; font-size: 1.2em;
color: #85ffc7; color: #85ffc7;
text-align: center; text-align: center;
background: none; background: none;
transition: color 0.25s ease; transition: color 0.25s ease;
} }
#survey-form .btn:after { #survey-form .btn:after {
position: absolute; position: absolute;
content: ""; content: "";
top: 0; top: 0;
left: 0; left: 0;
width: 0; width: 0;
height: 100%; height: 100%;
background-color: #85ffc7; background-color: #85ffc7;
transform-origin: left; transform-origin: left;
transition: width 0.5s ease; transition: width 0.5s ease;
z-index: -1; z-index: -1;
} }
#survey-form .btn:hover { #survey-form .btn:hover {
color: #37404a; color: #37404a;
} }
#survey-form .btn:hover:after { #survey-form .btn:hover:after {
width: 100%; width: 100%;
} }
#survey-form fieldset { #survey-form fieldset {
margin: 5% 0 0 0; margin: 5% 0 0 0;
} }
.copyright { .copyright {
text-align: center; text-align: center;
font-size: 10px; font-size: 10px;
color: #fff; color: #fff;
} }
.copyright i { .copyright i {
color: #ef5350; color: #ef5350;
} }
@media only screen and (max-width: 600px) { @media only screen and (max-width: 600px) {
body { body {
padding: 8% 0; padding: 8% 0;
} }
} }
</style> </style>
</head> </head>
<main id="main" class="container"> <main id="main" class="container">
<div class="row"> <div class="row">
<div class="col-xs-12 col-lg-offset-3 col-lg-6"> <div class="col-xs-12 col-lg-offset-3 col-lg-6">
<div class="m-b-md text-center"> <div class="m-b-md text-center">
<h1 id="title">Stash Form</h1> <h1 id="title">Stash Form</h1>
<p id="description" class="description" class="text-center">Download form</p> <p id="description" class="description" class="text-center">Download form</p>
</div> </div>
<form method="GET" action="/stash/submit-form/" id="survey-form" name="survey-form"> <form method="GET" action="/stash/submit-form/" id="survey-form" name="survey-form">
<fieldset> <fieldset>
<label for="name" id="name-label"> <label for="name" id="name-label">
Name * Name *
<input class="" type="text" id="name" name="name" placeholder="Enter your name (required)" required /> <input class="" type="text" id="name" name="name" placeholder="Enter your name (required)" required />
</label> </label>
</fieldset> </fieldset>
<fieldset> <fieldset>
<label for="url" id="url-label"> <label for="url" id="url-label">
URL * URL *
<input class="" type="url" id="url" name="url" placeholder="Enter the URL (required)" required /> <input class="" type="url" id="url" name="url" placeholder="Enter the URL (required)" required />
</label> </label>
</fieldset> </fieldset>
<fieldset> <fieldset>
<label for="survey-form-suggestions"> <label for="external_galleries">
Any Comments or Suggestions? Any external galleries ?
<textarea id="survey-form-suggestions" maxlength="194"></textarea> <textarea id="external_galleries" maxlength="194"></textarea>
</label> </label>
</fieldset> </fieldset>
<button id="submit" type="submit" class="btn">Submit the form</button> <button id="submit" type="submit" class="btn">Submit the form</button>
</form> </form>
</div> </div>
</div> </div>
</main> </main>
</html> </html>
+2 -1
View File
@@ -23,6 +23,7 @@ def handle_survey_form(request):
v1 = client.BatchV1Api() v1 = client.BatchV1Api()
name = request.GET.get('name') name = request.GET.get('name')
url = request.GET.get('url') url = request.GET.get('url')
external_galleries = request.GET.get('external_galleries')
with open('django_code/stash_management/templates/template.stash-pornpics-dowloader.job.yml', 'r') as file: with open('django_code/stash_management/templates/template.stash-pornpics-dowloader.job.yml', 'r') as file:
#get the manifest in a variable template_manifest from the manifest file #get the manifest in a variable template_manifest from the manifest file
@@ -33,7 +34,7 @@ def handle_survey_form(request):
template_manifest['spec']['template']['spec']['containers'][0]['name'] ="stash-pornpics-dowloader-"+name template_manifest['spec']['template']['spec']['containers'][0]['name'] ="stash-pornpics-dowloader-"+name
#edit the command based on the input #edit the command based on the input
command=['bash', '/config/download.sh', '--http_proxy', 'http://gluetun-svc.gluetun.svc:8888', '--BASE_URL', url, '--pornstars', name] command=['bash', '/config/download.sh', '--http_proxy', 'http://gluetun-svc.gluetun.svc:8888', '--BASE_URL', url, '--pornstars', name,'--external_gallery', external_galleries]
template_manifest['spec']['template']['spec']['containers'][0]['command']=command template_manifest['spec']['template']['spec']['containers'][0]['command']=command