diff --git a/src/component/AddClusterRoleBindingDialog/index.tsx b/src/component/AddClusterRoleBindingDialog/index.tsx index cb04c7d..af23c70 100644 --- a/src/component/AddClusterRoleBindingDialog/index.tsx +++ b/src/component/AddClusterRoleBindingDialog/index.tsx @@ -61,6 +61,7 @@ const AddClusterRoleBindingDialog = ({ open, onClose, onSubmit }: AddClusterRole - + diff --git a/src/component/AddConfigmapDialog/index.tsx b/src/component/AddConfigmapDialog/index.tsx index c1cd99f..3f65ab4 100644 --- a/src/component/AddConfigmapDialog/index.tsx +++ b/src/component/AddConfigmapDialog/index.tsx @@ -83,8 +83,8 @@ const AddConfigmapDialog = ({ open, onClose, onSubmit }: AddConfigmapDialogProps Add Configmap - - + + Namespace setAttributeType(e.target.value)} displayEmpty diff --git a/src/component/AddEdgeApplicationDialog/index.tsx b/src/component/AddEdgeApplicationDialog/index.tsx index a790feb..ae34c07 100644 --- a/src/component/AddEdgeApplicationDialog/index.tsx +++ b/src/component/AddEdgeApplicationDialog/index.tsx @@ -49,6 +49,8 @@ const TargetNodeGroupField = ({ index, onRemove, nodeGroups, value, onChange }: fullWidth select placeholder="name" + label="Name" + margin="dense" value={value?.name} onChange={(event) => onChange(index, 'name', event.target.value)} sx={{ marginBottom: '8px' }} @@ -162,6 +164,7 @@ const AddEdgeApplicationDialog = ({ open, onClose, onSubmit }: AddEdgeApplicatio fullWidth select label="Namespace" + margin="dense" value={namespace} onChange={(e) => setNamespace(e.target.value)} required diff --git a/src/component/AddNodeDialog/index.tsx b/src/component/AddNodeDialog/index.tsx index 473826d..3a9eb8d 100644 --- a/src/component/AddNodeDialog/index.tsx +++ b/src/component/AddNodeDialog/index.tsx @@ -71,6 +71,7 @@ const AddNodeDialog = ({ open, onClose }: AddNodeDialogProps) => { error={!!formErrors.cloudMasterIP} helperText={formErrors.cloudMasterIP} placeholder="192.168.30.300:3000" + margin="dense" required fullWidth /> @@ -82,15 +83,18 @@ const AddNodeDialog = ({ open, onClose }: AddNodeDialogProps) => { error={!!formErrors.kubeedgeVersion} helperText={formErrors.kubeedgeVersion} placeholder="1.12.1" + margin="dense" required fullWidth /> - Runtime type + Runtime type selected.join(', ')} - displayEmpty - required - placeholder="nodes" - sx={{ minWidth: 300 }} - > - {data?.items?.map((node) => ( - - {node?.metadata?.name || ''} - - ))} - + + Nodes + + MatchLabels {matchLabels.map((matchLabel, index) => ( @@ -108,6 +113,7 @@ const AddNodeGroupDialog = ({ open, onClose, onSubmit }: AddNodeGroupDialogProps label="Key" placeholder="Please input key" variant="outlined" + margin="dense" value={matchLabel.key} onChange={(e) => handleMatchLabelChange(index, 'key', e.target.value)} sx={{ flex: 1 }} @@ -118,6 +124,7 @@ const AddNodeGroupDialog = ({ open, onClose, onSubmit }: AddNodeGroupDialogProps label="Value" placeholder="Please input value" variant="outlined" + margin="dense" value={matchLabel.value} onChange={(e) => handleMatchLabelChange(index, 'value', e.target.value)} sx={{ flex: 1 }} @@ -141,7 +148,7 @@ const AddNodeGroupDialog = ({ open, onClose, onSubmit }: AddNodeGroupDialogProps - + diff --git a/src/component/AddRoleBindingDialog/index.tsx b/src/component/AddRoleBindingDialog/index.tsx index ef38c5d..b557a4f 100644 --- a/src/component/AddRoleBindingDialog/index.tsx +++ b/src/component/AddRoleBindingDialog/index.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { Dialog, DialogTitle, DialogContent, TextField, Button, Box, Typography, IconButton, MenuItem, Select } from '@mui/material'; +import { Dialog, DialogTitle, DialogContent, TextField, Button, Box, Typography, IconButton, MenuItem, Select, FormControl, InputLabel } from '@mui/material'; import AddIcon from '@mui/icons-material/Add'; import RemoveIcon from '@mui/icons-material/Remove'; import { RoleBinding, RoleRef, Subject } from '@/types/roleBinding'; @@ -73,20 +73,23 @@ const AddRoleBindingDialog = ({ open, onClose, onSubmit }: AddRoleBindingDialogP Add RoleBinding - + + Namespace + + - + diff --git a/src/component/AddRoleDialog/index.tsx b/src/component/AddRoleDialog/index.tsx index 28f1e0c..e9af547 100644 --- a/src/component/AddRoleDialog/index.tsx +++ b/src/component/AddRoleDialog/index.tsx @@ -71,6 +71,7 @@ const AddRoleDialog = ({ open, onClose, onSubmit }: AddRoleDialogProps) => { { - + diff --git a/src/component/AddRuleDialog/index.tsx b/src/component/AddRuleDialog/index.tsx index 2b68a9d..7b2cb25 100644 --- a/src/component/AddRuleDialog/index.tsx +++ b/src/component/AddRuleDialog/index.tsx @@ -103,12 +103,12 @@ const AddRuleDialog = ({ open, onClose, onSubmit }: AddRuleDialogProps) => { Add Rule - + Namespace setSource(e.target.value)} displayEmpty @@ -160,6 +161,7 @@ const AddRuleDialog = ({ open, onClose, onSubmit }: AddRuleDialogProps) => { Target setNamespace(e.target.value)} placeholder="Namespace" @@ -102,6 +103,7 @@ const AddRuleEndpointDialog = ({ open, onClose, onSubmit }: AddRuleEndpointDialo RuleEndpointType setNamespace(event.target.value)} placeholder="Namespace" @@ -98,11 +99,10 @@ const AddServiceAccountDialog = ({ open, onClose, onSubmit }: AddServiceAccountD Secrets + label="Secrets" multiple value={secrets} - // TODO: remove it - // @ts-ignore - onChange={(event) => setSecrets(event.target.value)} + onChange={(event) => setSecrets(typeof event.target.value === 'string' ? [event.target.value] : event.target.value)} placeholder="Secrets" > {data?.items?.map((secret) => ( diff --git a/src/component/AddServiceDialog/index.tsx b/src/component/AddServiceDialog/index.tsx index 15b23ee..45761c4 100644 --- a/src/component/AddServiceDialog/index.tsx +++ b/src/component/AddServiceDialog/index.tsx @@ -177,24 +177,26 @@ export default function AddServiceDialog({ open, onClose, onSubmit }: AddService } return ( - + Add Service - {/* Namespace */} - + + Namespace + + - {/* Name */} + }}> {container.type === 'init' ? 'Initial Container' : 'Work Container'} {container.name} Method { const updatedEnvVars = [...(container?.envVars || [{}])]; @@ -254,18 +255,18 @@ export default function ContainerInfoForm({ data, onChange, configMaps, secrets {env.valueType === 'value' && ( - Value - { - const updatedEnvVars = [...(container?.envVars || [{}])]; - updatedEnvVars[envIndex].value = e.target.value; - handleFormChange(index, 'envVars', updatedEnvVars); - }} - /> - + Value + { + const updatedEnvVars = [...(container?.envVars || [{}])]; + updatedEnvVars[envIndex].value = e.target.value; + handleFormChange(index, 'envVars', updatedEnvVars); + }} + /> + )} {(env.valueType === 'fieldRef' || env.valueType === 'resourceFieldRef') && ( @@ -340,6 +341,7 @@ export default function ContainerInfoForm({ data, onChange, configMaps, secrets Configuration type { const updatedPorts = [...(container?.ports || [{}])]; @@ -538,6 +541,7 @@ export default function ContainerInfoForm({ data, onChange, configMaps, secrets Privileged handleFormChange(index, 'allowPrivilegeEscalation', e.target.value)} > @@ -558,6 +563,7 @@ export default function ContainerInfoForm({ data, onChange, configMaps, secrets Read Only Root Filesystem handleFormChange(index, 'runAsNonRoot', e.target.value)} > diff --git a/src/component/DeploymentDrawer/DeploymentForms/StorageMountForm.tsx b/src/component/DeploymentDrawer/DeploymentForms/StorageMountForm.tsx index 0248b7d..754e65f 100644 --- a/src/component/DeploymentDrawer/DeploymentForms/StorageMountForm.tsx +++ b/src/component/DeploymentDrawer/DeploymentForms/StorageMountForm.tsx @@ -144,6 +144,7 @@ export default function StorageMountForm({ data, onChange, configMaps, secrets } Host Path Type handleValueChange(index, 'configMap', e.target.value)} error={!volume?.configMap} @@ -178,6 +180,7 @@ export default function StorageMountForm({ data, onChange, configMaps, secrets } Secret Name { const updatedContainers = [...(volume?.mountContainers || [{}])];