Skip to content

Commit

Permalink
Minor UI update.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmichaels-harvard committed Sep 10, 2023
1 parent fa558e1 commit 2d5316d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions foursight_core/react/ui/static/js/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "foursight-core"
version = "4.4.0.1b30" # TODO: To become 4.5.0
version = "4.4.0.1b31" # TODO: To become 4.5.0
description = "Serverless Chalice Application for Monitoring"
authors = ["4DN-DCIC Team <[email protected]>"]
license = "MIT"
Expand Down
10 changes: 5 additions & 5 deletions react/src/pages/AccountsComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,17 +448,17 @@ const AccountInfoRight = ({ account, header }) => {
</tbody></table>
}

export const AccountInfoCurrent = ({ bg = null }) => {
export const AccountInfoCurrent = ({ bg = null, top = null }) => {
const header = useHeader();
const account = {
id: "current",
name: "current",
stage: header.app?.stage
}
return <AccountInfo account={account} header={header} decrementAccountCount={() => {}} all={true} bg={bg} brighten={true} />
return <AccountInfo account={account} header={header} decrementAccountCount={() => {}} all={true} bg={bg} brighten={true} top={top} />
}

export const AccountInfo = ({ account, header, foursightUrl, all, decrementAccountCount, brighten, bg = null }) => {
export const AccountInfo = ({ account, header, foursightUrl, all, decrementAccountCount, brighten, bg = null, top = null }) => {

const accounts = useFetch(`/accounts/${account.id}`, { onDone: () => decrementAccountCount(), cache: true, nofetch: true });

Expand All @@ -481,8 +481,8 @@ export const AccountInfo = ({ account, header, foursightUrl, all, decrementAccou
}

let boxStyle = {
marginTop:"4pt",
marginBottom:"8pt",
marginTop: top ? top : "4pt",
marginBottom: "8pt",
filter:brighten ? "brightness(1.1)" : ""
};
if (bg) boxStyle = { background: bg, ...boxStyle };
Expand Down
6 changes: 4 additions & 2 deletions react/src/pages/EnvPage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Link, useNavigate } from 'react-router-dom';
import Uuid from 'react-uuid';
import useHeaderRefresh from '../hooks/HeaderRefresh';
import { AccountInfoCurrent } from './AccountsComponent';
import { FetchErrorBox, HorizontalLine } from '../Components';
import Page from '../Page';
import Auth from '../utils/Auth';
Expand Down Expand Up @@ -164,8 +165,9 @@ const EnvPage = (props) => {
</tbody></table>
</div>
{ Auth.IsLoggedIn(header) &&
<div style={{marginTop:"8pt"}}>
{/* <AccountsComponent header={header} /> */}
<div style={{marginTop:"12pt"}}>
<b>System Summary</b>
<AccountInfoCurrent top="1pt" bg={"var(--box-bg-darken)"} />
</div>
}
</div>
Expand Down

0 comments on commit 2d5316d

Please sign in to comment.