feat(ui): ui change for edge compute settings EE-3800 (#7365)

* added style to edge compute under settings
pull/7357/head^2
Richard Wei 2022-08-03 11:15:00 +12:00 committed by GitHub
parent 21fbd37bfb
commit 65c050dc87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 11 deletions

View File

@ -42,7 +42,7 @@ export function AutomaticEdgeEnvCreation() {
return (
<Widget>
<WidgetTitle
icon="fa-laptop"
icon="svg-laptop"
title="Automatic Edge Environment Creation"
/>
<WidgetBody>

View File

@ -32,7 +32,7 @@ export function EdgeComputeSettings({ settings, onSubmit }: Props) {
return (
<div className="row">
<Widget>
<WidgetTitle icon="fa-laptop" title="Edge Compute settings" />
<WidgetTitle icon="svg-laptop" title="Edge Compute settings" />
<WidgetBody>
<Formik
initialValues={settings}
@ -58,7 +58,7 @@ export function EdgeComputeSettings({ settings, onSubmit }: Props) {
<FormControl
inputId="edge_enable"
label="Enable Edge Compute features"
size="medium"
size="small"
errors={errors.EnableEdgeComputeFeatures}
>
<Switch
@ -80,7 +80,7 @@ export function EdgeComputeSettings({ settings, onSubmit }: Props) {
<FormControl
inputId="edge_enforce_id"
label="Enforce use of Portainer generated Edge ID"
size="medium"
size="small"
tooltip="This setting only applies to manually created environments."
errors={errors.EnforceEdgeID}
>

View File

@ -48,7 +48,7 @@ export function SettingsFDO({ settings, onSubmit }: Props) {
return (
<div className="row">
<Widget>
<WidgetTitle icon="fa-laptop" title="FDO" />
<WidgetTitle icon="svg-laptop" title="FDO" />
<WidgetBody>
<Formik
initialValues={initialValues}
@ -71,7 +71,7 @@ export function SettingsFDO({ settings, onSubmit }: Props) {
<FormControl
inputId="edge_enableFDO"
label="Enable FDO Management Service"
size="medium"
size="small"
errors={errors.enabled}
>
<Switch

View File

@ -93,7 +93,7 @@ export function SettingsOpenAMT({ settings, onSubmit }: Props) {
return (
<div className="row">
<Widget>
<WidgetTitle icon="fa-laptop" title="Intel OpenAMT" />
<WidgetTitle icon="svg-laptop" title="Intel OpenAMT" />
<WidgetBody>
<Formik
initialValues={initialValues}
@ -117,6 +117,7 @@ export function SettingsOpenAMT({ settings, onSubmit }: Props) {
inputId="edge_enableOpenAMT"
label="Enable OpenAMT"
errors={errors.enabled}
size="small"
>
<Switch
id="edge_enableOpenAMT"

View File

@ -1,11 +1,14 @@
import { PropsWithChildren } from 'react';
import { Icon } from '@@/Icon';
export function FormError({ children }: PropsWithChildren<unknown>) {
return (
<div className="small text-warning">
<i
className="fa fa-exclamation-triangle space-right"
aria-hidden="true"
<div className="small text-warning vertical-center">
<Icon
icon="alert-triangle"
feather
className="icon icon-sm icon-warning"
/>
{children}
</div>

View File

@ -66,3 +66,7 @@
background-color: var(--BE-only);
box-shadow: inset 0 0 1px rgb(0 0 0 / 50%), inset 0 0 40px var(--BE-only);
}
.switch input[type='checkbox']:disabled + .slider {
cursor: not-allowed;
}