mirror of https://github.com/CIRCL/AIL-framework
chg: [UI domain] add input: show domain by name
parent
514911eb62
commit
5f8b81fd85
|
@ -45,13 +45,18 @@ def api_validator(api_response):
|
||||||
|
|
||||||
# ============= ROUTES ==============
|
# ============= ROUTES ==============
|
||||||
# add route : /crawlers/show_domain
|
# add route : /crawlers/show_domain
|
||||||
@crawler_splash.route('/crawlers/showDomain')
|
@crawler_splash.route('/crawlers/showDomain', methods=['GET', 'POST'])
|
||||||
@login_required
|
@login_required
|
||||||
@login_read_only
|
@login_read_only
|
||||||
def showDomain():
|
def showDomain():
|
||||||
domain_name = request.args.get('domain')
|
if request.method == 'POST':
|
||||||
epoch = request.args.get('epoch')
|
domain_name = request.form.get('in_show_domain')
|
||||||
port = request.args.get('port')
|
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))
|
res = api_validator(Domain.api_verify_if_domain_exist(domain_name))
|
||||||
if res:
|
if res:
|
||||||
|
|
|
@ -105,6 +105,25 @@
|
||||||
</div>
|
</div>
|
||||||
</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' %}
|
{% with object_type='domain' %}
|
||||||
{% include 'tags/block_obj_tags_search.html' %}
|
{% include 'tags/block_obj_tags_search.html' %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
|
Loading…
Reference in New Issue