| @@ -421,7 +421,18 @@ function CreateServiceVersion() { | |||||
| <> | <> | ||||
| <Row gutter={8}> | <Row gutter={8}> | ||||
| <Col span={10}> | <Col span={10}> | ||||
| <Form.Item label="环境变量"></Form.Item> | |||||
| <Form.Item label="环境变量"> | |||||
| {fields.length === 0 ? ( | |||||
| <Button | |||||
| type="link" | |||||
| style={{ padding: '0' }} | |||||
| onClick={() => add()} | |||||
| disabled={disabled} | |||||
| > | |||||
| 添加环境变量 | |||||
| </Button> | |||||
| ) : null} | |||||
| </Form.Item> | |||||
| </Col> | </Col> | ||||
| </Row> | </Row> | ||||
| {fields.map(({ key, name, ...restField }) => ( | {fields.map(({ key, name, ...restField }) => ( | ||||
| @@ -457,7 +468,8 @@ function CreateServiceVersion() { | |||||
| disabled={disabled} | disabled={disabled} | ||||
| onClick={() => { | onClick={() => { | ||||
| modalConfirm({ | modalConfirm({ | ||||
| content: '是否确认删除?', | |||||
| title: '删除', | |||||
| content: '是否确认要删除该环境变量?', | |||||
| onOk: () => { | onOk: () => { | ||||
| remove(name); | remove(name); | ||||
| }, | }, | ||||
| @@ -466,19 +478,20 @@ function CreateServiceVersion() { | |||||
| ></Button> | ></Button> | ||||
| </Flex> | </Flex> | ||||
| ))} | ))} | ||||
| <Button | |||||
| type="link" | |||||
| style={{ padding: '0', margin: '-24px 0 24px' }} | |||||
| onClick={() => add()} | |||||
| icon={<PlusOutlined />} | |||||
| disabled={disabled} | |||||
| > | |||||
| 环境变量 | |||||
| </Button> | |||||
| {fields.length > 0 ? ( | |||||
| <Button | |||||
| type="link" | |||||
| style={{ padding: '0', margin: '-24px 0 24px' }} | |||||
| onClick={() => add()} | |||||
| icon={<PlusOutlined />} | |||||
| disabled={disabled} | |||||
| > | |||||
| 环境变量 | |||||
| </Button> | |||||
| ) : null} | |||||
| </> | </> | ||||
| )} | )} | ||||
| </Form.List> | </Form.List> | ||||
| <Form.Item wrapperCol={{ offset: 0, span: 16 }}> | <Form.Item wrapperCol={{ offset: 0, span: 16 }}> | ||||
| <Button type="primary" htmlType="submit"> | <Button type="primary" htmlType="submit"> | ||||
| {buttonText} | {buttonText} | ||||
| @@ -163,7 +163,8 @@ function ServiceInfo() { | |||||
| // 处理停止 | // 处理停止 | ||||
| const handleServiceVersionStop = async (record: ServiceVersionData) => { | const handleServiceVersionStop = async (record: ServiceVersionData) => { | ||||
| modalConfirm({ | modalConfirm({ | ||||
| content: '是否确认停止?', | |||||
| title: '停止', | |||||
| content: '是否确认停止该服务?', | |||||
| onOk: () => { | onOk: () => { | ||||
| stopServiceVersion(record); | stopServiceVersion(record); | ||||
| }, | }, | ||||
| @@ -372,7 +373,7 @@ function ServiceInfo() { | |||||
| ></SubAreaTitle> | ></SubAreaTitle> | ||||
| <div className={styles['service-info__content__filter']}> | <div className={styles['service-info__content__filter']}> | ||||
| <Input.Search | <Input.Search | ||||
| placeholder="按版本号筛选" | |||||
| placeholder="按服务版本筛选" | |||||
| onSearch={onSearch} | onSearch={onSearch} | ||||
| onChange={(e) => setInputText(e.target.value)} | onChange={(e) => setInputText(e.target.value)} | ||||
| style={{ width: 300 }} | style={{ width: 300 }} | ||||
| @@ -382,7 +383,7 @@ function ServiceInfo() { | |||||
| <Select | <Select | ||||
| style={{ width: 100, marginLeft: '20px' }} | style={{ width: 100, marginLeft: '20px' }} | ||||
| placeholder="请选择" | placeholder="请选择" | ||||
| onChange={(value) => setServiceStatus(value)} | |||||
| onChange={(value) => setServiceStatus(value ?? '')} | |||||
| options={allServiceStatusOptions} | options={allServiceStatusOptions} | ||||
| value={serviceStatus} | value={serviceStatus} | ||||
| allowClear | allowClear | ||||