From 5f8b81fd854503a6d20829ac78d5b2da09310c76 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Mon, 13 Jan 2020 14:24:35 +0100 Subject: [PATCH] chg: [UI domain] add input: show domain by name --- var/www/blueprints/crawler_splash.py | 13 +++++++++---- .../templates/Crawler_dashboard.html | 19 +++++++++++++++++++ 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/var/www/blueprints/crawler_splash.py b/var/www/blueprints/crawler_splash.py index 07f9ab60..155b3090 100644 --- a/var/www/blueprints/crawler_splash.py +++ b/var/www/blueprints/crawler_splash.py @@ -45,13 +45,18 @@ def api_validator(api_response): # ============= ROUTES ============== # add route : /crawlers/show_domain -@crawler_splash.route('/crawlers/showDomain') +@crawler_splash.route('/crawlers/showDomain', methods=['GET', 'POST']) @login_required @login_read_only def showDomain(): - domain_name = request.args.get('domain') - epoch = request.args.get('epoch') - port = request.args.get('port') + if request.method == 'POST': + domain_name = request.form.get('in_show_domain') + epoch = None + port = None + else: + domain_name = request.args.get('domain') + epoch = request.args.get('epoch') + port = request.args.get('port') res = api_validator(Domain.api_verify_if_domain_exist(domain_name)) if res: diff --git a/var/www/modules/hiddenServices/templates/Crawler_dashboard.html b/var/www/modules/hiddenServices/templates/Crawler_dashboard.html index dfca6ddc..d72daea6 100644 --- a/var/www/modules/hiddenServices/templates/Crawler_dashboard.html +++ b/var/www/modules/hiddenServices/templates/Crawler_dashboard.html @@ -105,6 +105,25 @@ +
+
+
+
Show Domain:
+
+
+ +
+ +
+
+
+
+
+
+ + {% with object_type='domain' %} {% include 'tags/block_obj_tags_search.html' %} {% endwith %}