IO-233 Resolv merge issues & move allocations to ws
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useQuery } from "@apollo/client";
|
||||
import { Button, Result, Select, Space } from "antd";
|
||||
import { Button, Col, Result, Row, Select, Space } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -46,14 +46,14 @@ export const socket = SocketIO(
|
||||
|
||||
export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
||||
const { t } = useTranslation();
|
||||
const [logLevel, setLogLevel] = useState("DEBUG");
|
||||
const [logLevel, setLogLevel] = useState("TRACE");
|
||||
const [logs, setLogs] = useState([]);
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const { jobId } = search;
|
||||
|
||||
const { loading, error, data } = useQuery(QUERY_JOB_EXPORT_DMS, {
|
||||
variables: { id: jobId },
|
||||
skip: !jobId,
|
||||
skip: true, //!jobId,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
@@ -129,21 +129,24 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
||||
socket.emit("set-log-level", value);
|
||||
}}
|
||||
>
|
||||
<Select.Option>TRACE</Select.Option>
|
||||
<Select.Option>DEBUG</Select.Option>
|
||||
<Select.Option>INFO</Select.Option>
|
||||
<Select.Option>WARNING</Select.Option>
|
||||
<Select.Option>ERROR</Select.Option>
|
||||
<Select.Option key="TRACE">TRACE</Select.Option>
|
||||
<Select.Option key="DEBUG">DEBUG</Select.Option>
|
||||
<Select.Option key="INFO">INFO</Select.Option>
|
||||
<Select.Option key="WARNING">WARNING</Select.Option>
|
||||
<Select.Option key="ERROR">ERROR</Select.Option>
|
||||
</Select>
|
||||
<Button onClick={() => setLogs([])}>Clear Logs</Button>
|
||||
</Space>
|
||||
<div>
|
||||
<DmsAllocationsSummary
|
||||
socket={socket}
|
||||
job={data ? data.jobs_by_pk : null}
|
||||
/>
|
||||
<DmsLogEvents socket={socket} logs={logs} />
|
||||
</div>
|
||||
<Row gutter={32}>
|
||||
<Col span={18}>
|
||||
<DmsAllocationsSummary socket={socket} jobId={jobId} />
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<div style={{ maxHeight: "500px", overflowY: "auto" }}>
|
||||
<DmsLogEvents socket={socket} logs={logs} />
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<DmsCustomerSelector />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user