Skip to content

Commit

Permalink
Remove parameters field from ApplicationStatus (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmt authored Dec 5, 2018
1 parent 39f8662 commit d7b89f5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,15 @@ export class ApplicationDetails extends React.Component<RouteComponentProps<{ na
<Tabs navTransparent={true} tabs={[{
title: 'SUMMARY', key: 'summary', content: <ApplicationSummary app={application} updateApp={(app) => this.updateApp(app)}/>,
}, {
title: 'PARAMETERS', key: 'parameters', content: <ParametersPanel
updateApp={(app) => this.updateApp(app)}
app={application}/>,
title: 'PARAMETERS', key: 'parameters', content: (
<DataLoader
input={{name: application.metadata.name, revision: application.spec.source.targetRevision}}
load={(input) => services.applications.getManifest(input.name, input.revision).then((res) => res.params || [])}>
{(params: appModels.ComponentParameter[]) =>
<ParametersPanel params={params} updateApp={(app) => this.updateApp(app)} app={application}/>
}
</DataLoader>
),
}, {
title: 'EVENTS', key: 'event', content: <ApplicationResourceEvents applicationName={application.metadata.name}/>,
}]}/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ function decodeParamNames(params: any, srcNames: {[name: string]: string}) {
});
}

export const ParametersPanel = (props: { app: models.Application, updateApp: (app: models.Application) => Promise<any>}) => {
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<any>}) => {
const componentParams = getParamsWithOverridesInfo(props.params || [], props.app.spec.source.componentParameterOverrides);

const src: any = {};
const srcNames: {[name: string]: string} = {};
Expand Down
2 changes: 0 additions & 2 deletions src/app/shared/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ export interface ApplicationSpec {
export interface RevisionHistory {
id: number;
revision: string;
params: ComponentParameter[];
componentParameterOverrides: ComponentParameter[];
deployedAt: models.Time;
}
Expand Down Expand Up @@ -250,7 +249,6 @@ export interface ApplicationStatus {
sync: SyncStatus;
conditions?: ApplicationCondition[];
history: RevisionHistory[];
parameters: ComponentParameter[];
health: HealthStatus;
operationState?: OperationState;
}
Expand Down

0 comments on commit d7b89f5

Please sign in to comment.