diff --git a/src/views/dashboard/related/continuous-profiling/components/Policy.vue b/src/views/dashboard/related/continuous-profiling/components/Policy.vue index 7ce898d7..8956f2cc 100644 --- a/src/views/dashboard/related/continuous-profiling/components/Policy.vue +++ b/src/views/dashboard/related/continuous-profiling/components/Policy.vue @@ -26,6 +26,23 @@ limitations under the License. --> />
+
+ {{ `Item - ${index + 1}` }} + + +
{{ t("monitorType") }}
{{ t("count") }}
- +
{{ t("threshold") }}
@@ -47,7 +64,7 @@ limitations under the License. -->
{{ t("period") }}
- +
{{ t("uriRegex") }}
@@ -109,6 +126,24 @@ limitations under the License. --> }); emits("edit", { ...states, checkItems }, props.order); } + + function createItem(e: PointerEvent) { + e.stopPropagation(); + states.checkItems.push({ + type: "", + threshold: "", + period: NaN, + count: NaN, + }); + } + + function removeItem(e: PointerEvent, key: number) { + e.stopPropagation(); + if (states.checkItems.length === 1) { + return; + } + states.checkItems = states.checkItems.filter((_, index: number) => index !== key); + }