mirror of
https://github.com/openziti/zrok.git
synced 2024-11-22 16:13:47 +01:00
activity -> shares (#141)
This commit is contained in:
parent
67dabbf73a
commit
2b5e4dda21
@ -1,6 +1,6 @@
|
||||
import AccountDetail from "./AccountDetail";
|
||||
import ShareDetail from "./ShareDetail";
|
||||
import EnvironmentDetail from "./environment/EnvironmentDetail";
|
||||
import Environment from "./environment/Environment";
|
||||
|
||||
const Detail = (props) => {
|
||||
let detailComponent = <h1>{props.selection.id} ({props.selection.type})</h1>;
|
||||
@ -11,7 +11,7 @@ const Detail = (props) => {
|
||||
break;
|
||||
|
||||
case "environment":
|
||||
detailComponent = <EnvironmentDetail selection={props.selection} />;
|
||||
detailComponent = <Environment selection={props.selection} />;
|
||||
break;
|
||||
|
||||
case "service":
|
||||
|
@ -1,12 +1,12 @@
|
||||
import {Tab, Tabs} from "react-bootstrap";
|
||||
import Activity from "./Activity";
|
||||
import Shares from "./Shares";
|
||||
import {useEffect, useState} from "react";
|
||||
import Icon from "@mdi/react";
|
||||
import {mdiConsoleNetwork} from "@mdi/js";
|
||||
import {getEnvironmentDetail} from "../../../api/metadata";
|
||||
import Detail from "./Detail";
|
||||
|
||||
const EnvironmentDetail = (props) => {
|
||||
const Environment = (props) => {
|
||||
const [detail, setDetail] = useState({});
|
||||
|
||||
useEffect(() => {
|
||||
@ -20,9 +20,9 @@ const EnvironmentDetail = (props) => {
|
||||
return (
|
||||
<div>
|
||||
<h2><Icon path={mdiConsoleNetwork} size={2} />{" "}{detail.environment.description}</h2>
|
||||
<Tabs defaultActiveKey={"activity"} className={"mb-3"}>
|
||||
<Tab eventKey={"activity"} title={"Activity"}>
|
||||
<Activity selection={props.selection} />
|
||||
<Tabs defaultActiveKey={"shares"} className={"mb-3"}>
|
||||
<Tab eventKey={"shares"} title={"Shares"}>
|
||||
<Shares selection={props.selection} />
|
||||
</Tab>
|
||||
<Tab eventKey={"detail"} title={"Detail"}>
|
||||
<Detail environment={detail.environment} />
|
||||
@ -34,4 +34,4 @@ const EnvironmentDetail = (props) => {
|
||||
return <></>;
|
||||
};
|
||||
|
||||
export default EnvironmentDetail;
|
||||
export default Environment;
|
@ -5,7 +5,7 @@ import {Sparklines, SparklinesLine, SparklinesSpots} from "react-sparklines";
|
||||
import {mdiConsoleNetwork} from "@mdi/js";
|
||||
import Icon from "@mdi/react";
|
||||
|
||||
const Activity = (props) => {
|
||||
const Shares = (props) => {
|
||||
const [detail, setDetail] = useState({});
|
||||
|
||||
useEffect(() => {
|
||||
@ -77,4 +77,4 @@ const Activity = (props) => {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
export default Activity;
|
||||
export default Shares;
|
Loading…
Reference in New Issue
Block a user