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
7906800c
Commit
7906800c
authored
Oct 22, 2013
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wb history to html conversion, help text added
parent
9a17e9ee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
2 deletions
+57
-2
wb/lib/wb/src/wb_log.cpp
wb/lib/wb/src/wb_log.cpp
+57
-2
No files found.
wb/lib/wb/src/wb_log.cpp
View file @
7906800c
...
...
@@ -180,6 +180,7 @@ void wb_log::generate_html( char *filename, pwr_tStatus *sts)
FILE
*
fp
;
char
timstr
[
24
];
char
pname
[
80
];
pwr_tFileName
help_fname
,
help_filename
;
time_AtoAscii
(
0
,
time_eFormat_DateAndTime
,
timstr
,
sizeof
(
timstr
));
utl_get_projectname
(
pname
);
...
...
@@ -188,6 +189,21 @@ void wb_log::generate_html( char *filename, pwr_tStatus *sts)
dcli_translate_filename
(
fname
,
filename
);
strcpy
(
help_fname
,
fname
);
char
*
s
=
strchr
(
help_fname
,
'.'
);
if
(
s
)
{
*
s
=
0
;
strcat
(
help_fname
,
"_help.html"
);
s
=
strrchr
(
help_fname
,
'/'
);
if
(
s
)
strcpy
(
help_filename
,
s
+
1
);
else
strcpy
(
help_filename
,
""
);
}
else
strcpy
(
help_fname
,
""
);
fp
=
fopen
(
fname
,
"w"
);
if
(
!
fp
)
{
*
sts
=
WNAV__NOFILE
;
...
...
@@ -196,15 +212,54 @@ void wb_log::generate_html( char *filename, pwr_tStatus *sts)
fprintf
(
fp
,
"<!DOCTYPE HTML PUBLIC
\"
-//W3C//DTD HTML 4.0 Transitional//EN
\"\"
http://www.w3.org/TR/REC-html40/loose.dtd>
\n
\
<!-- Generated by wb_log %s -->
\n
"
,
timstr
);
fprintf
(
fp
,
"<HTML>
\n
<HEAD>
\n
<META http-equiv=
\"
Content-Type
\"
content=
\"
text/html; charset=ISO-8859-1
\"
>
\n
\
<TITLE>
\n
Workbench History
\n
</TITLE>
\n
</HEAD>
\n
<BODY BGCOLOR=
\"
white
\"
>
<XMP>
\n
"
);
<TITLE>
\n
Workbench History
\n
</TITLE>
\n
</HEAD>
\n
<BODY BGCOLOR=
\"
white
\"
>
\n
"
);
fprintf
(
fp
,
"
Workbench History %s %s
\n\n
"
,
pname
,
timstr
);
fprintf
(
fp
,
"
<h2>Workbench History</h2>
\n
<xmp> %s %s</xmp><br>
\n
<a href=
\"
%s
\"
>Help</a>
\n
<XMP>
\n\n
"
,
pname
,
timstr
,
help_filename
);
fprintf
(
fp
,
"%-20s %-10s %-20s %-20s %s
\n
"
,
"Date"
,
"User"
,
"Action"
,
"Item"
,
"Comment"
);
fprintf
(
fp
,
"----------------------------------------------------------------------------------------------
\n
"
);
for
(
int
i
=
cbctx
.
v
.
size
()
-
1
;
i
>=
0
;
i
--
)
fprintf
(
fp
,
"%s
\n
"
,
cbctx
.
v
[
i
].
c_str
());
fprintf
(
fp
,
"</XMP>
\n
</BODY>
\n
</HTML>
\n
"
);
fclose
(
fp
);
if
(
strcmp
(
help_fname
,
""
)
!=
0
)
{
fp
=
fopen
(
help_fname
,
"w"
);
if
(
!
fp
)
return
;
fprintf
(
fp
,
"\
<!DOCTYPE HTML PUBLIC
\"
-//W3C//DTD HTML 4.01 Transitional//EN
\"
>
\n
\
<html>
\n
\
<head>
\n
\
<title>Wb History Help</title>
\n
\
</head>
\n
\
\n
\
<body>
\n
\
<XMP>
\n
\
The Wb History shows logged actions in the development environment.
\n
\
Each save action can be stored with a explanatory comment. This requires that comment is
\n
\
enabled in the configurator.
\n
\
\n
\
Action Description
\n
\
\n
\
WbLogin A user logged in to Proview development environment. User displayed in item.
\n
\
ConfigSave Configurator saved. Saved volume displayed in item.
\n
\
PlcSave Plc window saved. Saved plc window diplayed in item.
\n
\
GeSave Ge graph saved. Saved graphs displayed in item.
\n
\
VolumeBuild Volume is built. Built volume displayed in item.
\n
\
NodeBuild Node is built. Built node displayed in item.
\n
\
PlcBuild Plc window compiled. Built window displayed in item.
\n
\
GeBuild Ge graph built. Built graph displayed in item.
\n
\
GeExport Ge graph exported to java. Exported graph displayed in item.
\n
\
UpdateClasses Classes updated.
\n
\
CreatePackage Distribution package created. Created package displayed in item.
\n
\
CopyPackage Package distributed to process or operator station. Package displayed in item.
\n
\
</XMP>
\n
\
</body>
\n
\
</html>
\n
"
);
fclose
(
fp
);
}
}
void
wb_log
::
gen_cb
(
void
*
ctx
,
pwr_tTime
time
,
char
*
s1
,
char
*
s2
,
char
*
s3
,
char
*
s4
)
...
...
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