This commit is contained in:
Michael Quigley 2023-01-12 14:48:50 -05:00
parent 627d9eb882
commit f40e6efb24
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
6 changed files with 20 additions and 16 deletions

View File

@ -6,16 +6,17 @@ const Detail = (props) => {
let detailComponent = <h1>{props.selection.id} ({props.selection.type})</h1>;
switch(props.selection.type) {
case "account":
detailComponent = <AccountDetail user={props.user} />;
break;
case "environment":
detailComponent = <EnvironmentDetail selection={props.selection} />;
break;
case "share":
detailComponent = <ShareDetail selection={props.selection} />;
break;
default:
detailComponent = <AccountDetail user={props.user} />;
break;
}
return (

View File

@ -1,4 +1,4 @@
import {mdiCardAccountDetails, mdiEyeOutline, mdiEyeOffOutline} from "@mdi/js";
import {mdiCardAccountDetails} from "@mdi/js";
import Icon from "@mdi/react";
import PropertyTable from "../../PropertyTable";
import {Tab, Tabs} from "react-bootstrap";

View File

@ -2,8 +2,6 @@ import * as metadata from "../../../api/metadata";
import {useEffect, useState} from "react";
import DataTable from 'react-data-table-component';
import {Sparklines, SparklinesLine, SparklinesSpots} from "react-sparklines";
import {mdiConsoleNetwork} from "@mdi/js";
import Icon from "@mdi/react";
const SharesTab = (props) => {
const [detail, setDetail] = useState({});

View File

@ -25,9 +25,11 @@ const ShareDetail = (props) => {
let interval = setInterval(() => {
metadata.getShareDetail(props.selection.id)
.then(resp => {
let detail = resp.data;
detail.envZId = props.selection.envZId;
setDetail(detail);
if(mounted) {
let detail = resp.data;
detail.envZId = props.selection.envZId;
setDetail(detail);
}
});
}, 1000);
return () => {

View File

@ -22,9 +22,13 @@ const Network = (props) => {
case "environment":
nodeColor = "#444";
break;
case "share":
case "share": // share
nodeColor = "#291A66";
break;
default:
//
}
ctx.textBaseline = "middle";
@ -41,10 +45,9 @@ const Network = (props) => {
ctx.strokeStyle = "#c4bdde";
ctx.stroke();
} else {
switch(node.type) {
case "share":
ctx.strokeStyle = "#433482";
ctx.stroke();
if(node.type === "share") {
ctx.strokeStyle = "#433482";
ctx.stroke();
}
}

View File

@ -1,4 +1,4 @@
import {Button, Container, Row} from "react-bootstrap";
import {Container, Row} from "react-bootstrap";
const InvalidRequest = () => {
return (