Ent 6879 separar en alertas de inventario el selector de grupos de acl del selector de grupos sobre el que se aplican las alertas

This commit is contained in:
Daniel Maya 2021-03-01 10:35:28 +00:00 committed by Daniel Rodriguez
parent 55f9ab6d57
commit 208c0d10e8
5 changed files with 14 additions and 6 deletions

View File

@ -1,6 +1,8 @@
START TRANSACTION; START TRANSACTION;
ALTER TABLE `tinventory_alert` ADD COLUMN `alert_groups` TEXT NOT NULL;
UPDATE `tinventory_alert` t1 INNER JOIN `tinventory_alert` t2 ON t1.id = t2.id SET t1.alert_groups = t2.id_group;
ALTER TABLE `tnotification_source` ADD COLUMN `subtype_blacklist` TEXT; ALTER TABLE `tnotification_source` ADD COLUMN `subtype_blacklist` TEXT;
COMMIT; COMMIT;

View File

@ -363,6 +363,7 @@ CREATE TABLE IF NOT EXISTS `tinventory_alert`(
`last_fired` text NOT NULL default '', `last_fired` text NOT NULL default '',
`disable_event` tinyint(1) UNSIGNED default 0, `disable_event` tinyint(1) UNSIGNED default 0,
`enabled` tinyint(1) UNSIGNED default 1, `enabled` tinyint(1) UNSIGNED default 1,
`alert_groups` text NOT NULL default '',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
FOREIGN KEY (`id_module_inventory`) REFERENCES tmodule_inventory(`id_module_inventory`) FOREIGN KEY (`id_module_inventory`) REFERENCES tmodule_inventory(`id_module_inventory`)
ON DELETE CASCADE ON UPDATE CASCADE ON DELETE CASCADE ON UPDATE CASCADE

View File

@ -2653,6 +2653,7 @@ CREATE TABLE IF NOT EXISTS `tinventory_alert`(
`last_fired` text NOT NULL default '', `last_fired` text NOT NULL default '',
`disable_event` tinyint(1) UNSIGNED default 0, `disable_event` tinyint(1) UNSIGNED default 0,
`enabled` tinyint(1) UNSIGNED default 1, `enabled` tinyint(1) UNSIGNED default 1,
`alert_groups` text NOT NULL default '',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
FOREIGN KEY (`id_module_inventory`) REFERENCES tmodule_inventory(`id_module_inventory`) FOREIGN KEY (`id_module_inventory`) REFERENCES tmodule_inventory(`id_module_inventory`)
ON DELETE CASCADE ON UPDATE CASCADE ON DELETE CASCADE ON UPDATE CASCADE

View File

@ -844,7 +844,7 @@ abstract class VisualConsoleItem<Props extends ItemProps> {
if ( if (
prevProps && prevProps &&
(this.props.isLinkEnabled && prevProps.link !== this.props.link) this.props.isLinkEnabled && prevProps.link !== this.props.link
) { ) {
if (this.props.link !== null) { if (this.props.link !== null) {
this.elementRef.setAttribute("href", this.props.link); this.elementRef.setAttribute("href", this.props.link);

View File

@ -446,10 +446,14 @@ export default class Line extends Item<LineProps> {
} }
// Init the movement listeners. // Init the movement listeners.
this.initStartPositionMovementListener(startCircle, this.elementRef this.initStartPositionMovementListener(
.parentElement as HTMLElement); startCircle,
this.initEndPositionMovementListener(endCircle, this.elementRef this.elementRef.parentElement as HTMLElement
.parentElement as HTMLElement); );
this.initEndPositionMovementListener(
endCircle,
this.elementRef.parentElement as HTMLElement
);
} else if (!this.moveMode) { } else if (!this.moveMode) {
this.stopStartPositionMovementListener(); this.stopStartPositionMovementListener();
// Remove circles. // Remove circles.