Skip to content

Commit

Permalink
mend
Browse files Browse the repository at this point in the history
  • Loading branch information
pgigis committed Mar 27, 2019
1 parent ee2fe65 commit 15ab18f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
8 changes: 4 additions & 4 deletions backend/supervisor.d/services.conf
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ stdout_logfile_maxbytes=0

[program:database]
command=/usr/local/bin/python -c "import %(program_name)s; %(program_name)s.run()"
process_name=%(program_name)s
numprocs=1
process_name=%(program_name)s_%(process_num)02d
numprocs=10
directory=/root/core
umask=022
autostart=true
Expand Down Expand Up @@ -109,8 +109,8 @@ stdout_logfile_maxbytes=0

[program:detection]
command=/usr/local/bin/python -c "import %(program_name)s; %(program_name)s.run()"
process_name=%(program_name)s
numprocs=1
process_name=%(program_name)s_%(process_num)02d
numprocs=10
directory=/root/core
umask=022
autostart=false
Expand Down
10 changes: 6 additions & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
version: '3'
services:
backend:
image: inspiregroup/artemis-backend:${SYSTEM_VERSION}
build: backend
#image: inspiregroup/artemis-backend:${SYSTEM_VERSION}
container_name: backend
depends_on:
- rabbitmq
Expand Down Expand Up @@ -32,7 +33,7 @@ services:
HISTORIC: ${HISTORIC}
volumes:
# uncomment to run from source code (only if you build from source)
# - ./backend/:/root/
- ./backend/:/root/
# comment after Step 2 of README
- ./backend/configs/:/etc/artemis/
# uncomment after Step 2 of README
Expand All @@ -42,7 +43,8 @@ services:
# uncomment after Step 2 of README
#- ./local_configs/backend/supervisor.d/:/etc/supervisor/conf.d/
frontend:
image: inspiregroup/artemis-frontend:${SYSTEM_VERSION}
build: frontend
#image: inspiregroup/artemis-frontend:${SYSTEM_VERSION}
container_name: frontend
depends_on:
- rabbitmq
Expand Down Expand Up @@ -78,7 +80,7 @@ services:
SECURITY_PASSWORD_SALT: ${SECURITY_PASSWORD_SALT}
volumes:
# uncomment to run from source code (only if you build from source)
# - ./frontend/:/root/
- ./frontend/:/root/
# comment after Step 2 of README
- ./frontend/webapp/configs/:/etc/artemis/
# uncomment after Step 2 of README
Expand Down
10 changes: 7 additions & 3 deletions frontend/webapp/static/js/custom/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,15 @@ function aggregate_status_of_modules(data, name_to_aggregate, index){ // eslint-
"on": 0,
"total": 0
}

while(data[index].name.includes(name_to_aggregate)){
if(data[index].running){
status['on']++;
}
status['total']++;
index++;
}

if(status['on'] == 0){
return [status['on'], status['total'], "off"];
}else if(status['on'] == status['total']){
Expand All @@ -260,6 +262,7 @@ function aggregate_status_of_modules_no_index(data, name_to_aggregate){ // eslin
"on": 0,
"total": 0
}

for (var index = 0; index < data.length; index++){
while(index < data.length && data[index].name.includes(name_to_aggregate)){
if(data[index].running){
Expand All @@ -269,11 +272,12 @@ function aggregate_status_of_modules_no_index(data, name_to_aggregate){ // eslin
index++;
}
}

if(status['on'] == 0){
return "off";
return [status['on'], status['total'], "off"];
}else if(status['on'] == status['total']){
return status['on'] + "/" + status['total'] + " On";
return [status['on'], status['total'], "on"];
}else{
return status['on'] + "/" + status['total'];
return [status['on'], status['total'], "semi"];
}
}

0 comments on commit 15ab18f

Please sign in to comment.