Merge branch 'ent-10255-14940-Funcionalidad-cuadro-naranja-en-las-consolas-visuales-cuando-hay-una-alerta' into 'develop'
setup check to enable/disable vc item alert frame See merge request artica/pandorafms!5668
This commit is contained in:
commit
af80e204de
|
@ -1421,6 +1421,17 @@ $table_vc->data[$row][] = html_print_label_input_block(
|
|||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table_vc->data[$row][] = html_print_label_input_block(
|
||||
__('Display item frame on alert triggered'),
|
||||
html_print_checkbox_switch(
|
||||
'display_item_frame',
|
||||
1,
|
||||
(bool) $config['display_item_frame'],
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$row++;
|
||||
|
||||
|
||||
|
|
|
@ -1222,6 +1222,10 @@ function config_update_config()
|
|||
$error_update[] = __('Mobile view not allow visual console orientation');
|
||||
}
|
||||
|
||||
if (config_update_value('display_item_frame', (int) get_parameter('display_item_frame'), true) === false) {
|
||||
$error_update[] = __('Display item frame on alert triggered');
|
||||
}
|
||||
|
||||
if (config_update_value('ser_menu_items', (int) get_parameter('ser_menu_items', 10), true) === false) {
|
||||
$error_update[] = __('Default line menu items for the Services');
|
||||
}
|
||||
|
@ -3417,6 +3421,10 @@ function config_process_config()
|
|||
config_update_value('mobile_view_orientation_vc', 0);
|
||||
}
|
||||
|
||||
if (isset($config['display_item_frame']) === false) {
|
||||
config_update_value('display_item_frame', 1);
|
||||
}
|
||||
|
||||
if (!isset($config['agent_size_text_small'])) {
|
||||
config_update_value('agent_size_text_small', 18);
|
||||
}
|
||||
|
|
|
@ -194,6 +194,8 @@ class Item extends CachedModel
|
|||
*/
|
||||
protected function decode(array $data): array
|
||||
{
|
||||
global $config;
|
||||
|
||||
$decodedData = [
|
||||
'id' => (int) $data['id'],
|
||||
'colorStatus' => (string) COL_UNKNOWN,
|
||||
|
@ -209,9 +211,12 @@ class Item extends CachedModel
|
|||
'x' => static::extractX($data),
|
||||
'y' => static::extractY($data),
|
||||
'cacheExpiration' => static::extractCacheExpiration($data),
|
||||
'alertOutline' => static::checkLayoutAlertsRecursive($data),
|
||||
];
|
||||
|
||||
if ((bool) $config['display_item_frame'] === true) {
|
||||
$decodedData['alertOutline'] = static::checkLayoutAlertsRecursive($data);
|
||||
}
|
||||
|
||||
if (static::$useLinkedModule === true) {
|
||||
$decodedData = array_merge(
|
||||
$decodedData,
|
||||
|
|
Loading…
Reference in New Issue