You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@age.apache.org by em...@apache.org on 2021/10/29 14:21:53 UTC

[incubator-age-viewer] branch main updated (4c912a0 -> da6996e)

This is an automated email from the ASF dual-hosted git repository.

emotionbug pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-age-viewer.git.


    from 4c912a0  Create .asf.yaml
     new 74d11a9  Fix codeMirror module version issue
     new 5258066  Update wheel sensitivity adjustment in meta chart
     new 712b68d  Update frontend CypherGraphResultFrame
     new fd576d8  Update frontend
     new 9bbd3d1  Update  Connection error message improvement.
     new 700a2e2  Fix Optional Match Error
     new 330545b  Update cypherService.js
     new da6996e  Update CypherGraphResultFrame.jsx

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 backend/src/app.js                                 |  8 +++++++-
 backend/src/services/cypherService.js              | 22 +++++++++++++---------
 frontend/package.json                              |  4 ++--
 .../cytoscape/CypherResultCytoscapeFooter.jsx      | 12 ++++++------
 .../cytoscape/MetadataCytoscapeChart.jsx           |  1 +
 .../frame/presentations/CypherGraphResultFrame.jsx |  5 +----
 frontend/src/features/cypher/CypherUtil.js         |  2 +-
 frontend/src/features/database/DatabaseSlice.js    |  4 +++-
 frontend/src/features/database/MetadataSlice.js    |  2 ++
 frontend/src/static/style.css                      |  4 +++-
 10 files changed, 39 insertions(+), 25 deletions(-)

[incubator-age-viewer] 08/08: Update CypherGraphResultFrame.jsx

Posted by em...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

emotionbug pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-age-viewer.git

commit da6996e3f75fadac851a809de554d5ca9ef2424c
Author: Alex Kwak <ta...@kakao.com>
AuthorDate: Fri Oct 29 23:08:14 2021 +0900

    Update CypherGraphResultFrame.jsx
---
 frontend/src/components/frame/presentations/CypherGraphResultFrame.jsx | 2 --
 1 file changed, 2 deletions(-)

diff --git a/frontend/src/components/frame/presentations/CypherGraphResultFrame.jsx b/frontend/src/components/frame/presentations/CypherGraphResultFrame.jsx
index 7656929..543d86f 100644
--- a/frontend/src/components/frame/presentations/CypherGraphResultFrame.jsx
+++ b/frontend/src/components/frame/presentations/CypherGraphResultFrame.jsx
@@ -19,8 +19,6 @@ import uuid from 'react-uuid';
 import { saveAs } from 'file-saver';
 import { Parser } from 'json2csv';
 import PropTypes from 'prop-types';
-// import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-// import { faTable } from '@fortawesome/free-solid-svg-icons';
 import CypherResultCytoscapeContainer from '../../cypherresult/containers/CypherResultCytoscapeContainer';
 import CypherResultTableContainer from '../../cypherresult/containers/CypherResultTableContainer';
 import GraphFilterModal from '../../cypherresult/components/GraphFilterModal';

[incubator-age-viewer] 06/08: Fix Optional Match Error

Posted by em...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

emotionbug pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-age-viewer.git

commit 700a2e280bc0635b946af5efa026a79b48baa74b
Author: shinhanbyeol <si...@gmail.com>
AuthorDate: Wed Oct 27 17:44:46 2021 +0900

    Fix Optional Match Error
    
    1. Correct errors that fail to handle null results when using optical match syntax
---
 backend/src/services/cypherService.js      | 24 ++++++++++++++----------
 frontend/src/features/cypher/CypherUtil.js |  2 +-
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/backend/src/services/cypherService.js b/backend/src/services/cypherService.js
index a6b1adc..f6398fa 100644
--- a/backend/src/services/cypherService.js
+++ b/backend/src/services/cypherService.js
@@ -52,7 +52,7 @@ class CypherService {
             try {
                 cypherRow = this._convertRowToResult(targetItem)
             } catch (e) {
-                console.error("FixMe!")
+                console.error("FixMe: _convertRowToResult error")
             }
         }
         result = {
@@ -80,16 +80,20 @@ class CypherService {
         return resultSet.rows.map((row) => {
             let convetedObject = {};
             for (let k in row) {
-                let typeName = row[k].constructor.name;
-                if (typeName === 'Path') {
-                    convetedObject[k] = this.convertPath(row[k]);
-                } else if (typeName === 'Vertex') {
-                    convetedObject[k] = this.convertVertex(row[k]);
-                } else if (typeName === 'Edge') {
-                    convetedObject[k] = this.convertEdge(row[k]);
+                if (row[k]) {
+                    let typeName = row[k].constructor.name;
+                    if (typeName === 'Path') {
+                        convetedObject[k] = this.convertPath(row[k]);
+                    } else if (typeName === 'Vertex') {
+                        convetedObject[k] = this.convertVertex(row[k]);
+                    } else if (typeName === 'Edge') {
+                        convetedObject[k] = this.convertEdge(row[k]);
+                    } else {
+                        convetedObject[k] = row[k];
+                    }
                 } else {
-                    convetedObject[k] = row[k];
-                }
+                    convetedObject[k] = null;
+                }                
             }
             return convetedObject;
         });
diff --git a/frontend/src/features/cypher/CypherUtil.js b/frontend/src/features/cypher/CypherUtil.js
index b09324f..2e03d48 100644
--- a/frontend/src/features/cypher/CypherUtil.js
+++ b/frontend/src/features/cypher/CypherUtil.js
@@ -391,7 +391,7 @@ export const generateCytoscapeElement = (data, maxDataOfGraph, isNew) => {
             const [pathAlias, pathVal] = valueEntry;
             generateElements(pathAlias, pathVal);
           });
-        } else {
+        } else if (val) {
           generateElements(alias, val);
         }
       });

