Skip to content

Commit 3d0496f

Browse files
authored
Make deauthorization reason mandatory and disable confirmBtn (#237)
1 parent b33bafb commit 3d0496f

15 files changed

Lines changed: 58 additions & 36 deletions

File tree

apps/admin/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.20-dev
1+
2.0.20

apps/admin/deploy/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ apiVersion: v2
44
name: orch-ui-admin
55
description: Deploy Edge-Native Software Platform UI Admin pods on Kubernetes
66
type: application
7-
version: 2.0.20-dev
7+
version: 2.0.20
88
# Default appVersion will be overwritten by a the build to use the version from package.json.
99

1010
# This value is supplied only to enable local unbuilt deployment of released content.
11-
appVersion: "2.0.20-dev"
11+
appVersion: "2.0.20"
1212
annotations:
1313
api_observability_monitor: 0.0.5
1414
dependencies: []

apps/app-orch/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.22-dev
1+
2.0.22

apps/app-orch/deploy/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ apiVersion: v2
44
name: orch-ui-app-orch
55
description: Deploy the Edge Orchestrator app-orch pod
66
type: application
7-
version: 2.0.22-dev
7+
version: 2.0.22
88
# Default appVersion will be overwritten by a the build to use the version from package.json.
99

1010
# This value is supplied only to enable local unbuilt deployment of released content.
11-
appVersion: "2.0.22-dev"
11+
appVersion: "2.0.22"
1212
annotations: {}
1313
dependencies: []

apps/cluster-orch/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.23-dev
1+
2.0.23

apps/cluster-orch/deploy/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ apiVersion: v2
44
name: orch-ui-cluster-orch
55
description: Deploy the Edge Orchestrator cluster-orch pod
66
type: application
7-
version: 2.0.23-dev
7+
version: 2.0.23
88
# Default appVersion will be overwritten by a the build to use the version from package.json.
99

1010
# This value is supplied only to enable local unbuilt deployment of released content.
11-
appVersion: "2.0.23-dev"
11+
appVersion: "2.0.23"
1212
annotations: {}
1313
dependencies: []

apps/infra/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.21-dev
1+
1.0.21

apps/infra/deploy/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ apiVersion: v2
44
name: orch-ui-infra
55
description: Deploy the Edge-Native Software Platform Infrastructure pod
66
type: application
7-
version: 1.0.21-dev
7+
version: 1.0.21
88
# Default appVersion will be overwritten by a the build to use the version from package.json.
99

10-
appVersion: "1.0.21-dev"
10+
appVersion: "1.0.21"
1111
dependencies: []
1212
annotations: {}

apps/infra/src/components/organism/hosts/DeauthorizeHostStandalone/DeauthorizeHostStandalone.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const DeauthorizeHostStandalone = ({
4545
setDeauthorizeConfirmationOpen,
4646
}: DeauthorizeHostStandaloneProps) => {
4747
const cy = { "data-cy": dataCy };
48-
const [deauthorizeReason, setDeauthorizeReason] = useState<string>();
48+
const [deauthorizeReason, setDeauthorizeReason] = useState<string>("");
4949
const { control: controlDeauthBasicInfo } = useForm<DeauthInputs>({
5050
mode: "all",
5151
});
@@ -71,10 +71,12 @@ const DeauthorizeHostStandalone = ({
7171
render={({ field }) => (
7272
<TextField
7373
{...field}
74-
label="Deauthorize reason (Optional)"
74+
label="Reason for deauthorization"
7575
data-cy="reason"
7676
onInput={(e) => {
77-
setDeauthorizeReason(e.currentTarget.value);
77+
const value = e.currentTarget.value;
78+
setDeauthorizeReason(value);
79+
field.onChange(value);
7880
}}
7981
size={InputSize.Large}
8082
className="text-field-align"
@@ -109,6 +111,9 @@ const DeauthorizeHostStandalone = ({
109111
content={deauthDialogContent}
110112
isOpen={isDeauthConfirmationOpen}
111113
confirmBtnVariant={ButtonVariant.Alert}
114+
confirmBtnDisabled={
115+
!deauthorizeReason || deauthorizeReason.trim().length === 0
116+
}
112117
confirmCb={() => deauthorizeHostFn(deauthorizeReason ?? "")}
113118
confirmBtnText="Deauthorize"
114119
cancelCb={() => setDeauthorizeConfirmationOpen(false)}

apps/infra/src/components/organism/hosts/HostDetailsTab/HostDetailsTab.tsx

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
import { Item, MessageBanner, Tabs } from "@spark-design/react";
2222
import React, { Suspense } from "react";
2323
import OSProfileDetails from "../../../organism/OSProfileDetails/OSProfileDetails";
24-
import VproDetails from "../../../organism/VproDetails/VproDetails";
24+
import VproDetails from "../../VproDetails/VproDetails";
2525
import { ResourceType, ResourceTypeTitle } from "../ResourceDetails";
2626
import { HostResourcesCpuRead } from "../resourcedetails/Cpu";
2727
import ResourceIndicator from "../ResourceIndicator";
@@ -81,10 +81,14 @@ const HostDetailsTab: React.FC<HostDetailsTabProps> = (props) => {
8181
id: 7,
8282
title: "Host Labels",
8383
},
84-
{
85-
id: 8,
86-
title: "vPro Details",
87-
},
84+
...(host.amtSku !== "Unknown"
85+
? [
86+
{
87+
id: 8,
88+
title: "vPro Details",
89+
},
90+
]
91+
: []),
8892
];
8993

9094
const itemList = [
@@ -233,11 +237,16 @@ const HostDetailsTab: React.FC<HostDetailsTabProps> = (props) => {
233237
<OSProfileDetails os={currentOs} updatePolicy={updatePolicy} />
234238
)}
235239
</Item>,
236-
<Item title={tabItems[7].title}>
237-
<VproDetails host={host} />
238-
</Item>,
239240
];
240241

242+
if (host.amtSku !== "Unknown") {
243+
itemList.push(
244+
<Item title="vPro Details">
245+
<VproDetails host={host} />
246+
</Item>,
247+
);
248+
}
249+
241250
if (
242251
host.site &&
243252
host.instance?.workloadMembers?.find(

0 commit comments

Comments
 (0)