dashboard: other defaults, sane button centering for services widget

This commit is contained in:
Stephan de Wit 2024-09-13 13:51:31 +02:00
parent ceeffbb9cb
commit de06e2c349
2 changed files with 9 additions and 8 deletions

View File

@ -84,16 +84,16 @@ class DashboardController extends ApiControllerBase
return [
'options' => [],
'widgets' => [
['id' => 'systeminformation', 'x' => 0, 'y' => 0],
['id' => 'systeminformation', 'x' => 0, 'y' => 0, 'w' => 2],
['id' => 'memory', 'x' => 2, 'y' => 0],
['id' => 'disk', 'x' => 3, 'y' => 0],
['id' => 'cpu', 'x' => 4, 'y' => 0, 'w' => 4],
['id' => 'services', 'x' => 8, 'y' => 0, 'w' => '4'],
['id' => 'interfacestatistics', 'x' => 4, 'y' => 0, 'w' => 4],
['id' => 'firewall', 'x' => 8, 'y' => 0, 'w' => 4],
['id' => 'gateways', 'x' => 2, 'y' => 1, 'w' => 2],
['id' => 'traffic', 'x' => 4, 'y' => 1, 'w' => 4],
['id' => 'announcements', 'x' => 0, 'y' => 1, 'w' => 2],
['id' => 'interfacestatistics', 'x' => 4, 'y' => 2, 'w' => 4],
['id' => 'firewall', 'x' => 8, 'y' => 1, 'w' => 4],
['id' => 'services', 'x' => 4, 'y' => 1, 'w' => '4'],
['id' => 'traffic', 'x' => 8, 'y' => 1, 'w' => 4],
['id' => 'cpu', 'x' => 0, 'y' => 1, 'w' => 2],
['id' => 'announcements', 'x' => 2, 'y' => 2, 'w' => 2],
]
];
}

View File

@ -79,7 +79,8 @@ export default class Services extends BaseTableWidget {
actions.push({ action: 'start', id: service.id, title: this.translations.start, icon: 'play' });
}
let $buttonContainer = $(`<div style="display: flex; align-items: center; justify-content: flex-start;">
let $buttonContainer = $(`
<div style="margin-left: 45%">
<span class="label label-opnsense label-opnsense-xs
label-${service.running ? 'success' : 'danger'}
service-status"