mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-14 20:01:28 +00:00
refactor: optimize data types for widgets and dashboards (#490)
This commit is contained in:
@@ -88,7 +88,7 @@ export const selectorStore = defineStore({
|
||||
}
|
||||
return res.data;
|
||||
},
|
||||
async getServiceInstances(param?: { serviceId: string; isRelation: boolean }) {
|
||||
async getServiceInstances(param?: { serviceId: string; isRelation?: boolean }) {
|
||||
const serviceId = param ? param.serviceId : this.currentService?.id;
|
||||
if (!serviceId) {
|
||||
return new Promise((resolve) => resolve({ errors: "Service ID is required" }));
|
||||
@@ -106,7 +106,7 @@ export const selectorStore = defineStore({
|
||||
}
|
||||
return resp;
|
||||
},
|
||||
async getProcesses(param?: { instanceId: string; isRelation: boolean }) {
|
||||
async getProcesses(param?: { instanceId: string | undefined; isRelation?: boolean }) {
|
||||
const instanceId = param ? param.instanceId : this.currentPod?.id;
|
||||
if (!instanceId) {
|
||||
return null;
|
||||
@@ -147,7 +147,7 @@ export const selectorStore = defineStore({
|
||||
}
|
||||
return res;
|
||||
},
|
||||
async getService(serviceId: string, isRelation: boolean) {
|
||||
async getService(serviceId: string, isRelation?: boolean) {
|
||||
if (!serviceId) {
|
||||
return;
|
||||
}
|
||||
@@ -185,7 +185,7 @@ export const selectorStore = defineStore({
|
||||
|
||||
return res;
|
||||
},
|
||||
async getEndpoint(endpointId: string, isRelation?: string) {
|
||||
async getEndpoint(endpointId: string, isRelation?: boolean) {
|
||||
if (!endpointId) {
|
||||
return;
|
||||
}
|
||||
@@ -226,6 +226,6 @@ export const selectorStore = defineStore({
|
||||
},
|
||||
});
|
||||
|
||||
export function useSelectorStore(): Recordable {
|
||||
export function useSelectorStore() {
|
||||
return selectorStore(store);
|
||||
}
|
||||
|
Reference in New Issue
Block a user