1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 13:29:41 +02:00

feature(kubernetes): stack name made optional & add toggle to disable stack in kubernetes [EE-6170] (#10436)

This commit is contained in:
Prabhat Khera 2023-10-16 14:08:06 +13:00 committed by GitHub
parent 44d66cc633
commit 7840e0bfe1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 305 additions and 47 deletions

View file

@ -6,6 +6,8 @@ import { useCurrentStateAndParams } from '@uirouter/react';
import { Authorized } from '@/react/hooks/useUser';
import { notifyError, notifySuccess } from '@/portainer/services/notifications';
import { usePublicSettings } from '@/react/portainer/settings/queries';
import { GlobalDeploymentOptions } from '@/react/portainer/settings/types';
import { DetailsTable } from '@@/DetailsTable';
import { Badge } from '@@/Badge';
@ -69,6 +71,11 @@ export function ApplicationSummaryWidget() {
setApplicationNoteFormValues(applicationNote || '');
}, [applicationNote]);
const globalDeploymentOptionsQuery =
usePublicSettings<GlobalDeploymentOptions>({
select: (settings) => settings.GlobalDeploymentOptions,
});
const failedCreateCondition = application?.status?.conditions?.find(
(condition) => condition.reason === 'FailedCreate'
);
@ -117,13 +124,17 @@ export function ApplicationSummaryWidget() {
</div>
</td>
</tr>
<tr>
<td>Stack</td>
<td data-cy="k8sAppDetail-stackName">
{application?.metadata?.labels?.[appStackNameLabel] ||
'-'}
</td>
</tr>
{globalDeploymentOptionsQuery.data &&
!globalDeploymentOptionsQuery.data
.hideStacksFunctionality && (
<tr>
<td>Stack</td>
<td data-cy="k8sAppDetail-stackName">
{application?.metadata?.labels?.[appStackNameLabel] ||
'-'}
</td>
</tr>
)}
<tr>
<td>Namespace</td>
<td>