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
9c92d236
authored
2023-06-02 11:27:08 +0530
by
vanisha
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
reset button added
1 parent
4025cf2a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
ajax.php
templates/cron_logs_view.mustache
ajax.php
View file @
9c92d23
...
...
@@ -32,6 +32,10 @@ if (isset($_GET['choice'])) {
if
(
$choice
===
'get_logs'
)
{
$date_filter
=
$_GET
[
'date'
];
if
(
empty
(
$date_filter
))
{
$date_filter
=
date
(
'd-m-y'
);
}
$date_filter
=
date
(
'd-m-y'
,
strtotime
(
$date_filter
));
$configpaths
=
get_config
(
null
,
'block_log_path_info'
);
...
...
templates/cron_logs_view.mustache
View file @
9c92d23
...
...
@@ -20,6 +20,11 @@
<span
class=
"icon-stack"
><i
style=
"line-height: 0.5em;"
class=
"icon-filter icon-stack-base"
aria-hidden=
"true"
></i>
<i
style=
"line-height: 0.2em;"
class=
"icon-add"
></i></span></button>
</div>
<div
class=
"input-group-prepend"
style=
"display: block;padding: 10px;text-align: justify;width: 25em;margin-top: 30px;"
>
<button
id=
"reset_filter_logs"
class=
"btn btn-primary"
type=
"button"
title=
"Reset"
>
Reset
<span
class=
"icon-stack"
><i
style=
"line-height: 0.5em;"
class=
"icon-filter icon-stack-base"
aria-hidden=
"true"
></i>
<i
style=
"line-height: 0.2em;"
class=
"icon-add"
></i></span></button>
</div>
</div>
</div>
...
...
@@ -84,5 +89,23 @@ $('#filter_logs').click(function() {
}
});
$
(
'#reset_filter_logs'
).
click
(
function
()
{
if
((
'#date_filter_div'
).
length
!=
0
)
{
$
(
'#date_filter_div'
).
empty
();
}
$
.
ajax
({
method
:
"GET"
,
url
:
M
.
cfg
.
wwwroot
+
'/blocks/log/ajax.php'
,
data
:
{
"choice"
:
"get_logs"
,
"date"
:
''
}
}).
done
(
function
(
response
)
{
var
data
=
JSON
.
parse
(
response
);
var
userdata
=
JSON
.
parse
(
data
.
userdata
);
log_DataTable
.
clear
().
draw
();
log_DataTable
.
rows
.
add
(
userdata
).
draw
();
});
});
</script>
\ No newline at end of file
...
...
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