1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

fix(ui): tidy up Edge Devices configuration EE-3604 (#7797)

This commit is contained in:
matias-portainer 2022-11-10 16:13:20 -03:00 committed by GitHub
parent e1e81731b9
commit 30e23ea5b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 57 additions and 17 deletions

View file

@ -7,7 +7,7 @@ import { FormError } from '../FormError';
import styles from './FormControl.module.css';
type Size = 'small' | 'medium' | 'large';
export type Size = 'xsmall' | 'small' | 'medium' | 'large';
export interface Props {
inputId?: string;
@ -60,6 +60,8 @@ function sizeClassLabel(size?: Size) {
return 'col-sm-5 col-lg-4';
case 'medium':
return 'col-sm-4 col-lg-3';
case 'xsmall':
return 'col-sm-2';
default:
return 'col-sm-3 col-lg-2';
}
@ -71,6 +73,8 @@ function sizeClassChildren(size?: Size) {
return 'col-sm-7 col-lg-8';
case 'medium':
return 'col-sm-8 col-lg-9';
case 'xsmall':
return 'col-sm-8';
default:
return 'col-sm-9 col-lg-10';
}

View file

@ -1 +1,2 @@
export { FormControl } from './FormControl';
export type { Size } from './FormControl';

View file

@ -83,25 +83,27 @@ export function DeploymentSyncOptions() {
</TextTip>
<FormSection title="Check-in Intervals">
{!values.Edge.AsyncMode ? (
<EdgeCheckinIntervalField
value={values.EdgeAgentCheckinInterval}
onChange={(value) =>
setFieldValue('EdgeAgentCheckinInterval', value)
}
isDefaultHidden
label="Edge agent default poll frequency"
tooltip="Interval used by default by each Edge agent to check in with the Portainer instance. Affects Edge environment management and Edge compute features."
/>
) : (
<EdgeCheckinIntervalField
value={values.EdgeAgentCheckinInterval}
onChange={(value) =>
setFieldValue('EdgeAgentCheckinInterval', value)
}
isDefaultHidden
label="Edge agent default poll frequency"
tooltip="Interval used by default by each Edge agent to check in with the Portainer instance. Affects Edge environment management and Edge compute features."
/>
</FormSection>
{values.Edge.AsyncMode && (
<FormSection title="Async Check-in Intervals">
<EdgeAsyncIntervalsForm
values={values.Edge}
onChange={(value) => setFieldValue('Edge', value)}
isDefaultHidden
fieldSettings={asyncIntervalFieldSettings}
/>
)}
</FormSection>
</FormSection>
)}
<FormSection title="Actions">
<div className="form-group mt-5">