Skip to content
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
e354c1d
ncnode-ui: Add new NCNode editor component.
benloh Jul 5, 2023
2f9d2db
ncnode-ui: Add white stroke around nodes
benloh Jul 5, 2023
3e52ca0
ncnode-ui: Add round stroke linecap
benloh Jul 5, 2023
5586293
ncnode-ui: Show only attributes defined by TEMPLATE file.
benloh Jul 5, 2023
7718598
ncnode-ui: Lint fix: autolayout
benloh Jul 6, 2023
1e8fe7c
ncnode-ui: Add node lock check server call: SRV_DBISNODELOCKED
benloh Jul 6, 2023
08b8e60
ncnode-ui: Add edit input form support
benloh Jul 6, 2023
4d21d54
ncnode-ui: Make Edit mode darker than View mode.
benloh Jul 6, 2023
daabe88
lint fix
benloh Jul 6, 2023
93e5c15
ncnode-ui: Use componentDidMount, not componentWillMount
benloh Jul 6, 2023
59080eb
ncnode-ui: Ignore selections (and deselects) while editing a node.
benloh Jul 6, 2023
99c381f
ncnode-ui: Edit Node button is only enabled if logged in
benloh Jul 6, 2023
611b409
ncnode-ui: Fix reversed data calls
benloh Jul 6, 2023
74ae8f1
ncnode-ui: Add befloreunload handlers
benloh Jul 6, 2023
dfa070f
ncnode-ui: Disallow tab navigation during edit. Show gray screen and …
benloh Jul 6, 2023
ec1d97f
ncnode-ui: Update background color as soon as input form changes
benloh Jul 6, 2023
f4fd744
ncnode-ui: Gracefully fallback from `undefined` values to avoid React…
benloh Jul 6, 2023
a3510fa
ncnode-ui: Centralize permissions logic. Network-initiated node lock…
benloh Jul 6, 2023
2aac6ad
ncnode-ui: Handle NODE_EDIT requests sent by Node Table.
benloh Jul 7, 2023
c4e2599
ncnode-ui: Minimize graph animation movement after selecting a node.
benloh Jul 7, 2023
f066982
ncnode-ui: Show matching list of labels during node edit.
benloh Jul 7, 2023
de165e5
ncnode-ui: Show duplicate label warning when editing node labels
benloh Jul 7, 2023
f754b40
ncnode-ui: Hitting Cancel during edit node will now restore previous …
benloh Jul 7, 2023
d0b3509
Merge branch 'dev' into dev-bl/ncnode-ui
benloh Jul 7, 2023
ff65a05
ncnode-ui: Selecting edit from Node Table now switches to Attributes …
benloh Jul 7, 2023
46c3f34
lint autowrap
benloh Jul 7, 2023
59a5199
ncnode-ui: Skip saving and restoring provenance during Edit/Cancel fo…
benloh Jul 7, 2023
ba22899
ncnode-ui: NCGraphRenderer Document and clarify API
benloh Jul 9, 2023
a7eba89
lint fix
benloh Jul 10, 2023
0dcd21b
ncnode-ui: Add NCEdge editor and viewer
benloh Jul 10, 2023
5bcc8ee
lint fix autolayout
benloh Jul 10, 2023
135e1e0
ncnode-ui: Select "Edit" edge from Edge Table.
benloh Jul 10, 2023
4c97ccc
ncnode-ui: Add ability to select source/target nodes for edges or cre…
benloh Jul 19, 2023
2a06493
ncnode-ui: Disable original NodeSelector in favor of new NCNode compo…
benloh Jul 19, 2023
dddc442
ncnode-ui: Disable date rendering while provenance is being refactored.
benloh Jul 19, 2023
7caa83e
ncnode-ui: Disable ability to edit the source/target for "this parent…
benloh Jul 20, 2023
64cc18c
ncnode-ui: Ignore selection clicks during edge edit.
benloh Jul 20, 2023
eebfee7
ncnode-ui: Show "Click on node" help above the source/target.
benloh Jul 21, 2023
6389f65
ncnode-ui: Show selected source/target with animated arrow aka `selec…
benloh Jul 21, 2023
0bbe50a
ncnode-ui: Show secondary selection for autosuggest updates as well c…
benloh Jul 21, 2023
ba9aba1
ncnode-ui: Disable Edge Edit Save if a source or target have not been…
benloh Jul 21, 2023
ed15014
ncnode-ui: Add NCSearch and New Node button
benloh Jul 22, 2023
4395294
ncnode-ui: NCSearch select existing node vs create new node
benloh Jul 22, 2023
b01baa7
Merge branch 'dev-bl/ncnode-ui' of https://github.com/netcreateorg/ne…
benloh Jul 22, 2023
0bcb8af
lint fix: remove debug
benloh Jul 22, 2023
a228c67
ncnode-ui: Cancel AutoSuggest if click outside of matchlist.
benloh Jul 22, 2023
9885154
ncnode-ui: Catch undefined source/target nodes for EdgeTable.
benloh Jul 22, 2023
a3e468b
lint fix: CamelCase
benloh Jul 22, 2023
7c2cae9
ncnode-ui: Disable "New Node" button if not logged in.
benloh Jul 23, 2023
544b0bb
ncnode-ui: Automatically enable "Edit" mode when creating a new node.
benloh Jul 23, 2023
5199025
ncnode-ui: Refactor NCNode to re-use nc-ui components.
benloh Jul 23, 2023
cbcb89b
ncnode-ui: Add ability to "Delete Node"
benloh Jul 23, 2023
26ce3ea
ncnode-ui: Show invalid node id error message while setting Delete
benloh Jul 23, 2023
b166805
ncnode-ui: Hide Delete button while editing template.
benloh Jul 23, 2023
5c134a8
lint autolayout
benloh Jul 23, 2023
3d82443
ncnode-ui: HideDeleteNodebutton via template setting
benloh Jul 23, 2023
b12c4d2
ncnode-ui: NodeTable and EdgeTable now display custom attriutes.
benloh Jul 23, 2023
870c4d2
ncnode-ui: Use <textarea> for inputs to allow long text fields.
benloh Jul 23, 2023
46e5208
ncnode-ui: Enable simple input field for Provenance.
benloh Jul 23, 2023
3e4cc2c
ncnode-ui: Show "Degrees"
benloh Jul 23, 2023
fb6fbb7
ncnode-ui: Remove 'Degrees' from 'Provenance' -- it should be in Attr…
benloh Jul 23, 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
27 changes: 25 additions & 2 deletions app/unisys/server-database.js
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,15 @@ DB.PKT_RequestUnlockNode = function (pkt) {
return m_MakeLockError(`nodeID ${nodeID} was not locked so can't unlock`);
};
/// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DB.PKT_IsNodeLocked = function (pkt) {
let { nodeID } = pkt.Data();
const uaddr = pkt.s_uaddr;
let errcode = m_IsInvalidNode(nodeID);
if (errcode) return errcode;
const isLocked = m_locked_nodes.has(nodeID);
return { nodeID, locked: isLocked };
};
/// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function m_IsInvalidNode(nodeID) {
if (!nodeID) return m_MakeLockError(`undefined nodeID`);
nodeID = Number.parseInt(nodeID, 10);
Expand Down Expand Up @@ -805,6 +814,15 @@ DB.PKT_RequestUnlockEdge = function (pkt) {
return m_MakeLockError(`edgeID ${edgeID} was not locked so can't unlock`);
};
/// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DB.PKT_IsEdgeLocked = function (pkt) {
let { edgeID } = pkt.Data();
const uaddr = pkt.s_uaddr;
let errcode = m_IsInvalidEdge(edgeID);
if (errcode) return errcode;
const isLocked = m_locked_edges.has(edgeID);
return { edgeID, locked: isLocked };
};
/// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function m_IsInvalidEdge(edgeID) {
if (!edgeID) return m_MakeLockError(`undefined edgeID`);
edgeID = Number.parseInt(edgeID, 10);
Expand Down Expand Up @@ -1255,7 +1273,8 @@ DB.RegenerateDefaultTemplate = () => {
/**
* Returns object with flags indicating whether the template is being edited,
* data is being imported, or node or edge are being edited
* @returns {templateBeingEdited:boolean, importActive:boolean, nodeOrEdgeBeingEdited:boolean}
* @returns {templateBeingEdited:boolean, importActive:boolean, nodeOrEdgeBeingEdited:boolean,
* lockedNodes:array, lockedEdges:array }
*/
DB.GetEditStatus = () => {
// If there are any 'template' open editors, then templateBeingEdited is true
Expand All @@ -1267,7 +1286,11 @@ DB.GetEditStatus = () => {
m_open_editors.length > 0 &&
(m_open_editors.includes(EDITORTYPE.NODE) ||
m_open_editors.includes(EDITORTYPE.EDGE));
return { templateBeingEdited, importActive, nodeOrEdgeBeingEdited };
return {
templateBeingEdited, importActive, nodeOrEdgeBeingEdited,
lockedNodes: [...m_locked_nodes.keys()],
lockedEdges: [...m_locked_edges.keys()]
};
};
/**
* Register a template, import, node or edge as being actively edited.
Expand Down
Loading