switching to globalRedis + harmonization ui live-dashboard

pull/18/head
Sami Mokaddem 2017-10-27 16:36:27 +02:00
parent 7b1afdc60e
commit 2d09ee87f6
5 changed files with 23 additions and 23 deletions

View File

@ -24,23 +24,20 @@ field_to_plot = Attribute.category
fieldname_order=["Event.id", "Attribute.Tag", "Attribute.category", "Attribute.type", ["Attribute.value", "Attribute.comment"]]
char_separator=||
[RedisLog]
[RedisGlobal]
host=localhost
port=6251
[RedisLog]
db=0
channel=1
zmq_url=tcp://192.168.56.50:50000
#zmq_url=tcp://localhost:9990
zmq_url=tcp://localhost:50000
[RedisMap]
host=localhost
port=6251
db=1
channelProc=CoordToProcess
channelDisp=PicToDisplay
pathMaxMindDB=/home/sami/Downloads/GeoLite2-City_20171003/GeoLite2-City.mmdb
pathMaxMindDB=/home/circl/Downloads/GeoLite2-City_20171003/GeoLite2-City.mmdb
[RedisDB]
host=localhost
port=6250
db=2

View File

@ -16,16 +16,16 @@ cfg.read(configfile)
app = Flask(__name__)
redis_server_log = redis.StrictRedis(
host=cfg.get('RedisLog', 'host'),
port=cfg.getint('RedisLog', 'port'),
host=cfg.get('RedisGlobal', 'host'),
port=cfg.getint('RedisGlobal', 'port'),
db=cfg.getint('RedisLog', 'db'))
redis_server_map = redis.StrictRedis(
host=cfg.get('RedisMap', 'host'),
port=cfg.getint('RedisMap', 'port'),
host=cfg.get('RedisGlobal', 'host'),
port=cfg.getint('RedisGlobal', 'port'),
db=cfg.getint('RedisMap', 'db'))
serv_redis_db = redis.StrictRedis(
host=cfg.get('RedisDB', 'host'),
port=cfg.getint('RedisDB', 'port'),
host=cfg.get('RedisGlobal', 'host'),
port=cfg.getint('RedisGlobal', 'port'),
db=cfg.getint('RedisDB', 'db'))
subscriber_log = redis_server_log.pubsub(ignore_subscribe_messages=True)

View File

@ -10,7 +10,7 @@ for(i=0; i<maxNumPoint; i++) {
class LedManager {
constructor() {
this._feedLedsTimeout = setTimeout(function(){ this.manageColors(); }, feedStatusFreqCheck);
this._feedLedsTimeout = setTimeout(function(){ ledmanager.manageColors(); }, feedStatusFreqCheck);
this._feedLedKeepAlive = {};
this._allFeedName = [];
this._ledNum = 0;

View File

@ -175,8 +175,11 @@ $(function(){
values: [],
min: 0,
max: 10,
scale: ['#CD5C5C','#E34234','#D73B3E','#CE1620','#CC0000','#B22222','#B31B1B','#A40000','#800000','#701C1C','#3C1414','#321414'],
normalizeFunction: 'polynomial'
scale: ['#003FBF','#0063BF','#0087BF','#00ACBF','#00BFAD','#00BF89','#00BF64','#00BF40','#00BF1C','#08BF00','#2CBF00','#51BF00','#75BF00','#99BF00','#BEBF00','#BF9B00','#BF7700','#BF5200','#BF2E00','#BF0900'],
normalizeFunction: 'linear',
legend: {
horizontal: true
}
}]
},
});

View File

@ -25,16 +25,16 @@ CHANNEL_PROC = cfg.get('RedisMap', 'channelProc')
PATH_TO_DB = cfg.get('RedisMap', 'pathMaxMindDB')
serv_log = redis.StrictRedis(
host=cfg.get('RedisLog', 'host'),
port=cfg.getint('RedisLog', 'port'),
host=cfg.get('RedisGlobal', 'host'),
port=cfg.getint('RedisGlobal', 'port'),
db=cfg.getint('RedisLog', 'db'))
serv_coord = redis.StrictRedis(
host=cfg.get('RedisMap', 'host'),
port=cfg.getint('RedisMap', 'port'),
host=cfg.get('RedisGlobal', 'host'),
port=cfg.getint('RedisGlobal', 'port'),
db=cfg.getint('RedisMap', 'db'))
serv_redis_db = redis.StrictRedis(
host=cfg.get('RedisDB', 'host'),
port=cfg.getint('RedisDB', 'port'),
host=cfg.get('RedisGlobal', 'host'),
port=cfg.getint('RedisGlobal', 'port'),
db=cfg.getint('RedisDB', 'db'))
reader = geoip2.database.Reader(PATH_TO_DB)