1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

fix(ui): mark resources system correctly [EE-6558] (#10996)

* fix(ui): mark resources system correctly [EE-6558]

* address review comments
This commit is contained in:
Prabhat Khera 2024-01-23 13:49:25 +13:00 committed by GitHub
parent 85ae705833
commit f7840e0407
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 110 additions and 75 deletions

View file

@ -4,6 +4,7 @@ import { Pod } from 'kubernetes-types/core/v1';
import { Authorized } from '@/react/hooks/useUser';
import { useStackFile } from '@/react/common/stacks/stack.service';
import { useNamespaceQuery } from '@/react/kubernetes/namespaces/queries/useNamespaceQuery';
import { Widget, WidgetBody } from '@@/Widget';
import { Button } from '@@/buttons';
@ -14,7 +15,6 @@ import {
useApplication,
useApplicationServices,
} from '../../application.queries';
import { isSystemNamespace } from '../../../namespaces/utils';
import { applicationIsKind, isExternalApplication } from '../../utils';
import { appStackIdLabel } from '../../constants';
@ -39,6 +39,9 @@ export function ApplicationDetailsWidget() {
},
} = stateAndParams;
const namespaceData = useNamespaceQuery(environmentId, namespace);
const isSystemNamespace = namespaceData.data?.IsSystem;
// get app info
const { data: app } = useApplication(
environmentId,
@ -61,7 +64,7 @@ export function ApplicationDetailsWidget() {
<div className="col-sm-12">
<Widget>
<WidgetBody>
{!isSystemNamespace(namespace) && (
{!isSystemNamespace && (
<div className="mb-4 flex flex-wrap gap-2">
<Authorized authorizations="K8sApplicationDetailsW">
<Link to="kubernetes.applications.application.edit">