Skip to content

Commit 92a9d0d

Browse files
authored
Merge pull request #199 from json-scada/master
Version 0.47-alpha
2 parents 82a7ee1 + b1fabbc commit 92a9d0d

13 files changed

+102
-38
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ To provide an easy to use, fully-featured, scalable, and portable SCADA/IIoT-I4.
4848
- MongoDB as the real-time core database, persistence layer, config store, SOE historian.
4949
- Event-based realtime async data processing with MongoDB Change Streams.
5050
- Portability and modular interoperability over Linux, Windows, Mac OSX, x86/64, ARM.
51-
- Windows installer available in the [releases section](https://github.com/riclolsen/json-scada/releases/tag/V0.46-alpha).
51+
- Windows installer available in the [releases section](https://github.com/riclolsen/json-scada/releases/tag/V0.47-alpha).
5252
- Unlimited tags, servers, and users.
5353
- Horizontal scalability, from a single computer to big clusters (MongoDB-sharding), Docker containers, VMs, Kubernetes, cloud, or hybrid deployments.
5454
- Modular distributed architecture. Lightweight redundant data acquisition nodes can connect securely over TLS to the database server. E.g. a Raspberry PI can be a data acquisition node.
@@ -90,7 +90,7 @@ To provide an easy to use, fully-featured, scalable, and portable SCADA/IIoT-I4.
9090
## Documentation
9191

9292
- [Generic Install Guide](https://github.com/riclolsen/json-scada/blob/master/docs/install.md)
93-
- [Windows Installer](https://github.com/riclolsen/json-scada/releases/tag/V0.46-alpha)
93+
- [Windows Installer](https://github.com/riclolsen/json-scada/releases/tag/V0.47-alpha)
9494
- [RedHat/Rocky Linux Installer Script](https://github.com/riclolsen/json-scada/blob/master/docs/install.md#rhel94-and-compatible-systems-automated-installation)
9595
- [Ubuntu Linux Installer Script](https://github.com/riclolsen/json-scada/blob/master/docs/install.md#ubuntu-2404-scripted-installation)
9696
- [Generic Install Guide](https://github.com/riclolsen/json-scada/blob/master/docs/install.md)

index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ To provide an easy to use, fully-featured, scalable, and portable SCADA/IIoT-I4.
4848
- MongoDB as the real-time core database, persistence layer, config store, SOE historian.
4949
- Event-based realtime async data processing with MongoDB Change Streams.
5050
- Portability and modular interoperability over Linux, Windows, Mac OSX, x86/64, ARM.
51-
- Windows installer available in the [releases section](https://github.com/riclolsen/json-scada/releases/tag/V0.46-alpha).
51+
- Windows installer available in the [releases section](https://github.com/riclolsen/json-scada/releases/tag/V0.47-alpha).
5252
- Unlimited tags, servers, and users.
5353
- Horizontal scalability, from a single computer to big clusters (MongoDB-sharding), Docker containers, VMs, Kubernetes, cloud, or hybrid deployments.
5454
- Modular distributed architecture. Lightweight redundant data acquisition nodes can connect securely over TLS to the database server. E.g. a Raspberry PI can be a data acquisition node.
@@ -90,7 +90,7 @@ To provide an easy to use, fully-featured, scalable, and portable SCADA/IIoT-I4.
9090
## Documentation
9191

9292
- [Generic Install Guide](docs/install.md)
93-
- [Windows Installer](https://github.com/riclolsen/json-scada/releases/tag/V0.46-alpha)
93+
- [Windows Installer](https://github.com/riclolsen/json-scada/releases/tag/V0.47-alpha)
9494
- [RedHat/Rocky Linux Installer Script](docs/install.md#rhel94-and-compatible-systems-automated-installation)
9595
- [Ubuntu Linux Installer Script](docs/install.md#ubuntu-2404-scripted-installation)
9696
- [Generic Install Guide](docs/install.md)

platform-windows/json-scada.nsi

+19-18
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ RequestExecutionLevel admin
2020

2121
;--------------------------------
2222

23-
!define VERSION "v.0.46"
24-
!define VERSION_ "0.46.0.0"
23+
!define VERSION "v.0.47"
24+
!define VERSION_ "0.47.0.0"
2525

2626
Function .onInit
2727
System::Call 'keexrnel32::CreateMutexA(p0, i1, t "MutexJsonScadaInstall")?e'
@@ -509,22 +509,23 @@ SetRegView 64
509509
CreateDirectory "$DESKTOP\JSON-SCADA"
510510

511511
; App shortcuts
512-
CreateShortCut "$DESKTOP\JSON-SCADA\_Start_Services.lnk" "$INSTDIR\platform-windows\start_services.bat"
513-
CreateShortCut "$DESKTOP\JSON-SCADA\_Stop_Services.lnk" "$INSTDIR\platform-windows\stop_services.bat"
514-
CreateShortCut "$DESKTOP\JSON-SCADA\Windows Services.lnk" "services.msc"
515-
CreateShortCut "$DESKTOP\JSON-SCADA\_JSON SCADA WEB.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVINDEX $NAVPOSOPT" "$INSTDIR\src\htdocs\images\j-s-256.ico"
516-
CreateShortCut "$DESKTOP\JSON-SCADA\Chromium Browser.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT $NAVPOSOPT"
517-
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Display.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISTEL $NAVPOSOPT" "$INSTDIR\src\htdocs\images\tela.ico"
518-
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Events.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISEVE $NAVPOSOPT" "$INSTDIR\src\htdocs\images\chrono.ico"
519-
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Historical.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISHEV $NAVPOSOPT" "$INSTDIR\src\htdocs\images\calendar.ico"
520-
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Tabular.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISTAB $NAVPOSOPT" "$INSTDIR\src\htdocs\images\tabular.ico"
521-
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Alarms.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISANO $NAVPOSOPT" "$INSTDIR\src\htdocs\images\firstaid.ico"
522-
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Grafana.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVGRAFAN $NAVPOSOPT" "$INSTDIR\src\htdocs\images\grafana.ico"
523-
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Metabase.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVMETABA $NAVPOSOPT" "$INSTDIR\src\htdocs\images\metabase.ico"
524-
CreateShortCut "$DESKTOP\JSON-SCADA\Excel Config Spreadsheet.lnk" "$INSTDIR\conf\json-scada-config.xlsm"
525-
CreateShortCut "$DESKTOP\JSON-SCADA\Compass (Mongodb GUI Client).lnk" "$INSTDIR\platform-windows\mongodb-compass-runtime\MongoDBCompass.exe"
526-
CreateShortCut "$DESKTOP\JSON-SCADA\Inkscape SAGE (SVG Editor).lnk" "$INSTDIR\platform-windows\inkscape-runtime\bin\inkscape.exe"
527-
CreateShortCut "$DESKTOP\JSON-SCADA\Uninstall.lnk" "$INSTDIR\bt-uninst.exe"
512+
CreateShortCut "$DESKTOP\JSON-SCADA\_Start_Services.lnk" "$INSTDIR\platform-windows\start_services.bat"
513+
CreateShortCut "$DESKTOP\JSON-SCADA\_Stop_Services.lnk" "$INSTDIR\platform-windows\stop_services.bat"
514+
CreateShortCut "$DESKTOP\JSON-SCADA\Windows Services.lnk" "services.msc"
515+
CreateShortCut "$DESKTOP\JSON-SCADA\_JSON SCADA WEB.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVINDEX $NAVPOSOPT" "$INSTDIR\src\htdocs\images\j-s-256.ico"
516+
CreateShortCut "$DESKTOP\JSON-SCADA\Chromium Browser.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT $NAVPOSOPT"
517+
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Display.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISTEL $NAVPOSOPT" "$INSTDIR\src\htdocs\images\tela.ico"
518+
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Events.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISEVE $NAVPOSOPT" "$INSTDIR\src\htdocs\images\chrono.ico"
519+
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Historical.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISHEV $NAVPOSOPT" "$INSTDIR\src\htdocs\images\calendar.ico"
520+
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Tabular.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISTAB $NAVPOSOPT" "$INSTDIR\src\htdocs\images\tabular.ico"
521+
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Alarms.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISANO $NAVPOSOPT" "$INSTDIR\src\htdocs\images\firstaid.ico"
522+
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Grafana.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVGRAFAN $NAVPOSOPT" "$INSTDIR\src\htdocs\images\grafana.ico"
523+
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Metabase.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVMETABA $NAVPOSOPT" "$INSTDIR\src\htdocs\images\metabase.ico"
524+
CreateShortCut "$DESKTOP\JSON-SCADA\Excel Config Spreadsheet.lnk" "$INSTDIR\conf\json-scada-config.xlsm"
525+
CreateShortCut "$DESKTOP\JSON-SCADA\Compass (Mongodb GUI Client).lnk" "$INSTDIR\platform-windows\mongodb-compass-runtime\MongoDBCompass.exe"
526+
CreateShortCut "$DESKTOP\JSON-SCADA\pgAdmin4 (Postgres GUI Client).lnk" "$INSTDIR\platform-windows\postgresql-runtime\pgAdmin 4\runtime\pgAdmin4.exe"
527+
CreateShortCut "$DESKTOP\JSON-SCADA\Inkscape SAGE (SVG Editor).lnk" "$INSTDIR\platform-windows\inkscape-runtime\bin\inkscape.exe"
528+
CreateShortCut "$DESKTOP\JSON-SCADA\Uninstall.lnk" "$INSTDIR\bt-uninst.exe"
528529

529530

530531
; clear chromium cache

platform-windows/mongodb-conf/mongod.cfg

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
net:
2-
bindIp: 0.0.0.0
2+
bindIp: 127.0.0.1 # Enter 0.0.0.0,:: to bind to all IPv4 and IPv6 addresses
33
port: 27017
4+
45
# ssl:
56
# mode: requireSSL
67
# PEMKeyFile: c:\json-scada\conf\mongodb.pem
78
# CAFile: c:\json-scada\conf\rootCa.pem
89

10+
# Where and how to store data. Add more memory if you have more than 4GB of RAM.
911
storage:
1012
dbPath: c:\json-scada\platform-windows\mongodb-data
13+
wiredTiger:
14+
engineConfig:
15+
cacheSizeGB: 1.5
1116

1217
# REPLICA IS REQUIRED FOR JSON-SCADA
1318
replication:

platform-windows/release_notes.txt

+25
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,31 @@ Inkscape+SAGE:
135135

136136
-------------------------------------------------------------------
137137

138+
Notes for version 0.47:
139+
140+
* cs_data_processor: fixes and improvements.
141+
* PostgreSQL updated to 17.2.
142+
* TimescaleDB updated to 2.17.2.
143+
144+
To quickly run the system after installed, open the JSON-SCADA desktop folder and:
145+
146+
* On the JSON-SCADA desktop folder: execute "_Start_Services".
147+
* On the JSON-SCADA desktop folder: execute "_JSON SCADA WEB".
148+
* Default login credentials: username=admin password=jsonscada.
149+
* Metabase credentials: [email protected] password=jsonscada123.
150+
151+
Requirements and recommendations:
152+
153+
* Windows 10/11 64 bits or Server >=2019, Windows PowerShell. At least 20GB of free space in the "C:" drive.
154+
* Administrative rights. Corporate Windows policies may cause problems with the creation of services and the opening of TCP ports.
155+
* Free TCP ports 6688, 6689, 27017, 5432, 80, 8080, 3000, 3001, 9000. Other ports may be required for optional services and protocols.
156+
* If the server already has MongoDB, PostgreSQL, Grafana, Metabase, Nginx or another webserver, please uninstall, disable or watch out for possible conflicts.
157+
* Do not update previously installed JSON-SCADA. Please uninstall previous JSON-SCADA versions before installing a new version.
158+
* If using VirtualBox configure "paravirtualization interface"=KVM, otherwise Nodejs errors may occur.
159+
* MongoDB requires AVX instructions on x86 CPU.
160+
161+
-------------------------------------------------------------------
162+
138163
Notes for version 0.46:
139164

140165
* NPM packages updated.

src/AdminUI/public/config_viewers_default.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ var TabularViewer_Font = 'Segoe UI,Source Sans Pro,calibri,consolas,arial,helvet
5959

6060
var TabularViewer_GridColor = '#BBBBBB'; // table grid color
6161

62-
var TabularViewer_AlmTxtColor = 'rgb(37, 132, 211)'; // alarmed color
62+
var TabularViewer_AlmTxtColor = 'rgb(164, 128, 206)'; // alarmed color
6363
var TabularViewer_FailTxtColor = '#AAAAAA'; // failed value color
64-
var TabularViewer_AckTxtColor = 'rgb(17, 91, 151)'; // acknowledged alarm color
64+
var TabularViewer_AckTxtColor = 'rgb(40, 130, 136)'; // acknowledged alarm color
6565

6666
var TabularViewer_RefreshTime = 3; // refresh time (seconds)
6767

src/AdminUI/public/i18n/messages_i18n-en_us.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
var Msg =
55
{
66
NomeProduto: '{json:scada}',
7-
VersaoProduto: '0.46',
7+
VersaoProduto: '0.47',
88

99
NomeVisorTelas: 'Display Viewer',
1010
NomeVisorEventos: 'Events Viewer',

src/AdminUI/public/i18n/messages_i18n-pt_br.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
var Msg =
55
{
66
NomeProduto: '{json:scada}',
7-
VersaoProduto: '0.46',
7+
VersaoProduto: '0.47',
88

99
NomeVisorTelas: 'Visor de Telas',
1010
NomeVisorEventos: 'Visor de Eventos',

src/AdminUI/public/i18n/messages_i18n-uk_ua.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
var Msg =
55
{
66
NomeProduto: '{json:scada}',
7-
VersaoProduto: '0.46',
7+
VersaoProduto: '0.47',
88

99
NomeVisorTelas: 'Перегляд ',
1010
NomeVisorEventos: 'Події',

src/AdminUI/public/i18n/messages_i18n.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
var Msg =
55
{
66
NomeProduto: '{json:scada}',
7-
VersaoProduto: '0.46',
7+
VersaoProduto: '0.47',
88

99
NomeVisorTelas: 'Display Viewer',
1010
NomeVisorEventos: 'Events Viewer',

src/AdminUI/public/release_notes.txt

+25
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,31 @@ Inkscape+SAGE:
135135

136136
-------------------------------------------------------------------
137137

138+
Notes for version 0.47:
139+
140+
* cs_data_processor: fixes and improvements.
141+
* PostgreSQL updated to 17.2.
142+
* TimescaleDB updated to 2.17.2.
143+
144+
To quickly run the system after installed, open the JSON-SCADA desktop folder and:
145+
146+
* On the JSON-SCADA desktop folder: execute "_Start_Services".
147+
* On the JSON-SCADA desktop folder: execute "_JSON SCADA WEB".
148+
* Default login credentials: username=admin password=jsonscada.
149+
* Metabase credentials: [email protected] password=jsonscada123.
150+
151+
Requirements and recommendations:
152+
153+
* Windows 10/11 64 bits or Server >=2019, Windows PowerShell. At least 20GB of free space in the "C:" drive.
154+
* Administrative rights. Corporate Windows policies may cause problems with the creation of services and the opening of TCP ports.
155+
* Free TCP ports 6688, 6689, 27017, 5432, 80, 8080, 3000, 3001, 9000. Other ports may be required for optional services and protocols.
156+
* If the server already has MongoDB, PostgreSQL, Grafana, Metabase, Nginx or another webserver, please uninstall, disable or watch out for possible conflicts.
157+
* Do not update previously installed JSON-SCADA. Please uninstall previous JSON-SCADA versions before installing a new version.
158+
* If using VirtualBox configure "paravirtualization interface"=KVM, otherwise Nodejs errors may occur.
159+
* MongoDB requires AVX instructions on x86 CPU.
160+
161+
-------------------------------------------------------------------
162+
138163
Notes for version 0.46:
139164

140165
* NPM packages updated.

src/AdminUI/src/App.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
import { useRouter } from 'vue-router'
120120
import { STORAGE_KEY } from './i18n'
121121
122-
const version = ref('v0.46-alpha')
122+
const version = ref('v0.47-alpha')
123123
const router = useRouter()
124124
const theme = ref('dark')
125125
const vuetifyTheme = useTheme()

src/cs_data_processor/cs_data_processor.js

+16-8
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,21 @@ const pipeline = [
10941094
b2 = '0', // reserved
10951095
b1 = '0', // reserved
10961096
b0 = '0' // reserved
1097+
let vj =
1098+
valueJson === ''
1099+
? '""'
1100+
: valueJson.trim().replaceAll("'", "''")
1101+
let trimS = ''
1102+
if (vj.length > 0) {
1103+
if (vj.charAt(0) === '{' || vj.charAt(0) === '[')
1104+
trimS = '"'
1105+
else if (isNaN(vj) && vj.charAt(0) !== '"')
1106+
vj = '"' + vj + '"'
1107+
}
1108+
const vs =
1109+
valueString === ''
1110+
? ''
1111+
: valueString.replaceAll("'", "''")
10971112
sqlHistQueue.enqueue({
10981113
sql:
10991114
"'" +
@@ -1103,14 +1118,7 @@ const pipeline = [
11031118
change.updateDescription.updatedFields.sourceDataUpdate.timeTag.toISOString() +
11041119
"'," +
11051120
value +
1106-
',to_json(' +
1107-
"'{" +
1108-
'"v": ' +
1109-
JSON.stringify(valueJson).replaceAll("'", "''") +
1110-
',' +
1111-
'"s": "' +
1112-
valueString.replaceAll("'", "''") +
1113-
'"}\'::text),' +
1121+
`,('{"v":'||trim('${trimS}' FROM to_json('${vj}'::text)::jsonb #>> '{}')||',"s":'||to_json('${vs}'::text)||'}'::text)::jsonb,` +
11141122
(update.timeTagAtSource !== null
11151123
? "'" +
11161124
change.updateDescription.updatedFields.sourceDataUpdate.timeTagAtSource.toISOString() +

0 commit comments

Comments
 (0)