Skip to content

Commit

Permalink
chg: [UI domain] add input: show domain by name
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrtia committed Jan 13, 2020
1 parent 514911e commit 5f8b81f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
13 changes: 9 additions & 4 deletions var/www/blueprints/crawler_splash.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
19 changes: 19 additions & 0 deletions var/www/modules/hiddenServices/templates/Crawler_dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,25 @@ <h5><a class="text-info" href="{{ url_for('hiddenServices.Crawler_Splash_last_by
</div>
</div>

<div class="d-flex justify-content-center my-4">
<div class="card border-secondary" style="max-width: 40rem;">
<div class="card-body text-dark">
<h5 class="card-title">Show Domain:</h5>
<form class="" action="{{url_for('crawler_splash.showDomain')}}" method="post">
<div class="input-group mb-3">
<input type="text" class="form-control" style="min-width: 30rem;" placeholder="Domain name" aria-label="Domain name" aria-describedby="btn_show_domain" id="in_show_domain" , name="in_show_domain">
<div class="input-group-append">
<button class="btn btn-info" type="submit" id="btn_show_domain">
<i class="fas fa-search"></i>
</button>
</div>
</div>
</form>
</div>
</div>
</div>


{% with object_type='domain' %}
{% include 'tags/block_obj_tags_search.html' %}
{% endwith %}
Expand Down

0 comments on commit 5f8b81f

Please sign in to comment.