Skip to content

Commit

Permalink
Merge branch 'master' into doc/update-doc-for-app-in-any-namespace-to…
Browse files Browse the repository at this point in the history
…-stable
  • Loading branch information
Mangaal authored Mar 15, 2024
2 parents ba9dae1 + 2f58d73 commit 57175ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/image-reuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:

- name: Build and push container image
id: image
uses: docker/build-push-action@af5a7ed5ba88268d5278f7203fb52cd833f66d6e #v5.2.0
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 #v5.3.0
with:
context: .
platforms: ${{ inputs.platforms }}
Expand Down
7 changes: 6 additions & 1 deletion ui/src/app/applications/components/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,12 @@ export const deletePodAction = async (pod: appModels.Pod, appContext: AppContext
};

export const deletePopup = async (ctx: ContextApis, resource: ResourceTreeNode, application: appModels.Application, appChanged?: BehaviorSubject<appModels.Application>) => {
const isManaged = !!resource.status;
function isTopLevelResource(res: ResourceTreeNode, app: appModels.Application): boolean {
const uniqRes = `/${res.namespace}/${res.group}/${res.kind}/${res.name}`;
return app.status.resources.some(resStatus => `/${resStatus.namespace}/${resStatus.group}/${resStatus.kind}/${resStatus.name}` === uniqRes);
}

const isManaged = isTopLevelResource(resource, application);
const deleteOptions = {
option: 'foreground'
};
Expand Down

0 comments on commit 57175ae

Please sign in to comment.