Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#9889: Fix - Unable to export map configuration in context manager #9896

Merged
merged 2 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 1 addition & 3 deletions web/client/components/contextcreator/ContextCreator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,7 @@ export default class ContextCreator extends React.Component {
editingAllowedRoles: []
}
}
},
"ContextImport",
"ContextExport"
}
MV88 marked this conversation as resolved.
Show resolved Hide resolved
],
ignoreViewerPlugins: false,
allAvailablePlugins: [],
Expand Down
2 changes: 1 addition & 1 deletion web/client/epics/__tests__/contextcreator-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ describe('contextcreator epics', () => {
it('exportContextEpic, export context with plugins and themes', (done) => {
testEpic(exportContextEpic, 1, onContextExport('file.json'), ([a]) => {
expect(a.type).toEqual(TOGGLE_CONTROL);
expect(a.control).toEqual("export");
expect(a.control).toEqual("export-context");
done();
}, {
map: {
Expand Down
2 changes: 1 addition & 1 deletion web/client/epics/contextcreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ export const exportContextEpic = (action$, { getState }) =>
"application/json"
])
.do((downloadArgs) => download(...downloadArgs))
.map(() => toggleControl("export"))
.map(() => toggleControl("export-context"))
.catch(() =>
Rx.Observable.of(
error({
Expand Down
7 changes: 4 additions & 3 deletions web/client/plugins/ContextExport.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import { onContextExport } from "../actions/contextcreator";
import { toggleControl } from "../actions/controls";
import Message from "../components/I18N/Message";
import Button from "../components/misc/Button";
const isEnabled = createControlEnabledSelector("export");
const EXPORT_CONTROL = "export-context";
dsuren1 marked this conversation as resolved.
Show resolved Hide resolved
const isEnabled = createControlEnabledSelector(EXPORT_CONTROL);

const mapStateToProps = createSelector(
isEnabled,
Expand All @@ -32,7 +33,7 @@ const mapStateToProps = createSelector(
);

const actions = {
onClose: () => toggleControl("export"),
onClose: () => toggleControl(EXPORT_CONTROL),
onExport: onContextExport
};

Expand All @@ -58,7 +59,7 @@ const ExportComponent = connect(mapStateToProps, actions)(Component);
const ExportButton = connect(
createSelector(resourceSelector, (resource) => ({ resource })),
{
onExport: () => toggleControl("export")
onExport: () => toggleControl(EXPORT_CONTROL)
}
)(({ resource, onExport }) => (
<Button
Expand Down
2 changes: 1 addition & 1 deletion web/client/plugins/__tests__/ContextExport-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('ContextExport plugin', () => {
it('displays the export panel when enabled', () => {
const { Plugin } = getPluginForTest(ContextExport, {
controls: {
"export": {
"export-context": {
enabled: true
}
}
Expand Down
Loading