From 80dec0418f23044d45e1ba4b6818fc0b4187b738 Mon Sep 17 00:00:00 2001 From: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Date: Fri, 21 Jun 2024 12:49:11 -0400 Subject: [PATCH] lint Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --- server/application/application_test.go | 5 ++++- .../application-deployment-history.tsx | 6 ++++-- .../application-details.tsx | 9 ++++++++- ui/src/app/applications/components/utils.tsx | 2 +- .../shared/services/applications-service.ts | 18 +++++++----------- 5 files changed, 24 insertions(+), 16 deletions(-) diff --git a/server/application/application_test.go b/server/application/application_test.go index 24ead7bd25c14..c3fd3fadaf84a 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 884e704d2d713..8fb669f191509 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 821e43f41edf9..34d5121f87557 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 9a1b75966a157..7b6e2437d92d8 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 af1d9cceee4dd..1f7b5eb684416 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); }