mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 17:05:10 +00:00
add config for event
This commit is contained in:
parent
d0616d628f
commit
def4a9a630
@ -147,6 +147,7 @@ const msg = {
|
||||
nameTip:
|
||||
"The name only supports Chinese and English, horizontal lines and underscores",
|
||||
duplicateName: "Duplicate name",
|
||||
enableAssociate: "Enable association",
|
||||
seconds: "Seconds",
|
||||
hourTip: "Select Hour",
|
||||
minuteTip: "Select Minute",
|
||||
|
@ -147,6 +147,7 @@ const msg = {
|
||||
duplicateName: "Nombre duplicado",
|
||||
nameTip:
|
||||
"Este nombre sólo admite chino e inglés, líneas cruzadas y subrayado",
|
||||
enableAssociate: "Activar asociación",
|
||||
seconds: "Segundos",
|
||||
hourTip: "Seleccione Hora",
|
||||
minuteTip: "Seleccione Minuto",
|
||||
|
@ -143,6 +143,7 @@ const msg = {
|
||||
associateOptions: "关联选项",
|
||||
widget: "部件",
|
||||
nameTip: "该名称仅支持中文和英文、横线和下划线",
|
||||
enableAssociate: "启用关联",
|
||||
duplicateName: "重复的名称",
|
||||
seconds: "秒",
|
||||
hourTip: "选择小时",
|
||||
|
52
src/views/dashboard/configuration/Event.vue
Normal file
52
src/views/dashboard/configuration/Event.vue
Normal file
@ -0,0 +1,52 @@
|
||||
<!-- Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License. -->
|
||||
<template>
|
||||
<div>
|
||||
<span class="label">{{ t("enableAssociate") }}</span>
|
||||
<el-switch
|
||||
v-model="associate"
|
||||
active-text="Yes"
|
||||
inactive-text="No"
|
||||
@change="updateConfig"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { ref } from "vue";
|
||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||
|
||||
const { t } = useI18n();
|
||||
const dashboardStore = useDashboardStore();
|
||||
const associate = ref(dashboardStore.selectedGrid.associate || false);
|
||||
|
||||
function updateConfig() {
|
||||
dashboardStore.selectedGrid = {
|
||||
...dashboardStore.selectedGrid,
|
||||
associate,
|
||||
};
|
||||
dashboardStore.selectWidget(dashboardStore.selectedGrid);
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.label {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin: 10px 0;
|
||||
}
|
||||
</style>
|
@ -18,9 +18,11 @@
|
||||
import Text from "./Text.vue";
|
||||
import Widget from "./Widget.vue";
|
||||
import Topology from "./Topology.vue";
|
||||
import Event from "./Event.vue";
|
||||
|
||||
export default {
|
||||
Text,
|
||||
Widget,
|
||||
Topology,
|
||||
Event,
|
||||
};
|
||||
|
@ -25,6 +25,9 @@ limitations under the License. -->
|
||||
<Icon iconName="ellipsis_v" size="middle" class="operation" />
|
||||
</span>
|
||||
</template>
|
||||
<div class="tools" @click="editConfig">
|
||||
<span>{{ t("edit") }}</span>
|
||||
</div>
|
||||
<div class="tools" @click="removeWidget">
|
||||
<span>{{ t("delete") }}</span>
|
||||
</div>
|
||||
@ -58,6 +61,10 @@ const dashboardStore = useDashboardStore();
|
||||
function removeWidget() {
|
||||
dashboardStore.removeControls(props.data);
|
||||
}
|
||||
function editConfig() {
|
||||
dashboardStore.setConfigPanel(true);
|
||||
dashboardStore.selectWidget(props.data);
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.event-wrapper {
|
||||
|
Loading…
Reference in New Issue
Block a user