fix: [Crawler] remove hardcoded url

This commit is contained in:
Terrtia 2018-09-28 15:42:06 +02:00
parent 3dd20af4d1
commit b3a6dc8487
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
3 changed files with 5 additions and 4 deletions

View file

@ -18,6 +18,7 @@ import Flask_config
app = Flask_config.app app = Flask_config.app
cfg = Flask_config.cfg cfg = Flask_config.cfg
baseUrl = Flask_config.baseUrl
r_serv_onion = Flask_config.r_serv_onion r_serv_onion = Flask_config.r_serv_onion
r_serv_metadata = Flask_config.r_serv_metadata r_serv_metadata = Flask_config.r_serv_metadata
bootstrap_label = Flask_config.bootstrap_label bootstrap_label = Flask_config.bootstrap_label
@ -164,4 +165,4 @@ def domain_crawled_7days_json():
return jsonify(json_domain_stats) return jsonify(json_domain_stats)
# ========= REGISTRATION ========= # ========= REGISTRATION =========
app.register_blueprint(hiddenServices) app.register_blueprint(hiddenServices, url_prefix=baseUrl)

View file

@ -136,7 +136,7 @@
$(document).ready(function(){ $(document).ready(function(){
activePage = "page-hiddenServices" activePage = "page-hiddenServices"
$("#"+activePage).addClass("active"); $("#"+activePage).addClass("active");
all_graph.line_chart = create_line_chart('graph_line', '/hiddenServices/domain_crawled_7days_json?type=onion'); all_graph.line_chart = create_line_chart('graph_line', "{{ url_for('hiddenServices.domain_crawled_7days_json') }}?type=onion");
}); });
$(window).on("resize", function() { $(window).on("resize", function() {
all_graph.onResize(); all_graph.onResize();

View file

@ -16,8 +16,8 @@
<!-- JS --> <!-- JS -->
<script type="text/javascript" src="{{ url_for('static', filename='js/dygraph-combined.js') }}"></script> <script type="text/javascript" src="{{ url_for('static', filename='js/dygraph-combined.js') }}"></script>
<script language="javascript" src="{{ url_for('static', filename='js/jquery.js')}}"></script> <script language="javascript" src="{{ url_for('static', filename='js/jquery.js')}}"></script>
<script src="/static//js/jquery.dataTables.min.js"></script> <script src="{{ url_for('static', filename='js/jquery.dataTables.min.js')}}"></script>
<script src="/static//js/dataTables.bootstrap.js"></script> <script src="{{ url_for('static', filename='js/dataTables.bootstrap.js')}}"></script>
<style> <style>
.test thead{ .test thead{