mirror of
https://github.com/openziti/zrok.git
synced 2024-11-22 16:13:47 +01:00
ui lint
This commit is contained in:
parent
627d9eb882
commit
f40e6efb24
@ -6,16 +6,17 @@ const Detail = (props) => {
|
|||||||
let detailComponent = <h1>{props.selection.id} ({props.selection.type})</h1>;
|
let detailComponent = <h1>{props.selection.id} ({props.selection.type})</h1>;
|
||||||
|
|
||||||
switch(props.selection.type) {
|
switch(props.selection.type) {
|
||||||
case "account":
|
|
||||||
detailComponent = <AccountDetail user={props.user} />;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "environment":
|
case "environment":
|
||||||
detailComponent = <EnvironmentDetail selection={props.selection} />;
|
detailComponent = <EnvironmentDetail selection={props.selection} />;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "share":
|
case "share":
|
||||||
detailComponent = <ShareDetail selection={props.selection} />;
|
detailComponent = <ShareDetail selection={props.selection} />;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
detailComponent = <AccountDetail user={props.user} />;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {mdiCardAccountDetails, mdiEyeOutline, mdiEyeOffOutline} from "@mdi/js";
|
import {mdiCardAccountDetails} from "@mdi/js";
|
||||||
import Icon from "@mdi/react";
|
import Icon from "@mdi/react";
|
||||||
import PropertyTable from "../../PropertyTable";
|
import PropertyTable from "../../PropertyTable";
|
||||||
import {Tab, Tabs} from "react-bootstrap";
|
import {Tab, Tabs} from "react-bootstrap";
|
||||||
|
@ -2,8 +2,6 @@ import * as metadata from "../../../api/metadata";
|
|||||||
import {useEffect, useState} from "react";
|
import {useEffect, useState} from "react";
|
||||||
import DataTable from 'react-data-table-component';
|
import DataTable from 'react-data-table-component';
|
||||||
import {Sparklines, SparklinesLine, SparklinesSpots} from "react-sparklines";
|
import {Sparklines, SparklinesLine, SparklinesSpots} from "react-sparklines";
|
||||||
import {mdiConsoleNetwork} from "@mdi/js";
|
|
||||||
import Icon from "@mdi/react";
|
|
||||||
|
|
||||||
const SharesTab = (props) => {
|
const SharesTab = (props) => {
|
||||||
const [detail, setDetail] = useState({});
|
const [detail, setDetail] = useState({});
|
||||||
|
@ -25,9 +25,11 @@ const ShareDetail = (props) => {
|
|||||||
let interval = setInterval(() => {
|
let interval = setInterval(() => {
|
||||||
metadata.getShareDetail(props.selection.id)
|
metadata.getShareDetail(props.selection.id)
|
||||||
.then(resp => {
|
.then(resp => {
|
||||||
let detail = resp.data;
|
if(mounted) {
|
||||||
detail.envZId = props.selection.envZId;
|
let detail = resp.data;
|
||||||
setDetail(detail);
|
detail.envZId = props.selection.envZId;
|
||||||
|
setDetail(detail);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}, 1000);
|
}, 1000);
|
||||||
return () => {
|
return () => {
|
||||||
|
@ -22,9 +22,13 @@ const Network = (props) => {
|
|||||||
case "environment":
|
case "environment":
|
||||||
nodeColor = "#444";
|
nodeColor = "#444";
|
||||||
break;
|
break;
|
||||||
case "share":
|
|
||||||
|
case "share": // share
|
||||||
nodeColor = "#291A66";
|
nodeColor = "#291A66";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.textBaseline = "middle";
|
ctx.textBaseline = "middle";
|
||||||
@ -41,10 +45,9 @@ const Network = (props) => {
|
|||||||
ctx.strokeStyle = "#c4bdde";
|
ctx.strokeStyle = "#c4bdde";
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
} else {
|
} else {
|
||||||
switch(node.type) {
|
if(node.type === "share") {
|
||||||
case "share":
|
ctx.strokeStyle = "#433482";
|
||||||
ctx.strokeStyle = "#433482";
|
ctx.stroke();
|
||||||
ctx.stroke();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Button, Container, Row} from "react-bootstrap";
|
import {Container, Row} from "react-bootstrap";
|
||||||
|
|
||||||
const InvalidRequest = () => {
|
const InvalidRequest = () => {
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user