feat: paste multiple lines in parameters input

This commit is contained in:
jialin
2026-03-17 16:35:55 +08:00
committed by jialin
parent 556c4a434d
commit 4f02bcd40c
11 changed files with 76 additions and 58 deletions
+5 -22
View File
@@ -12,7 +12,7 @@ import useGranfanaLink from '@/pages/resources/hooks/use-grafana-link';
import { useIntl } from '@umijs/max';
import { useMemoizedFn } from 'ahooks';
import { ConfigProvider, Table, message } from 'antd';
import React, { useEffect, useState } from 'react';
import { useEffect, useState } from 'react';
import {
WORKERS_API,
deleteWorker,
@@ -27,19 +27,7 @@ import UpdateLabels from './update-labels';
import WorkerDetailModal from './worker-detail-modal';
import WorkerRightActions from './worker-right-actions';
const Workers: React.FC<{
clusterId?: string | number | null;
showSelect?: boolean;
showAddButton?: boolean;
widths?: { input: number };
sourceType?: string;
}> = ({
clusterId,
showSelect = true,
showAddButton = true,
widths = { input: 200 },
sourceType = 'resources'
}) => {
const Workers = () => {
const {
dataSource,
rowSelection,
@@ -63,10 +51,7 @@ const Workers: React.FC<{
contentForDelete: 'resources.worker',
watch: true,
API: WORKERS_API,
updateManually: true,
defaultQueryParams: {
cluster_id: clusterId
}
updateManually: true
});
const { goToGrafana, ActionButton } = useGranfanaLink({
type: 'worker'
@@ -255,8 +240,7 @@ const Workers: React.FC<{
loadend: dataSource.loadend,
firstLoad: extraStatus.firstLoad,
sortOrder,
handleSelect,
sourceType
handleSelect
});
useEffect(() => {
@@ -268,7 +252,7 @@ const Workers: React.FC<{
<>
<PageBox>
<FilterBar
showSelect={showSelect}
showSelect={true}
selectHolder={intl.formatMessage({ id: 'clusters.filterBy.cluster' })}
marginBottom={22}
marginTop={30}
@@ -280,7 +264,6 @@ const Workers: React.FC<{
handleInputChange={handleNameChange}
rowSelection={rowSelection}
selectOptions={clusterData.list}
widths={widths}
right={
<WorkerRightActions
handleDeleteByBatch={handleDeleteBatch}