fix(frontend): add navigation context for cross-view linking and fix double-load bug
Projects "View Secrets"/"View Pipelines" and Groups "View Secrets" now pass connection/scope/entity context so the target view opens with filters pre-filled. Fixed double-load bug where dees-simple-appdash's view-select event re-dispatched setActiveViewAction without context.
This commit is contained in:
@@ -102,7 +102,14 @@ export class GitopsViewProjects extends DeesElement {
|
||||
iconName: 'lucide:key',
|
||||
type: ['inRow', 'contextmenu'],
|
||||
actionFunc: async ({ item }: any) => {
|
||||
appstate.uiStatePart.dispatchAction(appstate.setActiveViewAction, { view: 'secrets' });
|
||||
appstate.uiStatePart.dispatchAction(appstate.setActiveViewAction, {
|
||||
view: 'secrets',
|
||||
navigationContext: {
|
||||
connectionId: this.selectedConnectionId,
|
||||
scope: 'project',
|
||||
scopeId: item.id,
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -110,7 +117,13 @@ export class GitopsViewProjects extends DeesElement {
|
||||
iconName: 'lucide:play',
|
||||
type: ['inRow', 'contextmenu'],
|
||||
actionFunc: async ({ item }: any) => {
|
||||
appstate.uiStatePart.dispatchAction(appstate.setActiveViewAction, { view: 'pipelines' });
|
||||
appstate.uiStatePart.dispatchAction(appstate.setActiveViewAction, {
|
||||
view: 'pipelines',
|
||||
navigationContext: {
|
||||
connectionId: this.selectedConnectionId,
|
||||
projectId: item.id,
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
]}
|
||||
|
||||
Reference in New Issue
Block a user