Skip to content

Commit

Permalink
fix(frontend): 线上问题高优先级需求及问题修复 #2094
Browse files Browse the repository at this point in the history
  • Loading branch information
jinquantianxia committed Nov 29, 2023
1 parent b3a6957 commit b59b8eb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import _ from 'lodash';

import type { ResourceTopo } from '@services/types';

import { ClusterTypes } from '@common/const';

const defaultNodeConfig = {
width: 296,
itemHeight: 28,
Expand Down Expand Up @@ -139,9 +141,9 @@ export class GraphData {
this.calcNodeLocations(firstRoot, groups, groupLines);

// es hdfs 集群特殊逻辑
if (['es', 'hdfs'].includes(this.clusterType)) {
if (([ClusterTypes.ES, ClusterTypes.HDFS] as string[]).includes(this.clusterType)) {
this.calcHorizontalAlignLocations(groups);
} else if (this.clusterType === 'spider') {
} else if (this.clusterType === ClusterTypes.TENDBCLUSTER) {
this.calcSpiderNodeLocations(rootGroups, groups);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
:style="{ color: highlightIps.includes(inst.ip) ? 'rgb(234 177 93)' : '#63656e' }">
<slot :data="inst">
{{ inst.ip }}:{{ inst.port }}
<!-- TODO: 待UI确认Icon -->
<!-- <DbIcon
<span
v-if="inst.admin_port && inst.admin_port > 0"
type="warn-lightning" /> -->
v-bk-tooltips="'Primary ctl'"
class="primary-ctl-box">P</span>
</slot>
</span>
<BkTag v-if="inst.status === 'unavailable'">
Expand Down Expand Up @@ -276,6 +276,23 @@
.cluster-instances {
padding: 8px 0;

.primary-ctl-box {
width: 16px;
height: 16px;
padding: 0 4px;
font-size: 12px;
font-weight: 700;
color: #3A84FF;
cursor: pointer;
background: #F0F5FF;
border-radius: 2px;

&:hover {
color: #1768EF;
background: #E1ECFF;
}
}

.db-icon-copy {
display: none;
margin-top: 1px;
Expand Down

0 comments on commit b59b8eb

Please sign in to comment.