update instance

This commit is contained in:
Qiuxia Fan 2022-03-24 20:22:25 +08:00
parent ff89735739
commit fe4655bc3f
3 changed files with 24 additions and 17 deletions

View File

@ -306,7 +306,7 @@ const msg = {
keywordsOfContentLogTips: keywordsOfContentLogTips:
"Current storage of SkyWalking OAP server does not support this.", "Current storage of SkyWalking OAP server does not support this.",
setEvent: "Set Event", setEvent: "Set Event",
instanceAttributes: "Instance Attributes", viewAttributes: "View Attributes",
serviceEvents: "Service Events", serviceEvents: "Service Events",
select: "Select", select: "Select",
eventID: "Event ID", eventID: "Event ID",

View File

@ -305,7 +305,7 @@ const msg = {
"只有core/default/searchableLogsTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。", "只有core/default/searchableLogsTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。",
keywordsOfContentLogTips: "SkyWalking OAP服务器的当前存储不支持此操作", keywordsOfContentLogTips: "SkyWalking OAP服务器的当前存储不支持此操作",
setEvent: "设置事件", setEvent: "设置事件",
instanceAttributes: "实例属性", viewAttributes: "实例属性",
serviceEvents: "服务事件", serviceEvents: "服务事件",
select: "选择", select: "选择",
eventID: "事件ID", eventID: "事件ID",

View File

@ -42,20 +42,6 @@ limitations under the License. -->
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="Attributes">
<template #default="scope">
<div class="attributes" v-if="scope.row.attributes.length">
<div
v-for="(attr, index) in scope.row.attributes"
:key="attr.name + index"
:style="{ fontSize: `${config.fontSize}px` }"
>
{{ attr.name }}: {{ attr.value || null }}
</div>
</div>
<div v-else>No Data</div>
</template>
</el-table-column>
<el-table-column <el-table-column
v-for="(metric, index) in config.metrics" v-for="(metric, index) in config.metrics"
:label="metric" :label="metric"
@ -77,6 +63,25 @@ limitations under the License. -->
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="Attributes" :width="100">
<template #default="scope">
<el-popover placement="left" :width="400" trigger="click">
<template #reference>
<span class="link">{{ t("viewAttributes") }}</span>
</template>
<div class="attributes" v-if="scope.row.attributes.length">
<div
v-for="(attr, index) in scope.row.attributes"
:key="attr.name + index"
:style="{ fontSize: `${config.fontSize}px` }"
class="mt-5"
>
{{ attr.name }}: {{ attr.value || null }}
</div>
</div>
</el-popover>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
<el-pagination <el-pagination
@ -94,6 +99,7 @@ limitations under the License. -->
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, watch } from "vue"; import { ref, watch } from "vue";
import { useI18n } from "vue-i18n";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import type { PropType } from "vue"; import type { PropType } from "vue";
import Line from "./Line.vue"; import Line from "./Line.vue";
@ -130,6 +136,7 @@ const props = defineProps({
needQuery: { type: Boolean, default: false }, needQuery: { type: Boolean, default: false },
isEdit: { type: Boolean, default: false }, isEdit: { type: Boolean, default: false },
}); });
const { t } = useI18n();
const selectorStore = useSelectorStore(); const selectorStore = useSelectorStore();
const dashboardStore = useDashboardStore(); const dashboardStore = useDashboardStore();
const chartLoading = ref<boolean>(false); const chartLoading = ref<boolean>(false);
@ -232,7 +239,7 @@ watch(
} }
.attributes { .attributes {
max-height: 80px; max-height: 400px;
overflow: auto; overflow: auto;
} }
</style> </style>