This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<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>Stash form</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">
|
||||||
@@ -277,7 +277,7 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<label for="external_galleries">
|
<label for="external_galleries">
|
||||||
Any external galleries ?
|
Any external galleries ?
|
||||||
<textarea id="external_galleries" maxlength="194"></textarea>
|
<textarea id="external_galleries" name="external_galleries" ></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>
|
||||||
|
|||||||
@@ -23,18 +23,23 @@ 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')
|
external_galleries = str(request.GET.get('external_galleries'))
|
||||||
|
|
||||||
|
if external_galleries:
|
||||||
|
skip_searching_gallery = True
|
||||||
|
else:
|
||||||
|
skip_searching_gallery = False
|
||||||
|
|
||||||
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
|
||||||
template_manifest = yaml.safe_load(file)
|
template_manifest = yaml.safe_load(file)
|
||||||
|
|
||||||
#edit the container name
|
#edit the container name
|
||||||
template_manifest['metadata']['name'] ="stash-pornpics-dowloader"+name
|
template_manifest['metadata']['name'] ="stash-pornpics-dowloader-"+name
|
||||||
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,'--external_gallery', external_galleries]
|
command=['bash', '/config/download.sh','--skip_searching_gallery',skip_searching_gallery, '--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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user