From cfd0fad05a16d1281056a27e750efb2178b2d068 Mon Sep 17 00:00:00 2001 From: Radolumbo Date: Fri, 23 Apr 2021 18:21:29 -0500 Subject: [PATCH] fix(ui): Remove the ability to change namespaces via the UI in Managed Namespace Mode. Closes #5577 Signed-off-by: Saravanan Balasubramanian --- USERS.md | 2 ++ ui/src/app/app-router.tsx | 20 ++++++++++--------- .../archived-workflow-list.tsx | 5 +++-- .../cluster-workflow-template-details.tsx | 2 +- .../components/cron-workflow-creator.tsx | 4 ++-- .../cron-workflow-list/cron-workflow-list.tsx | 3 ++- .../event-flow-details/event-flow-page.tsx | 5 +++-- .../components/event-source-creator.tsx | 4 ++-- .../event-source-list/event-source-list.tsx | 5 +++-- ui/src/app/reports/components/reports.tsx | 7 ++++--- .../app/sensors/components/sensor-creator.tsx | 4 ++-- .../components/sensor-list/sensor-list.tsx | 5 +++-- ui/src/app/shared/utils.ts | 7 ++++++- .../workflow-event-bindings.tsx | 5 +++-- .../components/workflow-template-creator.tsx | 4 ++-- .../workflow-template-list.tsx | 5 +++-- .../workflows/components/workflow-creator.tsx | 4 ++-- .../workflows-list/workflows-list.tsx | 7 ++++--- 18 files changed, 58 insertions(+), 40 deletions(-) diff --git a/USERS.md b/USERS.md index bf34cd5740a2..7dab3fffe546 100644 --- a/USERS.md +++ b/USERS.md @@ -23,7 +23,9 @@ Currently, the following organizations are **officially** using Argo Workflows: 1. [BEI.RE](https://www.bei.re/) 1. [BioBox Analytics](https://biobox.io) 1. [BlackRock](https://www.blackrock.com/) +1. [Bloomberg](https://www.bloomberg.com/) 1. [bonprix](https://en.bonprix.de/corporate/our-company/) +1. [ByteDance](https://www.bytedance.com/en/) 1. [Canva](https://www.canva.com/) 1. [Capital One](https://www.capitalone.com/tech/) 1. [CarTrack](https://www.cartrack.com/) diff --git a/ui/src/app/app-router.tsx b/ui/src/app/app-router.tsx index 5ad47d894687..e9be83a0a072 100644 --- a/ui/src/app/app-router.tsx +++ b/ui/src/app/app-router.tsx @@ -69,6 +69,7 @@ export const AppRouter = ({popupManager, history, notificationsManager}: {popupM .catch(setError); }, []); + const namespaceSuffix = Utils.managedNamespace ? '' : '/' + namespace; return ( <> {popupProps && } @@ -79,12 +80,12 @@ export const AppRouter = ({popupManager, history, notificationsManager}: {popupM navItems={[ { title: 'Workflows', - path: workflowsUrl + '/' + namespace, + path: workflowsUrl + namespaceSuffix, iconClassName: 'fa fa-stream' }, { title: 'Workflow Templates', - path: workflowTemplatesUrl + '/' + namespace, + path: workflowTemplatesUrl + namespaceSuffix, iconClassName: 'fa fa-window-maximize' }, { @@ -94,37 +95,37 @@ export const AppRouter = ({popupManager, history, notificationsManager}: {popupM }, { title: 'Cron Workflows', - path: cronWorkflowsUrl + '/' + namespace, + path: cronWorkflowsUrl + namespaceSuffix, iconClassName: 'fa fa-clock' }, { title: 'Event Flow', - path: eventFlowUrl + '/' + namespace, + path: eventFlowUrl + namespaceSuffix, iconClassName: 'fa fa-broadcast-tower' }, { title: 'Event Sources', - path: eventSourceUrl + '/' + namespace, + path: eventSourceUrl + namespaceSuffix, iconClassName: 'fas fa-bolt' }, { title: 'Sensors', - path: sensorUrl + '/' + namespace, + path: sensorUrl + namespaceSuffix, iconClassName: 'fa fa-satellite-dish' }, { title: 'Workflow Event Bindings', - path: workflowsEventBindingsUrl + '/' + namespace, + path: workflowsEventBindingsUrl + namespaceSuffix, iconClassName: 'fa fa-link' }, { title: 'Archived Workflows', - path: archivedWorkflowsUrl + '/' + namespace, + path: archivedWorkflowsUrl + namespaceSuffix, iconClassName: 'fa fa-archive' }, { title: 'Reports', - path: reportsUrl + '/' + namespace, + path: reportsUrl + namespaceSuffix, iconClassName: 'fa fa-chart-bar' }, { @@ -164,6 +165,7 @@ export const AppRouter = ({popupManager, history, notificationsManager}: {popupM + {Utils.managedNamespace && } {namespace && } diff --git a/ui/src/app/archived-workflows/components/archived-workflow-list/archived-workflow-list.tsx b/ui/src/app/archived-workflows/components/archived-workflow-list/archived-workflow-list.tsx index afe2545c41d6..17e7bfd04bdf 100644 --- a/ui/src/app/archived-workflows/components/archived-workflow-list/archived-workflow-list.tsx +++ b/ui/src/app/archived-workflows/components/archived-workflow-list/archived-workflow-list.tsx @@ -47,7 +47,7 @@ export class ArchivedWorkflowList extends BasePage, Sta const labelQueryParam = this.queryParams('label'); this.state = { pagination: {offset: this.queryParam('offset'), limit: parseLimit(this.queryParam('limit')) || savedOptions.pagination.limit}, - namespace: this.props.match.params.namespace || '', + namespace: Utils.getNamespace(this.props.match.params.namespace) || '', selectedPhases: phaseQueryParam.length > 0 ? phaseQueryParam : savedOptions.selectedPhases, selectedLabels: labelQueryParam.length > 0 ? labelQueryParam : savedOptions.selectedLabels, minStartedAt: this.parseTime(this.queryParam('minStartedAt')) || this.lastMonth(), @@ -144,7 +144,8 @@ export class ArchivedWorkflowList extends BasePage, Sta private saveHistory() { this.storage.setItem('options', this.state, {} as State); - this.url = uiUrl('archived-workflows/' + (this.state.namespace || '') + '?' + this.filterParams.toString()); + const newNamespace = Utils.managedNamespace ? '' : this.state.namespace; + this.url = uiUrl('archived-workflows' + (newNamespace ? '/' + newNamespace : '') + '?' + this.filterParams.toString()); Utils.currentNamespace = this.state.namespace; } diff --git a/ui/src/app/cluster-workflow-templates/components/cluster-workflow-template-details/cluster-workflow-template-details.tsx b/ui/src/app/cluster-workflow-templates/components/cluster-workflow-template-details/cluster-workflow-template-details.tsx index d129bc0d6d8a..b1cb30e6008a 100644 --- a/ui/src/app/cluster-workflow-templates/components/cluster-workflow-template-details/cluster-workflow-template-details.tsx +++ b/ui/src/app/cluster-workflow-templates/components/cluster-workflow-template-details/cluster-workflow-template-details.tsx @@ -56,7 +56,7 @@ export const ClusterWorkflowTemplateDetails = ({history, location, match}: Route useEffect(() => { services.info .getInfo() - .then(info => setNamespace(Utils.getNamespace(info.managedNamespace))) + .then(info => setNamespace(Utils.getNamespaceWithDefault(info.managedNamespace))) .then(() => setError(null)) .catch(setError); }, []); diff --git a/ui/src/app/cron-workflows/components/cron-workflow-creator.tsx b/ui/src/app/cron-workflows/components/cron-workflow-creator.tsx index fff94f32a8e1..5415ca8005e1 100644 --- a/ui/src/app/cron-workflows/components/cron-workflow-creator.tsx +++ b/ui/src/app/cron-workflows/components/cron-workflow-creator.tsx @@ -11,7 +11,7 @@ import {Utils} from '../../shared/utils'; import {CronWorkflowEditor} from './cron-workflow-editor'; export const CronWorkflowCreator = ({onCreate, namespace}: {namespace: string; onCreate: (cronWorkflow: CronWorkflow) => void}) => { - const [cronWorkflow, setCronWorkflow] = useState(exampleCronWorkflow(Utils.getNamespace(namespace))); + const [cronWorkflow, setCronWorkflow] = useState(exampleCronWorkflow(Utils.getNamespaceWithDefault(namespace))); const [error, setError] = useState(); return ( <> @@ -21,7 +21,7 @@ export const CronWorkflowCreator = ({onCreate, namespace}: {namespace: string; o icon='plus' onClick={() => { services.cronWorkflows - .create(cronWorkflow, Utils.getNamespace(cronWorkflow.metadata.namespace)) + .create(cronWorkflow, Utils.getNamespaceWithDefault(cronWorkflow.metadata.namespace)) .then(onCreate) .catch(setError); }}> diff --git a/ui/src/app/cron-workflows/components/cron-workflow-list/cron-workflow-list.tsx b/ui/src/app/cron-workflows/components/cron-workflow-list/cron-workflow-list.tsx index 8c67cebc5b6c..c36597ca8a43 100644 --- a/ui/src/app/cron-workflows/components/cron-workflow-list/cron-workflow-list.tsx +++ b/ui/src/app/cron-workflows/components/cron-workflow-list/cron-workflow-list.tsx @@ -89,7 +89,8 @@ export class CronWorkflowList extends BasePage, State> } private saveHistory() { - this.url = uiUrl('cron-workflows/' + this.state.namespace || ''); + const newNamespace = Utils.managedNamespace ? '' : this.state.namespace; + this.url = uiUrl('cron-workflows' + (newNamespace ? '/' + newNamespace : '')); Utils.currentNamespace = this.state.namespace; } diff --git a/ui/src/app/event-flow/components/event-flow-details/event-flow-page.tsx b/ui/src/app/event-flow/components/event-flow-details/event-flow-page.tsx index bc37597ba24f..94d78d6bf17b 100644 --- a/ui/src/app/event-flow/components/event-flow-details/event-flow-page.tsx +++ b/ui/src/app/event-flow/components/event-flow-details/event-flow-page.tsx @@ -23,6 +23,7 @@ import {ListWatch} from '../../../shared/list-watch'; import {RetryObservable} from '../../../shared/retry-observable'; import {services} from '../../../shared/services'; import {useQueryParams} from '../../../shared/use-query-params'; +import {Utils} from '../../../shared/utils'; import {EventsPanel} from '../../../workflows/components/events-panel'; import {FullHeightLogsViewer} from '../../../workflows/components/workflow-logs-viewer/full-height-logs-viewer'; import {buildGraph} from './build-graph'; @@ -37,7 +38,7 @@ export const EventFlowPage = ({history, location, match}: RouteComponentProps history.push( - historyUrl('event-flow/{namespace}', { + historyUrl('event-flow' + (Utils.managedNamespace ? '' : '/{namespace}'), { namespace, showFlow, showWorkflows, diff --git a/ui/src/app/event-sources/components/event-source-creator.tsx b/ui/src/app/event-sources/components/event-source-creator.tsx index 2fc471f2b534..8af0a236cdce 100644 --- a/ui/src/app/event-sources/components/event-source-creator.tsx +++ b/ui/src/app/event-sources/components/event-source-creator.tsx @@ -10,7 +10,7 @@ import {Utils} from '../../shared/utils'; import {EventSourceEditor} from './event-source-editor'; export const EventSourceCreator = ({onCreate, namespace}: {namespace: string; onCreate: (eventSource: EventSource) => void}) => { - const [eventSource, setEventSource] = useState(exampleEventSource(Utils.getNamespace(namespace))); + const [eventSource, setEventSource] = useState(exampleEventSource(Utils.getNamespaceWithDefault(namespace))); const [error, setError] = useState(); return ( <> @@ -20,7 +20,7 @@ export const EventSourceCreator = ({onCreate, namespace}: {namespace: string; on icon='plus' onClick={() => { services.eventSource - .create(eventSource, Utils.getNamespace(eventSource.metadata.namespace)) + .create(eventSource, Utils.getNamespaceWithDefault(eventSource.metadata.namespace)) .then(onCreate) .catch(setError); }}> diff --git a/ui/src/app/event-sources/components/event-source-list/event-source-list.tsx b/ui/src/app/event-sources/components/event-source-list/event-source-list.tsx index cfa4d4eb26f0..b449eb9817b7 100644 --- a/ui/src/app/event-sources/components/event-source-list/event-source-list.tsx +++ b/ui/src/app/event-sources/components/event-source-list/event-source-list.tsx @@ -19,6 +19,7 @@ import {Footnote} from '../../../shared/footnote'; import {historyUrl} from '../../../shared/history'; import {services} from '../../../shared/services'; import {useQueryParams} from '../../../shared/use-query-params'; +import {Utils} from '../../../shared/utils'; import {EventsPanel} from '../../../workflows/components/events-panel'; import {EventSourceCreator} from '../event-source-creator'; import {EventSourceLogsViewer} from '../event-source-log-viewer'; @@ -31,7 +32,7 @@ export const EventSourceList = ({match, location, history}: RouteComponentProps< const {navigation} = useContext(Context); // state for URL and query parameters - const [namespace, setNamespace] = useState(match.params.namespace || ''); + const [namespace, setNamespace] = useState(Utils.getNamespace(match.params.namespace) || ''); const [sidePanel, setSidePanel] = useState(queryParams.get('sidePanel') === 'true'); const [selectedNode, setSelectedNode] = useState(queryParams.get('selectedNode')); const [tab, setTab] = useState(queryParams.get('tab')); @@ -48,7 +49,7 @@ export const EventSourceList = ({match, location, history}: RouteComponentProps< useEffect( () => history.push( - historyUrl('event-sources/{namespace}', { + historyUrl('event-sources' + (Utils.managedNamespace ? '' : '/{namespace}'), { namespace, sidePanel, selectedNode, diff --git a/ui/src/app/reports/components/reports.tsx b/ui/src/app/reports/components/reports.tsx index ea6120b8e5d5..e6201e7ca190 100644 --- a/ui/src/app/reports/components/reports.tsx +++ b/ui/src/app/reports/components/reports.tsx @@ -58,7 +58,7 @@ export class Reports extends BasePage, State> { super(props, context); this.state = { archivedWorkflows: !!this.queryParam('archivedWorkflows'), - namespace: this.props.match.params.namespace || '', + namespace: Utils.getNamespace(this.props.match.params.namespace) || '', labels: (this.queryParam('labels') || '').split(',').filter(v => v !== '') }; } @@ -119,9 +119,10 @@ export class Reports extends BasePage, State> { } private saveHistory() { + const newNamespace = Utils.managedNamespace ? '' : this.state.namespace; this.url = uiUrl( - 'reports/' + - this.state.namespace + + 'reports' + + (newNamespace ? '/' + newNamespace : '') + '?labels=' + this.state.labels.join(',') + (this.state.archivedWorkflows ? '&archivedWorkflows=' + this.state.archivedWorkflows : '') diff --git a/ui/src/app/sensors/components/sensor-creator.tsx b/ui/src/app/sensors/components/sensor-creator.tsx index 7655e9a0ffcf..c1df145c09ef 100644 --- a/ui/src/app/sensors/components/sensor-creator.tsx +++ b/ui/src/app/sensors/components/sensor-creator.tsx @@ -10,7 +10,7 @@ import {Utils} from '../../shared/utils'; import {SensorEditor} from './sensor-editor'; export const SensorCreator = ({namespace, onCreate}: {namespace: string; onCreate: (sensor: Sensor) => void}) => { - const [sensor, setSensor] = useState(exampleSensor(Utils.getNamespace(namespace))); + const [sensor, setSensor] = useState(exampleSensor(Utils.getNamespaceWithDefault(namespace))); const [error, setError] = useState(); return ( <> @@ -20,7 +20,7 @@ export const SensorCreator = ({namespace, onCreate}: {namespace: string; onCreat icon='plus' onClick={() => { services.sensor - .create(sensor, Utils.getNamespace(sensor.metadata.namespace)) + .create(sensor, Utils.getNamespaceWithDefault(sensor.metadata.namespace)) .then(onCreate) .catch(setError); }}> diff --git a/ui/src/app/sensors/components/sensor-list/sensor-list.tsx b/ui/src/app/sensors/components/sensor-list/sensor-list.tsx index 4bf189a85749..42600d25e3f6 100644 --- a/ui/src/app/sensors/components/sensor-list/sensor-list.tsx +++ b/ui/src/app/sensors/components/sensor-list/sensor-list.tsx @@ -18,6 +18,7 @@ import {Footnote} from '../../../shared/footnote'; import {historyUrl} from '../../../shared/history'; import {services} from '../../../shared/services'; import {useQueryParams} from '../../../shared/use-query-params'; +import {Utils} from '../../../shared/utils'; import {SensorCreator} from '../sensor-creator'; import {SensorSidePanel} from '../sensor-side-panel'; import {Utils as EventsUtils} from '../utils'; @@ -30,7 +31,7 @@ export const SensorList = ({match, location, history}: RouteComponentProps) const {navigation} = useContext(Context); // state for URL and query parameters - const [namespace, setNamespace] = useState(match.params.namespace || ''); + const [namespace, setNamespace] = useState(Utils.getNamespace(match.params.namespace) || ''); const [sidePanel, setSidePanel] = useState(queryParams.get('sidePanel') === 'true'); const [selectedNode, setSelectedNode] = useState(queryParams.get('selectedNode')); @@ -45,7 +46,7 @@ export const SensorList = ({match, location, history}: RouteComponentProps) useEffect( () => history.push( - historyUrl('sensors/{namespace}', { + historyUrl('sensors' + (Utils.managedNamespace ? '' : '/{namespace}'), { namespace, sidePanel, selectedNode diff --git a/ui/src/app/shared/utils.ts b/ui/src/app/shared/utils.ts index 329c8d2750de..cf872f1587d5 100644 --- a/ui/src/app/shared/utils.ts +++ b/ui/src/app/shared/utils.ts @@ -102,8 +102,13 @@ export const Utils = { return this.managedNamespace || localStorage.getItem(currentNamespaceKey); }, - // return a namespace, never return null/undefined, defaults to "default" + // return a namespace, favoring managed namespace when set getNamespace(namespace: string) { + return this.managedNamespace || namespace; + }, + + // return a namespace, never return null/undefined, defaults to "default" + getNamespaceWithDefault(namespace: string) { return this.managedNamespace || namespace || this.currentNamespace || 'default'; } }; diff --git a/ui/src/app/workflow-event-bindings/components/workflow-event-bindings/workflow-event-bindings.tsx b/ui/src/app/workflow-event-bindings/components/workflow-event-bindings/workflow-event-bindings.tsx index 89b5e063a9f3..cd6635a392fe 100644 --- a/ui/src/app/workflow-event-bindings/components/workflow-event-bindings/workflow-event-bindings.tsx +++ b/ui/src/app/workflow-event-bindings/components/workflow-event-bindings/workflow-event-bindings.tsx @@ -17,6 +17,7 @@ import {Footnote} from '../../../shared/footnote'; import {historyUrl} from '../../../shared/history'; import {services} from '../../../shared/services'; import {useQueryParams} from '../../../shared/use-query-params'; +import {Utils} from '../../../shared/utils'; import {ID} from './id'; const introductionText = ( @@ -33,7 +34,7 @@ export const WorkflowEventBindings = ({match, location, history}: RouteComponent const queryParams = new URLSearchParams(location.search); // state for URL and query parameters - const [namespace, setNamespace] = useState(match.params.namespace || ''); + const [namespace, setNamespace] = useState(Utils.getNamespace(match.params.namespace) || ''); const [selectedWorkflowEventBinding, setSelectedWorkflowEventBinding] = useState(queryParams.get('selectedWorkflowEventBinding')); useEffect( @@ -46,7 +47,7 @@ export const WorkflowEventBindings = ({match, location, history}: RouteComponent useEffect( () => history.push( - historyUrl('workflow-event-bindings/{namespace}', { + historyUrl('workflow-event-bindings' + (Utils.managedNamespace ? '' : '/{namespace}'), { namespace, selectedWorkflowEventBinding }) diff --git a/ui/src/app/workflow-templates/components/workflow-template-creator.tsx b/ui/src/app/workflow-templates/components/workflow-template-creator.tsx index b0712647b356..58e6982b85d9 100644 --- a/ui/src/app/workflow-templates/components/workflow-template-creator.tsx +++ b/ui/src/app/workflow-templates/components/workflow-template-creator.tsx @@ -11,7 +11,7 @@ import {Utils} from '../../shared/utils'; import {WorkflowTemplateEditor} from './workflow-template-editor'; export const WorkflowTemplateCreator = ({namespace, onCreate}: {namespace: string; onCreate: (workflow: WorkflowTemplate) => void}) => { - const [template, setTemplate] = useState(exampleWorkflowTemplate(Utils.getNamespace(namespace))); + const [template, setTemplate] = useState(exampleWorkflowTemplate(Utils.getNamespaceWithDefault(namespace))); const [error, setError] = useState(); return ( <> @@ -21,7 +21,7 @@ export const WorkflowTemplateCreator = ({namespace, onCreate}: {namespace: strin icon='plus' onClick={() => { services.workflowTemplate - .create(template, Utils.getNamespace(template.metadata.namespace)) + .create(template, Utils.getNamespaceWithDefault(template.metadata.namespace)) .then(onCreate) .catch(setError); }}> diff --git a/ui/src/app/workflow-templates/components/workflow-template-list/workflow-template-list.tsx b/ui/src/app/workflow-templates/components/workflow-template-list/workflow-template-list.tsx index bbb423247fde..7247bb9c18c0 100644 --- a/ui/src/app/workflow-templates/components/workflow-template-list/workflow-template-list.tsx +++ b/ui/src/app/workflow-templates/components/workflow-template-list/workflow-template-list.tsx @@ -16,6 +16,7 @@ import {Footnote} from '../../../shared/footnote'; import {historyUrl} from '../../../shared/history'; import {services} from '../../../shared/services'; import {useQueryParams} from '../../../shared/use-query-params'; +import {Utils} from '../../../shared/utils'; import {WorkflowTemplateCreator} from '../workflow-template-creator'; require('./workflow-template-list.scss'); @@ -28,7 +29,7 @@ export const WorkflowTemplateList = ({match, location, history}: RouteComponentP const {navigation} = useContext(Context); // state for URL and query parameters - const [namespace, setNamespace] = useState(match.params.namespace || ''); + const [namespace, setNamespace] = useState(Utils.getNamespace(match.params.namespace) || ''); const [sidePanel, setSidePanel] = useState(queryParams.get('sidePanel') === 'true'); useEffect( @@ -41,7 +42,7 @@ export const WorkflowTemplateList = ({match, location, history}: RouteComponentP useEffect( () => history.push( - historyUrl('workflow-templates/{namespace}', { + historyUrl('workflow-templates' + (Utils.managedNamespace ? '' : '/{namespace}'), { namespace, sidePanel }) diff --git a/ui/src/app/workflows/components/workflow-creator.tsx b/ui/src/app/workflows/components/workflow-creator.tsx index fa12558d828e..300cd8f73bc2 100644 --- a/ui/src/app/workflows/components/workflow-creator.tsx +++ b/ui/src/app/workflows/components/workflow-creator.tsx @@ -49,7 +49,7 @@ export const WorkflowCreator = ({namespace, onCreate}: {namespace: string; onCre } }); } else { - setWorkflow(exampleWorkflow(Utils.getNamespace(namespace))); + setWorkflow(exampleWorkflow(Utils.getNamespaceWithDefault(namespace))); } break; } @@ -106,7 +106,7 @@ export const WorkflowCreator = ({namespace, onCreate}: {namespace: string; onCre icon='plus' onClick={() => { services.workflows - .create(workflow, Utils.getNamespace(workflow.metadata.namespace)) + .create(workflow, Utils.getNamespaceWithDefault(workflow.metadata.namespace)) .then(onCreate) .catch(setError); }}> diff --git a/ui/src/app/workflows/components/workflows-list/workflows-list.tsx b/ui/src/app/workflows/components/workflows-list/workflows-list.tsx index e12210b4156e..91f579ffe6f2 100644 --- a/ui/src/app/workflows/components/workflows-list/workflows-list.tsx +++ b/ui/src/app/workflows/components/workflows-list/workflows-list.tsx @@ -107,7 +107,7 @@ export class WorkflowsList extends BasePage, State> { offset: this.queryParam('offset'), limit: parseLimit(this.queryParam('limit')) || savedOptions.paginationLimit || 500 }, - namespace: this.props.match.params.namespace || '', + namespace: Utils.getNamespace(this.props.match.params.namespace) || '', selectedPhases: phaseQueryParam.length > 0 ? (phaseQueryParam as WorkflowPhase[]) : savedOptions.selectedPhases, selectedLabels: labelQueryParam.length > 0 ? (labelQueryParam as string[]) : savedOptions.selectedLabels, selectedWorkflows: new Map(), @@ -179,7 +179,7 @@ export class WorkflowsList extends BasePage, State> { ctx.navigation.goto('.', {sidePanel: null})}> {this.sidePanel === 'submit-new-workflow' && ( ctx.navigation.goto(uiUrl(`workflows/${wf.metadata.namespace}/${wf.metadata.name}`))} /> )} @@ -223,7 +223,8 @@ export class WorkflowsList extends BasePage, State> { private saveHistory() { this.storage.setItem('options', this.options, {} as WorkflowListRenderOptions); - this.url = uiUrl('workflows/' + this.state.namespace || '' + '?' + this.filterParams.toString()); + const newNamespace = Utils.managedNamespace ? '' : this.state.namespace; + this.url = uiUrl('workflows' + (newNamespace ? '/' + newNamespace : '') + '?' + this.filterParams.toString()); Utils.currentNamespace = this.state.namespace; }