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
4e75710d
Commit
4e75710d
authored
Oct 31, 2013
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wb history to html conversion fixes
parent
77c0cd3c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
5 deletions
+46
-5
wb/exe/wb_cmd/gtk/wb_cmd_gtk.cpp
wb/exe/wb_cmd/gtk/wb_cmd_gtk.cpp
+1
-0
wb/exe/wb_cmd/src/wb_cmd_main.cpp
wb/exe/wb_cmd/src/wb_cmd_main.cpp
+1
-0
wb/lib/wb/src/wb_log.cpp
wb/lib/wb/src/wb_log.cpp
+31
-5
wb/lib/wb/src/wb_log.h
wb/lib/wb/src/wb_log.h
+12
-0
xtt/exe/wb_ge/gtk/wb_ge_gtk.cpp
xtt/exe/wb_ge/gtk/wb_ge_gtk.cpp
+1
-0
No files found.
wb/exe/wb_cmd/gtk/wb_cmd_gtk.cpp
View file @
4e75710d
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include <vector>
#include <gtk/gtk.h>
#include <gtk/gtk.h>
#include "pwr.h"
#include "pwr.h"
...
...
wb/exe/wb_cmd/src/wb_cmd_main.cpp
View file @
4e75710d
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include <vector>
#include "pwr.h"
#include "pwr.h"
#include "pwr_class.h"
#include "pwr_class.h"
...
...
wb/lib/wb/src/wb_log.cpp
View file @
4e75710d
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
#include "wb_wnav_msg.h"
#include "wb_wnav_msg.h"
typedef
struct
{
typedef
struct
{
vector
<
string
>
v
;
vector
<
VItem
>
v
;
}
log_sCbCtx
;
}
log_sCbCtx
;
...
@@ -187,6 +187,8 @@ void wb_log::generate_html( char *filename, pwr_tStatus *sts)
...
@@ -187,6 +187,8 @@ void wb_log::generate_html( char *filename, pwr_tStatus *sts)
CoLog
::
dget
(
0
,
0
,
gen_cb
,
&
cbctx
);
CoLog
::
dget
(
0
,
0
,
gen_cb
,
&
cbctx
);
filter
(
cbctx
.
v
);
dcli_translate_filename
(
fname
,
filename
);
dcli_translate_filename
(
fname
,
filename
);
strcpy
(
help_fname
,
fname
);
strcpy
(
help_fname
,
fname
);
...
@@ -217,8 +219,10 @@ void wb_log::generate_html( char *filename, pwr_tStatus *sts)
...
@@ -217,8 +219,10 @@ void wb_log::generate_html( char *filename, pwr_tStatus *sts)
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
,
"<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
,
"%-20s %-10s %-20s %-20s %s
\n
"
,
"Date"
,
"User"
,
"Action"
,
"Item"
,
"Comment"
);
fprintf
(
fp
,
"----------------------------------------------------------------------------------------------
\n
"
);
fprintf
(
fp
,
"----------------------------------------------------------------------------------------------
\n
"
);
for
(
int
i
=
cbctx
.
v
.
size
()
-
1
;
i
>=
0
;
i
--
)
for
(
int
i
=
cbctx
.
v
.
size
()
-
1
;
i
>=
0
;
i
--
)
{
fprintf
(
fp
,
"%s
\n
"
,
cbctx
.
v
[
i
].
c_str
());
if
(
!
cbctx
.
v
[
i
].
disable
)
fprintf
(
fp
,
"%s
\n
"
,
cbctx
.
v
[
i
].
text
.
c_str
());
}
fprintf
(
fp
,
"</XMP>
\n
</BODY>
\n
</HTML>
\n
"
);
fprintf
(
fp
,
"</XMP>
\n
</BODY>
\n
</HTML>
\n
"
);
fclose
(
fp
);
fclose
(
fp
);
...
@@ -253,7 +257,7 @@ GeBuild Ge graph built. Built graph displayed in item.\n\
...
@@ -253,7 +257,7 @@ GeBuild Ge graph built. Built graph displayed in item.\n\
GeExport Ge graph exported to java. Exported graph displayed in item.
\n
\
GeExport Ge graph exported to java. Exported graph displayed in item.
\n
\
UpdateClasses Classes updated.
\n
\
UpdateClasses Classes updated.
\n
\
CreatePackage Distribution package created. Created package displayed in item.
\n
\
CreatePackage Distribution package created. Created package displayed in item.
\n
\
CopyPackage Package distributed to process or operator station. Package displayed in item.
\n
\
&
CopyPackage Package distributed to process or operator station. Package displayed in item.
\n
\
</XMP>
\n
\
</XMP>
\n
\
</body>
\n
\
</body>
\n
\
</html>
\n
"
);
</html>
\n
"
);
...
@@ -262,6 +266,25 @@ CopyPackage Package distributed to process or operator station. Package displaye
...
@@ -262,6 +266,25 @@ CopyPackage Package distributed to process or operator station. Package displaye
}
}
}
}
void
wb_log
::
filter
(
vector
<
VItem
>
&
v
)
{
#if 0
int last_volumebuild = 0;
for ( int i = 0; i < (int)v.size(); i++) {
if ( strncmp( v[0].text.c_str(), "VolumeBuild", 9) == 0) {
for ( int j = i - 1; j > last_config_save; j--) {
}
last_volumebuild = i;
}
if ( !v[i].has_comment)
v[i].disable = true;
}
#endif
}
void
wb_log
::
gen_cb
(
void
*
ctx
,
pwr_tTime
time
,
char
*
s1
,
char
*
s2
,
char
*
s3
,
char
*
s4
)
void
wb_log
::
gen_cb
(
void
*
ctx
,
pwr_tTime
time
,
char
*
s1
,
char
*
s2
,
char
*
s3
,
char
*
s4
)
{
{
log_sCbCtx
*
cbctx
=
(
log_sCbCtx
*
)
ctx
;
log_sCbCtx
*
cbctx
=
(
log_sCbCtx
*
)
ctx
;
...
@@ -271,7 +294,10 @@ void wb_log::gen_cb( void *ctx, pwr_tTime time, char *s1, char *s2, char *s3, ch
...
@@ -271,7 +294,10 @@ void wb_log::gen_cb( void *ctx, pwr_tTime time, char *s1, char *s2, char *s3, ch
time_AtoAscii
(
&
time
,
time_eFormat_DateAndTime
,
timstr
,
sizeof
(
timstr
));
time_AtoAscii
(
&
time
,
time_eFormat_DateAndTime
,
timstr
,
sizeof
(
timstr
));
snprintf
(
str
,
sizeof
(
str
),
"%-20s %-10s %-20s %-20s %s"
,
timstr
,
s2
,
s1
,
s3
,
s4
?
s4
:
""
);
snprintf
(
str
,
sizeof
(
str
),
"%-20s %-10s %-20s %-20s %s"
,
timstr
,
s2
,
s1
,
s3
,
s4
?
s4
:
""
);
string
s
(
str
);
VItem
s
(
str
);
if
(
s4
&&
strcmp
(
s4
,
""
)
!=
0
)
s
.
has_comment
=
true
;
cbctx
->
v
.
push_back
(
s
);
cbctx
->
v
.
push_back
(
s
);
}
}
wb/lib/wb/src/wb_log.h
View file @
4e75710d
...
@@ -37,11 +37,15 @@
...
@@ -37,11 +37,15 @@
#ifndef wb_log_h
#ifndef wb_log_h
#define wb_log_h
#define wb_log_h
#include <vector>
#include <string>
#include "pwr.h"
#include "pwr.h"
#include "cow_log.h"
#include "cow_log.h"
#define wlog_cLogFile "$pwrp_db/wb_history.log"
#define wlog_cLogFile "$pwrp_db/wb_history.log"
using
namespace
std
;
typedef
enum
{
typedef
enum
{
wlog_eCategory_
,
wlog_eCategory_
,
wlog_eCategory_WbLogin
,
wlog_eCategory_WbLogin
,
...
@@ -61,6 +65,13 @@ typedef enum {
...
@@ -61,6 +65,13 @@ typedef enum {
wlog_eCategory__
,
wlog_eCategory__
,
}
wlog_eCategory
;
}
wlog_eCategory
;
class
VItem
{
public:
VItem
(
char
*
t
)
:
text
(
t
),
has_comment
(
false
),
disable
(
false
)
{}
string
text
;
bool
has_comment
;
bool
disable
;
};
class
wb_log
;
class
wb_log
;
class
wb_session
;
class
wb_session
;
...
@@ -79,6 +90,7 @@ class wb_log
...
@@ -79,6 +90,7 @@ class wb_log
static
void
pull
()
{
CoLog
::
dpull
();}
static
void
pull
()
{
CoLog
::
dpull
();}
static
void
generate_html
(
char
*
filename
,
pwr_tStatus
*
sts
);
static
void
generate_html
(
char
*
filename
,
pwr_tStatus
*
sts
);
static
void
gen_cb
(
void
*
ctx
,
pwr_tTime
time
,
char
*
s1
,
char
*
s2
,
char
*
s3
,
char
*
s4
);
static
void
gen_cb
(
void
*
ctx
,
pwr_tTime
time
,
char
*
s1
,
char
*
s2
,
char
*
s3
,
char
*
s4
);
static
void
filter
(
vector
<
VItem
>
&
v
);
};
};
...
...
xtt/exe/wb_ge/gtk/wb_ge_gtk.cpp
View file @
4e75710d
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <locale.h>
#include <locale.h>
#include <vector>
#include "pwr.h"
#include "pwr.h"
...
...
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