[incubator-age-viewer] 01/08: Fix codeMirror module version issue

Posted by em...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

emotionbug pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-age-viewer.git

commit 74d11a95ebee98dd1138e851234b7067093e691f
Author: Hanbyeol Shin <hb...@bitnine.net>
AuthorDate: Fri Oct 1 11:04:54 2021 +0900

    Fix codeMirror module version issue
    
    A bug occurred when applying the latest version of the Codemirror and Uiw/codemirror modules.
    
    I stopped updating the version of the module.
---
 frontend/package.json | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/frontend/package.json b/frontend/package.json
index de46efd..7927285 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -9,12 +9,12 @@
     "@fortawesome/free-solid-svg-icons": "^5.15.2",
     "@fortawesome/react-fontawesome": "^0.1.14",
     "@reduxjs/toolkit": "^1.5.0",
-    "@uiw/react-codemirror": "^3.0.5",
+    "@uiw/react-codemirror": "3.0.5",
     "antd": "^4.12.3",
     "ascii-table": "0.0.9",
     "axios": "^0.21.1",
     "bootstrap": "^4.6.0",
-    "codemirror": "^5.59.0",
+    "codemirror": "5.59.0",
     "cytoscape": "^3.18.0",
     "cytoscape-avsdf": "^1.0.0",
     "cytoscape-cise": "^1.0.0",

[incubator-age-viewer] 03/08: Update frontend CypherGraphResultFrame

Posted by em...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

emotionbug pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-age-viewer.git

commit 712b68dbb6b38c8112ab5fc7ca83575906431f01
Author: shinhanbyeol <76...@users.noreply.github.com>
AuthorDate: Thu Oct 7 18:14:47 2021 +0900

    Update frontend CypherGraphResultFrame
    
    1. Error Fix :  Expected indentation of 0 spaces but found 2  indent
---
 frontend/src/components/frame/presentations/CypherGraphResultFrame.jsx | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/frontend/src/components/frame/presentations/CypherGraphResultFrame.jsx b/frontend/src/components/frame/presentations/CypherGraphResultFrame.jsx
index 3bb87b2..7656929 100644
--- a/frontend/src/components/frame/presentations/CypherGraphResultFrame.jsx
+++ b/frontend/src/components/frame/presentations/CypherGraphResultFrame.jsx
@@ -21,8 +21,7 @@ import { Parser } from 'json2csv';
 import PropTypes from 'prop-types';
 // import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
 // import { faTable } from '@fortawesome/free-solid-svg-icons';
-import CypherResultCytoscapeContainer
-  from '../../cypherresult/containers/CypherResultCytoscapeContainer';
+import CypherResultCytoscapeContainer from '../../cypherresult/containers/CypherResultCytoscapeContainer';
 import CypherResultTableContainer from '../../cypherresult/containers/CypherResultTableContainer';
 import GraphFilterModal from '../../cypherresult/components/GraphFilterModal';
 import EdgeThicknessMenu from '../../cypherresult/components/EdgeThicknessMenu';

[incubator-age-viewer] 07/08: Update cypherService.js

Posted by em...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

emotionbug pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-age-viewer.git

commit 330545b39e62a1685f5fbdcbf4a68721c41c2ef8
Author: Alex Kwak <ta...@kakao.com>
AuthorDate: Fri Oct 29 23:06:32 2021 +0900

    Update cypherService.js
---
 backend/src/services/cypherService.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backend/src/services/cypherService.js b/backend/src/services/cypherService.js
