add black theme to widget dashboard

This commit is contained in:
marcos 2021-04-14 12:07:38 +02:00
parent dd41c1c0f7
commit b6ea565118
13 changed files with 597 additions and 536 deletions

View File

@ -885,6 +885,11 @@ function html_print_select(
";
}
$select2 = 'select2.min';
if ($config['style'] === 'pandora_black') {
$select2 = 'select2_dark.min';
}
if ($multiple === false) {
if (is_ajax()) {
$output .= '<script src="';
@ -898,18 +903,13 @@ function html_print_select(
$output .= '<link rel="stylesheet" href="';
$output .= ui_get_full_url(
'include/styles/select2.min.css',
'include/styles/'.$select2.'.css',
false,
false,
false
);
$output .= '"/>';
} else {
$select2 = 'select2.min';
if ($config['style'] === 'pandora_black') {
$select2 = 'select2_dark.min';
}
ui_require_css_file($select2);
ui_require_javascript_file('select2.min');
}

View File

@ -322,7 +322,7 @@ function ui_print_message($message, $class='', $attributes='', $return=false, $t
class="info_box '.$id.' '.$class.' textodialogo" style="'.$force_style.'">
<tr>
<td class="icon icon_ui" rowspan="2" >'.html_print_image($icon_image, true, false, false, false, false).'</td>
<td class="title pandora_upper pdd_t_10px"><b>'.$text_title.'</b></td>
<td class="title pandora_upper pdd_t_10px text_left"><b>'.$text_title.'</b></td>
<td class="icon right pdd_r_3px">';
if (!$no_close_bool) {
// Use the no_meta parameter because this image is only in

View File

@ -2798,7 +2798,7 @@ Licensed under the MIT license.
pos += 'right:' + (m[0] + plotOffset.right) + 'px;';
else if (p.charAt(1) == "w")
pos += 'left:' + (m[0] + plotOffset.left) + 'px;';
var legend = $('<div class="legend">' + table.replace('style="', 'style="position:absolute;' + pos +';') + '</div>').appendTo(placeholder);
var legend = $('<div class="bg_222_important">' + table.replace('style="', 'style="position:absolute;' + pos + ';') + '</div>').appendTo(placeholder);
if (options.legend.backgroundOpacity != 0.0) {
// put in the transparent background
// separately to avoid blended labels and
@ -2814,7 +2814,7 @@ Licensed under the MIT license.
c = c.toString();
}
var div = legend.children();
$('<div style="position:absolute;width:' + div.width() + 'px;height:' + div.height() + 'px;' + pos +'background-color:' + c + ';"> </div>').prependTo(legend).css('opacity', options.legend.backgroundOpacity);
$('<div class="" style="position:absolute;width:' + div.width() + 'px;height:' + div.height() + 'px;' + pos + 'background-color:' + c + ';"> </div>').prependTo(legend).css('opacity', options.legend.backgroundOpacity);
}
}
}
@ -2917,10 +2917,12 @@ Licensed under the MIT license.
j = item[1];
ps = series[i].datapoints.pointsize;
return { datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps),
return {
datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps),
dataIndex: j,
series: series[i],
seriesIndex: i };
seriesIndex: i
};
}
return null;

File diff suppressed because one or more lines are too long

View File

@ -683,12 +683,13 @@ function flot_vcolumn_chart(array $options)
$options['graphId'] = $graphId;
// If pandora_black theme its enabled then change grid colors.
/*
if ($config['style'] === 'pandora_black') {
$options['grid']['backgroundColor']['colors'][0] = 'transparent';
$options['grid']['backgroundColor']['colors'][1] = 'transparent';
$options['y']['color'] = 'transparent';
$options['x']['color'] = 'transparent';
}
}*/
$settings = base64_encode(json_encode($options));

View File

