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 18:57:41 UTC

[GitHub] [oodt] IMS94 commented on a change in pull request #126: Improve UI/UX of File Manager Components in React.js OPSUI

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