Skip to content

Commit

Permalink
Version 6.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Olsen committed Mar 1, 2019
1 parent b403d2e commit 7816595
Show file tree
Hide file tree
Showing 20 changed files with 2,288 additions and 269 deletions.
4 changes: 4 additions & 0 deletions conf_templates/hmi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ LOGS_VIEWER="c:\oshmi\browser\chrome --user-data-dir=c:\oshmi\browser-data --bop
; periodo de envio em segundos de acerto de hora ao outro IHM como keep-alive (0=não envia)
;SEND_TIME_PERIOD=5

; Port for event and annotation synchronization
; Default: 51909
;HTTP_PORT=51909

;---------------------------------------------------------------------------------------------------
[BDTR]
; Configuration options for QTester104
Expand Down
Binary file modified docs/oshmi_configuration_manual-en_us.odt
Binary file not shown.
73 changes: 51 additions & 22 deletions htdocs/websage.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -163,21 +163,25 @@ function Animate( elem, animtype, params )
}
}

function ShowHideTranslate( id, xd, yd )
function ShowHideTranslate( idorobj, xd, yd )
{
var obj, svgdoc;

xd=xd||0;
yd=yd||0;

svgdoc = document.getElementById("svgdiv").children[0];
svgdoc = document.getElementById("svgdiv").firstElementChild;

if ( svgdoc === null )
{
return;
}

obj = svgdoc.getElementById( id );
if (typeof idorobj === "object")
obj = idorobj;
else
obj = svgdoc.getElementById( idorobj );

if ( obj === null )
{
return;
Expand Down Expand Up @@ -624,11 +628,14 @@ acrescentaPontoLista : function( tag )
{
tag = tag.trim();

if( tag.indexOf('#') === 0 || tag.indexOf('%') === 0 || tag == "")
return 0;

/*
if ( tag.indexOf('ALM') === 0 ||
tag.indexOf('TMP') === 0 )
{
tag = tag.substr( 3 );
tag = tag.substr( 3 ).trim();
}
else
*/
Expand All @@ -639,20 +646,20 @@ if ( tag.indexOf('!ALM') === 0 ||
tag.indexOf('!TAG') === 0 ||
tag.indexOf('!DCR') === 0 )
{
tag = tag.substr( 4 );
tag = tag.substr( 4 ).trim();
}
else
if ( tag.indexOf('!SLIM') === 0 ||
tag.indexOf('!ILIM') === 0 ||
tag.indexOf('!STON') === 0 )
{
tag = tag.substr( 5 );
tag = tag.substr( 5 ).trim();
}
else
if ( tag.indexOf('!STOFF') === 0 ||
tag.indexOf('!STVAL') === 0 )
{
tag = tag.substr( 6 );
tag = tag.substr( 6 ).trim();
}

if ( isNaN( parseInt(tag) ) )
Expand All @@ -663,13 +670,8 @@ if ( isNaN( parseInt(tag) ) )
}
else
{
var code = tag.charCodeAt(0);
if ( ((code >= 65) && (code <= 90)) || ((code >= 97) && (code <= 122)) )
{
// it is a letter: ok it can be a id
}
else
return 0; // it can't be an id
if ( tag.indexOf('!') === 0) // must not begin with a '!' or '#'
return 0;
}
}

Expand Down Expand Up @@ -1508,7 +1510,7 @@ valorTagueado: function ( tag, obj )
t = NPTS[t];
if ( typeof( TAGS[t] ) === 'undefined' )
{
return 0;
return "";
}
return TAGS[t];
}
Expand All @@ -1520,7 +1522,7 @@ valorTagueado: function ( tag, obj )
t = NPTS[t];
if ( typeof( DCRS[t] ) === 'undefined' )
{
return 0;
return "";
}
return DCRS[t];
}
Expand Down Expand Up @@ -1566,11 +1568,11 @@ valorTagueado: function ( tag, obj )
}
if ( (f & 0x03) === 0x00 )
{
return WebSAGE.g_retnok;
return "";
}
if ( (f & 0x03) === 0x03 )
{
return WebSAGE.g_retnok;
return "";
}
}

