You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oodt.apache.org by GitBox <gi...@apache.org> on 2021/08/17 13:09:47 UTC
[GitHub] [oodt] pavinduLakshan opened a new pull request #126: Improve UI/UX of File Manager Components in React.js OPSUI
pavinduLakshan opened a new pull request #126:
URL: https://github.com/apache/oodt/pull/126
Included changes:
1. Replace alerts with snack bar
2. Improve snack bar styles
3. Remove unused code and comments
4. Improve Product Browser UI by displaying products in a paginated table
5. Remove redundant file manager endpoints
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@oodt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [oodt] NGimhana commented on a change in pull request #126: Improve UI/UX of File Manager Components in React.js OPSUI
Posted by GitBox <gi...@apache.org>.
NGimhana commented on a change in pull request #126:
URL: https://github.com/apache/oodt/pull/126#discussion_r690453909
##########
File path: webapp/fmprod/src/main/java/org/apache/oodt/cas/product/jaxrs/services/FileManagerJaxrsServiceV2.java
##########
@@ -181,38 +148,29 @@ public int getTotalNumOfProducts() throws WebApplicationException {
})
public ProductPageResource getNextPage(
@QueryParam("productTypeName") String productTypeName,
+ @QueryParam("productStructureName") String productStructureName,
+ @QueryParam("productTransferStatus") String productTransferStatus,
+ @QueryParam("productName") String productName,
@QueryParam("currentProductPage") int currentProductPage)
throws WebApplicationException {
try {
FileManagerClient client = getContextClient();
+ Query query = new Query();
- // Get the first ProductPage
- ProductPage firstpage = client.getFirstPage(client.getProductTypeByName(productTypeName));
-
- if (currentProductPage == 1) {
- return getProductPageResource(client,firstpage);
+ if (productStructureName != null) {
Review comment:
Use `StringUtils.isEmpty()`for null check. Change other places also.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@oodt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [oodt] IMS94 commented on a change in pull request #126: Improve UI/UX of File Manager Components in React.js OPSUI
Posted by GitBox <gi...@apache.org>.
IMS94 commented on a change in pull request #126:
URL: https://github.com/apache/oodt/pull/126#discussion_r690433396
##########
File path: filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/StdIngester.java
##########
@@ -189,8 +189,8 @@ public String ingest(URL fmUrl, File prodFile, Metadata met)
product.setProductType(getProductType(productType));
List<String> references = new Vector<String>();
- if (!fileLocation.endsWith("/")) {
- fileLocation += "/";
+ if (!fileLocation.endsWith(System.getProperty("file.separator"))) {
Review comment:
We can use `File.separator`
##########
File path: react-components/oodt_opsui_sample_app/src/components/SimpleSnackBar.js
##########
@@ -0,0 +1,135 @@
+import React from "react";
+import Snackbar from "@material-ui/core/Snackbar";
+import SnackbarContent from "@material-ui/core/SnackbarContent";
+import Typography from "@material-ui/core/Typography";
+import InfoIcon from "@material-ui/icons/Info"
+import WarningIcon from "@material-ui/icons/Warning"
+import SuccessIcon from "@material-ui/icons/CheckCircleOutline"
+import IconButton from "@material-ui/core/IconButton";
+import CloseIcon from "@material-ui/icons/Close";
+import PropTypes from "prop-types";
+import { withStyles } from "@material-ui/core";
+
+const styles = theme => ({
+ close: {
+ padding: 10
+ },
+ info: {
+ backgroundColor: "#0F8EF7",
+ },
+ warning: {
+ backgroundColor: "#F0AD11"
+ },
+ success: {
+ backgroundColor: "#41BE41"
+ },
+ error: {
+ backgroundColor: "red"
+ },
+ snackContent: {
+ display: "flex",
+ height: "2vh",
+ alignItems: "center",
+ },
+ icon: {
+ paddingRight: "2%",
+ fontSize: "1.5em"
+ }
+});
+
+class SimpleSnackBar extends React.Component {
Review comment:
We could use a package like https://www.npmjs.com/package/notistack to get snackbar support as well. It provides a hook `useSnackbar()` which is convenient. WDYT?
##########
File path: react-components/oodt_opsui_sample_app/.env.development
##########
@@ -1,2 +1,2 @@
-REACT_APP_FM_REST_API_URL=http://localhost:8080/filemgr-services/jaxrs/v2
-REACT_APP_WM_REST_API_URL=http://localhost:8080/workflow-services/wmservice/v2
+REACT_APP_FM_REST_API_URL=http://localhost:8080/cas_product_war/jaxrs/v2
Review comment:
Let's keep these unchanged. I have changed them to match the docker deployment. Once deployed with docker, the removed ones are the context paths.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@oodt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [oodt] IMS94 commented on a change in pull request #126: Improve UI/UX of File Manager Components in React.js OPSUI
Posted by GitBox <gi...@apache.org>.
IMS94 commented on a change in pull request #126:
URL: https://github.com/apache/oodt/pull/126#discussion_r690433396
##########
File path: filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/StdIngester.java
##########
@@ -189,8 +189,8 @@ public String ingest(URL fmUrl, File prodFile, Metadata met)
product.setProductType(getProductType(productType));
List<String> references = new Vector<String>();
- if (!fileLocation.endsWith("/")) {
- fileLocation += "/";
+ if (!fileLocation.endsWith(System.getProperty("file.separator"))) {
Review comment:
We can use `File.separator`
##########
File path: react-components/oodt_opsui_sample_app/src/components/SimpleSnackBar.js
##########
@@ -0,0 +1,135 @@
+import React from "react";
+import Snackbar from "@material-ui/core/Snackbar";
+import SnackbarContent from "@material-ui/core/SnackbarContent";
+import Typography from "@material-ui/core/Typography";
+import InfoIcon from "@material-ui/icons/Info"
+import WarningIcon from "@material-ui/icons/Warning"
+import SuccessIcon from "@material-ui/icons/CheckCircleOutline"
+import IconButton from "@material-ui/core/IconButton";
+import CloseIcon from "@material-ui/icons/Close";
+import PropTypes from "prop-types";
+import { withStyles } from "@material-ui/core";
+
+const styles = theme => ({
+ close: {
+ padding: 10
+ },
+ info: {
+ backgroundColor: "#0F8EF7",
+ },
+ warning: {
+ backgroundColor: "#F0AD11"
+ },
+ success: {
+ backgroundColor: "#41BE41"
+ },
+ error: {
+ backgroundColor: "red"
+ },
+ snackContent: {
+ display: "flex",
+ height: "2vh",
+ alignItems: "center",
+ },
+ icon: {
+ paddingRight: "2%",
+ fontSize: "1.5em"
+ }
+});
+
+class SimpleSnackBar extends React.Component {
Review comment:
We could use a package like https://www.npmjs.com/package/notistack to get snackbar support as well. It provides a hook `useSnackbar()` which is convenient. WDYT?
##########
File path: react-components/oodt_opsui_sample_app/.env.development
##########
@@ -1,2 +1,2 @@
-REACT_APP_FM_REST_API_URL=http://localhost:8080/filemgr-services/jaxrs/v2
-REACT_APP_WM_REST_API_URL=http://localhost:8080/workflow-services/wmservice/v2
+REACT_APP_FM_REST_API_URL=http://localhost:8080/cas_product_war/jaxrs/v2
Review comment:
Let's keep these unchanged. I have changed them to match the docker deployment. Once deployed with docker, the removed ones are the context paths.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@oodt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [oodt] pavinduLakshan commented on a change in pull request #126: Improve UI/UX of File Manager Components in React.js OPSUI
Posted by GitBox <gi...@apache.org>.
pavinduLakshan commented on a change in pull request #126:
URL: https://github.com/apache/oodt/pull/126#discussion_r690911179
##########
File path: react-components/oodt_opsui_sample_app/.env.development
##########
@@ -1,2 +1,2 @@
-REACT_APP_FM_REST_API_URL=http://localhost:8080/filemgr-services/jaxrs/v2
-REACT_APP_WM_REST_API_URL=http://localhost:8080/workflow-services/wmservice/v2
+REACT_APP_FM_REST_API_URL=http://localhost:8080/cas_product_war/jaxrs/v2
Review comment:
I had to change the URLs to make OPSUI work. If I use the deleted URLs, app doesn't work. Since the removed URLs remain unchanged in the .env file, is it okay to keep the new URLs unchanged in the .env.development file?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@oodt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [oodt] pavinduLakshan commented on a change in pull request #126: Improve UI/UX of File Manager Components in React.js OPSUI
Posted by GitBox <gi...@apache.org>.
pavinduLakshan commented on a change in pull request #126:
URL: https://github.com/apache/oodt/pull/126#discussion_r690911179
##########
File path: react-components/oodt_opsui_sample_app/.env.development
##########
@@ -1,2 +1,2 @@
-REACT_APP_FM_REST_API_URL=http://localhost:8080/filemgr-services/jaxrs/v2
-REACT_APP_WM_REST_API_URL=http://localhost:8080/workflow-services/wmservice/v2
+REACT_APP_FM_REST_API_URL=http://localhost:8080/cas_product_war/jaxrs/v2
Review comment:
I had to change the URLs to make OPSUI work. If I use the deleted URLs, app doesn't work. Since the removed URLs remain unchanged in the .env file, is it okay to keep the new URLs unchanged in the .env.development file?
##########
File path: react-components/oodt_opsui_sample_app/src/components/SimpleSnackBar.js
##########
@@ -0,0 +1,135 @@
+import React from "react";
+import Snackbar from "@material-ui/core/Snackbar";
+import SnackbarContent from "@material-ui/core/SnackbarContent";
+import Typography from "@material-ui/core/Typography";
+import InfoIcon from "@material-ui/icons/Info"
+import WarningIcon from "@material-ui/icons/Warning"
+import SuccessIcon from "@material-ui/icons/CheckCircleOutline"
+import IconButton from "@material-ui/core/IconButton";
+import CloseIcon from "@material-ui/icons/Close";
+import PropTypes from "prop-types";
+import { withStyles } from "@material-ui/core";
+
+const styles = theme => ({
+ close: {
+ padding: 10
+ },
+ info: {
+ backgroundColor: "#0F8EF7",
+ },
+ warning: {
+ backgroundColor: "#F0AD11"
+ },
+ success: {
+ backgroundColor: "#41BE41"
+ },
+ error: {
+ backgroundColor: "red"
+ },
+ snackContent: {
+ display: "flex",
+ height: "2vh",
+ alignItems: "center",
+ },
+ icon: {
+ paddingRight: "2%",
+ fontSize: "1.5em"
+ }
+});
+
+class SimpleSnackBar extends React.Component {
Review comment:
Using hooks wouldn't be possible as all components in our app are class components. However, that library can be used in class components in another way. I will look into it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@oodt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [oodt] pavinduLakshan commented on a change in pull request #126: Improve UI/UX of File Manager Components in React.js OPSUI
Posted by GitBox <gi...@apache.org>.
pavinduLakshan commented on a change in pull request #126:
URL: https://github.com/apache/oodt/pull/126#discussion_r691730111
##########
File path: react-components/oodt_opsui_sample_app/.env.development
##########
@@ -1,2 +1,2 @@
-REACT_APP_FM_REST_API_URL=http://localhost:8080/filemgr-services/jaxrs/v2
-REACT_APP_WM_REST_API_URL=http://localhost:8080/workflow-services/wmservice/v2
+REACT_APP_FM_REST_API_URL=http://localhost:8080/cas_product_war/jaxrs/v2
Review comment:
Replaced API URL env variables
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@oodt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [oodt] pavinduLakshan commented on a change in pull request #126: Improve UI/UX of File Manager Components in React.js OPSUI
Posted by GitBox <gi...@apache.org>.
pavinduLakshan commented on a change in pull request #126:
URL: https://github.com/apache/oodt/pull/126#discussion_r691729842
##########
File path: react-components/oodt_opsui_sample_app/src/components/SimpleSnackBar.js
##########
@@ -0,0 +1,135 @@
+import React from "react";
+import Snackbar from "@material-ui/core/Snackbar";
+import SnackbarContent from "@material-ui/core/SnackbarContent";
+import Typography from "@material-ui/core/Typography";
+import InfoIcon from "@material-ui/icons/Info"
+import WarningIcon from "@material-ui/icons/Warning"
+import SuccessIcon from "@material-ui/icons/CheckCircleOutline"
+import IconButton from "@material-ui/core/IconButton";
+import CloseIcon from "@material-ui/icons/Close";
+import PropTypes from "prop-types";
+import { withStyles } from "@material-ui/core";
+
+const styles = theme => ({
+ close: {
+ padding: 10
+ },
+ info: {
+ backgroundColor: "#0F8EF7",
+ },
+ warning: {
+ backgroundColor: "#F0AD11"
+ },
+ success: {
+ backgroundColor: "#41BE41"
+ },
+ error: {
+ backgroundColor: "red"
+ },
+ snackContent: {
+ display: "flex",
+ height: "2vh",
+ alignItems: "center",
+ },
+ icon: {
+ paddingRight: "2%",
+ fontSize: "1.5em"
+ }
+});
+
+class SimpleSnackBar extends React.Component {
Review comment:
Implemented snack bars in notistack and removed the `SimpleSnackBar` component.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@oodt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [oodt] pavinduLakshan commented on a change in pull request #126: Improve UI/UX of File Manager Components in React.js OPSUI
Posted by GitBox <gi...@apache.org>.
pavinduLakshan commented on a change in pull request #126:
URL: https://github.com/apache/oodt/pull/126#discussion_r690912116
##########
File path: react-components/oodt_opsui_sample_app/src/components/SimpleSnackBar.js
##########
@@ -0,0 +1,135 @@
+import React from "react";
+import Snackbar from "@material-ui/core/Snackbar";
+import SnackbarContent from "@material-ui/core/SnackbarContent";
+import Typography from "@material-ui/core/Typography";
+import InfoIcon from "@material-ui/icons/Info"
+import WarningIcon from "@material-ui/icons/Warning"
+import SuccessIcon from "@material-ui/icons/CheckCircleOutline"
+import IconButton from "@material-ui/core/IconButton";
+import CloseIcon from "@material-ui/icons/Close";
+import PropTypes from "prop-types";
+import { withStyles } from "@material-ui/core";
+
+const styles = theme => ({
+ close: {
+ padding: 10
+ },
+ info: {
+ backgroundColor: "#0F8EF7",
+ },
+ warning: {
+ backgroundColor: "#F0AD11"
+ },
+ success: {
+ backgroundColor: "#41BE41"
+ },
+ error: {
+ backgroundColor: "red"
+ },
+ snackContent: {
+ display: "flex",
+ height: "2vh",
+ alignItems: "center",
+ },
+ icon: {
+ paddingRight: "2%",
+ fontSize: "1.5em"
+ }
+});
+
+class SimpleSnackBar extends React.Component {
Review comment:
Using hooks wouldn't be possible as all components in our app are class components. However, that library can be used in class components in another way. I will look into it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@oodt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [oodt] IMS94 merged pull request #126: Improve UI/UX of File Manager Components in React.js OPSUI
Posted by GitBox <gi...@apache.org>.
IMS94 merged pull request #126:
URL: https://github.com/apache/oodt/pull/126
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@oodt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org