Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/developer-guide/mapstore-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,35 @@ This is a list of things to check if you want to update from a previous version

## Migration from 2023.02.xx to 2024.01.00

### Restructuring of Login and Home in Dashboard page

We recently added the sidebar to the dashboard page and by doing so we wanted to keep a uniform position of login and home plugins, by putting them in the omnibar container rather than the sidebar one. The viewer is a specific case that will be reviewed in the future.

In order to align the configuration of the two mentioned plugin you have t

- edit locaConfig.json plugins.dashboard
- remove Home and Login items
- add the following

```json
{
"name": "Home",
"override": {
"OmniBar": {
"priority": 5
}
}
},
{
"name": "Login",
"override": {
"OmniBar": {
"priority": 5
}
}
}
```

### Using `elevation` layer type instead of wms layer with useForElevation property

The wms layer with `useForElevation` property is deprecated and a `elevation` layer introduced in substitution.
Expand Down
22 changes: 18 additions & 4 deletions web/client/configs/localConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -752,12 +752,11 @@
"cfg" : {
"containerPosition": "columns"
}
},
},
{
"name": "Dashboard"
},
"Notifications",
"Login",
{
"name": "About",
"cfg": {
Expand All @@ -769,7 +768,22 @@
"DashboardSave",
"DashboardSaveAs",
"Attribution",
"Home",
{
"name": "Home",
"override": {
"OmniBar": {
"priority": 5
}
}
},
{
"name": "Login",
"override": {
"OmniBar": {
"priority": 5
}
}
},
{ "name": "DeleteDashboard" },
{ "name": "DashboardExport" },
{ "name": "DashboardImport" },
Expand Down Expand Up @@ -992,5 +1006,5 @@
],
"manager": ["Header", "Redirect", "Manager", "Home", "UserManager", "GroupManager", "Footer"],
"context-manager": ["Header", "Redirect", "Home", "ContextManager", "Footer"]
}
}
}
12 changes: 11 additions & 1 deletion web/client/plugins/DashboardEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,17 @@ class DashboardEditorComponent extends React.Component {
const defaultServices = this.props.pluginCfg.services || {};

return this.props.editing
? <div className="dashboard-editor de-builder"><Builder disableEmptyMap={this.props.disableEmptyMap} defaultSelectedService={defaultSelectedService} defaultServices={defaultServices} enabled={this.props.editing} onClose={() => this.props.setEditing(false)} catalog={this.props.catalog} /></div>
? <div
className="dashboard-editor de-builder">
<Builder
disableEmptyMap={this.props.disableEmptyMap}
defaultSelectedService={defaultSelectedService}
defaultServices={defaultServices}
enabled={this.props.editing}
onClose={() => this.props.setEditing(false)}
catalog={this.props.catalog}
/>
</div>
: false;
}
}
Expand Down
6 changes: 2 additions & 4 deletions web/client/plugins/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { setControlProperty } from '../actions/controls';
import {burgerMenuSelector, unsavedMapSelector, unsavedMapSourceSelector} from '../selectors/controls';
import { feedbackMaskSelector } from '../selectors/feedbackmask';
import ConfigUtils from '../utils/ConfigUtils';
import {sidebarIsActiveSelector} from "../selectors/sidebarmenu";

const checkUnsavedMapChanges = (action) => {
return dispatch => {
Expand Down Expand Up @@ -71,8 +70,7 @@ export default {
OmniBar: {
name: 'home',
position: 4,
tool: connect((state) => ({
hidden: sidebarIsActiveSelector(state),
tool: connect(() => ({
bsStyle: 'primary',
tooltipPosition: 'bottom'
}))(HomeConnected),
Expand All @@ -89,7 +87,7 @@ export default {
selector: (state) => ({
style: { display: burgerMenuSelector(state) ? 'none' : null }
}),
priority: 3
priority: 4
}
}),
reducers: {},
Expand Down
6 changes: 2 additions & 4 deletions web/client/plugins/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { Login, LoginNav, PasswordReset, UserDetails, UserMenu } from './login/i
import {connect} from "../utils/PluginsUtils";
import {Glyphicon} from "react-bootstrap";
import {burgerMenuSelector} from "../selectors/controls";
import {sidebarIsActiveSelector} from "../selectors/sidebarmenu";

/**
* Login Plugin. Allow to login/logout or show user info and reset password tools.
Expand Down Expand Up @@ -80,8 +79,7 @@ export default {
OmniBar: {
name: "login",
position: 3,
tool: connect((state) => ({
hidden: sidebarIsActiveSelector(state),
tool: connect(() => ({
renderButtonContent: () => {return <Glyphicon glyph="user" />; },
bsStyle: 'primary'
}))(LoginNav),
Expand All @@ -104,7 +102,7 @@ export default {
style: { display: burgerMenuSelector(state) ? 'none' : null }
}),
tools: [UserDetails, PasswordReset, Login],
priority: 1
priority: 2
}
}),
reducers: {security},
Expand Down
1 change: 1 addition & 0 deletions web/client/plugins/widgetbuilder/ChartLayerSelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export default connect((state) =>({
trigger={false}
glyph="warning-sign"
bsStyle="warning"
placement="left"
title={<Message msgId="widgets.builder.errors.noWidgetsAvailableTitle"/>}
text={<HTML msgId={layerError}/>}/> : null}
</BuilderHeader>}
Expand Down
6 changes: 4 additions & 2 deletions web/client/themes/default/less/dashboard.less
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@
}

}

#mapstore-sidebar-menu-container {
order: 2;
}
.dashboard-editor {
/* flex column */
order: -1;
order: 1;
z-index: 1;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.12);

Expand Down