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

Commit

Permalink
fix: update ui for logs (#425)
Browse files Browse the repository at this point in the history
* fix: update log bar

* fix: update data

* fix: update style of selectors

* fix: log time
  • Loading branch information
Fine0830 authored Feb 1, 2021
1 parent b49e657 commit 2bee72f
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 12 deletions.
8 changes: 5 additions & 3 deletions src/views/components/common/trace-select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ limitations under the License. -->
<div class="rk-trace-bar-i flex-h" @click="visible = !visible && !readonly">
<div class="mr-15 rk-trace-bar-i-text">
<div class="sm grey">{{ title }}</div>
<div class="ell" v-tooltip:right.ellipsis="value.label || ''">
<div v-tooltip:right.ellipsis="value.label || ''">
{{ value.label || '' }}
</div>
</div>
Expand Down Expand Up @@ -92,8 +92,10 @@ limitations under the License. -->
}
}
.rk-trace-bar-i-text {
max-width: 150px;
min-width: 80px;
max-width: 350px;
min-width: 100px;
word-wrap: break-word;
word-break: break-all;
}
.rk-trace-bar-i {
height: 100%;
Expand Down
8 changes: 6 additions & 2 deletions src/views/components/dashboard/tool-bar-endpoint-select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ limitations under the License. -->
</svg>
<div class="mr-15 rk-dashboard-bar-i-text">
<div class="sm grey">{{ title }}</div>
<div class="ell" v-tooltip:right.ellipsis="current.label || ''">
<div class="selector-ell" v-tooltip:right.ellipsis="current.label || ''">
{{ current.label }}
</div>
</div>
Expand Down Expand Up @@ -97,7 +97,11 @@ limitations under the License. -->
}
}
.rk-dashboard-bar-i-text {
max-width: 250px;
max-width: 350px;
.selector-ell {
word-wrap: break-word;
word-break: break-all;
}
}
.rk-dashboard-bar-i {
height: 100%;
Expand Down
8 changes: 6 additions & 2 deletions src/views/components/dashboard/tool-bar-select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ limitations under the License. -->
</svg>
<div class="mr-15 rk-dashboard-bar-i-text">
<div class="sm grey">{{ title }}</div>
<div class="ell" v-tooltip:right.ellipsis="current.label || ''">
<div class="selector-ell" v-tooltip:right.ellipsis="current.label || ''">
{{ current.label }}
</div>
</div>
Expand Down Expand Up @@ -97,7 +97,11 @@ limitations under the License. -->
}
}
.rk-dashboard-bar-i-text {
max-width: 200px;
max-width: 350px;
.selector-ell {
word-wrap: break-word;
word-break: break-all;
}
}
.rk-dashboard-bar-i {
height: 100%;
Expand Down
2 changes: 1 addition & 1 deletion src/views/components/log/log-bar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ limitations under the License. -->
<RkPage :currentSize="10" :currentPage="pageNum" @changePage="handleRefresh" :total="logState.total" />
</span>
</div>
<div class="flex-h" v-show="showConditionsBox">
<div class="flex-h" v-show="showConditionsBox && logState.type.key !== cateGoryBrowser">
<LogConditions />
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion src/views/components/log/log-table/log-service-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License. -->
<div @click="showSelectSpan" class="log-item">
<div v-for="(item, index) in columns" :key="index" :class="item.label">
<span v-if="item.label === 'timestamp'">
{{ data.time | dateformat }}
{{ data.timestamp | dateformat }}
</span>
<span v-else-if="item.label === 'tags'">
{{ tags }}
Expand All @@ -43,6 +43,9 @@ limitations under the License. -->
private columns = ServiceLogConstants;
private tags: string = '';
private created() {
if (!this.data.tags) {
return;
}
this.tags = String(this.data.tags.map((d: any) => `${d.key}=${d.value}`));
}
private showSelectSpan() {
Expand Down
8 changes: 5 additions & 3 deletions src/views/containers/topology/trace/trace-select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ limitations under the License. -->
<div class="rk-trace-bar-i flex-h" @click="visible = !visible && !readonly">
<div class="mr-15 rk-trace-bar-i-text">
<div class="sm grey">{{ title }}</div>
<div class="ell" v-tooltip:right.ellipsis="value.label || ''">
<div v-tooltip:right.ellipsis="value.label || ''">
{{ value.label || '' }}
</div>
</div>
Expand Down Expand Up @@ -92,8 +92,10 @@ limitations under the License. -->
}
}
.rk-trace-bar-i-text {
max-width: 150px;
min-width: 80px;
max-width: 350px;
min-width: 100px;
word-wrap: break-word;
word-break: break-all;
}
.rk-trace-bar-i {
height: 100%;
Expand Down

0 comments on commit 2bee72f

Please sign in to comment.