You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2022/09/01 11:13:06 UTC

[inlong] branch master updated: [INLONG-5761][Dashboard] Add agent type to cluster management (#5764)

This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new 23be25f63 [INLONG-5761][Dashboard] Add agent type to cluster management (#5764)
23be25f63 is described below

commit 23be25f63b689e06236423c8c59651e625647370
Author: Lizhen <88...@users.noreply.github.com>
AuthorDate: Thu Sep 1 19:13:00 2022 +0800

    [INLONG-5761][Dashboard] Add agent type to cluster management (#5764)
---
 inlong-dashboard/src/metas/clusters/Agent.tsx | 20 ++++++++++++++++++++
 inlong-dashboard/src/metas/clusters/index.tsx |  6 ++++++
 inlong-dashboard/src/pages/Clusters/index.tsx |  2 +-
 3 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/inlong-dashboard/src/metas/clusters/Agent.tsx b/inlong-dashboard/src/metas/clusters/Agent.tsx
new file mode 100644
index 000000000..d199be7c4
--- /dev/null
+++ b/inlong-dashboard/src/metas/clusters/Agent.tsx
@@ -0,0 +1,20 @@
+/*
+ * 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 type { ClsConfigItemType } from './common/types';
+
+export const Agent: ClsConfigItemType[] = [];
diff --git a/inlong-dashboard/src/metas/clusters/index.tsx b/inlong-dashboard/src/metas/clusters/index.tsx
index 35a96b2ba..c630aafbc 100644
--- a/inlong-dashboard/src/metas/clusters/index.tsx
+++ b/inlong-dashboard/src/metas/clusters/index.tsx
@@ -24,6 +24,7 @@ import type { ClsConfigItemType, ClsTableItemType } from './common/types';
 import { DataProxy } from './DataProxy';
 import { Pulsar } from './Pulsar';
 import { TubeMQ } from './TubeMQ';
+import { Agent } from './Agent';
 
 export interface ClusterItemType {
   label: string;
@@ -33,6 +34,11 @@ export interface ClusterItemType {
 }
 
 const _Clusters: Omit<ClusterItemType, 'tableColumns'>[] = [
+  {
+    label: 'Agent',
+    value: 'AGENT',
+    config: Agent,
+  },
   {
     label: 'DataProxy',
     value: 'DATAPROXY',
diff --git a/inlong-dashboard/src/pages/Clusters/index.tsx b/inlong-dashboard/src/pages/Clusters/index.tsx
index b21534b4f..eceffa5b4 100644
--- a/inlong-dashboard/src/pages/Clusters/index.tsx
+++ b/inlong-dashboard/src/pages/Clusters/index.tsx
@@ -149,7 +149,7 @@ const Comp: React.FC = () => {
           width: 200,
           render: (text, record) => (
             <>
-              {record.type === 'DATAPROXY' && (
+              {(record.type === 'DATAPROXY' || record.type === 'AGENT') && (
                 <Link to={`/clusters/node?type=${record.type}&clusterId=${record.id}`}>
                   {i18n.t('pages.Clusters.Node.Name')}
                 </Link>