mirror of
https://github.com/openziti/zrok.git
synced 2025-06-24 03:31:57 +02:00
better ux (#14)
This commit is contained in:
parent
23288d38cd
commit
5a007f2401
@ -3,6 +3,11 @@ import Services from './Services';
|
|||||||
|
|
||||||
const Environments = (props) => {
|
const Environments = (props) => {
|
||||||
const columns = [
|
const columns = [
|
||||||
|
{
|
||||||
|
name: 'Description',
|
||||||
|
selector: row => row.environment.description,
|
||||||
|
sortable: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'Host',
|
name: 'Host',
|
||||||
selector: row => row.environment.host,
|
selector: row => row.environment.host,
|
||||||
@ -13,11 +18,6 @@ const Environments = (props) => {
|
|||||||
selector: row => row.environment.address,
|
selector: row => row.environment.address,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'Description',
|
|
||||||
selector: row => row.environment.description,
|
|
||||||
sortable: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'Identity',
|
name: 'Identity',
|
||||||
selector: row => row.environment.zitiIdentityId,
|
selector: row => row.environment.zitiIdentityId,
|
||||||
|
@ -3,6 +3,8 @@ import * as metadata from './api/metadata';
|
|||||||
import {useEffect, useLayoutEffect, useRef, useState} from "react";
|
import {useEffect, useLayoutEffect, useRef, useState} from "react";
|
||||||
import ReactFlow, {isNode, useNodesState} from "react-flow-renderer";
|
import ReactFlow, {isNode, useNodesState} from "react-flow-renderer";
|
||||||
import dagre from 'dagre';
|
import dagre from 'dagre';
|
||||||
|
import { mdiDesktopClassic, mdiAccessPointNetwork } from '@mdi/js';
|
||||||
|
import Icon from "@mdi/react";
|
||||||
|
|
||||||
const Network = () => {
|
const Network = () => {
|
||||||
const [overview, setOverview] = useState([]);
|
const [overview, setOverview] = useState([]);
|
||||||
@ -53,8 +55,10 @@ function buildGraph(overview) {
|
|||||||
let envId = id
|
let envId = id
|
||||||
out.nodes.push({
|
out.nodes.push({
|
||||||
id: '' + envId,
|
id: '' + envId,
|
||||||
data: {label: 'Environment: ' + item.environment.zitiIdentityId},
|
data: { label: <div><Icon path={mdiDesktopClassic} size={0.75} className={"flowNode"}/> { item.environment.description } </div> },
|
||||||
position: {x: (id * 25), y: 0},
|
position: { x: (id * 25), y: 0 },
|
||||||
|
style: { width: 'fit-content', backgroundColor: '#aaa', color: 'white' },
|
||||||
|
type: 'input',
|
||||||
draggable: true
|
draggable: true
|
||||||
});
|
});
|
||||||
id++
|
id++
|
||||||
@ -63,8 +67,10 @@ function buildGraph(overview) {
|
|||||||
if(item.active) {
|
if(item.active) {
|
||||||
out.nodes.push({
|
out.nodes.push({
|
||||||
id: '' + id,
|
id: '' + id,
|
||||||
data: {label: 'Service: ' + item.zitiServiceId},
|
data: {label: <div><Icon path={mdiAccessPointNetwork} size={0.75} className={"flowNode"}/> { item.endpoint }</div>},
|
||||||
position: {x: (id * 25), y: 0},
|
position: {x: (id * 25), y: 0},
|
||||||
|
style: { width: 'fit-content', backgroundColor: '#9367ef', color: 'white' },
|
||||||
|
type: 'output',
|
||||||
draggable: true
|
draggable: true
|
||||||
})
|
})
|
||||||
out.edges.push({
|
out.edges.push({
|
||||||
|
@ -125,4 +125,8 @@ h1, h2, h3, h4, h5, h6 {
|
|||||||
|
|
||||||
.nested-services {
|
.nested-services {
|
||||||
padding-left: 10em;
|
padding-left: 10em;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg.flowNode {
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user