@ -2646,6 +2646,8 @@ function printClockDigital1(
svg = d3.selectAll("#clock_" + id_element + " svg");
svgUnderlay.attr("id", "underlay_" + id_element);
svgUnderlay.attr("class", "invert_filter");
svgOverlay.attr("id", "overlay_" + id_element);
var digit = svg.selectAll(".digit"),

View File

@ -490,6 +490,8 @@ class Widget
*/
public function getFormInputs(): array
{
global $config;
$inputs = [];
$values = $this->values;
@ -501,6 +503,10 @@ class Widget
if (empty($values['background']) === true) {
$values['background'] = '#ffffff';
if ($config['style'] === 'pandora_black') {
$values['background'] = '#222222';
}
}
$inputs[] = [

View File

@ -732,7 +732,12 @@ class EventsListWidget extends Widget
$table->data[$i] = $data;
$table->cellstyle[$i][0] = 'background: #E8E8E8;';
$bg_color = 'background: #E8E8E8;';
if ($config['style'] === 'pandora_black') {
$bg_color = 'background: #222;';
}
$table->cellstyle[$i][0] = $bg_color;
$rowclass = \events_get_criticity_class($event['criticity']);
$table->cellclass[$i][1] = $rowclass;
$table->cellclass[$i][2] = $rowclass;

View File

@ -510,7 +510,7 @@ class SystemGroupStatusWidget extends Widget
$show_link = array_key_exists($group['g'], $user_groups);
if ((in_array($group['g'], $this->values['groupId'])) === true) {
$table->data[$i][] = '<span>'.$group['name'].'</span>';
$table->data[$i][] = '<span class="legendLabel">'.$group['name'].'</span>';
$url = $config['homeurl'].'index.php';
$url .= '?sec=estado&sec2=operation/agentes/status_monitor';

View File

@ -536,6 +536,9 @@ class TreeViewWidget extends Widget
// Css Files.
\ui_require_css_file('tree', 'include/styles/', true);
if ($config['style'] == 'pandora_black') {
\ui_require_css_file('pandora_black', 'include/styles/', true);
}
// Javascript Files.
\ui_include_time_picker();

View File

@ -665,6 +665,9 @@ form ul.form_flex {
border-radius: 4px;
}
text {
color: #fff !important;
}
.legendLabel {
color: #fff;
}
@ -720,8 +723,9 @@ form ul.form_flex {
color: #900;
}
.cluetip-default ul {
text-align: left;
.cluetip-default ul,
.text_left {
text-align: left !important;
}
.card {
border: 1px solid #e2e2e2;
@ -892,3 +896,38 @@ div.integria_details_description textarea {
color: #fff;
resize: vertical;
}
.grid-stack-item-content {
color: #fff !important;
}
.widget-groups-status h1 a {
font-size: 1.1em;
font-weight: bold;
line-height: 20px;
color: #fff;
font-family: "lato-lighter", "Open Sans", sans-serif;
letter-spacing: 0.03pt;
text-decoration: none;
text-transform: capitalize;
}
.widget_groups_status {
background-color: #222;
}
.flot-text {
color: #fff !important;
}
.table.group_modules_status_box tr td {
font-family: "lato-lighter", "Open Sans", sans-serif;
letter-spacing: 0.03pt;
font-size: 11pt;
text-decoration: none;
color: #fff !important;
font-weight: bolder;
text-align: justify;
border-bottom: 0px;
}
.bg_222_important {
background-color: #222 !important;
}

View File

@ -255,7 +255,7 @@
.select2-container--default
.select2-selection--multiple
.select2-selection__choice {
background-color: #e4e4e4;
background-color: #222;
border: 1px solid #aaa;
border-radius: 4px;
cursor: default;
@ -263,7 +263,7 @@
margin-right: 5px;
margin-top: 5px;
padding: 0 5px;
color: #111;
color: #fff;
}
.select2-container--default
.select2-selection--multiple
@ -277,7 +277,7 @@
.select2-container--default
.select2-selection--multiple
.select2-selection__choice__remove:hover {
color: #333;
color: #82b92e;
}
.select2-container--default[dir="rtl"]
.select2-selection--multiple
@ -301,7 +301,7 @@
}
.select2-container--default.select2-container--focus
.select2-selection--multiple {
border: solid black 1px;
border: solid #fff 1px;
outline: 0;
}
.select2-container--default.select2-container--disabled
@ -331,7 +331,7 @@
border: 1px solid #aaa;
}
.select2-container--default .select2-search--inline .select2-search__field {
background: transparent;
background: #222;
border: none;
outline: 0;
box-shadow: none;

View File

@ -73,6 +73,9 @@ if ($manageDashboards !== 0) {
$output .= '</div>';
$output .= '</div>';
if ($options['background'] === null && $config['style'] === 'pandora_black') {
$options['background'] = '#222';
}
if ((int) $cellData['id_widget'] !== 0) {
$style = 'style="background-color:'.$options['background'].';"';