relplaced the position of logColumn contants to store/modules/data.ts

This commit is contained in:
Peter Olu 2022-05-20 23:24:58 +01:00
parent 860888260d
commit 35367df371
3 changed files with 123 additions and 1 deletions

View File

@ -29,3 +29,115 @@ export const TextConfig = {
fontSize: 14,
textAlign: "left",
};
export const ServiceLogConstants = [
{
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
},
];
export const ServiceLogDetail = [
{
label: "serviceName",
value: "service",
},
{
label: "serviceInstanceName",
value: "instance",
},
{
label: "timestamp",
value: "time",
},
{
label: "contentType",
value: "contentType",
},
{
label: "traceId",
value: "traceID",
},
{
label: "tags",
value: "tags",
},
{
label: "content",
value: "content",
},
];
// The order of columns should be time, service, error, stack, version, url, catalog, and grade.
export const BrowserLogConstants = [
{
label: "service",
value: "service",
},
{
label: "serviceVersion",
value: "serviceVersion",
},
{
label: "errorUrl",
value: "errorPage",
},
{
label: "time",
value: "time",
},
{
label: "message",
value: "message",
// drag: true,
method: 350,
},
{
label: "stack",
value: "stack",
// drag: true,
method: 350,
},
{
label: "category",
value: "category",
},
{
label: "grade",
value: "grade",
},
];

View File

@ -17,6 +17,7 @@
import { defineStore } from "pinia";
import { Duration } from "@/types/app";
import { Instance, Endpoint, Service } from "@/types/selector";
import { ServiceLogColumn, BrowserLogColumn } from '@/types/log-column'
import { store } from "@/store";
import graphql from "@/graphql";
import { AxiosResponse } from "axios";
@ -28,6 +29,8 @@ interface LogState {
services: Service[];
instances: Instance[];
endpoints: Endpoint[];
serviceLogColumn: ServiceLogColumn[];
browserLogColumn: BrowserLogColumn[];
conditions: any;
durationTime: Duration;
selectorStore: any;
@ -47,6 +50,8 @@ export const logStore = defineStore({
queryDuration: useAppStoreWithOut().durationTime,
paging: { pageNum: 1, pageSize: 15, needTotal: true },
},
serviceLogColumn: [],
browserLogColumn: [],
supportQueryLogsByKeywords: true,
durationTime: useAppStoreWithOut().durationTime,
selectorStore: useSelectorStore(),

View File

@ -14,7 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export interface logColumn {
export interface BrowserLogColumn {
lable: string;
value: string;
isVisible?: boolean;
}
export interface ServiceLogColumn {
lable: string;
value: string;
isVisible?: boolean;