Skip to content

Commit

Permalink
[INLONG-5761][Dashboard] Add agent type to cluster management (#5764)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluewang authored and leezng committed Sep 2, 2022
1 parent f20972d commit 2cbb2c7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
20 changes: 20 additions & 0 deletions inlong-dashboard/src/metas/clusters/Agent.tsx
Original file line number Diff line number Diff line change
@@ -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[] = [];
6 changes: 6 additions & 0 deletions inlong-dashboard/src/metas/clusters/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -33,6 +34,11 @@ export interface ClusterItemType {
}

const _Clusters: Omit<ClusterItemType, 'tableColumns'>[] = [
{
label: 'Agent',
value: 'AGENT',
config: Agent,
},
{
label: 'DataProxy',
value: 'DATAPROXY',
Expand Down
2 changes: 1 addition & 1 deletion inlong-dashboard/src/pages/Clusters/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 2cbb2c7

Please sign in to comment.