diff --git a/server/application/application_test.go b/server/application/application_test.go index 24ead7bd25c1..c3fd3fadaf84 100644 --- a/server/application/application_test.go +++ b/server/application/application_test.go @@ -5,12 +5,15 @@ import ( coreerrors "errors" "fmt" "io" - "k8s.io/utils/pointer" "strconv" "sync/atomic" "testing" "time" + "k8s.io/utils/pointer" + + "k8s.io/utils/pointer" + "k8s.io/apimachinery/pkg/labels" "github.com/argoproj/gitops-engine/pkg/health" diff --git a/ui/src/app/applications/components/application-deployment-history/application-deployment-history.tsx b/ui/src/app/applications/components/application-deployment-history/application-deployment-history.tsx index 884e704d2d71..8fb669f19150 100644 --- a/ui/src/app/applications/components/application-deployment-history/application-deployment-history.tsx +++ b/ui/src/app/applications/components/application-deployment-history/application-deployment-history.tsx @@ -20,7 +20,7 @@ export const ApplicationDeploymentHistory = ({ rollbackApp: (info: models.RevisionHistory) => any; selectDeployment: (index: number) => any; }) => { - console.log("selectedRollbackDeploymentIndex: ", selectedRollbackDeploymentIndex) + console.log('selectedRollbackDeploymentIndex: ', selectedRollbackDeploymentIndex); const deployments = (app.status.history || []).slice().reverse(); const recentDeployments = deployments.map((info, i) => { const nextDeployedAt = i === 0 ? null : deployments[i - 1].deployedAt; @@ -154,7 +154,9 @@ export const ApplicationDeploymentHistory = ({ )) ) - ) :

Click to see source details.

} + ) : ( +

Click to see source details.

+ )} ))} 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 821e43f41edf..34d5121f8755 100644 --- a/ui/src/app/applications/components/application-details/application-details.tsx +++ b/ui/src/app/applications/components/application-details/application-details.tsx @@ -192,7 +192,14 @@ export class ApplicationDetails extends React.Component { + const getContentForChart = ( + aRevision: string, + aSourceIndex: number | null, + aVersionId: number | null, + indx: number, + aSource: models.ApplicationSource, + sourceHeader?: JSX.Element + ) => { const showChartNonMetadataInfo = (aRevision: string, aRepoUrl: string) => { return ( <> diff --git a/ui/src/app/applications/components/utils.tsx b/ui/src/app/applications/components/utils.tsx index 9a1b75966a15..7b6e2437d92d 100644 --- a/ui/src/app/applications/components/utils.tsx +++ b/ui/src/app/applications/components/utils.tsx @@ -1131,7 +1131,7 @@ export function getAppDefaultOperationSyncRevision(app?: appModels.Application) // getAppCurrentVersion gets the first app revisions from `status.sync.revisions` or, if that list is missing or empty, the `revision` // field. -export function getAppCurrentVersion(app?: appModels.Application): number|null { +export function getAppCurrentVersion(app?: appModels.Application): number | null { if (!app || !app.status || !app.status.history || app.status.history.length === 0) { return null; } diff --git a/ui/src/app/shared/services/applications-service.ts b/ui/src/app/shared/services/applications-service.ts index af1d9cceee4d..1f7b5eb68441 100644 --- a/ui/src/app/shared/services/applications-service.ts +++ b/ui/src/app/shared/services/applications-service.ts @@ -53,28 +53,24 @@ export class ApplicationsService { .then(res => res.body as models.ApplicationSyncWindowState); } - public revisionMetadata(name: string, appNamespace: string, revision: string, sourceIndex: number|null, versionId: number|null): Promise { - let r = requests - .get(`/applications/${name}/revisions/${revision || 'HEAD'}/metadata`) - .query({appNamespace}) + public revisionMetadata(name: string, appNamespace: string, revision: string, sourceIndex: number | null, versionId: number | null): Promise { + let r = requests.get(`/applications/${name}/revisions/${revision || 'HEAD'}/metadata`).query({appNamespace}); if (sourceIndex !== null) { - r = r.query({sourceIndex}) + r = r.query({sourceIndex}); } if (versionId !== null) { - r = r.query({versionId}) + r = r.query({versionId}); } return r.then(res => res.body as models.RevisionMetadata); } public revisionChartDetails(name: string, appNamespace: string, revision: string, sourceIndex: number, versionId: number): Promise { - let r = requests - .get(`/applications/${name}/revisions/${revision || 'HEAD'}/chartdetails`) - .query({appNamespace}) + let r = requests.get(`/applications/${name}/revisions/${revision || 'HEAD'}/chartdetails`).query({appNamespace}); if (sourceIndex !== null) { - r = r.query({sourceIndex}) + r = r.query({sourceIndex}); } if (versionId !== null) { - r = r.query({versionId}) + r = r.query({versionId}); } return r.then(res => res.body as models.ChartDetails); }