diff --git a/new-lamassu-admin/src/pages/MachineLogs.js b/new-lamassu-admin/src/pages/MachineLogs.js index 10565c2c..a2a530fe 100644 --- a/new-lamassu-admin/src/pages/MachineLogs.js +++ b/new-lamassu-admin/src/pages/MachineLogs.js @@ -1,4 +1,4 @@ -import { useQuery, useMutation } from '@apollo/react-hooks' +import { useQuery } from '@apollo/react-hooks' import { makeStyles } from '@material-ui/core/styles' import gql from 'graphql-tag' import moment from 'moment' @@ -7,7 +7,6 @@ import React, { useState } from 'react' import LogsDowloaderPopover from 'src/components/LogsDownloaderPopper' import Title from 'src/components/Title' -import { SimpleButton } from 'src/components/buttons' import Sidebar from 'src/components/layout/Sidebar' import { Table, @@ -17,9 +16,7 @@ import { TableBody, TableCell } from 'src/components/table' -import { Label1, Info3 } from 'src/components/typography' -import { ReactComponent as WhiteShareIcon } from 'src/styling/icons/circle buttons/share/white.svg' -import { ReactComponent as ShareIcon } from 'src/styling/icons/circle buttons/share/zodiac.svg' +import { Info3 } from 'src/components/typography' import styles from './Logs.styles' @@ -52,14 +49,6 @@ const GET_MACHINE_LOGS = gql` } ` -const SUPPORT_LOGS = gql` - mutation SupportLogs($deviceId: ID!) { - machineSupportLogs(deviceId: $deviceId) { - id - } - } -` - const formatDate = date => { return moment(date).format('YYYY-MM-DD HH:mm') } @@ -74,12 +63,6 @@ const Logs = () => { const { data: machineResponse } = useQuery(GET_MACHINES) - const [sendSnapshot, { loading }] = useMutation(SUPPORT_LOGS, { - variables: { deviceId }, - onError: () => setSaveMessage('Failure saving snapshot'), - onCompleted: () => setSaveMessage('✓ Saved latest snapshot') - }) - const { data: logsResponse } = useQuery(GET_MACHINE_LOGS, { variables: { deviceId, limit: NUM_LOG_RESULTS }, skip: !selected, @@ -108,14 +91,6 @@ const Logs = () => { args={{ deviceId }} getLogs={logs => R.path(['machineLogs'])(logs)} /> - - Share with Lamassu - {saveMessage} )} diff --git a/new-lamassu-admin/src/pages/ServerLogs.js b/new-lamassu-admin/src/pages/ServerLogs.js index 7190ab14..ab28b4ba 100644 --- a/new-lamassu-admin/src/pages/ServerLogs.js +++ b/new-lamassu-admin/src/pages/ServerLogs.js @@ -1,4 +1,4 @@ -import { useQuery, useMutation } from '@apollo/react-hooks' +import { useQuery } from '@apollo/react-hooks' import { makeStyles } from '@material-ui/core' import gql from 'graphql-tag' import moment from 'moment' @@ -8,7 +8,6 @@ import React, { useState, useRef } from 'react' import LogsDowloaderPopover from 'src/components/LogsDownloaderPopper' import Title from 'src/components/Title' import Uptime from 'src/components/Uptime' -import { SimpleButton } from 'src/components/buttons' import { Select } from 'src/components/inputs' import { Table, @@ -18,10 +17,8 @@ import { TableBody, TableCell } from 'src/components/table' -import { Label1, Info3 } from 'src/components/typography' +import { Info3 } from 'src/components/typography' import typographyStyles from 'src/components/typography/styles' -import { ReactComponent as WhiteShareIcon } from 'src/styling/icons/circle buttons/share/white.svg' -import { ReactComponent as ShareIcon } from 'src/styling/icons/circle buttons/share/zodiac.svg' import { offColor } from 'src/styling/variables' import logsStyles from './Logs.styles' @@ -78,13 +75,6 @@ const GET_DATA = gql` } } ` -const SUPPORT_LOGS = gql` - mutation ServerSupportLogs { - serverSupportLogs { - id - } - } -` const Logs = () => { const classes = useStyles() @@ -104,11 +94,6 @@ const Logs = () => { const serverVersion = data?.serverVersion const processStates = data?.uptime ?? [] - const [sendSnapshot, { loading }] = useMutation(SUPPORT_LOGS, { - onError: () => setSaveMessage('Failure saving snapshot'), - onCompleted: () => setSaveMessage('✓ Saved latest snapshot') - }) - const getLogLevels = R.compose( R.prepend(SHOW_ALL), R.uniq, @@ -136,14 +121,6 @@ const Logs = () => { logs={data.serverLogs} getTimestamp={log => log.timestamp} /> - - Share with Lamassu - {saveMessage} )}