diff --git a/packages/console-app/src/components/LogPoller.js b/packages/console-app/src/components/LogPoller.js index 7a501af..05aa399 100644 --- a/packages/console-app/src/components/LogPoller.js +++ b/packages/console-app/src/components/LogPoller.js @@ -7,14 +7,16 @@ import { useQuery } from '@apollo/react-hooks'; import { ConsoleContext, useQueryStatusReducer } from '../hooks'; +import LOGS from '../gql/logs.graphql'; + import Log from './Log'; const MAX_LINES = 1000; const logBuffer = []; -const LogPoller = ({ service, query }) => { +const LogPoller = ({ service }) => { const { config } = useContext(ConsoleContext); - const data = useQueryStatusReducer(useQuery(query, { + const data = useQueryStatusReducer(useQuery(LOGS, { pollInterval: config.api.intervalLog, variables: { service, incremental: logBuffer.length !== 0 } })); @@ -23,7 +25,7 @@ const LogPoller = ({ service, query }) => { return null; } - const { incremental, lines } = JSON.parse(data.wns_log.json); + const { incremental, lines } = JSON.parse(data.logs.json); if (!incremental && lines.length) { logBuffer.length = 0; diff --git a/packages/console-app/src/containers/panels/signal/Signaling.js b/packages/console-app/src/containers/panels/signal/Signaling.js index 37dd380..793b5c9 100644 --- a/packages/console-app/src/containers/panels/signal/Signaling.js +++ b/packages/console-app/src/containers/panels/signal/Signaling.js @@ -9,8 +9,6 @@ import Tab from '@material-ui/core/Tab'; import Tabs from '@material-ui/core/Tabs'; import TabContext from '@material-ui/lab/TabContext'; -import SIGNAL_LOG from '../../../gql/logs.graphql'; - import Panel from '../../../components/Panel'; import Toolbar from '../../../components/Toolbar'; @@ -64,7 +62,7 @@ const Signal = () => { {tab === TAB_LOG && (
- +
)} diff --git a/packages/console-app/src/containers/panels/wns/WNS.js b/packages/console-app/src/containers/panels/wns/WNS.js index 00476f7..0c1a742 100644 --- a/packages/console-app/src/containers/panels/wns/WNS.js +++ b/packages/console-app/src/containers/panels/wns/WNS.js @@ -9,8 +9,6 @@ import Tab from '@material-ui/core/Tab'; import Tabs from '@material-ui/core/Tabs'; import TabContext from '@material-ui/lab/TabContext'; -import WNS_LOG from '../../../gql/wns_log.graphql'; - import LogPoller from "../../../components/LogPoller"; import Panel from '../../../components/Panel'; import Toolbar from '../../../components/Toolbar'; @@ -78,7 +76,7 @@ const WNS = () => { {tab === TAB_LOG && (
- +
)}