Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
vanisha
/
log
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
b67da166
authored
2023-06-02 12:23:00 +0530
by
vanisha
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
show more show less added.
1 parent
efef8f3c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
2 deletions
templates/cron_logs_view.mustache
templates/cron_logs_view.mustache
View file @
b67da16
...
...
@@ -43,6 +43,23 @@
<script>
function
read
(
obj
,
sno
){
if
(
$
(
obj
).
hasClass
(
"less"
))
{
$
(
obj
).
removeClass
(
"less"
);
$
(
obj
).
html
(
'<font style="color:#33ccff;cursor:pointer;">showmore</font>'
);
$
(
"#text_"
+
sno
).
css
(
'display'
,
'none !important'
);
$
(
"#moreellipses_"
+
sno
).
css
(
'display'
,
'block'
);
}
else
{
$
(
obj
).
addClass
(
"less"
);
$
(
obj
).
html
(
'<font style="color:#33ccff;cursor:pointer;">showless</font>'
);
$
(
"#text_"
+
sno
).
css
(
'display'
,
'block !important'
);
$
(
"#moreellipses_"
+
sno
).
css
(
'display'
,
'none'
);
}
$
(
obj
).
parent
().
prev
().
toggle
();
$
(
obj
).
prev
().
toggle
();
return
false
;
}
var
log_DataTable
=
""
;
log_DataTable
=
$
(
'#view_logs_entries_table'
).
DataTable
({
dom
:
'lBfrtip'
,
...
...
@@ -53,9 +70,32 @@ var log_DataTable = "";
"emptyTable"
:
"No records found."
},
"columns"
:
[
{
"data"
:
"sno"
},
{
"data"
:
"sno"
,
"render"
:
function
(
data
,
type
,
full
)
{
s_no
=
data
;
return
data
;
}
},
{
"data"
:
"name"
},
{
"data"
:
"log"
}
{
"data"
:
"log"
,
"render"
:
function
(
data
,
type
,
full
)
{
var
showChar
=
150
;
var
ellipsestext
=
"..... "
;
var
moretext
=
'<font style="color:#33ccff;cursor:pointer;">showmore</font>'
;
var
lesstext
=
'<font style="color:#33ccff;cursor:pointer;">showless</font>'
;
var
contentt
=
JSON
.
stringify
(
data
);
var
content
=
contentt
.
replace
(
/
[
"
]
+/g
,
''
).
substring
(
0
,
contentt
.
length
-
1
);
if
(
content
.
length
>
showChar
)
{
var
c
=
content
.
substr
(
0
,
showChar
);
var
h
=
content
.
substr
(
showChar
,
content
.
length
-
showChar
);
var
html
=
c
+
'<span class="moreellipses_'
+
s_no
+
'">'
+
ellipsestext
+
"</span><span class='morecontent'><span id='text_"
+
s_no
+
"' style='display:none;'>"
+
h
+
"</span> <a onclick='read(this,"
+
s_no
+
")'"
+
" class='morelink'>"
+
moretext
+
"</a></span>"
;
//here call the read() function
return
html
.
toString
();
}
return
data
;
}
}
]
});
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment