fix: import components

This commit is contained in:
Qiuxia Fan 2022-01-04 22:59:23 +08:00
parent b9a6e648ae
commit 0f09e4b0f7
5 changed files with 42 additions and 17 deletions

View File

@ -87,11 +87,12 @@ import { ElMessage, ElButton } from "element-plus";
import { ValuesTypes, MetricQueryTypes, ChartTypes } from "../data"; import { ValuesTypes, MetricQueryTypes, ChartTypes } from "../data";
import { Option } from "@/types/app"; import { Option } from "@/types/app";
import Loading from "@/utils/loading"; import Loading from "@/utils/loading";
import charts from "../graphs"; import graphs from "../graphs";
import controls from "../controls";
export default defineComponent({ export default defineComponent({
name: "WidgetConfig", name: "WidgetConfig",
components: { ...charts, ElButton }, components: { ...graphs, ...controls, ElButton },
setup() { setup() {
const states = reactive<{ const states = reactive<{
metrics: string; metrics: string;

View File

@ -40,7 +40,7 @@ limitations under the License. -->
<script lang="ts" setup> <script lang="ts" setup>
import { defineProps, reactive } from "vue"; import { defineProps, reactive } from "vue";
import type { PropType } from "vue"; import type { PropType } from "vue";
import Widget from "./Widget.vue"; import Widget from "../panel/Widget.vue";
import { LayoutConfig } from "@/types/dashboard"; import { LayoutConfig } from "@/types/dashboard";
defineProps({ defineProps({

View File

@ -0,0 +1,24 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Image from "./Image.vue";
import Tabs from "./Tabs.vue";
export default {
Image,
Tabs,
};

View File

@ -15,18 +15,18 @@
* limitations under the License. * limitations under the License.
*/ */
export const ChartTypes = [ export const ChartTypes = [
{ label: "Bar", value: "bar" }, { label: "Bar", value: "Bar" },
{ label: "Line", value: "line" }, { label: "Line", value: "Line" },
{ label: "Area", value: "area" }, { label: "Area", value: "Area" },
{ label: "Heatmap", value: "heatmap" }, { label: "Heatmap", value: "Heatmap" },
{ label: "Pie", value: "pie" }, { label: "Pie", value: "Pie" },
{ label: "Card", value: "card" }, { label: "Card", value: "Card" },
{ label: "Progress Bar", value: "progressBar" }, { label: "Progress Bar", value: "ProgressBar" },
{ label: "Table", value: "table" }, { label: "Table", value: "Table" },
{ label: "Endpoint List", value: "endpointList" }, { label: "Endpoint List", value: "EndpointList" },
{ label: "Instance List", value: "instanceList" }, { label: "Instance List", value: "InstanceList" },
{ label: "Image", value: "image" }, { label: "Image", value: "Image" },
{ label: "Tab", value: "tab" }, { label: "Tab", value: "Tabs" },
]; ];
export enum MetricQueryTypes { export enum MetricQueryTypes {
ReadMetricsValue = "readMetricsValue", ReadMetricsValue = "readMetricsValue",

View File

@ -19,7 +19,7 @@ import Area from "./Area.vue";
import Line from "./Line.vue"; import Line from "./Line.vue";
import Bar from "./Bar.vue"; import Bar from "./Bar.vue";
import Heatmap from "./Heatmap.vue"; import Heatmap from "./Heatmap.vue";
// import ProgressBar from "./ProgressBar.vue"; import ProgressBar from "./ProgressBar.vue";
import Table from "./Table.vue"; import Table from "./Table.vue";
import Pie from "./Pie.vue"; import Pie from "./Pie.vue";
import Card from "./Card.vue"; import Card from "./Card.vue";
@ -28,7 +28,7 @@ export default {
Line, Line,
Bar, Bar,
Heatmap, Heatmap,
// ProgressBar, ProgressBar,
Area, Area,
Table, Table,
Pie, Pie,