feat: implement Topology on the dashboard (#14)

This commit is contained in:
Fine0830
2022-02-19 23:05:57 +08:00
committed by GitHub
parent 7472d70720
commit f53b422782
81 changed files with 4886 additions and 232 deletions

View File

@@ -16,7 +16,13 @@
*/
import * as echarts from "echarts/core";
import { BarChart, LineChart, PieChart, HeatmapChart } from "echarts/charts";
import {
BarChart,
LineChart,
PieChart,
HeatmapChart,
SankeyChart,
} from "echarts/charts";
import {
TitleComponent,
@@ -39,6 +45,7 @@ echarts.use([
LineChart,
PieChart,
HeatmapChart,
SankeyChart,
SVGRenderer,
DataZoomComponent,
VisualMapComponent,

View File

@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import graph from "@/graph";
import graphql from "@/graphql";
import { AxiosResponse } from "axios";
const getLocalTime = (utc: string, time: Date): Date => {
@@ -38,7 +38,9 @@ const setTimezoneOffset = () => {
export const queryOAPTimeInfo = async (): Promise<void> => {
let utc = window.localStorage.getItem("utc");
if (!utc) {
const res: AxiosResponse = await graph.query("queryOAPTimeInfo").params({});
const res: AxiosResponse = await graphql
.query("queryOAPTimeInfo")
.params({});
if (
!res.data ||
!res.data.data ||