diff --git a/controller/shareDetail.go b/controller/shareDetail.go
index 165a0094..d486e0c9 100644
--- a/controller/shareDetail.go
+++ b/controller/shareDetail.go
@@ -47,7 +47,6 @@ func (h *shareDetailHandler) Handle(params metadata.GetShareDetailParams, princi
sparkData, err = sparkDataForShares([]*store.Share{shr})
if err != nil {
logrus.Errorf("error querying spark data for share: %v", err)
- return metadata.NewGetEnvironmentDetailInternalServerError()
}
}
feEndpoint := ""
diff --git a/ui/src/console/detail/AccountDetail.js b/ui/src/console/detail/AccountDetail.js
index 96be475f..5d659e39 100644
--- a/ui/src/console/detail/AccountDetail.js
+++ b/ui/src/console/detail/AccountDetail.js
@@ -1,15 +1,29 @@
-import {mdiCardAccountDetails} from "@mdi/js";
+import {mdiCardAccountDetails, mdiEyeOutline, mdiEyeOffOutline} from "@mdi/js";
import Icon from "@mdi/react";
import PropertyTable from "../PropertyTable";
import {Tab, Tabs} from "react-bootstrap";
+import {useState} from "react";
+import {secretString} from "./util";
const AccountDetail = (props) => {
+ const [showToken, setShowToken] = useState(false);
+
+ const customProperties = {
+ token: row => {
+ if(showToken) {
+ return {row.value} setShowToken(false)} />
+ } else {
+ return {secretString(row.value)} setShowToken(true)} />
+ }
+ }
+ }
+
return (
{" "}{props.user.email}
-
+
diff --git a/ui/src/console/detail/ShareDetail.js b/ui/src/console/detail/ShareDetail.js
index f0130e7d..07c7ae1a 100644
--- a/ui/src/console/detail/ShareDetail.js
+++ b/ui/src/console/detail/ShareDetail.js
@@ -1,13 +1,15 @@
import * as metadata from "../../api/metadata";
import {Sparklines, SparklinesLine, SparklinesSpots} from "react-sparklines";
import {useEffect, useState} from "react";
-import {mdiShareVariant} from "@mdi/js";
+import {mdiEyeOffOutline, mdiEyeOutline, mdiShareVariant} from "@mdi/js";
import Icon from "@mdi/react";
import PropertyTable from "../PropertyTable";
import {Tab, Tabs} from "react-bootstrap";
+import {secretString} from "./util";
const ShareDetail = (props) => {
const [detail, setDetail] = useState({});
+ const [showZId, setShowZId] = useState(false);
useEffect(() => {
metadata.getShareDetail(props.selection.id)
@@ -41,6 +43,13 @@ const ShareDetail = (props) => {
return {row.value};
}
return row.value;
+ },
+ zId: row => {
+ if(showZId) {
+ return {row.value} setShowZId(false)} />
+ } else {
+ return {secretString(row.value)} setShowZId(true)} />
+ }
}
}
diff --git a/ui/src/console/detail/environment/Detail.js b/ui/src/console/detail/environment/Detail.js
index 8ac4b479..0e0cff65 100644
--- a/ui/src/console/detail/environment/Detail.js
+++ b/ui/src/console/detail/environment/Detail.js
@@ -1,8 +1,24 @@
import PropertyTable from "../../PropertyTable";
+import Icon from "@mdi/react";
+import {mdiEyeOffOutline, mdiEyeOutline} from "@mdi/js";
+import {secretString} from "../util";
+import {useState} from "react";
const Detail = (props) => {
+ const [showZId, setShowZId] = useState(false);
+
+ const customProperties = {
+ zId: row => {
+ if(showZId) {
+ return {row.value} setShowZId(false)} />
+ } else {
+ return {secretString(row.value)} setShowZId(true)} />
+ }
+ }
+ }
+
return (
-
+
);
};
diff --git a/ui/src/console/detail/util.js b/ui/src/console/detail/util.js
new file mode 100644
index 00000000..e55fb654
--- /dev/null
+++ b/ui/src/console/detail/util.js
@@ -0,0 +1,7 @@
+export const secretString = (s) => {
+ let out = "";
+ for(let i = 0; i < s.length; i++) {
+ out += "*";
+ }
+ return out;
+}
\ No newline at end of file