Skip to content

Commit

Permalink
also separate out on newly created ones
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Ho <dxho@amazon.com>
  • Loading branch information
derek-ho committed Apr 14, 2023
1 parent ea5baf7 commit 2b1837e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ export class SaveAsNewVisualization extends SavedQuerySaver {
}

addToPanel({ selectedPanels, saveTitle, notifications, visId }) {
const uuidRx = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/;
const soPanels = selectedPanels.filter((id) => id.panel.id.match(uuidRx));
const opsPanels = selectedPanels.filter((id) => !id.panel.id.match(uuidRx));
this.panelClient
.updateBulk({
selectedCustomPanels: selectedPanels,
selectedCustomPanels: opsPanels,
savedVisualizationId: visId,
})
.then((res: any) => {
Expand Down

0 comments on commit 2b1837e

Please sign in to comment.