Adds a refresh button to log pages, minor column tweaks
This commit is contained in:
parent
2ced2f8c73
commit
30025a6ada
|
|
@ -36,4 +36,9 @@ class AccessLogs extends Controller
|
||||||
BackendMenu::setContext('October.System', 'system', 'settings');
|
BackendMenu::setContext('October.System', 'system', 'settings');
|
||||||
SettingsManager::setContext('October.Backend', 'access_logs');
|
SettingsManager::setContext('October.Backend', 'access_logs');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function index_onRefresh()
|
||||||
|
{
|
||||||
|
return $this->listRefresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,9 @@
|
||||||
<div data-control="toolbar">
|
<div data-control="toolbar" class="loading-indicator-container">
|
||||||
|
<a
|
||||||
|
href="javascript:;"
|
||||||
|
data-request="onRefresh"
|
||||||
|
data-load-indicator="<?= e(trans('backend::lang.list.updating')) ?>"
|
||||||
|
class="btn btn-primary oc-icon-refresh">
|
||||||
|
<?= e(trans('backend::lang.list.refresh')) ?>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -130,6 +130,8 @@ return [
|
||||||
'pagination' => 'Displayed records: :from-:to of :total',
|
'pagination' => 'Displayed records: :from-:to of :total',
|
||||||
'prev_page' => 'Previous page',
|
'prev_page' => 'Previous page',
|
||||||
'next_page' => 'Next page',
|
'next_page' => 'Next page',
|
||||||
|
'refresh' => 'Refresh',
|
||||||
|
'updating' => 'Updating...',
|
||||||
'loading' => 'Loading...',
|
'loading' => 'Loading...',
|
||||||
'setup_title' => 'List Setup',
|
'setup_title' => 'List Setup',
|
||||||
'setup_help' => 'Use checkboxes to select columns you want to see in the list. You can change position of columns by dragging them up or down.',
|
'setup_help' => 'Use checkboxes to select columns you want to see in the list. You can change position of columns by dragging them up or down.',
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ columns:
|
||||||
created_at:
|
created_at:
|
||||||
label: backend::lang.access_log.created_at
|
label: backend::lang.access_log.created_at
|
||||||
searchable: yes
|
searchable: yes
|
||||||
|
type: timetense
|
||||||
|
width: 160px
|
||||||
|
|
||||||
login:
|
login:
|
||||||
label: backend::lang.access_log.login
|
label: backend::lang.access_log.login
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,12 @@ class EventLogs extends Controller
|
||||||
SettingsManager::setContext('October.System', 'event_logs');
|
SettingsManager::setContext('October.System', 'event_logs');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onEmptyLog()
|
public function index_onRefresh()
|
||||||
|
{
|
||||||
|
return $this->listRefresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index_onEmptyLog()
|
||||||
{
|
{
|
||||||
EventLog::truncate();
|
EventLog::truncate();
|
||||||
Flash::success(Lang::get('system::lang.event_log.empty_success'));
|
Flash::success(Lang::get('system::lang.event_log.empty_success'));
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,12 @@ class RequestLogs extends Controller
|
||||||
SettingsManager::setContext('October.System', 'request_logs');
|
SettingsManager::setContext('October.System', 'request_logs');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onEmptyLog()
|
public function index_onRefresh()
|
||||||
|
{
|
||||||
|
return $this->listRefresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index_onEmptyLog()
|
||||||
{
|
{
|
||||||
RequestLog::truncate();
|
RequestLog::truncate();
|
||||||
Flash::success(Lang::get('system::lang.request_log.empty_success'));
|
Flash::success(Lang::get('system::lang.request_log.empty_success'));
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,11 @@
|
||||||
<div data-control="toolbar" class="loading-indicator-container">
|
<div data-control="toolbar" class="loading-indicator-container">
|
||||||
|
<a
|
||||||
|
href="javascript:;"
|
||||||
|
data-request="onRefresh"
|
||||||
|
data-load-indicator="<?= e(trans('backend::lang.list.updating')) ?>"
|
||||||
|
class="btn btn-primary oc-icon-refresh">
|
||||||
|
<?= e(trans('backend::lang.list.refresh')) ?>
|
||||||
|
</a>
|
||||||
<a
|
<a
|
||||||
href="javascript:;"
|
href="javascript:;"
|
||||||
data-request="onEmptyLog"
|
data-request="onEmptyLog"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,11 @@
|
||||||
<div data-control="toolbar" class="loading-indicator-container">
|
<div data-control="toolbar" class="loading-indicator-container">
|
||||||
|
<a
|
||||||
|
href="javascript:;"
|
||||||
|
data-request="onRefresh"
|
||||||
|
data-load-indicator="<?= e(trans('backend::lang.list.updating')) ?>"
|
||||||
|
class="btn btn-primary oc-icon-refresh">
|
||||||
|
<?= e(trans('backend::lang.list.refresh')) ?>
|
||||||
|
</a>
|
||||||
<a
|
<a
|
||||||
href="javascript:;"
|
href="javascript:;"
|
||||||
data-request="onEmptyLog"
|
data-request="onEmptyLog"
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,13 @@ columns:
|
||||||
id:
|
id:
|
||||||
label: system::lang.event_log.id
|
label: system::lang.event_log.id
|
||||||
searchable: yes
|
searchable: yes
|
||||||
|
width: 75px
|
||||||
|
|
||||||
created_at:
|
created_at:
|
||||||
label: system::lang.event_log.created_at
|
label: system::lang.event_log.created_at
|
||||||
searchable: yes
|
searchable: yes
|
||||||
|
width: 160px
|
||||||
|
type: timetense
|
||||||
|
|
||||||
message:
|
message:
|
||||||
label: system::lang.event_log.message
|
label: system::lang.event_log.message
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ columns:
|
||||||
status_code:
|
status_code:
|
||||||
label: system::lang.request_log.status_code
|
label: system::lang.request_log.status_code
|
||||||
searchable: yes
|
searchable: yes
|
||||||
|
width: 100px
|
||||||
|
|
||||||
url:
|
url:
|
||||||
label: system::lang.request_log.url
|
label: system::lang.request_log.url
|
||||||
|
|
@ -14,3 +15,4 @@ columns:
|
||||||
|
|
||||||
count:
|
count:
|
||||||
label: system::lang.request_log.count
|
label: system::lang.request_log.count
|
||||||
|
width: 150px
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue