pull/10/head
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 #
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 = []
message = Sub.get_msg_from_queue(r_serv)
prec_filename = None
@ -82,7 +86,7 @@ def main():
channel, filename, word, score = message.split()
if prec_filename == None or filename != prec_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
prev_score = r_serv1.hget(word.lower(), PST.p_date)

View File

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

View File

@ -23,7 +23,7 @@
<div id="wrapper">
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
<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>
<!-- /.navbar-top-links -->
<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>
</li>
<li>
<a href="{{ url_for('wordstrending') }}">WordsTrendings</a>
<a href="{{ url_for('wordstrending') }}"><i class="glyphicon glyphicon-stats"></i> WordsTrendings</a>
</li>
</ul>
<!-- /#side-menu -->
@ -57,11 +57,10 @@
<div id="page-wrapper">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Dashboard</h1>
</br>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
@ -70,7 +69,7 @@
</div>
<div class="panel-body">
<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>
<!-- /.row -->
</div>
@ -98,6 +97,7 @@
</select>
</label>
</div>
<input type="checkbox">
</div>
</div>
<table class="table table-bordered table-hover table-striped" id="table_log">