This commit is contained in:
Alexandre Dulaunoy 2014-08-11 13:46:37 +02:00
commit 9657c6bf80
3 changed files with 17 additions and 11 deletions

View file

@ -74,6 +74,10 @@ def main():
# FUNCTIONS # # FUNCTIONS #
publisher.info("Script Curve subscribed to channel {0}".format(cfg.get("PubSub_Words", "channel_0"))) publisher.info("Script Curve subscribed to channel {0}".format(cfg.get("PubSub_Words", "channel_0")))
# FILE CURVE SECTION #
csv_path = cfg.get("Directories", "wordtrending_csv")
wordfile_path = cfg.get("Directories", "wordsfile")
paste_words = [] paste_words = []
message = Sub.get_msg_from_queue(r_serv) message = Sub.get_msg_from_queue(r_serv)
prec_filename = None prec_filename = None
@ -82,7 +86,7 @@ def main():
channel, filename, word, score = message.split() channel, filename, word, score = message.split()
if prec_filename == None or filename != prec_filename: if prec_filename == None or filename != prec_filename:
PST = P.Paste(filename) PST = P.Paste(filename)
lib_words.create_curve_with_word_file(r_serv1, "/home/user/AIL/var/www/static/csv/wordstrendingdata", "/home/user/AIL/files/wordfile", int(PST.p_date.year), int(PST.p_date.month)) lib_words.create_curve_with_word_file(r_serv1, csv_path, wordfile_path, int(PST.p_date.year), int(PST.p_date.month))
prec_filename = filename prec_filename = filename
prev_score = r_serv1.hget(word.lower(), PST.p_date) prev_score = r_serv1.hget(word.lower(), PST.p_date)

View file

@ -1,6 +1,8 @@
[Directories] [Directories]
bloomfilters = /home/user/Blooms/ bloomfilters = /home/user/Blooms/
pastes = /home/user/PASTES/ pastes = /home/user/PASTES/
wordtrending_csv = /home/user/AIL/var/www/static/csv/wordstrendingdata
wordsfile = /home/user/AIL/files/wordfile
##### Redis ##### ##### Redis #####
[Redis_Cache] [Redis_Cache]

View file

@ -23,7 +23,7 @@
<div id="wrapper"> <div id="wrapper">
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0"> <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
<div class="navbar-header"> <div class="navbar-header">
<a class="navbar-brand" href="{{ url_for('index') }}">Analysis Information Leak framework.</a> <a class="navbar-brand" href="{{ url_for('index') }}">Analysis Information Leak framework -- Dashboard</a>
</div> </div>
<!-- /.navbar-top-links --> <!-- /.navbar-top-links -->
<div class="navbar-default sidebar" role="navigation"> <div class="navbar-default sidebar" role="navigation">
@ -44,7 +44,7 @@
<a href="{{ url_for('index') }}"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a> <a href="{{ url_for('index') }}"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a>
</li> </li>
<li> <li>
<a href="{{ url_for('wordstrending') }}">WordsTrendings</a> <a href="{{ url_for('wordstrending') }}"><i class="glyphicon glyphicon-stats"></i> WordsTrendings</a>
</li> </li>
</ul> </ul>
<!-- /#side-menu --> <!-- /#side-menu -->
@ -55,13 +55,12 @@
<!-- /.navbar-static-side --> <!-- /.navbar-static-side -->
</nav> </nav>
<div id="page-wrapper"> <div id="page-wrapper">
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<h1 class="page-header">Dashboard</h1> </br>
</div> </div>
<!-- /.col-lg-12 --> </div>
</div>
<!-- /.row -->
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="panel panel-default"> <div class="panel panel-default">
@ -70,7 +69,7 @@
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="row"> <div class="row">
<div class="col-lg-12" id="Graph" style="height:300px; width:95%"></div> <div class="col-lg-12" id="Graph" style="height:400px; width:95%"></div>
</div> </div>
<!-- /.row --> <!-- /.row -->
</div> </div>
@ -98,6 +97,7 @@
</select> </select>
</label> </label>
</div> </div>
<input type="checkbox">
</div> </div>
</div> </div>
<table class="table table-bordered table-hover table-striped" id="table_log"> <table class="table table-bordered table-hover table-striped" id="table_log">