Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
80ee6635
Commit
80ee6635
authored
May 20, 2003
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
html-files for web op window
parent
219a5df1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
87 additions
and
27 deletions
+87
-27
xtt/lib/ge/src/ge_graph_web.cpp
xtt/lib/ge/src/ge_graph_web.cpp
+87
-27
No files found.
xtt/lib/ge/src/ge_graph_web.cpp
View file @
80ee6635
...
...
@@ -36,6 +36,7 @@ extern "C" {
#include "glow_growwidget.h"
#include "ge_graph.h"
#include "ge_util.h"
#include "ge_msg.h"
extern
"C"
{
...
...
@@ -101,12 +102,19 @@ int Graph::generate_web( ldh_tSesContext ldhses)
char
link_URL
[
80
];
char
link_text
[
80
];
char
*
s
;
ofstream
fp
;
ofstream
fp_login
;
ofstream
fp_start
;
ofstream
fp_menu
;
ofstream
fp_ow
;
ofstream
fp_ows
;
char
fname
[
120
];
char
menu_file_name
[
80
];
char
codebase
[
200
];
pwr_tEnum
web_target
;
char
target_str
[
80
];
char
sname
[
80
];
ge_get_systemname
(
sname
);
// Get codebase for applets from global config file
cnf_get_value
(
"appletCodebase"
,
codebase
);
...
...
@@ -231,9 +239,9 @@ int Graph::generate_web( ldh_tSesContext ldhses)
strcpy
(
fname
,
"$pwrp_web/pwr_login.html"
);
dcli_translate_filename
(
fname
,
fname
);
fp
.
open
(
fname
);
fp
_login
.
open
(
fname
);
fp
<<
fp
_login
<<
"<!-- Generated by Ge -->"
<<
endl
<<
"<!-- Do not edit this file -->"
<<
endl
<<
"</html>"
<<
endl
<<
...
...
@@ -250,16 +258,16 @@ int Graph::generate_web( ldh_tSesContext ldhses)
" <param name=
\"
scriptable
\"
value=
\"
false
\"
>"
<<
endl
<<
" </body>"
<<
endl
<<
"</html>"
<<
endl
;
fp
.
close
();
fp
_login
.
close
();
// Generate html-file for start page
sprintf
(
fname
,
"$pwrp_web/%s.html"
,
name
);
dcli_translate_filename
(
fname
,
fname
);
fp
.
open
(
fname
);
fp
_start
.
open
(
fname
);
fp
<<
fp
_start
<<
"<! Generated by Ge >"
<<
endl
<<
"<html>"
<<
endl
<<
" <head>"
<<
endl
<<
...
...
@@ -269,28 +277,28 @@ int Graph::generate_web( ldh_tSesContext ldhses)
" <frameset cols=
\"
20%,80%
\"
>"
<<
endl
<<
" <frame name=
\"
left
\"
src=
\"
"
<<
menu_file_name
<<
"
\"
>"
<<
endl
;
if
(
strcmp
(
start_URL
,
""
)
!=
0
)
fp
<<
fp
_start
<<
" <frame name=
\"
right
\"
src=
\"
"
<<
start_URL
<<
"
\"
>"
<<
endl
;
else
fp
<<
fp
_start
<<
" <frame NAME=
\"
right
\"
>"
<<
endl
;
fp
<<
fp
_start
<<
" </frameset>"
<<
endl
<<
""
<<
endl
<<
"</html>"
<<
endl
;
fp
.
close
();
fp
_start
.
close
();
// Generate menu file
sprintf
(
fname
,
"$pwrp_web/%s"
,
menu_file_name
);
dcli_translate_filename
(
fname
,
fname
);
fp
.
open
(
fname
);
fp
_menu
.
open
(
fname
);
fp
<<
fp
_menu
<<
"<html>"
<<
endl
<<
" <head>"
<<
endl
<<
" <link rel=
\"
stylesheet
\"
type=
\"
text/css
\"
href=
\"
"
<<
style_sheet
<<
"
\"
>"
<<
endl
<<
" <link rel=
\"
stylesheet
\"
type=
\"
text/css
\"
href=
\"
"
<<
style_sheet
<<
"
\"
>"
<<
endl
<<
" <title>Menu</title>"
<<
endl
<<
" </head>"
<<
endl
<<
" <body>"
<<
endl
<<
...
...
@@ -300,22 +308,22 @@ int Graph::generate_web( ldh_tSesContext ldhses)
""
<<
endl
;
if
(
enable_login
)
{
fp
<<
fp
_menu
<<
" <a href=
\"
pwr_login.html
\"
target=
\"
right
\"
>Login</a><br>"
<<
endl
;
}
if
(
enable_navigator
)
{
fp
<<
fp
_menu
<<
" <a href=
\"
javascript:open_applet('pwr_navigator.html','Navigator',1,400,600)
\"
>Navigator</a><br>"
<<
endl
;
}
if
(
enable_alarmlist
)
{
fp
<<
fp
_menu
<<
" <a href=
\"
javascript:open_applet('pwr_events.html','AlarmandEventlist',1,600,600)
\"
>Alarm and Event list</a><br>"
<<
endl
;
}
if
(
enable_login
||
enable_navigator
)
{
fp
<<
fp
_menu
<<
" <hr>"
<<
endl
;
}
...
...
@@ -332,7 +340,7 @@ int Graph::generate_web( ldh_tSesContext ldhses)
sts
=
ldh_GetObjectPar
(
ldhses
,
webgraph_objid
,
"RtBody"
,
"Name"
,
&
value_p
,
&
size
);
if
(
EVEN
(
sts
))
return
sts
;
strcpy
(
graph_name
,
value_p
);
cdh_ToLower
(
graph_name
,
value_p
);
XtFree
(
value_p
);
// Attribute WebTarget
...
...
@@ -355,7 +363,7 @@ int Graph::generate_web( ldh_tSesContext ldhses)
switch
(
web_target
)
{
case
graph_eWebTarget_ParentWindow
:
strcpy
(
target_str
,
"_parent"
);
fp
<<
fp
_menu
<<
" <a href=
\"
"
<<
graph_name
<<
".html
\"
target=
\"
"
<<
target_str
<<
"
\"
>"
<<
graph_text
<<
"</a><br>"
<<
endl
;
break
;
case
graph_eWebTarget_SeparateWindow
:
...
...
@@ -370,7 +378,7 @@ int Graph::generate_web( ldh_tSesContext ldhses)
resize
=
1
;
}
fp
<<
fp
_menu
<<
" <a href=
\"
javascript:open_applet('"
<<
graph_name
<<
".html','"
<<
graph_text
<<
"',"
<<
resize
<<
","
<<
width
+
20
<<
","
<<
height
+
20
<<
")
\"
>"
<<
graph_text
<<
"</a><br>"
<<
endl
;
...
...
@@ -378,7 +386,7 @@ graph_text << "'," << resize << "," << width+20 << "," << height+20
}
default:
strcpy
(
target_str
,
"right"
);
fp
<<
fp
_menu
<<
" <a href=
\"
"
<<
graph_name
<<
".html
\"
target=
\"
"
<<
target_str
<<
"
\"
>"
<<
graph_text
<<
"</a><br>"
<<
endl
;
}
...
...
@@ -386,7 +394,7 @@ graph_text << "'," << resize << "," << width+20 << "," << height+20
sts
=
ldh_GetNextSibling
(
ldhses
,
webgraph_objid
,
&
webgraph_objid
);
}
fp
<<
fp
_menu
<<
" <hr>"
<<
endl
<<
""
<<
endl
;
...
...
@@ -431,26 +439,78 @@ graph_text << "'," << resize << "," << width+20 << "," << height+20
strcpy
(
target_str
,
"right"
);
}
fp
<<
fp
_menu
<<
" <a href=
\"
"
<<
link_URL
<<
"
\"
target=
\"
"
<<
target_str
<<
"
\"
>"
<<
link_text
<<
"</a><br>"
<<
endl
;
}
sts
=
ldh_GetNextSibling
(
ldhses
,
weblink_objid
,
&
weblink_objid
);
}
fp
<<
fp
_menu
<<
" </body>"
<<
endl
<<
"</html>"
<<
endl
;
// Function for opening a window without menues and toolbar
fp
<<
fp
_menu
<<
"<script language=
\"
JavaScript
\"
>"
<<
endl
<<
"function open_applet(url,name,resizable,width,height)"
<<
endl
<<
"{"
<<
endl
<<
" var win = window.open(url, name, 'resizable='+resizable+',menubar=no,scrollbars=no,location=no,toolbar=no,width='+width+',height='+height+',directories=no');"
<<
endl
<<
"}"
<<
endl
<<
"</script>"
<<
endl
;
fp
.
close
();
fp_menu
.
close
();
// Generate html-file for opwindow applet
sprintf
(
fname
,
"$pwrp_web/%s_opwin_menu.html"
,
name
);
dcli_translate_filename
(
fname
,
fname
);
fp_ow
.
open
(
fname
);
fp_ow
<<
"<!-- Generated by Ge -->"
<<
endl
<<
"<!-- Do not edit this file -->"
<<
endl
<<
"</html>"
<<
endl
<<
" <head>"
<<
endl
<<
" <title>"
<<
title
<<
"</title>"
<<
endl
<<
" </head>"
<<
endl
<<
" <body>"
<<
endl
<<
" <object classid=
\"
clsid:8AD9C840-044E-11D1-B3E9-00805F499D93
\"
"
<<
endl
<<
" width=100% height=100% codebase=
\"
"
<<
codebase
<<
"
\"
>"
<<
endl
<<
" <param name = code value=jpwr.jop.JopOpWindowApplet.class >"
<<
endl
<<
" <param name =
\"
archive
\"
value=
\"
pwr_rt_client.jar,pwr_jop.jar,pwrp_"
<<
sname
<<
"_web.jar
\"
>"
<<
endl
<<
" <param name=
\"
type
\"
value=
\"
application/x-java-applet;version=1.3
\"
>"
<<
endl
<<
" <param name=
\"
scriptable
\"
value=
\"
false
\"
>"
<<
endl
<<
" <embed type=
\"
application/x-java-applet;version=1.3
\"
"
<<
endl
<<
" code = jpwr.jop.JopOpWindowApplet.class "
<<
endl
<<
" archive=
\"
pwr_jop.jar,pwr_rt_client.jar,pwrp_"
<<
sname
<<
"_web.jar
\"
"
<<
endl
<<
" width = 100% height = 100% scriptable=false "
<<
endl
<<
" pluginspage=
\"
http://java.sun.com/products/plugin/1.3/plugin-install.html
\"
>"
<<
endl
<<
" </body>"
<<
endl
<<
"</html>"
<<
endl
;
fp_ow
.
close
();
// Generate html-file for start page for opwindow applet
sprintf
(
fname
,
"$pwrp_web/%s_opwin.html"
,
name
);
dcli_translate_filename
(
fname
,
fname
);
fp_ows
.
open
(
fname
);
fp_ows
<<
"<!-- Generated by Ge -->"
<<
endl
<<
"<!-- Do not edit this file -->"
<<
endl
<<
"<html>"
<<
endl
<<
" <head>"
<<
endl
<<
" <title>"
<<
title
<<
"</title>"
<<
endl
<<
" </head>"
<<
endl
<<
" <frameset cols=
\"
20%,80%
\"
>"
<<
endl
<<
" <frame name=
\"
left
\"
src=
\"
"
<<
name
<<
"_opwin_menu.html
\"
>"
<<
endl
<<
" <frame name=
\"
right
\"
src=
\"
xtt_help_index.html
\"
>"
<<
endl
<<
" </frameset>"
<<
endl
<<
"</html>"
<<
endl
;
fp_ows
.
close
();
// Copy default css-file to pwrp_web
system
(
"cp $pwr_exe/pwr_css.css $pwrp_web/"
);
...
...
@@ -464,7 +524,7 @@ graph_text << "'," << resize << "," << width+20 << "," << height+20
sts
=
dcli_search_file
(
"$pwrp_exe/xtt_help.dat"
,
fname
,
DCLI_DIR_SEARCH_END
);
printf
(
"-- Web startpage
generated $pwrp_web/%s.html
\n
"
,
name
);
printf
(
"-- Web startpage
s generated $pwrp_web/%s.html and %s_opwin.html
\n
"
,
name
,
name
);
#endif
return
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment