diff --git a/ui/src/app/applications/components/application-details/application-details.tsx b/ui/src/app/applications/components/application-details/application-details.tsx index 0a2641aa1c0d5..c1c0da6736510 100644 --- a/ui/src/app/applications/components/application-details/application-details.tsx +++ b/ui/src/app/applications/components/application-details/application-details.tsx @@ -16,7 +16,7 @@ import {AppDetailsPreferences, AppsDetailsViewKey, AppsDetailsViewType, services import {ApplicationConditions} from '../application-conditions/application-conditions'; import {ApplicationDeploymentHistory} from '../application-deployment-history/application-deployment-history'; import {ApplicationOperationState} from '../application-operation-state/application-operation-state'; -import {PodView} from '../application-pod-view/pod-view'; +import {PodGroupType, PodView} from '../application-pod-view/pod-view'; import {ApplicationResourceTree, ResourceTreeNode} from '../application-resource-tree/application-resource-tree'; import {ApplicationStatusPanel} from '../application-status-panel/application-status-panel'; import {ApplicationSyncPanel} from '../application-sync-panel/application-sync-panel'; @@ -169,6 +169,7 @@ export class ApplicationDetails extends React.Component combineLatest([this.loadAppInfo(name, this.appNamespace), services.viewPreferences.getPreferences(), q]).pipe( map(items => { + const application = items[0].application; const pref = items[1].appDetails; const params = items[2]; if (params.get('resource') != null) { @@ -179,10 +180,27 @@ export class ApplicationDetails extends React.Component { ), action: () => { + this.appContext.apis.navigation.goto('.', {podSortMode: mode}); services.viewPreferences.updatePreferences({appDetails: {...prefs.appDetails, podView: {...podPrefs, sortMode: mode}}}); } })); diff --git a/ui/src/app/shared/models.ts b/ui/src/app/shared/models.ts index 3bbaed2ba4226..fb087a8299458 100644 --- a/ui/src/app/shared/models.ts +++ b/ui/src/app/shared/models.ts @@ -123,6 +123,8 @@ export interface ResourceResult { export const AnnotationRefreshKey = 'argocd.argoproj.io/refresh'; export const AnnotationHookKey = 'argocd.argoproj.io/hook'; export const AnnotationSyncWaveKey = 'argocd.argoproj.io/sync-wave'; +export const AnnotationDefaultView = 'pref.argocd.argoproj.io/default-view'; +export const AnnotationDefaultPodSort = 'pref.argocd.argoproj.io/default-pod-sort'; export interface Application { apiVersion?: string;