From d7b89f5a7c25703c62aca55ffc4f71f45339580a Mon Sep 17 00:00:00 2001 From: Alexander Matyushentsev Date: Tue, 4 Dec 2018 22:29:14 -0800 Subject: [PATCH] Remove parameters field from ApplicationStatus (#83) --- .../application-details/application-details.tsx | 12 +++++++++--- .../components/parameters-panel/parameters-panel.tsx | 4 ++-- src/app/shared/models.ts | 2 -- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/app/applications/components/application-details/application-details.tsx b/src/app/applications/components/application-details/application-details.tsx index 3bda23aa891c7..9b470aa316ee5 100644 --- a/src/app/applications/components/application-details/application-details.tsx +++ b/src/app/applications/components/application-details/application-details.tsx @@ -242,9 +242,15 @@ export class ApplicationDetails extends React.Component this.updateApp(app)}/>, }, { - title: 'PARAMETERS', key: 'parameters', content: this.updateApp(app)} - app={application}/>, + title: 'PARAMETERS', key: 'parameters', content: ( + services.applications.getManifest(input.name, input.revision).then((res) => res.params || [])}> + {(params: appModels.ComponentParameter[]) => + this.updateApp(app)} app={application}/> + } + + ), }, { title: 'EVENTS', key: 'event', content: , }]}/> diff --git a/src/app/applications/components/parameters-panel/parameters-panel.tsx b/src/app/applications/components/parameters-panel/parameters-panel.tsx index fa45b808a39b1..ed10ddbcffc99 100644 --- a/src/app/applications/components/parameters-panel/parameters-panel.tsx +++ b/src/app/applications/components/parameters-panel/parameters-panel.tsx @@ -28,8 +28,8 @@ function decodeParamNames(params: any, srcNames: {[name: string]: string}) { }); } -export const ParametersPanel = (props: { app: models.Application, updateApp: (app: models.Application) => Promise}) => { - const componentParams = getParamsWithOverridesInfo(props.app.status.parameters || [], props.app.spec.source.componentParameterOverrides); +export const ParametersPanel = (props: { app: models.Application, params: models.ComponentParameter[], updateApp: (app: models.Application) => Promise}) => { + const componentParams = getParamsWithOverridesInfo(props.params || [], props.app.spec.source.componentParameterOverrides); const src: any = {}; const srcNames: {[name: string]: string} = {}; diff --git a/src/app/shared/models.ts b/src/app/shared/models.ts index eff5a45fc9fdc..a0930fa35db96 100644 --- a/src/app/shared/models.ts +++ b/src/app/shared/models.ts @@ -172,7 +172,6 @@ export interface ApplicationSpec { export interface RevisionHistory { id: number; revision: string; - params: ComponentParameter[]; componentParameterOverrides: ComponentParameter[]; deployedAt: models.Time; } @@ -250,7 +249,6 @@ export interface ApplicationStatus { sync: SyncStatus; conditions?: ApplicationCondition[]; history: RevisionHistory[]; - parameters: ComponentParameter[]; health: HealthStatus; operationState?: OperationState; }