Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
Daniels project
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
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Daniel Quadras
Daniels project
Commits
cb08c1ec
Commit
cb08c1ec
authored
Jun 28, 2023
by
Daniel Quadras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update ITMUserAuditTrailBrow.jsp
parent
872ce409
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
3 deletions
+80
-3
ITMUserAuditTrailBrow.jsp
ITMUserAuditTrailBrow.jsp
+80
-3
No files found.
ITMUserAuditTrailBrow.jsp
View file @
cb08c1ec
...
...
@@ -147,10 +147,13 @@ function showPreviousPage(){
dataNew
=
auditBean
.
getXMLStrBrow
(
"EXCELDATA"
);
BaseLogger
.
log
(
"3"
,
userInfo
,
null
,
"datanew daniel in html from auditbean.getxmlstrbrow"
+
dataNew
);
//DATANEW No data for audittrail data
boolean
noDataCheck
=
dataNew
.
contains
(
"
<
nodata
>
");
BaseLogger.log("
3
",userInfo,null, "
daniel
nodatacheckvalue
"+noDataCheck);
sessiondata=itmuserauditbeantest.getSessionInfoDet(userStr, fromDateformat, toDateformat);
BaseLogger.log("
3
",userInfo,null, "
datanew
daniel
sessiondata
before
if
nodatacheck
"+sessiondata);
//condition to handle no data in datanew i.e audittrail
if(noDataCheck)
{
String tagtoremove = "
nodata
";
...
...
@@ -191,7 +194,81 @@ function showPreviousPage(){
}
//else { add the below code inside this else add below 10 lines in here }
//condition to check if sessiondata is empty and audtitrail has data
else if(noDataCheck==false && sessiondata.trim().length() == 0 || noDataCheck==false && sessiondata.equalsIgnoreCase(null) || noDataCheck==false && sessiondata.equalsIgnoreCase(""))
{
dataNew = dataNew.replaceAll("
</
DocumentRoot
>
", "");
dataNew = dataNew.replaceAll("
</
Header0
>
", "");
dataNew = dataNew.replaceAll("
</
group0
>
", "");
String xmlFrNoRecords = "
<
Detail1
dbID
=
''
domID
=
''
objName
=
''
objContext
=
''>
<
attribute
pkNames
=
''
status
=
'O'
updateFlag
=
''
selected
=
''
/
>
<
chg_id
>
<![
CDATA
[]]
>
</
chg_id
>
<
obj_name
>
<![
CDATA
[]]
>
</
obj_name
>
<
ref_id
>
<![
CDATA
[]]
>
</
ref_id
>
<
action_prfrm
>
<![
CDATA
[]]
>
</
action_prfrm
>
<
action_status
>
<![
CDATA
[]]
>
</
action_status
>
<
chg_term
>
<![
CDATA
[]]
>
</
chg_term
>
<
tran_id
>
<![
CDATA
[]]
>
</
tran_id
>
<
chg_user
>
<![
CDATA
[]]
>
</
chg_user
>
<
chg_date
>
<![
CDATA
[
27
/
12
/
93
11
:
11
:
11
]]
>
</
chg_date
>
<
descr
>
<![
CDATA
[
NO
RECORDS
FOUND
FOR
LOGIN
TRACE
]]
>
</
descr
>
</
Detail1
>
";
String closingtags = "
</
Header0
>
"+"
\
r
\
n
"+"
</
group0
>
"+"
\
r
\
n
"+"
</
DocumentRoot
>
" ;
String tagtoremove = "
nodata
";
dataNew = dataNew.replaceAll("
<
" + tagtoremove + "
>
.*?</
" + tagtoremove + "
>
", "");
BaseLogger.log("
3
",userInfo,null, "
daniel
data
after
remove
tagtoremove
first
else
if
"+dataNew);
dataNew = dataNew+xmlFrNoRecords+closingtags;
BaseLogger.log("
3
",userInfo,null, "
daniel
finaldata
first
else
if
"+dataNew);
try {
TransformerFactory tFactory = TransformerFactory.newInstance();
String xslFile = new E12GenericUtility().readFile(CommonConstants.APPLICATION_CONTEXT + CommonConstants.ITM_CONTEXT + File.separator+"
xsl
"+File.separator+"
user_audit_trail11_en_US_V
.
xsl
");
Transformer transformer = tFactory.newTransformer(new StreamSource(new ByteArrayInputStream(xslFile.getBytes())));
ByteArrayOutputStream bos = new ByteArrayOutputStream();
transformer.transform( new DOMSource( new E12GenericUtility().parseString(dataNew)), new StreamResult(bos));
dataNew = bos.toString();
BaseLogger.log("
3
",userInfo,null, "
daniel
final
html
datanew
converted
into
html
data
in
first
else
if
"+dataNew);
}
catch (Exception e) {
e.printStackTrace();
BaseLogger.log("
3
",userInfo,null, "
daniel
Exception
is:
::
");
}
}
//condition to hanlde both sessiondata and datanew having no data
else if(sessiondata.trim().length() == 0 && noDataCheck)
{
String tagtoremove = "
nodata
";
BaseLogger.log("
3
",userInfo,null, "
daniel
tagtoremove
elseif
condition
2
nd
else
if
"+tagtoremove);
dataNew = dataNew.replaceAll("
<
" + tagtoremove + "
>
.*?</
" + tagtoremove + "
>
", "");
BaseLogger.log("
3
",userInfo,null, "
daniel
datanew
after
removing
<
nodata
>
tag
2
nd
else
if
"+dataNew);
String closingtags = "
</
Header0
>
"+"
\
r
\
n
"+"
</
group0
>
"+"
\
r
\
n
"+"
</
DocumentRoot
>
" ;
dataNew = dataNew.replaceAll("
</
DocumentRoot
>
", "");
dataNew = dataNew.replaceAll("
</
Header0
>
", "");
dataNew = dataNew.replaceAll("
</
group0
>
", "");
BaseLogger.log("
3
",userInfo,null, "
datanew
daniel
after
remove
closing
tags
in
if
nodatacheck
in
html
2
nd
else
if
"+dataNew);
String xmlFrNoRecords = "
<
Detail1
dbID
=
''
domID
=
''
objName
=
''
objContext
=
''>
<
attribute
pkNames
=
''
status
=
'O'
updateFlag
=
''
selected
=
''
/
>
<
chg_id
>
<![
CDATA
[]]
>
</
chg_id
>
<
obj_name
>
<![
CDATA
[]]
>
</
obj_name
>
<
ref_id
>
<![
CDATA
[]]
>
</
ref_id
>
<
action_prfrm
>
<![
CDATA
[]]
>
</
action_prfrm
>
<
action_status
>
<![
CDATA
[]]
>
</
action_status
>
<
chg_term
>
<![
CDATA
[]]
>
</
chg_term
>
<
tran_id
>
<![
CDATA
[]]
>
</
tran_id
>
<
chg_user
>
<![
CDATA
[]]
>
</
chg_user
>
<
chg_date
>
<![
CDATA
[
27
/
12
/
93
11
:
11
:
11
]]
>
</
chg_date
>
<
descr
>
<![
CDATA
[
NO
RECORDS
FOUND
IN
AUDIT
TRAIL
AND
LOGINTRACE
]]
>
</
descr
>
</
Detail1
>
";
BaseLogger.log("
3
",userInfo,null, "
datanew
daniel
final
2
nd
else
if
"+dataNew);
dataNew = dataNew + xmlFrNoRecords + closingtags;
try {
TransformerFactory tFactory = TransformerFactory.newInstance();
String xslFile = new E12GenericUtility().readFile(CommonConstants.APPLICATION_CONTEXT + CommonConstants.ITM_CONTEXT + File.separator+"
xsl
"+File.separator+"
user_audit_trail11_en_US_V
.
xsl
");
Transformer transformer = tFactory.newTransformer(new StreamSource(new ByteArrayInputStream(xslFile.getBytes())));
ByteArrayOutputStream bos = new ByteArrayOutputStream();
transformer.transform( new DOMSource( new E12GenericUtility().parseString(dataNew)), new StreamResult(bos));
dataNew = bos.toString();
BaseLogger.log("
3
",userInfo,null, "
daniel
final
html
datanew
2
nd
else
if
"+dataNew);
}
catch (Exception e) {
e.printStackTrace();
BaseLogger.log("
3
",userInfo,null, "
daniel
Exception
is:
::
");
}
}
//else { add the below code inside this else add below 10 lines in here WHEn both tables have data}
else {
dataNew = dataNew.replaceAll("
</
DocumentRoot
>
", "");
...
...
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