Skip to content
Merged
148 changes: 74 additions & 74 deletions src/main/webapp/js/app.min.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/main/webapp/js/diagramly/EditorUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -15237,6 +15237,8 @@
return;
}

// Unlike setDataProperties, no Centreon wizard that stores graph._centreonEditCell
// ever sends setStyleProperties, so graph.getSelectionCell() is sufficient here.
var cell = graph.getSelectionCell();
var cellStyle = graph.getModel().getStyle(cell);

Expand All @@ -15258,7 +15260,9 @@

var graph = this.editor.graph;

var cell = graph.getSelectionCell();
// Fallback to _centreonEditCell because opening the wizard shifts focus to the iframe, which clears the graph selection before setDataProperties is received.
var cell = graph.getSelectionCell() || graph._centreonEditCell;
Comment thread
gfontaineCentreon marked this conversation as resolved.
Comment thread
gfontaineCentreon marked this conversation as resolved.
graph._centreonEditCell = null;
var cellValue = graph.getModel().getValue(cell);
cellValue = cellValue.cloneNode(true);

Expand Down
5 changes: 3 additions & 2 deletions src/main/webapp/js/grapheditor/Actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ Actions.prototype.init = function()
const resourceCentreonProps = ['type', 'resourceType', 'resourceId', 'displayLabel', 'displayImage', 'displayParentName', 'useResourceName', 'label',
'resourceName', 'modelId', 'viewId', 'parentName', 'parentType', 'parentId', 'displayWeatherStatusBackgroundColor', 'useBackgroundStatusColor'];
const linkProps = ['type', 'linkType', 'parentName', 'parentType', 'parentId',
'resourceType', 'resourceId', 'resourceName', 'modelId','metric1Min',
'resourceType', 'resourceId', 'resourceName', 'resource2Id', 'resource2Name', 'modelId', 'metric1Min',
'metric1Max', 'metric2Min', 'metric2Max', 'metricName1', 'metricName2', 'displayPercent'];
const mediaProps = ['type', 'mediaType', 'newTab', 'elementUrl',
'imageName', 'centreonImageId', 'label'];
Expand Down Expand Up @@ -808,11 +808,12 @@ Actions.prototype.init = function()
cellAttributes = createAttributes(containerProps);
}

graph._centreonEditCell = cell;
parent.postMessage(JSON.stringify({
mxObject: cellAttributes,
mxStyle: cell.getStyle(),
event: 'setShowWizardShapeProperties',
}), '*');
}), '*');

}, null, null, Editor.ctrlKey + '+E');
this.addAction('editCentreonStyle', function()
Expand Down
330 changes: 165 additions & 165 deletions src/main/webapp/js/stencils.min.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/main/webapp/js/viewer-static.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading