Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/conversion check server #452

Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e03e8fc
update viewer and instlal uuid
interim17 Dec 7, 2023
bdd832f
add colors for text and button hover states
interim17 Dec 7, 2023
a284edf
update viewer panel selectors for colorchange
interim17 Dec 7, 2023
ac19aca
remove unused import from file error modal
interim17 Dec 7, 2023
5ab337e
server error modal and styling
interim17 Dec 7, 2023
c4b2300
config controller and check server in redux
interim17 Dec 7, 2023
9aaa87e
add server health check to user flow
interim17 Dec 7, 2023
38d40ac
organize imports and comments
interim17 Dec 7, 2023
11e383b
remove redundant variable readyToConvert
interim17 Dec 7, 2023
9befb07
removes unused css and fixes html tags
interim17 Dec 7, 2023
66c6ffb
alphabetize css rules
interim17 Dec 7, 2023
6fa7a3d
clarifies comments on logic
interim17 Dec 8, 2023
342025b
renames red text css property
interim17 Dec 8, 2023
447b72e
fixes typos in comments
interim17 Dec 8, 2023
26bc097
receive file action to trigger health check logic
interim17 Dec 12, 2023
825bac6
remove outdated comment
interim17 Dec 12, 2023
8f5b16a
configure previous instance if controller exists
interim17 Dec 12, 2023
39541bd
use warning text color variable
interim17 Dec 12, 2023
2b615cb
change red text class name to warning text
interim17 Dec 12, 2023
3034ee2
update warning text classnames
interim17 Dec 12, 2023
f8bd674
spacing below imports
interim17 Dec 12, 2023
09652c1
rename convert file to initalize conversion
interim17 Dec 12, 2023
8e08476
replace VIEWER_IMPORTING with conversionStatus
interim17 Dec 12, 2023
6464a98
consolidate status type declarations
interim17 Dec 13, 2023
63e81c2
clean up white space and add todo comment
interim17 Dec 13, 2023
c699c84
restore default net config after server check
interim17 Dec 13, 2023
bdd6060
remove white space from prettier formatting
interim17 Dec 19, 2023
5b314a1
shorten PR comment to appropriate length for code
interim17 Dec 19, 2023
82eb0da
shut down server checks if not on conversion page
interim17 Dec 20, 2023
4ec7f9a
remove more whitespace
interim17 Dec 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 74 additions & 43 deletions package-lock.json

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

6 changes: 4 additions & 2 deletions package.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm is warning about some dependency issues. May want to run npm audit fix.

Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@types/react-plotly.js": "^2.2.4",
"@types/react-router-dom": "^5.1.5",
"@types/sinon": "7.0.6",
"@types/uuid": "^9.0.7",
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.42.1",
"@webpack-cli/serve": "^1.7.0",
Expand Down Expand Up @@ -91,7 +92,7 @@
"webpack-dev-server": "^4.10.1"
},
"dependencies": {
"@aics/simularium-viewer": "^3.6.2",
"@aics/simularium-viewer": "^3.6.4",
"@ant-design/css-animation": "^1.7.3",
"@ant-design/icons": "^4.0.6",
"antd": "^4.23.6",
Expand All @@ -114,7 +115,8 @@
"react-waypoint": "^9.0.3",
"redux": "4.2.0",
"redux-logic": "^3.0.3",
"reselect": "4.0.0"
"reselect": "4.0.0",
"uuid": "^9.0.1"
},
"resolutions": {
"react": "^16",
Expand Down
5 changes: 2 additions & 3 deletions src/components/ConversionFileErrorModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { Button } from "antd";
import React from "react";

import CustomModal from "../CustomModal";
import { Exclamation } from "../Icons";
import { AvailableEngines } from "../../state/trajectory/conversion-data-types";

import styles from "./style.css";
import { AvailableEngines } from "../../state/trajectory/conversion-data-types";

interface ConversionFileErrorModalProps {
closeModal: () => void;
Expand Down Expand Up @@ -33,7 +32,7 @@ const ConversionFileErrorModal: React.FC<ConversionFileErrorModalProps> = ({
onCancel={closeModal}
>
<div>
<div className={styles.redText}>
<div className={styles.redWarningText}>
{" "}
meganrm marked this conversation as resolved.
Show resolved Hide resolved
{"We're sorry, there was a problem importing your file."}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you don't need the {"

</div>{" "}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ConversionFileErrorModal/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
padding: 15px 15px 0px 15px;
}

.error-modal .red-text {
.error-modal .red-warning-text {
color: var(--brick-red);
interim17 marked this conversation as resolved.
Show resolved Hide resolved
padding: 10px 0px;
}
Expand Down
51 changes: 51 additions & 0 deletions src/components/ConversionServerErrorModal/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { Button } from "antd";
import React from "react";

import CustomModal from "../CustomModal";
import { Exclamation } from "../Icons";

import styles from "./style.css";

interface ConversionServerErrorModalProps {
closeModal: () => void;
}

const ConversionServerErrorModal: React.FC<ConversionServerErrorModalProps> = ({
closeModal,
}) => {
return (
<CustomModal
className={styles.serverErrorModal}
title="File import cannot be completed"
open
footer={
<Button type="primary" onClick={closeModal}>
OK
</Button>
}
centered
onCancel={closeModal}
>
<p className={styles.redText}>
meganrm marked this conversation as resolved.
Show resolved Hide resolved
{" "}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you delete these and try to figure out how to keep them from happening? Are you adding spaces while you're typing that then get converted?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed these and made a note for myself to look through the repo for these things and keep them from showing up.

{Exclamation} We&apos;re sorry, the server is currently
experiencing an issue.
</p>
<p>
{" "}
Please try again at a later time. For further assistance, please
visit{" "}
meganrm marked this conversation as resolved.
Show resolved Hide resolved
<a
href="https://forum.allencell.org/"
target="_blank"
rel="noreferrer"
>
{" "}
The Allen Cell Discussion Forum.{" "}
</a>
</p>
</CustomModal>
);
};

export default ConversionServerErrorModal;
34 changes: 34 additions & 0 deletions src/components/ConversionServerErrorModal/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.server-error-modal :global(.ant-modal-content) {
width: 425px;
}

.server-error-modal :global(.ant-modal-close-x) {
/* specifying here prevents hover behavior */
color: var(--light-theme-modal-close-x);
font-size: 12px;
position: relative;
top: -3px;
}

.server-error-modal :global(.ant-modal-header) {
padding: 12px 24px;
}

.server-error-modal :global(.ant-modal-title) {
font-size: 14px;
font-weight: 400;
}

.server-error-modal :global(.ant-modal-body) {
padding: 20px 20px 0px;
}

.server-error-modal .red-text {
color: var(--warning-text-color);
padding-bottom: 1px;
}

.server-error-modal :global(.ant-modal-footer) {
background-color: var(--modal-content-bg);
padding: 6px 16px 12px;
}
5 changes: 5 additions & 0 deletions src/components/theme/light-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
color: var(--light-theme-btn-primary-color);
}

.light-theme :global(.ant-btn-primary):hover {
background-color: var(--light-theme-btn-primary-hover-bg);
color: var(--light-theme-btn-primary-hover-color);
}

.light-theme :global(.ant-btn-primary[disabled]) {
background: var(--light-button-disabled-background);
border: var(--light-button-disabled-border);
Expand Down
Loading
Loading