-
Notifications
You must be signed in to change notification settings - Fork 393
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
The default catalog changes after the catalog is opened from the background tool #10486 #10586
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -25,6 +25,7 @@ export const CLEAR_MODAL_PARAMETERS = 'BACKGROUND_SELECTOR:CLEAR_MODAL_PARAMETER | |||||||||||||||||||||||||||||||||||
export const CONFIRM_DELETE_BACKGROUND_MODAL = 'BACKGROUND_SELECTOR:CONFIRM_DELETE_BACKGROUND_MODAL'; | ||||||||||||||||||||||||||||||||||||
export const ALLOW_BACKGROUNDS_DELETION = 'BACKGROUND_SELECTOR:ALLOW_BACKGROUNDS_DELETION'; | ||||||||||||||||||||||||||||||||||||
export const SYNC_CURRENT_BACKGROUND_LAYER = 'BACKGROUND_SELECTOR:SYNC_CURRENT_BACKGROUND_LAYER'; | ||||||||||||||||||||||||||||||||||||
export const ADD_BACKUP_BACKGROUND = 'BACKGROUND_SELECTOR:ADD_BACKUP_BACKGROUND'; | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
export function createBackgroundsList(backgrounds) { | ||||||||||||||||||||||||||||||||||||
return { | ||||||||||||||||||||||||||||||||||||
|
@@ -125,3 +126,10 @@ export function confirmDeleteBackgroundModal(show, layerTitle = null, layerId = | |||||||||||||||||||||||||||||||||||
layerId | ||||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
export function addBackupBackground(background) { | ||||||||||||||||||||||||||||||||||||
return { | ||||||||||||||||||||||||||||||||||||
type: ADD_BACKUP_BACKGROUND, | ||||||||||||||||||||||||||||||||||||
background | ||||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This action stashes the selected catalog, not a backup of the background.
Suggested change
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,8 @@ import { | |
setBackgroundModalParams, | ||
setCurrentBackgroundLayer, | ||
allowBackgroundsDeletion, | ||
backgroundAdded | ||
backgroundAdded, | ||
addBackupBackground | ||
} from '../actions/backgroundselector'; | ||
|
||
import { setControlProperty } from '../actions/controls'; | ||
|
@@ -36,14 +37,16 @@ import { getCustomTileGridProperties, getLayerOptions } from '../utils/WMSUtils' | |
import { getLayerTileMatrixSetsInfo } from '../api/WMTS'; | ||
import { generateGeoServerWMTSUrl } from '../utils/WMTSUtils'; | ||
|
||
const accessMetadataExplorer = (action$) => | ||
const accessMetadataExplorer = (action$, store) => | ||
action$.ofType(ADD_BACKGROUND) | ||
.switchMap(() => Rx.Observable.of( | ||
setControlProperty('metadataexplorer', 'enabled', true), | ||
allowBackgroundsDeletion(false), | ||
addBackupBackground(store.getState().catalog.selectedService), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use selectors when available in this case |
||
changeSelectedService('default_map_backgrounds') | ||
)); | ||
|
||
|
||
const addBackgroundPropertiesEpic = (action$) => | ||
action$.ofType(ADD_BACKGROUND_PROPERTIES) | ||
.switchMap(({modalParams}) => { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -592,13 +592,12 @@ export default (API) => ({ | |
.switchMap(() => { | ||
const state = store.getState(); | ||
const metadataSource = metadataSourceSelector(state); | ||
const services = servicesSelector(state); | ||
return Rx.Observable.of(...([ | ||
setControlProperties('metadataexplorer', "enabled", false, "group", null), | ||
changeCatalogMode("view"), | ||
resetCatalog() | ||
].concat(metadataSource === 'backgroundSelector' ? | ||
[changeSelectedService(head(keys(services))), allowBackgroundsDeletion(true)] : []))); | ||
[changeSelectedService(state.backgroundSelector.backupBackground), allowBackgroundsDeletion(true)] : []))); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also in this case, create a selector for that value and use it here. |
||
}), | ||
|
||
/** | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.