diff --git a/inlong-dashboard/src/plugins/clusters/defaults/SortCls.ts b/inlong-dashboard/src/plugins/clusters/defaults/SortCls.ts new file mode 100644 index 00000000000..19d0b734c8f --- /dev/null +++ b/inlong-dashboard/src/plugins/clusters/defaults/SortCls.ts @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { DataWithBackend } from '@/plugins/DataWithBackend'; +import { RenderRow } from '@/plugins/RenderRow'; +import { RenderList } from '@/plugins/RenderList'; +import { ClusterInfo } from '../common/ClusterInfo'; + +export default class SortClsCluster + extends ClusterInfo + implements DataWithBackend, RenderRow, RenderList {} diff --git a/inlong-dashboard/src/plugins/clusters/defaults/SortEs.ts b/inlong-dashboard/src/plugins/clusters/defaults/SortEs.ts new file mode 100644 index 00000000000..dd8ea4092a7 --- /dev/null +++ b/inlong-dashboard/src/plugins/clusters/defaults/SortEs.ts @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { DataWithBackend } from '@/plugins/DataWithBackend'; +import { RenderRow } from '@/plugins/RenderRow'; +import { RenderList } from '@/plugins/RenderList'; +import { ClusterInfo } from '../common/ClusterInfo'; + +export default class SortEsCluster + extends ClusterInfo + implements DataWithBackend, RenderRow, RenderList {} diff --git a/inlong-dashboard/src/plugins/clusters/defaults/SortPulsar.ts b/inlong-dashboard/src/plugins/clusters/defaults/SortPulsar.ts new file mode 100644 index 00000000000..740d89ace73 --- /dev/null +++ b/inlong-dashboard/src/plugins/clusters/defaults/SortPulsar.ts @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { DataWithBackend } from '@/plugins/DataWithBackend'; +import { RenderRow } from '@/plugins/RenderRow'; +import { RenderList } from '@/plugins/RenderList'; +import { ClusterInfo } from '../common/ClusterInfo'; + +export default class SortPulsarCluster + extends ClusterInfo + implements DataWithBackend, RenderRow, RenderList {} diff --git a/inlong-dashboard/src/plugins/clusters/defaults/index.ts b/inlong-dashboard/src/plugins/clusters/defaults/index.ts index 8d923db35f3..d29bb816045 100644 --- a/inlong-dashboard/src/plugins/clusters/defaults/index.ts +++ b/inlong-dashboard/src/plugins/clusters/defaults/index.ts @@ -51,4 +51,19 @@ export const allDefaultClusters: MetaExportWithBackendList = [ value: 'TUBEMQ', LoadEntity: () => import('./TubeMq'), }, + { + label: 'Sort CLS', + value: 'SORT_CLS', + LoadEntity: () => import('./SortCls'), + }, + { + label: 'Sort ES', + value: 'SORT_ES', + LoadEntity: () => import('./SortEs'), + }, + { + label: 'Sort Pulsar', + value: 'SORT_PULSAR', + LoadEntity: () => import('./SortPulsar'), + }, ]; diff --git a/inlong-dashboard/src/ui/pages/Clusters/CreateModal.tsx b/inlong-dashboard/src/ui/pages/Clusters/CreateModal.tsx index 59e5de89b5e..63fd1530c6a 100644 --- a/inlong-dashboard/src/ui/pages/Clusters/CreateModal.tsx +++ b/inlong-dashboard/src/ui/pages/Clusters/CreateModal.tsx @@ -65,6 +65,9 @@ const Comp: React.FC = ({ id, defaultType, ...modalProps }) => { inCharges: values.inCharges?.join(','), clusterTags: values.clusterTags?.join(','), }; + if (values.type === 'SORT_CLS' || values.type === 'SORT_ES' || values.type === 'SORT_PULSAR') { + submitData.name = values.displayName; + } if (isUpdate) { submitData.id = id; submitData.version = savedData?.version;