add expression

This commit is contained in:
Fine 2025-01-13 16:49:28 +08:00
parent 77f9100ec4
commit 7341243377
7 changed files with 13 additions and 5 deletions

View File

@ -396,5 +396,6 @@ const msg = {
execArgs: "Exec Args",
instances: "Instances",
snapshot: "Snapshot",
expression: "Expression",
};
export default msg;

View File

@ -396,5 +396,6 @@ const msg = {
execArgs: "Exec Args",
instances: "Instances",
snapshot: "Snapshot",
expression: "Expression",
};
export default msg;

View File

@ -394,5 +394,6 @@ const msg = {
execArgs: "String任务扩展",
instances: "实例",
snapshot: "快照",
expression: "表达式",
};
export default msg;

View File

@ -48,7 +48,7 @@ limitations under the License. -->
:destroy-on-close="true"
@closed="isShowDetails = false"
>
<div class="mb-10 clear alarm-detail" v-for="(item, index) in AlarmDetailCol" :key="index">
<div class="mb-20 clear alarm-detail" v-for="(item, index) in AlarmDetailCol" :key="index">
<span class="g-sm-2 grey">{{ t(item.value) }}:</span>
<span v-if="item.label === 'startTime'">
{{ dateFormat(currentDetail[item.label]) }}
@ -56,7 +56,7 @@ limitations under the License. -->
<span v-else-if="item.label === 'tags'">
<div v-for="(d, index) in alarmTags" :key="index">{{ d }}</div>
</span>
<span v-else-if="item.label === 'events'" class="event-detail">
<span v-else-if="item.label === 'events'">
<div>
<ul>
<li>
@ -77,6 +77,9 @@ limitations under the License. -->
</ul>
</div>
</span>
<span v-else-if="item.label === 'expression'">
{{ currentDetail.snapshot.expression }}
</span>
<span v-else-if="item.label === 'snapshot'">
<Snapshot :snapshot="currentDetail.snapshot" />
</span>
@ -90,7 +93,7 @@ limitations under the License. -->
:destroy-on-close="true"
@closed="showEventDetails = false"
>
<div class="event-detail">
<div>
<div class="mb-10" v-for="(eventKey, index) in EventsDetailKeys" :key="index">
<span class="keys">{{ t(eventKey.text) }}</span>
<span v-if="eventKey.class === 'parameters'">

View File

@ -113,7 +113,6 @@ limitations under the License. -->
link: { xAxisIndex: "all" },
},
legend: {
show: grid.length > 1,
type: "scroll",
icon: "circle",
top: -5,

View File

@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License. -->
<template>
<LineChart
class="snapshot flex-v"
:intervalTime="appStore.intervalTime"
:data="metrics"
:style="{ width: `800px`, height: `${metrics.length * 300}px` }"

View File

@ -52,6 +52,10 @@ export const AlarmDetailCol = [
label: "events",
value: "eventDetail",
},
{
label: "expression",
value: "expression",
},
{
label: "snapshot",
value: "snapshot",