refactor: optimize data types for widgets and dashboards (#490)

This commit is contained in:
Fine0830
2025-08-14 18:25:40 +08:00
committed by GitHub
parent e885b61353
commit 54a700bf19
141 changed files with 972 additions and 743 deletions

View File

@@ -98,7 +98,7 @@ limitations under the License. -->
if (!selectorStore.currentService) {
return;
}
const service = selectorStore.currentService.id;
const service = selectorStore.currentService.id || "";
const res = await profileStore.getEndpoints(service, keyword);
if (res.errors) {
@@ -129,10 +129,14 @@ limitations under the License. -->
}
async function createTask() {
if (!selectorStore.currentService?.id) {
ElMessage.error("Please select a service");
return;
}
emits("close");
const date = monitorTime.value === "0" ? new Date() : time.value;
const params = {
serviceId: selectorStore.currentService.id,
serviceId: selectorStore.currentService?.id || "",
endpointName: endpointName.value,
startTime: date.getTime(),
duration: Number(monitorDuration.value),