Skip to content

Commit

Permalink
update dcicutils and minor ui updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dmichaels-harvard committed Sep 26, 2023
1 parent f193336 commit cb25a9c
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 46 deletions.
4 changes: 2 additions & 2 deletions foursight_core/react/ui/static/js/main.js

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "foursight-core"
version = "4.5.0.1b9" # TODO: To become 5.0.0
version = "4.5.0.1b10" # TODO: To become 5.0.0
description = "Serverless Chalice Application for Monitoring"
authors = ["4DN-DCIC Team <[email protected]>"]
license = "MIT"
Expand All @@ -15,7 +15,7 @@ python = ">=3.8,<3.12"
click = "^7.1.2"
cron-descriptor = "^1.2.31"
cryptography = "39.0.2" # Required for AWS Cognito JWT decode (PyJWKClient)
dcicutils = "7.12.0.1b5"
dcicutils = "7.12.0.2b6"
elasticsearch = "7.13.4"
elasticsearch-dsl = "^7.0.0"
geocoder = "1.38.1"
Expand Down
7 changes: 6 additions & 1 deletion react/src/pages/AccountsComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Char from '../utils/Char';
import Client from '../utils/Client';
import Clipboard from '../utils/Clipboard';
import DateTime from '../utils/DateTime';
import Env from '../utils/Env';
import { ExternalLink } from '../Components';
import Image from '../utils/Image';
import Json from '../utils/Json';
Expand Down Expand Up @@ -189,7 +190,11 @@ const KnownEnvsBox = ({ header, account }) => {
return <>
<div className="box" style={{background:"inherit",border:"1pt gray dotted",marginTop:"2pt",marginBottom:"2pt",padding:"4pt",color:"inherit"}}>
{knownEnvs?.map(env => <span key={`${env.full_name}`}>
<b>{env.full_name}</b> (<span id={`tooltip-env-${env.full_name}`}>{env.public_name}</span>)<br />
<b>{env.full_name}</b>
&nbsp;(<span id={`tooltip-env-${env.full_name}`}>{env.public_name}</span>)
{Env.IsCurrent(env) && <>&nbsp;{Char.RightArrow}&nbsp;Current</>}
{Env.IsDefault(env) && <>&nbsp;{Char.RightArrow}&nbsp;Default</>}
<br />
<Tooltip id={`tooltip-env-${env.full_name}`} text={`Public name of environment.`} position="right" shape="squared" />
</span> )}
</div>
Expand Down
7 changes: 4 additions & 3 deletions react/src/pages/CheckHistoryPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,10 @@ const CheckHistoryPage = (props) => {
<td colSpan="9">
{ !history.__resultLoading && history.__result?.checks[checkInfo.get("title")]?.ff_link &&
<div className="box lighten" style={{marginTop:"4pt", marginRight:"5pt"}}><small>
<b>Portal</b>: <ExternalLink
href={history.__result?.checks[checkInfo.get("title")]?.ff_link}
text={history.__result?.checks[checkInfo.get("title")]?.ff_link} />
<b>Portal</b>:&nbsp;
<ExternalLink
href={history.__result?.checks[checkInfo.get("title")]?.ff_link}
text={history.__result?.checks[checkInfo.get("title")]?.ff_link} />
</small></div>
}
<pre className="box lighten" style={{borderWidth:"1",wordWrap: "break-word",paddingTop:"6pt",paddingBottom:"6pt",marginBottom:"4pt",marginTop:"4pt",marginRight:"5pt",minWidth:"360pt",maxWidth:"600pt"}}>
Expand Down
55 changes: 37 additions & 18 deletions react/src/pages/ChecksPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,8 @@ const ToggleHistoryButton = ({ check, env, historyList, style }) => {
</span>
</>}
{ (check.__result.get("ff_link")) && <>
&nbsp;<a style={{color:"inherit"}} href={check.__result.get("ff_link")} rel="noreferrer" target="_blank">
<span className="fa fa-external-link" style={{position:"relative",bottom:"-1px"}}></span>
&nbsp;&nbsp;<a style={{color:"inherit"}} href={check.__result.get("ff_link")} rel="noreferrer" target="_blank">
<ExternalLink href={check.__result.get("ff_link")} />
</a>
</>}
</span>
Expand All @@ -621,18 +621,28 @@ const ToggleHistoryButton = ({ check, env, historyList, style }) => {
const ResultDetailsBox = ({check, groupList, showResultByUuid, showResultByAction, style}) => {
if (!check.__showingResults) return <></>
if (showResultByUuid) {
return <pre className="box lighten" style={{wordWrap:"break-word",paddingBottom:"4pt",marginBottom:"3px",marginTop:"3px",marginRight:"5pt",minWidth:"360pt",maxWidth:"100%"}}>
<div style={{float:"right",marginTop:"0px"}}>
<span style={{fontSize:"0",opacity:"0"}} id={check.name}>{Json.Str(check.__resultByUuid.get())}</span>
<img alt="copy" onClick={() => Clipboard.Copy(check.name)} style={{cursor:"copy",fontFamily:"monospace",position:"relative",bottom:"2pt"}} src={Image.Clipboard()} height="19" />
&nbsp;<span style={{fontSize:"large",cursor:"pointer",color:"black"}} onClick={() => { check.__showingResultDetails = false ; noteChangedResults(groupList); }}>X</span>
</div>
{ (check.__result.loading || check.__resultByUuid.loading || check.__resultByAction.loading) ? <>
<StandardSpinner condition={check.__result.loading || check.__resultByUuid.loading || check.__resultByAction.loading} color={Styles.GetForegroundColor()} label={"Loading latest result "}/>
</>:<>
{Yaml.Format(check.__resultByUuid.get())}
</>}
</pre>
return <>
{ !check?.__result?.loading && check.__result?.data?.ff_link &&
<div className="box lighten" style={{marginTop:"4pt", marginRight:"5pt", whiteSpace:"break-spaces"}}><small>
<b>Portal</b>:&nbsp;
<ExternalLink
href={check.__result?.data?.ff_link}
text={check.__result?.data?.ff_link} />
</small></div>
}
<pre className="box lighten" style={{wordWrap:"break-word",paddingBottom:"4pt",marginBottom:"3px",marginTop:"3px",marginRight:"5pt",minWidth:"360pt",maxWidth:"100%"}}>
<div style={{float:"right",marginTop:"0px"}}>
<span style={{fontSize:"0",opacity:"0"}} id={check.name}>{Json.Str(check.__resultByUuid.get())}</span>
<img alt="copy" onClick={() => Clipboard.Copy(check.name)} style={{cursor:"copy",fontFamily:"monospace",position:"relative",bottom:"2pt"}} src={Image.Clipboard()} height="19" />
&nbsp;<span style={{fontSize:"large",cursor:"pointer",color:"black"}} onClick={() => { check.__showingResultDetails = false ; noteChangedResults(groupList); }}>X</span>
</div>
{ (check.__result.loading || check.__resultByUuid.loading || check.__resultByAction.loading) ? <>
<StandardSpinner condition={check.__result.loading || check.__resultByUuid.loading || check.__resultByAction.loading} color={Styles.GetForegroundColor()} label={"Loading latest result "}/>
</>:<>
{Yaml.Format(check.__resultByUuid.get())}
</>}
</pre>
</>
}
if (showResultByAction) {
return <pre className="box lighten" style={{wordWrap:"break-word",paddingBottom:"4pt",marginBottom:"3px",marginTop:"3px",marginRight:"5pt",minWidth:"360pt",maxWidth:"100%"}}>
Expand All @@ -649,7 +659,15 @@ const ToggleHistoryButton = ({ check, env, historyList, style }) => {
return <>
{ !check?.__result?.loading && check.__result?.data?.ff_link &&
<div className="box lighten" style={{marginTop:"4pt", marginRight:"5pt", whiteSpace:"break-spaces"}}><small>
<b>Portal</b>:
<b>Portal</b>:&nbsp;
<ExternalLink
href={check.__result?.data?.ff_link}
text={check.__result?.data?.ff_link} />
</small></div>
}
{ !check?.__result?.loading && check.__result?.data?.ff_link &&
<div className="box lighten" style={{marginTop:"4pt", marginRight:"5pt", whiteSpace:"break-spaces"}}><small>
<b>Portal</b>:&nbsp;
<ExternalLink
href={check.__result?.data?.ff_link}
text={check.__result?.data?.ff_link} />
Expand Down Expand Up @@ -1114,9 +1132,10 @@ const ResultsHistoryBox = ({ check, env, historyList }) => {
<td colSpan="6">
{ !history.__resultLoading && history.__result?.checks[check.title]?.ff_link &&
<div className="box lighten" style={{marginTop:"4pt", marginRight:"5pt"}}><small>
<b>Portal</b>: <ExternalLink
href={history.__result?.checks[check.title]?.ff_link}
text={history.__result?.checks[check.title]?.ff_link} />
<b>Portal</b>:&nbsp;
<ExternalLink
href={history.__result?.checks[check.title]?.ff_link}
text={history.__result?.checks[check.title]?.ff_link} />
</small></div>
}
<pre className="box lighten" style={{wordWrap: "break-word",paddingTop:"6pt",paddingBottom:"6pt",marginBottom:"4pt",marginTop:"4pt",marginRight:"5pt",width:"fit-content",minWidth:"360pt",maxWidth:"500pt"}}>
Expand Down

0 comments on commit cb25a9c

Please sign in to comment.