Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: Jovan Cvetkovic <[email protected]>
  • Loading branch information
jovancvetkovic3006 committed Jun 22, 2023
1 parent c796666 commit 2ad090a
Showing 1 changed file with 13 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,21 @@ const AssociateMonitors = ({

_.set(monitorValues, 'associatedMonitorsEditor', JSON.stringify(value, null, 4));
_.set(monitorValues, 'associatedMonitors', delegatesToMonitors(value));
} else {
if (options?.length && !graphUi) {
const value = { ...queryTemplate };
const firstTwo = options.slice(0, 2);
firstTwo.map((monitor, idx) => {
value.sequence.delegates.push({
order: idx + 1,
monitor_id: monitor.monitor_id,
});
} else if (options?.length && !graphUi) {
const value = { ...queryTemplate };
const firstTwo = options.slice(0, 2);
firstTwo.map((monitor, idx) => {
value.sequence.delegates.push({
order: idx + 1,
monitor_id: monitor.monitor_id,
});
});

try {
_.set(monitorValues, 'associatedMonitorsEditor', JSON.stringify(value, null, 4));
_.set(monitorValues, 'associatedMonitors', delegatesToMonitors(value));
} catch (e) {
console.log('No monitor options are available.');
}
try {
_.set(monitorValues, 'associatedMonitorsEditor', JSON.stringify(value, null, 4));
_.set(monitorValues, 'associatedMonitors', delegatesToMonitors(value));
} catch (e) {
console.log('No monitor options are available.');
}
}

Expand Down

0 comments on commit 2ad090a

Please sign in to comment.