mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
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');
|
||||
SettingsManager::setContext('October.Backend', 'access_logs');
|
||||
}
|
||||
|
||||
public function index_onRefresh()
|
||||
{
|
||||
return $this->listRefresh();
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,9 @@
|
||||
<div data-control="toolbar">
|
||||
|
||||
</div>
|
||||
<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>
|
||||
|
@ -130,6 +130,8 @@ return [
|
||||
'pagination' => 'Displayed records: :from-:to of :total',
|
||||
'prev_page' => 'Previous page',
|
||||
'next_page' => 'Next page',
|
||||
'refresh' => 'Refresh',
|
||||
'updating' => 'Updating...',
|
||||
'loading' => 'Loading...',
|
||||
'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.',
|
||||
|
@ -6,6 +6,8 @@ columns:
|
||||
created_at:
|
||||
label: backend::lang.access_log.created_at
|
||||
searchable: yes
|
||||
type: timetense
|
||||
width: 160px
|
||||
|
||||
login:
|
||||
label: backend::lang.access_log.login
|
||||
|
@ -40,7 +40,12 @@ class EventLogs extends Controller
|
||||
SettingsManager::setContext('October.System', 'event_logs');
|
||||
}
|
||||
|
||||
public function onEmptyLog()
|
||||
public function index_onRefresh()
|
||||
{
|
||||
return $this->listRefresh();
|
||||
}
|
||||
|
||||
public function index_onEmptyLog()
|
||||
{
|
||||
EventLog::truncate();
|
||||
Flash::success(Lang::get('system::lang.event_log.empty_success'));
|
||||
|
@ -40,7 +40,12 @@ class RequestLogs extends Controller
|
||||
SettingsManager::setContext('October.System', 'request_logs');
|
||||
}
|
||||
|
||||
public function onEmptyLog()
|
||||
public function index_onRefresh()
|
||||
{
|
||||
return $this->listRefresh();
|
||||
}
|
||||
|
||||
public function index_onEmptyLog()
|
||||
{
|
||||
RequestLog::truncate();
|
||||
Flash::success(Lang::get('system::lang.request_log.empty_success'));
|
||||
|
@ -1,4 +1,11 @@
|
||||
<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
|
||||
href="javascript:;"
|
||||
data-request="onEmptyLog"
|
||||
@ -21,4 +28,4 @@
|
||||
data-stripe-load-indicator>
|
||||
<?= e(trans('backend::lang.list.delete_selected')) ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1,11 @@
|
||||
<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
|
||||
href="javascript:;"
|
||||
data-request="onEmptyLog"
|
||||
@ -21,4 +28,4 @@
|
||||
data-stripe-load-indicator>
|
||||
<?= e(trans('backend::lang.list.delete_selected')) ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,10 +6,13 @@ columns:
|
||||
id:
|
||||
label: system::lang.event_log.id
|
||||
searchable: yes
|
||||
width: 75px
|
||||
|
||||
created_at:
|
||||
label: system::lang.event_log.created_at
|
||||
searchable: yes
|
||||
width: 160px
|
||||
type: timetense
|
||||
|
||||
message:
|
||||
label: system::lang.event_log.message
|
||||
|
@ -6,6 +6,7 @@ columns:
|
||||
status_code:
|
||||
label: system::lang.request_log.status_code
|
||||
searchable: yes
|
||||
width: 100px
|
||||
|
||||
url:
|
||||
label: system::lang.request_log.url
|
||||
@ -14,3 +15,4 @@ columns:
|
||||
|
||||
count:
|
||||
label: system::lang.request_log.count
|
||||
width: 150px
|
||||
|
Loading…
x
Reference in New Issue
Block a user