Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(frontend): 线上问题高优先级需求及问题修复 #2094 #2200

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading