Skip to content
This repository was archived by the owner on Jun 1, 2022. It is now read-only.

Commit 2bee72f

Browse files
authored
fix: update ui for logs (#425)
* fix: update log bar * fix: update data * fix: update style of selectors * fix: log time
1 parent b49e657 commit 2bee72f

File tree

6 files changed

+27
-12
lines changed

6 files changed

+27
-12
lines changed

src/views/components/common/trace-select.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ limitations under the License. -->
2626
<div class="rk-trace-bar-i flex-h" @click="visible = !visible && !readonly">
2727
<div class="mr-15 rk-trace-bar-i-text">
2828
<div class="sm grey">{{ title }}</div>
29-
<div class="ell" v-tooltip:right.ellipsis="value.label || ''">
29+
<div v-tooltip:right.ellipsis="value.label || ''">
3030
{{ value.label || '' }}
3131
</div>
3232
</div>
@@ -92,8 +92,10 @@ limitations under the License. -->
9292
}
9393
}
9494
.rk-trace-bar-i-text {
95-
max-width: 150px;
96-
min-width: 80px;
95+
max-width: 350px;
96+
min-width: 100px;
97+
word-wrap: break-word;
98+
word-break: break-all;
9799
}
98100
.rk-trace-bar-i {
99101
height: 100%;

src/views/components/dashboard/tool-bar-endpoint-select.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ limitations under the License. -->
2929
</svg>
3030
<div class="mr-15 rk-dashboard-bar-i-text">
3131
<div class="sm grey">{{ title }}</div>
32-
<div class="ell" v-tooltip:right.ellipsis="current.label || ''">
32+
<div class="selector-ell" v-tooltip:right.ellipsis="current.label || ''">
3333
{{ current.label }}
3434
</div>
3535
</div>
@@ -97,7 +97,11 @@ limitations under the License. -->
9797
}
9898
}
9999
.rk-dashboard-bar-i-text {
100-
max-width: 250px;
100+
max-width: 350px;
101+
.selector-ell {
102+
word-wrap: break-word;
103+
word-break: break-all;
104+
}
101105
}
102106
.rk-dashboard-bar-i {
103107
height: 100%;

src/views/components/dashboard/tool-bar-select.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ limitations under the License. -->
2929
</svg>
3030
<div class="mr-15 rk-dashboard-bar-i-text">
3131
<div class="sm grey">{{ title }}</div>
32-
<div class="ell" v-tooltip:right.ellipsis="current.label || ''">
32+
<div class="selector-ell" v-tooltip:right.ellipsis="current.label || ''">
3333
{{ current.label }}
3434
</div>
3535
</div>
@@ -97,7 +97,11 @@ limitations under the License. -->
9797
}
9898
}
9999
.rk-dashboard-bar-i-text {
100-
max-width: 200px;
100+
max-width: 350px;
101+
.selector-ell {
102+
word-wrap: break-word;
103+
word-break: break-all;
104+
}
101105
}
102106
.rk-dashboard-bar-i {
103107
height: 100%;

src/views/components/log/log-bar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ limitations under the License. -->
7373
<RkPage :currentSize="10" :currentPage="pageNum" @changePage="handleRefresh" :total="logState.total" />
7474
</span>
7575
</div>
76-
<div class="flex-h" v-show="showConditionsBox">
76+
<div class="flex-h" v-show="showConditionsBox && logState.type.key !== cateGoryBrowser">
7777
<LogConditions />
7878
</div>
7979
</div>

src/views/components/log/log-table/log-service-item.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License. -->
1717
<div @click="showSelectSpan" class="log-item">
1818
<div v-for="(item, index) in columns" :key="index" :class="item.label">
1919
<span v-if="item.label === 'timestamp'">
20-
{{ data.time | dateformat }}
20+
{{ data.timestamp | dateformat }}
2121
</span>
2222
<span v-else-if="item.label === 'tags'">
2323
{{ tags }}
@@ -43,6 +43,9 @@ limitations under the License. -->
4343
private columns = ServiceLogConstants;
4444
private tags: string = '';
4545
private created() {
46+
if (!this.data.tags) {
47+
return;
48+
}
4649
this.tags = String(this.data.tags.map((d: any) => `${d.key}=${d.value}`));
4750
}
4851
private showSelectSpan() {

src/views/containers/topology/trace/trace-select.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ limitations under the License. -->
2626
<div class="rk-trace-bar-i flex-h" @click="visible = !visible && !readonly">
2727
<div class="mr-15 rk-trace-bar-i-text">
2828
<div class="sm grey">{{ title }}</div>
29-
<div class="ell" v-tooltip:right.ellipsis="value.label || ''">
29+
<div v-tooltip:right.ellipsis="value.label || ''">
3030
{{ value.label || '' }}
3131
</div>
3232
</div>
@@ -92,8 +92,10 @@ limitations under the License. -->
9292
}
9393
}
9494
.rk-trace-bar-i-text {
95-
max-width: 150px;
96-
min-width: 80px;
95+
max-width: 350px;
96+
min-width: 100px;
97+
word-wrap: break-word;
98+
word-break: break-all;
9799
}
98100
.rk-trace-bar-i {
99101
height: 100%;

0 commit comments

Comments
 (0)