mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-12 15:52:57 +00:00
disable events
This commit is contained in:
parent
57e0c8219d
commit
78a0834fb2
@ -35,7 +35,13 @@ limitations under the License. -->
|
|||||||
<div>
|
<div>
|
||||||
<div class="label">{{ t("profilingEvents") }}</div>
|
<div class="label">{{ t("profilingEvents") }}</div>
|
||||||
<el-checkbox-group v-model="asyncEvents" class="profile-input mb-5">
|
<el-checkbox-group v-model="asyncEvents" class="profile-input mb-5">
|
||||||
<el-checkbox v-for="event in ProfilingEvents" :label="event.label" :value="event.value" :key="event.value" />
|
<el-checkbox
|
||||||
|
v-for="event in ProfilingEvents"
|
||||||
|
:label="event"
|
||||||
|
:value="event"
|
||||||
|
:key="event"
|
||||||
|
:disabled="disableEvents(event)"
|
||||||
|
/>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -103,10 +109,11 @@ limitations under the License. -->
|
|||||||
const selectorStore = useSelectorStore();
|
const selectorStore = useSelectorStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const serviceInstanceIds = ref<string[]>([]);
|
const serviceInstanceIds = ref<string[]>([]);
|
||||||
const asyncEvents = ref<string[]>([ProfilingEvents[0].value]);
|
const asyncEvents = ref<string[]>([ProfilingEvents[0]]);
|
||||||
const duration = ref<string>(DurationOptions[0].value);
|
const duration = ref<string>(DurationOptions[0].value);
|
||||||
const execArgs = ref<string>("");
|
const execArgs = ref<string>("");
|
||||||
const loading = ref<boolean>(false);
|
const loading = ref<boolean>(false);
|
||||||
|
const PartofEvents = [ProfilingEvents[3], ProfilingEvents[4], ProfilingEvents[5]];
|
||||||
|
|
||||||
function changeDuration(val: string) {
|
function changeDuration(val: string) {
|
||||||
duration.value = val;
|
duration.value = val;
|
||||||
@ -116,6 +123,21 @@ limitations under the License. -->
|
|||||||
serviceInstanceIds.value = options.map((d: Option) => d.value);
|
serviceInstanceIds.value = options.map((d: Option) => d.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function disableEvents(item: string) {
|
||||||
|
if (asyncEvents.value.includes(ProfilingEvents[0]) && PartofEvents.includes(item)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (item === ProfilingEvents[0]) {
|
||||||
|
for (const event of PartofEvents) {
|
||||||
|
if (asyncEvents.value.includes(event)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
async function createTask() {
|
async function createTask() {
|
||||||
const params = {
|
const params = {
|
||||||
serviceId: selectorStore.currentService.id,
|
serviceId: selectorStore.currentService.id,
|
||||||
|
@ -21,14 +21,7 @@ export const DurationOptions = [
|
|||||||
{ value: "15", label: "15 min" },
|
{ value: "15", label: "15 min" },
|
||||||
];
|
];
|
||||||
|
|
||||||
export const ProfilingEvents = [
|
export const ProfilingEvents = ["CPU", "ALLOC", "LOCK", "WALL", "CTIMER", "ITIMER"];
|
||||||
{ value: "CPU", label: "CPU" },
|
|
||||||
{ value: "ALLOC", label: "ALLOC" },
|
|
||||||
{ value: "WALL", label: "WALL" },
|
|
||||||
{ value: "LOCK", label: "LOCK" },
|
|
||||||
{ value: "CTIMER", label: "CTIMER" },
|
|
||||||
{ value: "ITIMER", label: "ITIMER" },
|
|
||||||
];
|
|
||||||
|
|
||||||
export enum EventsMap {
|
export enum EventsMap {
|
||||||
CPU = "EXECUTION_SAMPLE",
|
CPU = "EXECUTION_SAMPLE",
|
||||||
|
Loading…
Reference in New Issue
Block a user