fixed unknown export member issues

This commit is contained in:
Peter Olu 2022-05-20 23:49:11 +01:00
parent 35367df371
commit 72ab1534ae
3 changed files with 11 additions and 49 deletions

View File

@ -17,7 +17,8 @@
import { defineStore } from "pinia";
import { Duration } from "@/types/app";
import { Instance, Endpoint, Service } from "@/types/selector";
import { ServiceLogColumn, BrowserLogColumn } from '@/types/log-column'
import { ServiceLogColumn, BrowserLogColumn } from "@/types/log-column";
import { ServiceLogConstants, BrowserLogConstants } from "../data";
import { store } from "@/store";
import graphql from "@/graphql";
import { AxiosResponse } from "axios";
@ -50,8 +51,8 @@ export const logStore = defineStore({
queryDuration: useAppStoreWithOut().durationTime,
paging: { pageNum: 1, pageSize: 15, needTotal: true },
},
serviceLogColumn: [],
browserLogColumn: [],
serviceLogColumn: [...ServiceLogConstants],
browserLogColumn: [...BrowserLogConstants],
supportQueryLogsByKeywords: true,
durationTime: useAppStoreWithOut().durationTime,
selectorStore: useSelectorStore(),

View File

@ -15,12 +15,12 @@
* limitations under the License.
*/
export interface BrowserLogColumn {
lable: string;
label: string;
value: string;
isVisible?: boolean;
}
export interface ServiceLogColumn {
lable: string;
label: string;
value: string;
isVisible?: boolean;
methode?: any;
}

View File

@ -72,10 +72,11 @@ limitations under the License. -->
<script lang="ts" setup>
import { ref, computed } from "vue";
import { useI18n } from "vue-i18n";
import { ServiceLogConstants, BrowserLogConstants } from "./data";
// import { ServiceLogConstants, BrowserLogConstants } from "./data";
import LogBrowser from "./LogBrowser.vue";
import LogService from "./LogService.vue";
import LogDetail from "./LogDetail.vue";
import { logStore } from '@/store/modules/log'
/*global defineProps, Nullable */
const props = defineProps({
@ -83,54 +84,14 @@ const props = defineProps({
tableData: { type: Array, default: () => [] },
noLink: { type: Boolean, default: true },
});
const useLogStore = logStore()
const { t } = useI18n();
const currentLog = ref<any>({});
const showDetail = ref<boolean>(false);
const dragger = ref<Nullable<HTMLSpanElement>>(null);
// const method = ref<number>(380);
// props.type === "browser" ? BrowserLogConstants : ServiceLogConstants;
const columns = ref<any[]> ([
{
label: "serviceName",
value: "service",
isVisible: true,
},
{
label: "serviceInstanceName",
value: "instance",
isVisible: true,
},
{
label: "endpointName",
value: "endpoint",
isVisible: false,
},
{
label: "timestamp",
value: "time",
isVisible: true,
},
{
label: "contentType",
value: "contentType",
isVisible: true,
},
{
label: "tags",
value: "tags",
isVisible: false,
},
{
label: "content",
value: "content",
isVisible: true,
},
{
label: "traceId",
value: "traceID",
isVisible: false,
},
]);
const columns = ref<any[]> (useLogStore.serviceLogColumn);
const visibleColumns = computed(() =>
columns.value.filter((column) => column.isVisible)