Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
  • Loading branch information
crenshaw-dev committed Jun 21, 2024
1 parent cb5161d commit 80dec04
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 16 deletions.
5 changes: 4 additions & 1 deletion server/application/application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -154,7 +154,9 @@ export const ApplicationDeploymentHistory = ({
</React.Fragment>
))
)
) : <p>Click to see source details.</p>}
) : (
<p>Click to see source details.</p>
)}
</div>
</div>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,14 @@ export class ApplicationDetails extends React.Component<RouteComponentProps<{app
)
);

const getContentForChart = (aRevision: string, aSourceIndex: number|null, aVersionId: number|null, indx: number, aSource: models.ApplicationSource, sourceHeader?: JSX.Element) => {
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 (
<>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/applications/components/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
18 changes: 7 additions & 11 deletions ui/src/app/shared/services/applications-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<models.RevisionMetadata> {
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<models.RevisionMetadata> {
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<models.ChartDetails> {
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);
}
Expand Down

0 comments on commit 80dec04

Please sign in to comment.