mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-15 12:49:17 +00:00
feat: create image, intstance list, endpoint list
This commit is contained in:
@@ -20,7 +20,7 @@ import { Duration, DurationTime } from "@/types/app";
|
||||
import getLocalTime from "@/utils/localtime";
|
||||
import getDurationRow from "@/utils/dateTime";
|
||||
import dateFormatStep, { dateFormatTime } from "@/utils/dateFormat";
|
||||
|
||||
/*global Nullable*/
|
||||
interface AppState {
|
||||
durationRow: any;
|
||||
utc: string;
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { defineStore } from "pinia";
|
||||
import { Option } from "@/types/app";
|
||||
import { Option, Duration } from "@/types/app";
|
||||
import { store } from "@/store";
|
||||
import graph from "@/graph";
|
||||
import { AxiosResponse } from "axios";
|
||||
@@ -45,6 +45,27 @@ export const selectorStore = defineStore({
|
||||
}
|
||||
return res;
|
||||
},
|
||||
async getServiceInstances(params: {
|
||||
serviceId: string;
|
||||
duration: Duration;
|
||||
}): Promise<AxiosResponse> {
|
||||
const res: AxiosResponse = await graph
|
||||
.query("queryInstances")
|
||||
.params(params);
|
||||
return res;
|
||||
},
|
||||
async getEndpoints(params: {
|
||||
keyword: string;
|
||||
serviceId: string;
|
||||
}): Promise<AxiosResponse> {
|
||||
if (!params.keyword) {
|
||||
params.keyword = "";
|
||||
}
|
||||
const res: AxiosResponse = await graph
|
||||
.query("queryEndpoints")
|
||||
.params(params);
|
||||
return res;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user