Skip to content

Commit 7816595

Browse files
author
Ricardo Olsen
committed
Version 6.1.
1 parent b403d2e commit 7816595

File tree

20 files changed

+2288
-269
lines changed

20 files changed

+2288
-269
lines changed

conf_templates/hmi.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ LOGS_VIEWER="c:\oshmi\browser\chrome --user-data-dir=c:\oshmi\browser-data --bop
7777
; periodo de envio em segundos de acerto de hora ao outro IHM como keep-alive (0=não envia)
7878
;SEND_TIME_PERIOD=5
7979

80+
; Port for event and annotation synchronization
81+
; Default: 51909
82+
;HTTP_PORT=51909
83+
8084
;---------------------------------------------------------------------------------------------------
8185
[BDTR]
8286
; Configuration options for QTester104
104 Bytes
Binary file not shown.

htdocs/websage.js

100644100755
Lines changed: 51 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -163,21 +163,25 @@ function Animate( elem, animtype, params )
163163
}
164164
}
165165

166-
function ShowHideTranslate( id, xd, yd )
166+
function ShowHideTranslate( idorobj, xd, yd )
167167
{
168168
var obj, svgdoc;
169169

170170
xd=xd||0;
171171
yd=yd||0;
172172

173-
svgdoc = document.getElementById("svgdiv").children[0];
173+
svgdoc = document.getElementById("svgdiv").firstElementChild;
174174

175175
if ( svgdoc === null )
176176
{
177177
return;
178178
}
179179

180-
obj = svgdoc.getElementById( id );
180+
if (typeof idorobj === "object")
181+
obj = idorobj;
182+
else
183+
obj = svgdoc.getElementById( idorobj );
184+
181185
if ( obj === null )
182186
{
183187
return;
@@ -624,11 +628,14 @@ acrescentaPontoLista : function( tag )
624628
{
625629
tag = tag.trim();
626630

631+
if( tag.indexOf('#') === 0 || tag.indexOf('%') === 0 || tag == "")
632+
return 0;
633+
627634
/*
628635
if ( tag.indexOf('ALM') === 0 ||
629636
tag.indexOf('TMP') === 0 )
630637
{
631-
tag = tag.substr( 3 );
638+
tag = tag.substr( 3 ).trim();
632639
}
633640
else
634641
*/
@@ -639,20 +646,20 @@ if ( tag.indexOf('!ALM') === 0 ||
639646
tag.indexOf('!TAG') === 0 ||
640647
tag.indexOf('!DCR') === 0 )
641648
{
642-
tag = tag.substr( 4 );
649+
tag = tag.substr( 4 ).trim();
643650
}
644651
else
645652
if ( tag.indexOf('!SLIM') === 0 ||
646653
tag.indexOf('!ILIM') === 0 ||
647654
tag.indexOf('!STON') === 0 )
648655
{
649-
tag = tag.substr( 5 );
656+
tag = tag.substr( 5 ).trim();
650657
}
651658
else
652659
if ( tag.indexOf('!STOFF') === 0 ||
653660
tag.indexOf('!STVAL') === 0 )
654661
{
655-
tag = tag.substr( 6 );
662+
tag = tag.substr( 6 ).trim();
656663
}
657664

658665
if ( isNaN( parseInt(tag) ) )
@@ -663,13 +670,8 @@ if ( isNaN( parseInt(tag) ) )
663670
}
664671
else
665672
{
666-
var code = tag.charCodeAt(0);
667-
if ( ((code >= 65) && (code <= 90)) || ((code >= 97) && (code <= 122)) )
668-
{
669-
// it is a letter: ok it can be a id
670-
}
671-
else
672-
return 0; // it can't be an id
673+
if ( tag.indexOf('!') === 0) // must not begin with a '!' or '#'
674+
return 0;
673675
}
674676
}
675677

@@ -1508,7 +1510,7 @@ valorTagueado: function ( tag, obj )
15081510
t = NPTS[t];
15091511
if ( typeof( TAGS[t] ) === 'undefined' )
15101512
{
1511-
return 0;
1513+
return "";
15121514
}
15131515
return TAGS[t];
15141516
}
@@ -1520,7 +1522,7 @@ valorTagueado: function ( tag, obj )
15201522
t = NPTS[t];
15211523
if ( typeof( DCRS[t] ) === 'undefined' )
15221524
{
1523-
return 0;
1525+
return "";
15241526
}
15251527
return DCRS[t];
15261528
}
@@ -1566,11 +1568,11 @@ valorTagueado: function ( tag, obj )
15661568
}
15671569
if ( (f & 0x03) === 0x00 )
15681570
{
1569-
return WebSAGE.g_retnok;
1571+
return "";
15701572
}
15711573
if ( (f & 0x03) === 0x03 )
15721574
{
1573-
return WebSAGE.g_retnok;
1575+
return "";
15741576
}
15751577
}
15761578

