src: style sweep

This commit is contained in:
Franco Fichtner 2024-03-20 11:50:07 +01:00
parent 92bd601a7b
commit ea90af0434
5 changed files with 16 additions and 14 deletions

View File

@ -82,8 +82,9 @@ class DashboardController extends ApiControllerBase
}
}
$widgetModules = array_filter(glob('/usr/local/opnsense/www/js/widgets/*.js'),
function($element) {
$widgetModules = array_filter(
glob('/usr/local/opnsense/www/js/widgets/*.js'),
function ($element) {
$base = basename($element);
if (str_contains($base, '.js') && !str_contains($base, 'Base')) {
return $this->canAccessEndpoints($element);
@ -93,7 +94,9 @@ class DashboardController extends ApiControllerBase
}
);
$widgetModules = array_map(function($element) {return basename($element);}, $widgetModules);
$widgetModules = array_map(function ($element) {
return basename($element);
}, $widgetModules);
$result['modules'] = [];
foreach ($widgetModules as $module) {
@ -154,4 +157,4 @@ class DashboardController extends ApiControllerBase
return json_encode($result);
}
}
}

View File

@ -195,7 +195,7 @@ div {
flex-flow: row wrap;
transition: 0.5s;
padding: 0.5em 0.5em;
border-top: solid 1px rgba(217, 79, 0, 0.15);
border-top: solid 1px rgba(217, 79, 0, 0.15);
}
.flextable-row {
@ -203,7 +203,7 @@ div {
flex-flow: row wrap;
transition: 0.5s;
padding: 0.5em 0.5em;
border-top: solid 1px rgba(217, 79, 0, 0.15);
border-top: solid 1px rgba(217, 79, 0, 0.15);
align-items: center
}
@ -246,4 +246,4 @@ div {
.column .flex-row:not(:last-child) {
border-bottom: solid 1px rgba(217, 79, 0, 0.15);
}
}

View File

@ -217,7 +217,7 @@ class WidgetManager {
$('#save-grid').show();
});
}
// render to the DOM
this.grid.load(Object.values(this.widgetConfigurations));
@ -359,4 +359,4 @@ class WidgetManager {
return $panel;
}
}
}

View File

@ -236,7 +236,7 @@
// Reject NaN
if (isNaN(timestamp) || isNaN(value)){
return
}
}
var lastI = this.data.length - 1;
if (lastI >= 0) {
@ -609,7 +609,7 @@
SmoothieChart.prototype.updateTooltip = function () {
if(!this.options.tooltip){
return;
return;
}
var el = this.getTooltipEl();
@ -658,7 +658,7 @@
this.mousePageX = evt.pageX;
this.mousePageY = evt.pageY;
if(!this.options.tooltip){
return;
return;
}
var el = this.getTooltipEl();
el.style.top = Math.round(this.mousePageY) + 'px';
@ -1173,4 +1173,3 @@
exports.SmoothieChart = SmoothieChart;
})(typeof exports === 'undefined' ? this : exports);

View File

@ -143,7 +143,7 @@ export default class BaseTableWidget extends BaseWidget {
}
}
}
}
}