index f6398fa..8b86c71 100644
--- a/backend/src/services/cypherService.js
+++ b/backend/src/services/cypherService.js
@@ -93,7 +93,7 @@ class CypherService {
                     }
                 } else {
                     convetedObject[k] = null;
-                }                
+                }
             }
             return convetedObject;
         });

[incubator-age-viewer] 04/08: Update frontend

Posted by em...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

emotionbug pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-age-viewer.git

commit fd576d89086e31ba2e363ee00cf847955e452d1e
Author: shinhanbyeol <si...@gmail.com>
AuthorDate: Mon Oct 25 13:57:26 2021 +0900

    Update frontend
    
    1. If there are too many results in the cypher result, fix the bug with the scroll bar on the right.
    
    2. The color value of the fold button is #ffffff, so it may not be seen well on a specific monitor, so it is modified to #c4c4c4.
---
 .../src/components/cytoscape/CypherResultCytoscapeFooter.jsx | 12 ++++++------
 frontend/src/static/style.css                                |  4 +++-
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/frontend/src/components/cytoscape/CypherResultCytoscapeFooter.jsx b/frontend/src/components/cytoscape/CypherResultCytoscapeFooter.jsx
index 1329a20..4b00eea 100644
--- a/frontend/src/components/cytoscape/CypherResultCytoscapeFooter.jsx
+++ b/frontend/src/components/cytoscape/CypherResultCytoscapeFooter.jsx
@@ -69,7 +69,7 @@ const CypherResultCytoscapeFooter = ({
 
       return (
         <div className="d-flex pl-3">
-          <div className={`mr-auto graphFrameFooter ${footerExpanded ? 'expandedGraphFrameFooter' : ''}`}>
+          <div className={`graphFrameFooter ${footerExpanded ? 'expandedGraphFrameFooter' : ''}`}>
             <Badge
               className="px-3 py-1"
               pill={isEdge === false}
@@ -99,7 +99,7 @@ const CypherResultCytoscapeFooter = ({
           Layout :&nbsp;
           <select
             id="selectLayout"
-            className="col-1 custom-select custom-select-sm layout-select"
+            className="col-2 custom-select custom-select-sm layout-select"
             defaultValue={cytoscapeLayout}
             onChange={(e) => [setCytoscapeLayout(e.target.value)]}
           >
@@ -134,7 +134,7 @@ const CypherResultCytoscapeFooter = ({
           Layout :&nbsp;
           <select
             id="selectLayout"
-            className="col-1 custom-select custom-select-sm layout-select"
+            className="col-2 custom-select custom-select-sm layout-select"
             defaultValue={cytoscapeLayout}
             onChange={(e) => [setCytoscapeLayout(e.target.value)]}
           >
@@ -234,7 +234,7 @@ const CypherResultCytoscapeFooter = ({
 
       return (
         <div className="d-flex pl-3">
-          <div className={`mr-auto graphFrameFooter ${footerExpanded ? 'expandedGraphFrameFooter' : ''}`}>
+          <div className={`graphFrameFooter ${footerExpanded ? 'expandedGraphFrameFooter' : ''}`}>
             <Badge
               className="px-3 py-1"
               pill={isEdge === false}
@@ -298,7 +298,7 @@ const CypherResultCytoscapeFooter = ({
           Layout :&nbsp;
           <select
             id="selectLayout"
-            className="col-1 custom-select custom-select-sm layout-select"
+            className="col-2 custom-select custom-select-sm layout-select"
             defaultValue={cytoscapeLayout}
             onChange={(e) => [setCytoscapeLayout(e.target.value)]}
           >
@@ -324,7 +324,7 @@ const CypherResultCytoscapeFooter = ({
         <div className="px-1">Layout : </div>
         <select
           id="selectLayout"
-          className="col-1 custom-select custom-select-sm layout-select"
+          className="col-2 custom-select custom-select-sm layout-select"
           defaultValue={cytoscapeLayout}
           onChange={(e) => [setCytoscapeLayout(e.target.value)]}
         >
diff --git a/frontend/src/static/style.css b/frontend/src/static/style.css
index c4289f4..42083c9 100644
--- a/frontend/src/static/style.css
+++ b/frontend/src/static/style.css
@@ -320,7 +320,7 @@ a[data-toggle="collapse"] {
 }
 
 .btn-link {
-    color: #ffffff !important;
+    color: #c4c4c4 !important;
 }
 .btn-link:hover {
     color: #2756FF !important;
@@ -421,11 +421,13 @@ a.nav-link.active {
 }
 
 .chart-footer-area .graphFrameFooter {
+    flex: 1;
     height: 37px;
     overflow: hidden;
 }
 
 .chart-footer-area .graphFrameFooter.expandedGraphFrameFooter {
+    flex: 1;
     height: initial !important;
     overflow: initial !important;
 }

[incubator-age-viewer] 02/08: Update wheel sensitivity adjustment in meta chart

Posted by em...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

emotionbug pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-age-viewer.git

commit 5258066c7effcf34f78cba57970ade346a2ff04c
Author: shinhanbyeol <76...@users.noreply.github.com>
AuthorDate: Mon Oct 4 21:20:55 2021 +0900

    Update wheel sensitivity adjustment in meta chart
    
    1.  Wheel sensitivity adjustment.
---
 frontend/src/components/cytoscape/MetadataCytoscapeChart.jsx | 1 +
 1 file changed, 1 insertion(+)

diff --git a/frontend/src/components/cytoscape/MetadataCytoscapeChart.jsx b/frontend/src/components/cytoscape/MetadataCytoscapeChart.jsx
index d525e39..447b7c5 100644
--- a/frontend/src/components/cytoscape/MetadataCytoscapeChart.jsx
+++ b/frontend/src/components/cytoscape/MetadataCytoscapeChart.jsx
@@ -62,6 +62,7 @@ const MetadataCytoscapeChart = ({ elements }) => {
       stylesheet={stylesheet}
       cy={cyCallback}
       className={styles.MetaChart}
+      wheelSensitivity={0.3}
     />
   );
 };

[incubator-age-viewer] 05/08: Update Connection error message improvement.

Posted by em...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

emotionbug pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-age-viewer.git

commit 9bbd3d15769eb4f3cb9b2e0a5e9229047a49211a
Author: shinhanbyeol <si...@gmail.com>
AuthorDate: Mon Oct 25 16:27:30 2021 +0900

    Update  Connection error message improvement.
    
    1. Add severity and error code to the error alert message.
---
 backend/src/app.js                              | 8 +++++++-
 frontend/src/features/database/DatabaseSlice.js | 4 +++-
 frontend/src/features/database/MetadataSlice.js | 2 ++
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/backend/src/app.js b/backend/src/app.js
index e7e5f4c..9c66fad 100644
--- a/backend/src/app.js
+++ b/backend/src/app.js
@@ -66,7 +66,13 @@ app.use('/api/v1/feature', FeatureRouter);
 app.use(function (err, req, res, next) {
     // TODO: logger
     console.error(err);
-    res.status(err.status || 500).json({message: err.message});
+    res.status(err.status || 500).json(
+        {
+            severity: err.severity || '',
+            message: err.message || '',
+            code: err.code || ''
+        }
+    );
 });
 
 process.on('uncaughtException', function (exception) {
diff --git a/frontend/src/features/database/DatabaseSlice.js b/frontend/src/features/database/DatabaseSlice.js
index 5226fec..bcfc24a 100644
--- a/frontend/src/features/database/DatabaseSlice.js
+++ b/frontend/src/features/database/DatabaseSlice.js
@@ -35,7 +35,7 @@ export const connectToAgensGraph = createAsyncThunk(
       const errorJson = await error.json();
       const errorDetail = {
         name: 'Failed to Retrieve Connection Information',
-        message: errorJson.message,
+        message: `[${errorJson.severity}]:(${errorJson.code}) ${errorJson.message} `,
         statusText: error.statusText,
       };
       throw errorDetail;
@@ -58,8 +58,10 @@ export const getConnectionStatus = createAsyncThunk(
       if (response.ok) { return await response.json(); }
       throw response;
     } catch (error) {
+      const errorJson = await error.json();
       const errorDetail = {
         name: 'Failed to Retrieve Connection Information',
+        message: `[${errorJson.severity}]:(${errorJson.code}) ${errorJson.message} `,
         statusText: error.statusText,
       };
       throw errorDetail;
diff --git a/frontend/src/features/database/MetadataSlice.js b/frontend/src/features/database/MetadataSlice.js
index d7949fa..be1467c 100644
--- a/frontend/src/features/database/MetadataSlice.js
+++ b/frontend/src/features/database/MetadataSlice.js
@@ -40,6 +40,7 @@ export const getMetaData = createAsyncThunk(
     } catch (error) {
       const errorDetail = {
         name: 'Database Connection Failed',
+        message: `[${error.severity}]:(${error.code}) ${error.message} `,
         statusText: error.statusText,
       };
       throw errorDetail;
@@ -59,6 +60,7 @@ export const getMetaChartData = createAsyncThunk(
     } catch (error) {
       const errorDetail = {
         name: 'Database Connection Failed',
+        message: `[${error.severity}]:(${error.code}) ${error.message} `,
         statusText: error.statusText,
       };
       throw errorDetail;