@liujitcn/kratos-admin-system 0.0.94 → 0.0.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -96,8 +96,15 @@
|
|
|
96
96
|
</template>
|
|
97
97
|
<div class="ops-summary-list">
|
|
98
98
|
<div v-for="item in availabilityItems" :key="item.label" class="ops-summary-row">
|
|
99
|
-
<
|
|
100
|
-
|
|
99
|
+
<div class="ops-summary-main">
|
|
100
|
+
<span>{{ item.label }}</span>
|
|
101
|
+
<strong :class="`is-${item.tone}`"><i />{{ item.value }}</strong>
|
|
102
|
+
</div>
|
|
103
|
+
<div v-if="item.metrics.length" class="ops-summary-metrics">
|
|
104
|
+
<span v-for="metric in item.metrics" :key="metric.label">
|
|
105
|
+
<b>{{ metric.label }}</b><em>{{ metric.value }}</em>
|
|
106
|
+
</span>
|
|
107
|
+
</div>
|
|
101
108
|
</div>
|
|
102
109
|
</div>
|
|
103
110
|
</el-card>
|
|
@@ -229,6 +236,7 @@ import type {
|
|
|
229
236
|
OpsNode,
|
|
230
237
|
OpsAlertsResponse,
|
|
231
238
|
OpsEndpointsResponse,
|
|
239
|
+
OpsMetric,
|
|
232
240
|
OpsServicesResponse,
|
|
233
241
|
OpsStorage,
|
|
234
242
|
OpsStorageResponse,
|
|
@@ -333,6 +341,8 @@ interface AvailabilityItem {
|
|
|
333
341
|
value: string;
|
|
334
342
|
/** 状态颜色。 */
|
|
335
343
|
tone: "ok" | "warn";
|
|
344
|
+
/** 服务运行指标。 */
|
|
345
|
+
metrics: OpsMetric[];
|
|
336
346
|
}
|
|
337
347
|
|
|
338
348
|
const loading = ref(false);
|
|
@@ -442,7 +452,8 @@ const availabilityItems = computed<AvailabilityItem[]>(() =>
|
|
|
442
452
|
(services.value?.services ?? []).map(service => ({
|
|
443
453
|
label: service.name,
|
|
444
454
|
value: translateStatus(service.status),
|
|
445
|
-
tone: isNormalStatus(service.status) ? "ok" : "warn"
|
|
455
|
+
tone: isNormalStatus(service.status) ? "ok" : "warn",
|
|
456
|
+
metrics: service.metrics ?? []
|
|
446
457
|
}))
|
|
447
458
|
);
|
|
448
459
|
|
|
@@ -916,11 +927,10 @@ onBeforeUnmount(stopMonitoring);
|
|
|
916
927
|
margin-top: 5px;
|
|
917
928
|
}
|
|
918
929
|
.ops-summary-row {
|
|
919
|
-
display:
|
|
920
|
-
gap:
|
|
921
|
-
align-items: center;
|
|
922
|
-
justify-content: space-between;
|
|
930
|
+
display: grid;
|
|
931
|
+
gap: 6px;
|
|
923
932
|
min-height: 40px;
|
|
933
|
+
padding: 9px 0;
|
|
924
934
|
font-size: 12px;
|
|
925
935
|
color: var(--ops-text-secondary);
|
|
926
936
|
border-bottom: 1px solid var(--el-border-color-lighter);
|
|
@@ -947,6 +957,30 @@ onBeforeUnmount(stopMonitoring);
|
|
|
947
957
|
.ops-summary-row strong.is-warn {
|
|
948
958
|
color: var(--el-color-warning);
|
|
949
959
|
}
|
|
960
|
+
.ops-summary-main {
|
|
961
|
+
display: flex;
|
|
962
|
+
gap: 10px;
|
|
963
|
+
align-items: center;
|
|
964
|
+
justify-content: space-between;
|
|
965
|
+
}
|
|
966
|
+
.ops-summary-metrics {
|
|
967
|
+
display: flex;
|
|
968
|
+
flex-wrap: wrap;
|
|
969
|
+
gap: 4px 12px;
|
|
970
|
+
color: var(--ops-text-placeholder);
|
|
971
|
+
font-size: 11px;
|
|
972
|
+
}
|
|
973
|
+
.ops-summary-metrics span {
|
|
974
|
+
display: inline-flex;
|
|
975
|
+
gap: 4px;
|
|
976
|
+
}
|
|
977
|
+
.ops-summary-metrics b {
|
|
978
|
+
font-weight: 500;
|
|
979
|
+
}
|
|
980
|
+
.ops-summary-metrics em {
|
|
981
|
+
font-style: normal;
|
|
982
|
+
color: var(--ops-text-secondary);
|
|
983
|
+
}
|
|
950
984
|
.ops-storage-section {
|
|
951
985
|
margin-bottom: 10px;
|
|
952
986
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liujitcn/kratos-admin-system",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.95",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "kratos-admin system management module",
|
|
7
7
|
"license": "MIT",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"sortablejs": "^1.15.2",
|
|
17
17
|
"swagger-ui-dist": "^5.32.15",
|
|
18
18
|
"vue-element-plus-x": "^2.0.3",
|
|
19
|
-
"@liujitcn/kratos-admin-core": "0.0.
|
|
19
|
+
"@liujitcn/kratos-admin-core": "0.0.95"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"@element-plus/icons-vue": "^2.3.1",
|