This commit is contained in:
Qiuxia Fan 2022-03-23 20:34:32 +08:00
parent 33365f2a14
commit 3b348cff65
2 changed files with 12 additions and 3 deletions

View File

@ -42,7 +42,7 @@ limitations under the License. -->
</span>
</template>
</el-table-column>
<el-table-column label="Service Instances">
<el-table-column label="Attributes">
<template #default="scope">
<div class="attributes" v-if="scope.row.attributes.length">
<div
@ -186,6 +186,10 @@ function clickInstance(scope: any) {
layer: dashboardStore.layerId,
entity: EntityType[3].value,
});
if (!d) {
ElMessage.error("No this dashboard");
return;
}
router.push(
`/dashboard/${d.layer}/${d.entity}/${selectorStore.currentService.id}/${
scope.row.id

View File

@ -127,6 +127,7 @@ const params = useRoute().params;
const toolIcons = ref<{ name: string; content: string; id: string }[]>(
EndpointRelationTools
);
const limit = ref<number>(10);
const loading = ref<boolean>(false);
const states = reactive<{
destService: string;
@ -401,7 +402,7 @@ async function fetchPods(type: string, serviceId: string, setPod: boolean) {
let resp;
switch (type) {
case EntityType[2].value:
resp = await selectorStore.getEndpoints({ serviceId });
resp = await selectorStore.getEndpoints({ serviceId, limit });
if (setPod) {
selectorStore.setCurrentPod(
selectorStore.pods.length ? selectorStore.pods[0] : null
@ -419,7 +420,11 @@ async function fetchPods(type: string, serviceId: string, setPod: boolean) {
}
break;
case EntityType[6].value:
resp = await selectorStore.getEndpoints({ serviceId, isRelation: true });
resp = await selectorStore.getEndpoints({
serviceId,
isRelation: true,
limit,
});
if (setPod) {
selectorStore.setCurrentDestPod(
selectorStore.destPods.length ? selectorStore.destPods[0] : null