Expand Down Expand Up @@ -2159,7 +2161,13 @@ if ( typeof( inksage_labeltxt ) != 'undefined' )
case "#exec": // exec a script one time
try
{
eval( 'var thisobj=window.SVGDoc.getElementById("' + item.id + '"); ' + inksage_labelvec[lbv].src );
function evalprot(src)
{
// create a context to protect some vars from being changed by the eval code
var lbv = null;
return eval(src);
}
evalprot('var thisobj=document.getElementById("' + item.id + '"); ' + inksage_labelvec[lbv].src );
}
catch( err )
{
Expand Down Expand Up @@ -2893,7 +2901,13 @@ var mudou_dig = WebSAGE.g_sha1ant_dig=='' || WebSAGE.g_sha1ant_dig!=Sha1Dig;
case "#exec_on_update": // exec a script every time data changed
try
{
eval( 'var thisobj=window.SVGDoc.getElementById("' + WebSAGE.InkSage[i].parent.id + '"); ' + WebSAGE.InkSage[i].src );
function evalprot(src)
{
// create a context to protect some vars from being changed by the eval code
var i, j, val, vt, mudou_dig, mudou_ana = null;
return eval(src);
}
evalprot( 'var thisobj=document.getElementById("' + WebSAGE.InkSage[i].parent.id + '"); ' + WebSAGE.InkSage[i].src );
}
catch( err )
{
Expand Down Expand Up @@ -3206,7 +3220,15 @@ var mudou_dig = WebSAGE.g_sha1ant_dig=='' || WebSAGE.g_sha1ant_dig!=Sha1Dig;
WebSAGE.InkSage[i].parent.style.stroke = WebSAGE.InkSage[i].initstroke;
try
{
eval( 'var thisobj=window.SVGDoc.getElementById("' + WebSAGE.InkSage[i].parent.id + '"); ' + script );
function evalprot(src, iloop)
{
// create a context to protect some vars from being changed by the eval code
var i = iloop;
var j, val, vt, mudou_dig, mudou_ana = null;
var script, ch, fill, stroke, attrib, attribval, tag = null;
return eval(src);
}
evalprot( 'var thisobj=window.SVGDoc.getElementById("' + WebSAGE.InkSage[i].parent.id + '"); ' + script, i );
}
catch ( err )
{
Expand Down Expand Up @@ -3315,7 +3337,14 @@ var mudou_dig = WebSAGE.g_sha1ant_dig=='' || WebSAGE.g_sha1ant_dig!=Sha1Dig;
}
if ( pini !== -1 )
{
ev = eval( tc.substring( pini + 5 , pend ) );
function evalprot(src)
{
// create a context to protect some vars from being changed by the eval code
var i, j, val, vt, mudou_dig, mudou_ana = null;
var pini, pend, ev, tc = null;
return eval(src);
}
ev = evalprot( tc.substring( pini + 5 , pend ) );
if ( Number( ev ) !== NaN )
{
ev = printf( "%1.3f", ev );
Expand Down
1 change: 1 addition & 0 deletions i18n/messages_i18n-en_us.ini
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ WNDTITCT2="Select network printer"
WNDTITCT3="Favorites Manager"
WNDTITCT4="Developer Tools"
WNDTITCT5="view-source:"
WNDTITCT6="DevTools -"

[EVENTS]
IEC_DP_TRANSIT="TRANSIT"
Expand Down
2 changes: 1 addition & 1 deletion i18n/messages_i18n-en_us.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var Msg =
{
NomeProduto: 'OSHMI',
VersaoProduto: '6.0',
VersaoProduto: '6.1',

NomeVisorTelas: 'Screen Viewer',
NomeVisorEventos: 'Events Viewer',
Expand Down
5 changes: 3 additions & 2 deletions i18n/messages_i18n-pt_br.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BUTTON_EXIT="Op

BUTTON_VIS_SCR_HINT="Lista de Telas"
BUTTON_VIS_SOE_HINT="Visor de Eventos"
BUTTON_VIS_HISTSOE_HINT="Visor de Eventos Histórico"
BUTTON_VIS_HISTSOE_HINT="Visor de Eventos Hist�rico"
BUTTON_VIS_TAB_HINT="Visor Tabular"
BUTTON_VIS_ANORM_HINT="Visor de Alarmes"
BUTTON_VIS_CURV_HINT="Visor de Curvas"
Expand Down Expand Up @@ -60,7 +60,7 @@ WNDTITEQ17="Chrome Help"
WNDTITEQ18="Chrome Ajuda"
WNDTITEQ19="Carregando..."
WNDTITEQ20="Downloads - Chromium"
WNDTITEQ21="Preferências de Impressão"
WNDTITEQ21="Preferências de Impressãoo"
WNDTITEQ22="Ajuda e Suporte do Windows"
WNDTITEQ23="Salvar arquivo como"
WNDTITEQ24="Configurações"
Expand All @@ -74,6 +74,7 @@ WNDTITCT2="Selecione a impressora de rede"
WNDTITCT3="Gerenciador de favoritos"
WNDTITCT4="Developer Tools"
WNDTITCT5="view-source:"
WNDTITCT6="DevTools -"

[EVENTS]
IEC_DP_TRANSIT="INDETERMINADO"
Expand Down
2 changes: 1 addition & 1 deletion i18n/messages_i18n-pt_br.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var Msg =
{
NomeProduto: 'OSHMI',
VersaoProduto: '6.0',
VersaoProduto: '6.1',

NomeVisorTelas: 'Visor de Telas',
NomeVisorEventos: 'Visor de Eventos',
Expand Down
2 changes: 1 addition & 1 deletion i18n/messages_i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var Msg =
{
NomeProduto: 'OSHMI',
VersaoProduto: '6.0',
VersaoProduto: '6.1',

NomeVisorTelas: 'Screen Viewer',
NomeVisorEventos: 'Events Viewer',
Expand Down
19 changes: 14 additions & 5 deletions installer/oshmi.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ RequestExecutionLevel user

;--------------------------------

!define VERSION "v.6.0"
!define VERSION_ "6.0.0.0"
!define VERSION "v.6.1"
!define VERSION_ "6.1.0.0"

Function .onInit
System::Call 'keexrnel32::CreateMutexA(i 0, i 0, t "MutexOshmiInstall") i .r1 ?e'
Expand Down Expand Up @@ -196,7 +196,12 @@ Section "" ; empty string makes it hidden, so would starting with -
CreateDirectory "$INSTDIR\fonts"
CreateDirectory "$INSTDIR\linux"
CreateDirectory "$INSTDIR\linux\nginx"
CreateDirectory "$INSTDIR\linux\nginx\sites-available"
CreateDirectory "$INSTDIR\linux\nginx\conf"
CreateDirectory "$INSTDIR\linux\nginx\conf\sites-available"
CreateDirectory "$INSTDIR\linux\php"
CreateDirectory "$INSTDIR\linux\php\7.2"
CreateDirectory "$INSTDIR\linux\php\7.2\fpm"

CreateDirectory "$INSTDIR\logs"
CreateDirectory "$INSTDIR\nginx_php"
CreateDirectory "$INSTDIR\scripts"
Expand Down Expand Up @@ -235,8 +240,12 @@ Section "" ; empty string makes it hidden, so would starting with -
SetOutPath $INSTDIR\linux
File /a "..\linux\*.*"
File /a "..\linux\QTester104"
SetOutPath $INSTDIR\linux\nginx\sites-available
File /a "..\linux\nginx\sites-available\default"
SetOutPath $INSTDIR\linux\nginx\conf
File /a "..\linux\nginx\conf\nginx.conf"
SetOutPath $INSTDIR\linux\nginx\conf\sites-available
File /a "..\linux\nginx\conf\sites-available\default"
SetOutPath $INSTDIR\linux\php\7.2\fpm
File /a "..\linux\php\7.2\fpm\php.ini"

SetOutPath $INSTDIR\db\db_cold
File /a "..\db\db_cold\*.*"
Expand Down
16 changes: 16 additions & 0 deletions installer/release_notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,22 @@ Inkscape+SAGE:

-------------------------------------------------------------------

Notes for version 6.1:

Webserver:
- Configurable HTTP port for event and annotation synchronization in redundant mode.

Screen Viewer:
- Protection of local variables when executing scripts in the SVG file.

SQLite:
- Updated to version 3.27.2.

Linux:
- Updated config files for Nginx and PHP.

-------------------------------------------------------------------

Notes for version 6.0:

This release introduces many performance optimizations under the hood.
Expand Down
64 changes: 64 additions & 0 deletions linux/nginx/conf/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Nginx config for running OSHMI under linux.
# Copy to /etc/nginx/nginx.conf

user www-data;
worker_processes 4;
pid /var/run/nginx.pid;

include /etc/nginx/modules-enabled/*.conf;

##
# Logging Settings
##
#access_log /var/log/nginx/access.log;
#error_log /var/log/nginx/error.log;

events {
worker_connections 1024;
}

http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

# adjustments to allow for larger URL queries (meaning more objects in displays)
large_client_header_buffers 4 32k;
http2_max_field_size 32k;

#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';

access_log off;

# OSHMI real time webserver listening on port 51908
upstream oshmirealtimewebserver {
server 127.0.0.1:51908;
keepalive 15;
}

# FastCGI server
upstream phpbackend {
server unix:/run/php/php7.2-fpm.sock;
keepalive 15;
}

##
# Virtual Host Configs
##

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

}




Loading

0 comments on commit 7816595

Please sign in to comment.