-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fixes in base workflows and improved data-exploration UI (#55)
* base wf fixes and data exploration UI extensions * more data exploration improvements * Updated example rules file and regenerated test data for workflow test * updated change log and removed commented code --------- Co-authored-by: Aleksandrs Livincovs <aleksandrs.livincovs@cognite.com>
- Loading branch information
1 parent
a6b9ca4
commit 2cd984c
Showing
26 changed files
with
768 additions
and
332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.14.0" | ||
__version__ = "0.14.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
{ | ||
"files": { | ||
"main.css": "./static/css/main.38a62222.css", | ||
"main.js": "./static/js/main.45df5ef5.js", | ||
"main.js": "./static/js/main.16555d84.js", | ||
"static/media/logo.svg": "./static/media/logo.4bdbcf8396881de06a6723a92fed910b.svg", | ||
"index.html": "./index.html", | ||
"main.38a62222.css.map": "./static/css/main.38a62222.css.map", | ||
"main.45df5ef5.js.map": "./static/js/main.45df5ef5.js.map" | ||
"main.16555d84.js.map": "./static/js/main.16555d84.js.map" | ||
}, | ||
"entrypoints": [ | ||
"static/css/main.38a62222.css", | ||
"static/js/main.45df5ef5.js" | ||
"static/js/main.16555d84.js" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="NEAT controll panel"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>React App</title><script defer="defer" src="./static/js/main.45df5ef5.js"></script><link href="./static/css/main.38a62222.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html> | ||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="NEAT controll panel"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>React App</title><script defer="defer" src="./static/js/main.16555d84.js"></script><link href="./static/css/main.38a62222.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html> |
6 changes: 3 additions & 3 deletions
6
...neat-app/build/static/js/main.45df5ef5.js → ...neat-app/build/static/js/main.16555d84.js
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...-app/build/static/js/main.45df5ef5.js.map → ...-app/build/static/js/main.16555d84.js.map
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
cognite/neat/explorer-ui/neat-app/src/components/NodeViewer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import Button from "@mui/material/Button" | ||
import Dialog from "@mui/material/Dialog" | ||
import DialogActions from "@mui/material/DialogActions" | ||
import DialogContent from "@mui/material/DialogContent" | ||
import DialogTitle from "@mui/material/DialogTitle" | ||
import React, { useEffect, useState } from "react" | ||
import RemoveNsPrefix, { getNeatApiRootUrl, getSelectedWorkflowName } from "./Utils" | ||
import { Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Typography } from "@mui/material" | ||
import { ExplorerContext } from "./Context" | ||
|
||
export default function NodeViewerDialog(props: any) | ||
{ | ||
const {hiddenNsPrefixModeCtx, graphNameCtx} = React.useContext(ExplorerContext); | ||
const [dialogOpen, setDialogOpen] = useState(false); | ||
const neatApiRootUrl = getNeatApiRootUrl(); | ||
const [nodeId, setNodeId] = useState(""); | ||
const [graphName, setGraphName] = graphNameCtx; | ||
const [hiddenNsPrefixMode, setHiddenNsPrefixMode] = hiddenNsPrefixModeCtx; | ||
const [data, setData] = useState([]); | ||
|
||
const handleDialogCancel = () => { | ||
setDialogOpen(false); | ||
props.onClose(); | ||
}; | ||
|
||
useEffect(() => { | ||
if (props.open){ | ||
setNodeId(props.nodeId); | ||
setDialogOpen(true); | ||
loadObjectProperties(props.nodeId); | ||
} | ||
}, [props.open]); | ||
|
||
const loadObjectProperties = (reference:string) => { | ||
const workflowName = getSelectedWorkflowName(); | ||
fetch(neatApiRootUrl+`/api/object-properties?`+new URLSearchParams({"reference":reference,"graph_name":graphName,"workflow_name":workflowName}).toString()) | ||
.then((response) => response.json()) | ||
.then((rdata) => { | ||
let result = rdata.rows.map((row:any) => { | ||
let prop = row.property; | ||
if(hiddenNsPrefixMode) | ||
prop = RemoveNsPrefix(prop); | ||
return {property:prop, value:row.value} | ||
}); | ||
setData(result); | ||
}).catch((error) => { | ||
console.error('Error:', error); | ||
}); | ||
} | ||
|
||
|
||
return ( | ||
<Dialog open={dialogOpen} onClose={handleDialogCancel} fullWidth = {true} maxWidth = "lg" > | ||
<DialogTitle>Node viewer</DialogTitle> | ||
<DialogContent sx={{ minWidth: 650 }} > | ||
<TableContainer component={Paper}> | ||
<Table sx={{ minWidth: 650 }} aria-label="simple table"> | ||
<TableHead> | ||
<TableRow> | ||
<TableCell>Property</TableCell> | ||
<TableCell align="left">Value</TableCell> | ||
</TableRow> | ||
</TableHead> | ||
<TableBody> | ||
{data.map((row) => ( | ||
<TableRow | ||
key={row.name} | ||
sx={{ '&:last-child td, &:last-child th': { border: 0 } }} | ||
> | ||
<TableCell component="th" scope="row"> | ||
{row.property} | ||
</TableCell> | ||
<TableCell align="left">{ row.value } </TableCell> | ||
</TableRow> | ||
))} | ||
</TableBody> | ||
</Table> | ||
</TableContainer> | ||
<Typography variant="body1" gutterBottom> object : { nodeId} </Typography> | ||
</DialogContent> | ||
<DialogActions> | ||
<Button variant="outlined" size="small" onClick={handleDialogCancel}>Cancel</Button> | ||
</DialogActions> | ||
</Dialog> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.