@@ -2159,7 +2161,13 @@ if ( typeof( inksage_labeltxt ) != 'undefined' )
21592161
case "#exec": // exec a script one time
21602162
try
21612163
{
2162-
eval( 'var thisobj=window.SVGDoc.getElementById("' + item.id + '"); ' + inksage_labelvec[lbv].src );
2164+
function evalprot(src)
2165+
{
2166+
// create a context to protect some vars from being changed by the eval code
2167+
var lbv = null;
2168+
return eval(src);
2169+
}
2170+
evalprot('var thisobj=document.getElementById("' + item.id + '"); ' + inksage_labelvec[lbv].src );
21632171
}
21642172
catch( err )
21652173
{
@@ -2893,7 +2901,13 @@ var mudou_dig = WebSAGE.g_sha1ant_dig=='' || WebSAGE.g_sha1ant_dig!=Sha1Dig;
28932901
case "#exec_on_update": // exec a script every time data changed
28942902
try
28952903
{
2896-
eval( 'var thisobj=window.SVGDoc.getElementById("' + WebSAGE.InkSage[i].parent.id + '"); ' + WebSAGE.InkSage[i].src );
2904+
function evalprot(src)
2905+
{
2906+
// create a context to protect some vars from being changed by the eval code
2907+
var i, j, val, vt, mudou_dig, mudou_ana = null;
2908+
return eval(src);
2909+
}
2910+
evalprot( 'var thisobj=document.getElementById("' + WebSAGE.InkSage[i].parent.id + '"); ' + WebSAGE.InkSage[i].src );
28972911
}
28982912
catch( err )
28992913
{
@@ -3206,7 +3220,15 @@ var mudou_dig = WebSAGE.g_sha1ant_dig=='' || WebSAGE.g_sha1ant_dig!=Sha1Dig;
32063220
WebSAGE.InkSage[i].parent.style.stroke = WebSAGE.InkSage[i].initstroke;
32073221
try
32083222
{
3209-
eval( 'var thisobj=window.SVGDoc.getElementById("' + WebSAGE.InkSage[i].parent.id + '"); ' + script );
3223+
function evalprot(src, iloop)
3224+
{
3225+
// create a context to protect some vars from being changed by the eval code
3226+
var i = iloop;
3227+
var j, val, vt, mudou_dig, mudou_ana = null;
3228+
var script, ch, fill, stroke, attrib, attribval, tag = null;
3229+
return eval(src);
3230+
}
3231+
evalprot( 'var thisobj=window.SVGDoc.getElementById("' + WebSAGE.InkSage[i].parent.id + '"); ' + script, i );
32103232
}
32113233
catch ( err )
32123234
{
@@ -3315,7 +3337,14 @@ var mudou_dig = WebSAGE.g_sha1ant_dig=='' || WebSAGE.g_sha1ant_dig!=Sha1Dig;
33153337
}
33163338
if ( pini !== -1 )
33173339
{
3318-
ev = eval( tc.substring( pini + 5 , pend ) );
3340+
function evalprot(src)
3341+
{
3342+
// create a context to protect some vars from being changed by the eval code
3343+
var i, j, val, vt, mudou_dig, mudou_ana = null;
3344+
var pini, pend, ev, tc = null;
3345+
return eval(src);
3346+
}
3347+
ev = evalprot( tc.substring( pini + 5 , pend ) );
33193348
if ( Number( ev ) !== NaN )
33203349
{
33213350
ev = printf( "%1.3f", ev );

i18n/messages_i18n-en_us.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ WNDTITCT2="Select network printer"
7272
WNDTITCT3="Favorites Manager"
7373
WNDTITCT4="Developer Tools"
7474
WNDTITCT5="view-source:"
75+
WNDTITCT6="DevTools -"
7576

7677
[EVENTS]
7778
IEC_DP_TRANSIT="TRANSIT"

i18n/messages_i18n-en_us.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
var Msg =
55
{
66
NomeProduto: 'OSHMI',
7-
VersaoProduto: '6.0',
7+
VersaoProduto: '6.1',
88

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

i18n/messages_i18n-pt_br.ini

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ BUTTON_EXIT="Op
1212

1313
BUTTON_VIS_SCR_HINT="Lista de Telas"
1414
BUTTON_VIS_SOE_HINT="Visor de Eventos"
15-
BUTTON_VIS_HISTSOE_HINT="Visor de Eventos Histórico"
15+
BUTTON_VIS_HISTSOE_HINT="Visor de Eventos Hist�rico"
1616
BUTTON_VIS_TAB_HINT="Visor Tabular"
1717
BUTTON_VIS_ANORM_HINT="Visor de Alarmes"
1818
BUTTON_VIS_CURV_HINT="Visor de Curvas"
@@ -60,7 +60,7 @@ WNDTITEQ17="Chrome Help"
6060
WNDTITEQ18="Chrome Ajuda"
6161
WNDTITEQ19="Carregando..."
6262
WNDTITEQ20="Downloads - Chromium"
63-
WNDTITEQ21="Preferências de Impressão"
63+
WNDTITEQ21="Preferências de Impressãoo"
6464
WNDTITEQ22="Ajuda e Suporte do Windows"
6565
WNDTITEQ23="Salvar arquivo como"
6666
WNDTITEQ24="Configurações"
@@ -74,6 +74,7 @@ WNDTITCT2="Selecione a impressora de rede"
7474
WNDTITCT3="Gerenciador de favoritos"
7575
WNDTITCT4="Developer Tools"
7676
WNDTITCT5="view-source:"
77+
WNDTITCT6="DevTools -"
7778

7879
[EVENTS]
7980
IEC_DP_TRANSIT="INDETERMINADO"

i18n/messages_i18n-pt_br.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
var Msg =
55
{
66
NomeProduto: 'OSHMI',
7-
VersaoProduto: '6.0',
7+
VersaoProduto: '6.1',
88

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

i18n/messages_i18n.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
var Msg =
55
{
66
NomeProduto: 'OSHMI',
7-
VersaoProduto: '6.0',
7+
VersaoProduto: '6.1',
88

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

installer/oshmi.nsi

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ RequestExecutionLevel user
1111

1212
;--------------------------------
1313

14-
!define VERSION "v.6.0"
15-
!define VERSION_ "6.0.0.0"
14+
!define VERSION "v.6.1"
15+
!define VERSION_ "6.1.0.0"
1616

1717
Function .onInit
1818
System::Call 'keexrnel32::CreateMutexA(i 0, i 0, t "MutexOshmiInstall") i .r1 ?e'
@@ -196,7 +196,12 @@ Section "" ; empty string makes it hidden, so would starting with -
196196
CreateDirectory "$INSTDIR\fonts"
197197
CreateDirectory "$INSTDIR\linux"
198198
CreateDirectory "$INSTDIR\linux\nginx"
199-
CreateDirectory "$INSTDIR\linux\nginx\sites-available"
199+
CreateDirectory "$INSTDIR\linux\nginx\conf"
200+
CreateDirectory "$INSTDIR\linux\nginx\conf\sites-available"
201+
CreateDirectory "$INSTDIR\linux\php"
202+
CreateDirectory "$INSTDIR\linux\php\7.2"
203+
CreateDirectory "$INSTDIR\linux\php\7.2\fpm"
204+
200205
CreateDirectory "$INSTDIR\logs"
201206
CreateDirectory "$INSTDIR\nginx_php"
202207
CreateDirectory "$INSTDIR\scripts"
@@ -235,8 +240,12 @@ Section "" ; empty string makes it hidden, so would starting with -
235240
SetOutPath $INSTDIR\linux
236241
File /a "..\linux\*.*"
237242
File /a "..\linux\QTester104"
238-
SetOutPath $INSTDIR\linux\nginx\sites-available
239-
File /a "..\linux\nginx\sites-available\default"
243+
SetOutPath $INSTDIR\linux\nginx\conf
244+
File /a "..\linux\nginx\conf\nginx.conf"
245+
SetOutPath $INSTDIR\linux\nginx\conf\sites-available
246+
File /a "..\linux\nginx\conf\sites-available\default"
247+
SetOutPath $INSTDIR\linux\php\7.2\fpm
248+
File /a "..\linux\php\7.2\fpm\php.ini"
240249

241250
SetOutPath $INSTDIR\db\db_cold
242251
File /a "..\db\db_cold\*.*"

installer/release_notes.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,22 @@ Inkscape+SAGE:
174174

175175
-------------------------------------------------------------------
176176

177+
Notes for version 6.1:
178+
179+
Webserver:
180+
- Configurable HTTP port for event and annotation synchronization in redundant mode.
181+
182+
Screen Viewer:
183+
- Protection of local variables when executing scripts in the SVG file.
184+
185+
SQLite:
186+
- Updated to version 3.27.2.
187+
188+
Linux:
189+
- Updated config files for Nginx and PHP.
190+
191+
-------------------------------------------------------------------
192+
177193
Notes for version 6.0:
178194

179195
This release introduces many performance optimizations under the hood.

0 commit comments

Comments
 (0)