|
@@ -5,19 +5,47 @@ import Interface from './Interface'
|
|
const INTERFACES_FULL = gql`
|
|
const INTERFACES_FULL = gql`
|
|
query INTERFACES_FULL {
|
|
query INTERFACES_FULL {
|
|
interfaces {
|
|
interfaces {
|
|
|
|
+ id
|
|
interfaceName
|
|
interfaceName
|
|
- workerScript
|
|
|
|
|
|
+ workerScript {
|
|
|
|
+ path
|
|
|
|
+ mtime
|
|
|
|
+ updated
|
|
|
|
+ }
|
|
|
|
+ workerProcess {
|
|
|
|
+ pid
|
|
|
|
+ killed
|
|
|
|
+ signalCode
|
|
|
|
+ exitCode
|
|
|
|
+ spawnfile
|
|
|
|
+ spawnargs
|
|
|
|
+ }
|
|
ports {
|
|
ports {
|
|
id
|
|
id
|
|
- device
|
|
|
|
interfaceName
|
|
interfaceName
|
|
|
|
+ host
|
|
|
|
+ device
|
|
name
|
|
name
|
|
description
|
|
description
|
|
}
|
|
}
|
|
connections {
|
|
connections {
|
|
id
|
|
id
|
|
- device
|
|
|
|
- interfaceName
|
|
|
|
|
|
+ port {
|
|
|
|
+ id
|
|
|
|
+ interfaceName
|
|
|
|
+ host
|
|
|
|
+ device
|
|
|
|
+ name
|
|
|
|
+ description
|
|
|
|
+ }
|
|
|
|
+ workerProcess {
|
|
|
|
+ pid
|
|
|
|
+ killed
|
|
|
|
+ signalCode
|
|
|
|
+ exitCode
|
|
|
|
+ spawnfile
|
|
|
|
+ spawnargs
|
|
|
|
+ }
|
|
}
|
|
}
|
|
options {
|
|
options {
|
|
name
|
|
name
|
|
@@ -46,8 +74,10 @@ const INTERFACES = gql`
|
|
const InterfaceList = props => (
|
|
const InterfaceList = props => (
|
|
<Query query={INTERFACES_FULL}>
|
|
<Query query={INTERFACES_FULL}>
|
|
{({ data }, loading, error) => {
|
|
{({ data }, loading, error) => {
|
|
|
|
+ if (loading) return <p>Loading interfaces...</p>
|
|
|
|
+ if (error) return <p>Error loading interfaces: {error.message}</p>
|
|
if (!data) return <p>No interfaces found.</p>
|
|
if (!data) return <p>No interfaces found.</p>
|
|
-
|
|
|
|
|
|
+ console.log(interfaces)
|
|
const { interfaces } = data
|
|
const { interfaces } = data
|
|
return (
|
|
return (
|
|
<div>
|
|
<div>
|
|
@@ -55,8 +85,11 @@ const InterfaceList = props => (
|
|
{loading ? (
|
|
{loading ? (
|
|
<p>Loading interfaces...</p>
|
|
<p>Loading interfaces...</p>
|
|
) : (
|
|
) : (
|
|
- interfaces && interfaces.map(iface => <Interface key={iface.interfaceName} data={iface} />)
|
|
|
|
- )}
|
|
|
|
|
|
+ interfaces &&
|
|
|
|
+ interfaces.map(iface => (
|
|
|
|
+ <Interface key={iface.interfaceName} data={iface} />
|
|
|
|
+ ))
|
|
|
|
+ )}
|
|
</div>
|
|
</div>
|
|
)
|
|
)
|
|
}}
|
|
}}
|