1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 13:55:21 +02:00

feat(kubernetes): add note teaser and styled application note on details EE-5364 (#9016)

This commit is contained in:
Prabhat Khera 2023-06-09 08:35:29 +12:00 committed by GitHub
parent 58c1a60fee
commit 3233987a21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 24 additions and 10 deletions

View file

@ -7,6 +7,7 @@
.btn-none:focus {
outline: none;
color: inherit;
}
.btn-warninglight {

View file

@ -1,4 +1,4 @@
import { User, Clock, Edit, ChevronDown, ChevronUp } from 'lucide-react';
import { User, Clock, Edit, ChevronRight, ChevronUp } from 'lucide-react';
import moment from 'moment';
import { useEffect, useState } from 'react';
import { Pod } from 'kubernetes-types/core/v1';
@ -197,16 +197,16 @@ export function ApplicationSummaryWidget() {
<form className="form-horizontal">
<div className="form-group">
<div className="col-sm-12 vertical-center">
<Edit /> Note
<Button
size="xsmall"
size="small"
type="button"
color="light"
color="none"
data-cy="k8sAppDetail-expandNoteButton"
onClick={() => setIsNoteOpen(!isNoteOpen)}
className="!m-0 !p-0"
>
{isNoteOpen ? 'Collapse' : 'Expand'}
{isNoteOpen ? <ChevronUp /> : <ChevronDown />}
{isNoteOpen ? <ChevronUp /> : <ChevronRight />} <Edit />{' '}
Note
</Button>
</div>
</div>
@ -267,7 +267,7 @@ export function ApplicationSummaryWidget() {
{
op: 'replace',
path: `/metadata/annotations/${appNoteAnnotation}`,
value: 'applicationNoteFormValues',
value: applicationNoteFormValues,
},
];
if (application?.kind) {

View file

@ -41,4 +41,5 @@ export enum FeatureId {
K8SINSTALL = 'k8s-install',
K8S_ANNOTATIONS = 'k8s-annotations',
CA_FILE = 'ca-file',
K8S_REQUIRE_NOTE_ON_APPLICATIONS = 'k8s-note-on-applications',
}

View file

@ -46,6 +46,7 @@ export async function init(edition: Edition) {
[FeatureId.K8S_ROLLING_RESTART]: Edition.BE,
[FeatureId.K8S_ANNOTATIONS]: Edition.BE,
[FeatureId.CA_FILE]: Edition.BE,
[FeatureId.K8S_REQUIRE_NOTE_ON_APPLICATIONS]: Edition.BE,
};
state.currentEdition = currentEdition;