Commit 486e1cad authored by Giorgos Korfiatis's avatar Giorgos Korfiatis

Remove duplicate status definitions

parent b53e71cf
......@@ -40,6 +40,7 @@ def extra_datas(prefix, path):
a.datas += extra_datas(os.path.join(HERE, 'agkyra'), os.path.join('resources', 'nwjs'))
a.datas += extra_datas(os.path.join(HERE, 'agkyra'), os.path.join('resources', 'nwgui'))
a.datas += extra_datas(os.path.join(HERE, 'agkyra'), os.path.join('resources', 'ui_data'))
a.datas += extra_datas(os.path.join(HERE, 'agkyra'), os.path.join('resources', 'main.json'))
a.datas += extra_datas(os.path.join(HERE, 'agkyra'), os.path.join('resources', 'cacert.pem'))
a.datas += extra_datas(os.path.join(HERE, 'agkyra'), os.path.join('resources', 'defaults.conf'))
......
......@@ -46,7 +46,11 @@ SYNCERS = utils.ThreadSafeDict()
with open(os.path.join(RESOURCES, 'ui_data/common_en.json')) as f:
COMMON = json.load(f)
STATUS = COMMON['STATUS']
with open(os.path.join(RESOURCES, 'main.json')) as f:
MAINSETTINGS = json.load(f)
STATUS = MAINSETTINGS['STATUS']
class SessionDB(database.DB):
......
{
"STATUS": {
"UNINITIALIZED": 0,
"INITIALIZING": 1,
"SHUTTING DOWN": 2,
"SETTINGS READY": 5,
"READY": 10,
"SYNCING": 100,
"PAUSING": 101,
"PAUSED": 102,
"SETTINGS MISSING": 200,
"AUTH URL ERROR": 201,
"TOKEN ERROR": 202,
"DIRECTORY ERROR": 203,
"CONTAINER ERROR": 204,
"CRITICAL ERROR": 1000
}
}
......@@ -30,7 +30,8 @@ function load_common(lang) {
return JSON.parse(fs.readFileSync(path.join('..', 'ui_data', common_path)));
}
var COMMON = load_common();
var STATUS = COMMON.STATUS;
var MAINSETTINGS = JSON.parse(fs.readFileSync(path.join('..', 'main.json')));
var STATUS = MAINSETTINGS.STATUS;
var globals = {
settings: {
......
{
"STATUS": {
"UNINITIALIZED": 0,
"INITIALIZING": 1,
"SHUTTING DOWN": 2,
"SETTINGS READY": 5,
"READY": 10,
"SYNCING": 100,
"PAUSING": 101,
"PAUSED": 102,
"SETTINGS MISSING": 200,
"AUTH URL ERROR": 201,
"TOKEN ERROR": 202,
"DIRECTORY ERROR": 203,
"CONTAINER ERROR": 204,
"CRITICAL ERROR": 1000
},
"NOTIFICATION": {
"0": "Ανενεργό",
"1": "Εκκίνηση ...",
......
{
"STATUS": {
"UNINITIALIZED": 0,
"INITIALIZING": 1,
"SHUTTING DOWN": 2,
"SETTINGS READY": 5,
"READY": 10,
"SYNCING": 100,
"PAUSING": 101,
"PAUSED": 102,
"SETTINGS MISSING": 200,
"AUTH URL ERROR": 201,
"TOKEN ERROR": 202,
"DIRECTORY ERROR": 203,
"CONTAINER ERROR": 204,
"CRITICAL ERROR": 1000
},
"NOTIFICATION": {
"0": "Not initialized",
"1": "Initializing ...",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment