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>; 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 (

View File

@ -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";

View File

@ -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({});

View File

@ -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 () => {

View File

@ -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();
} }
} }

View File

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