Skip to content

Commit

Permalink
Implement workaround for namespaced app navigation bug (argoproj#17800)
Browse files Browse the repository at this point in the history
Signed-off-by: jacco <[email protected]>
  • Loading branch information
Sir-Jacques committed Jul 31, 2024
1 parent d9337a3 commit 3658f8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ export const ApplicationsDetailsAppDropdown = (props: {appName: string}) => {
}
/>
</li>
<DataLoader load={() => services.applications.list([], {fields: ['items.metadata.name']})}>
<DataLoader load={() => services.applications.list([], {fields: ['items.metadata.name', 'items.metadata.namespace']})}>
{apps =>
apps.items
.filter(app => {
return appFilter.length === 0 || app.metadata.name.toLowerCase().includes(appFilter.toLowerCase());
})
.slice(0, 100) // take top 100 results after filtering to avoid performance issues
.map(app => (
<li key={app.metadata.name} onClick={() => ctx.navigation.goto(`/applications/${app.metadata.name}`)}>
<li key={app.metadata.name} onClick={() => ctx.navigation.goto(`/applications/${app.metadata.namespace}/${app.metadata.name}`)}>
{app.metadata.name} {app.metadata.name === props.appName && ' (current)'}
</li>
))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ export class ApplicationDetails extends React.Component<RouteComponentProps<{app
loadingRenderer={() => <Page title='Application Details'>Loading...</Page>}
input={this.props.match.params.name}
load={name =>
combineLatest([this.loadAppInfo(name, this.appNamespace), services.viewPreferences.getPreferences(), q]).pipe(
combineLatest([this.loadAppInfo(name, this.props.match.params.appnamespace), services.viewPreferences.getPreferences(), q]).pipe(
map(items => {
const application = items[0].application;
const pref = items[1].appDetails;
Expand Down

0 comments on commit 3658f8e

Please sign in to comment.