Skip to content

Commit

Permalink
geosolutions-it#9683: resolve test comment (geosolutions-it#9730)
Browse files Browse the repository at this point in the history
- Adding export, import, delete dashboard
- Reorder shown plugins in sidebar for dashboard
  • Loading branch information
mahmoudadel54 committed Nov 27, 2023
1 parent 4aec303 commit 3d3d5c3
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/client/plugins/AddWidgetDashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default createPlugin('AddWidgetDashboard', {
containers: {
SidebarMenu: {
name: "AddWidgetDashboard",
position: 10,
position: 3,
tool: ConnectedAddWidget,
priority: 0
}
Expand Down
12 changes: 12 additions & 0 deletions web/client/plugins/DashboardExport.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ const DashboardExportPlugin = createPlugin('DashboardExport', {
toggle: true,
doNotHide: true
};
}, SidebarMenu: () => {
return {
name: "export",
position: 4,
text: <Message msgId="mapExport.title" />,
tooltip: "mapExport.title",
icon: <Glyphicon glyph="download" />,
action: () => toggleControl('export'),
priority: 2,
toggle: true,
doNotHide: true
};
}
}
});
Expand Down
12 changes: 12 additions & 0 deletions web/client/plugins/DashboardImport.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@ const DashboardImportPlugin = createPlugin('DashboardImport', {
toggle: true,
doNotHide: true
};
}, SidebarMenu: () => {
return {
name: "import",
position: 4,
tooltip: "mapImport.title",
text: <Message msgId="mapImport.title" />,
icon: <Glyphicon glyph="upload" />,
action: () => toggleControl('import'),
priority: 2,
toggle: true,
doNotHide: true
};
}
}
});
Expand Down
16 changes: 16 additions & 0 deletions web/client/plugins/DeleteDashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,22 @@ export default createPlugin('DeleteDashboard', {
),
priority: 1,
doNotHide: true
}, SidebarMenu: {
name: 'dashboardDelete',
tooltip: "dashboard.delete",
position: 300,
text: <Message msgId="dashboard.delete"/>,
icon: <Glyphicon glyph="trash"/>,
action: setControl.bind(null, Controls.SHOW_DELETE, true),
selector: createSelector(
isLoggedIn,
dashboardResource,
(loggedIn, {canEdit, id} = {}) => ({
style: loggedIn && (id && canEdit) ? {} : { display: "none" } // save is present only if the resource already exists and you can save
})
),
priority: 1,
doNotHide: true
}
}
});
2 changes: 1 addition & 1 deletion web/client/plugins/MapConnectionDashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default createPlugin('MapConnectionDashboard', {
SidebarMenu: {
name: "MapConnectionDashboard",
tool: ConnectedMapAddWidget,
position: 10,
position: 3,
priority: 0
}
}
Expand Down

0 comments on commit 3d3d5c3

Please sign in to comment.