Skip to content

Commit

Permalink
Merge pull request #817 from ICRAR/eagle-1193
Browse files Browse the repository at this point in the history
Eagle 1193
  • Loading branch information
M-Wicenec authored Jan 23, 2025
2 parents fd09df9 + 4d899ff commit afe9cc4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/Daliuge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ export namespace Daliuge {
Dill = "dill",
Npy = "npy",
Base64 = "base64",
UTF8 = "utf-8"
UTF8 = "utf-8",
Path = "path"
}

export enum FieldType {
Expand Down
5 changes: 3 additions & 2 deletions src/ParameterTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,14 @@ export class ParameterTable {
// TODO: move to Eagle.ts?
// doesn't seem to depend on any ParameterTable state, only Eagle state
static getNodeLockedState = (field:Field) : boolean => {
const eagle: Eagle = Eagle.getInstance();

// this handles a special case where EAGLE is displaying the "Graph Configuration Attributes Table"
// all the field names shown in that table should be locked (readonly)
if (Setting.find(Setting.BOTTOM_WINDOW_MODE).value() === Eagle.BottomWindowMode.ConfigParameterTable){
return true;
return eagle.logicalGraph().findNodeByIdQuiet(field?.getNodeId()).isLocked()
}

const eagle: Eagle = Eagle.getInstance();
if(Eagle.selectedLocation() === Eagle.FileType.Palette){
if(eagle.selectedNode() === null){
return false
Expand Down
2 changes: 1 addition & 1 deletion templates/config_parameter_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ <h5 class="bottomWindowHeader">
<input class="tableParameter" type="string" data-bind="value: $root.logicalGraph().findNodeByIdQuiet(nodeId())?.getName(), disabled: true, eagleTooltip: $root.logicalGraph().findNodeByIdQuiet(nodeId())?.getDescription()">
</td>
<td class='columnCell column_DisplayText' data-bind=" css: { selectedTableParameter: ParameterTable.isSelected('displayText', $data) }, eagleTooltip:description, click: function(){Utils.showField($root, nodeId(), $data)}">
<input class="tableParameter selectionTargets tableFieldDisplayName" placeholder="New Parameter" type="string" data-bind="value: displayText, disabled: ParameterTable.getNodeLockedState($data), valueUpdate: ['afterkeydown', 'input'], click: function(event, data){ParameterTable.select($data.displayText(), 'displayText', $data, $index())}, event:{blur: function(){$(event.target).removeClass('newEmpty')} ,keyup: function(event, data){ParameterTable.select($data.displayText(), 'displayText', $data, $index())}}">
<input class="tableParameter selectionTargets tableFieldDisplayName" placeholder="New Parameter" type="string" data-bind="value: displayText, disabled: true, valueUpdate: ['afterkeydown', 'input'], click: function(event, data){ParameterTable.select($data.displayText(), 'displayText', $data, $index())}, event:{blur: function(){$(event.target).removeClass('newEmpty')} ,keyup: function(event, data){ParameterTable.select($data.displayText(), 'displayText', $data, $index())}}">
</td>

<!-- value fields -->
Expand Down
1 change: 0 additions & 1 deletion templates/node_parameter_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ <h5 class="bottomWindowHeader">Fields Table: </h5>
<!-- ko if: ParameterTable.getActiveColumnVisibility().displayText() -->
<td class='columnCell column_DisplayText' data-bind=" css: { selectedTableParameter: ParameterTable.isSelected('displayText', $data) }, eagleTooltip:description, click: function(){Utils.showField($root, nodeId(), $data)}">
<input class="tableParameter selectionTargets tableFieldDisplayName" placeholder="New Parameter" type="string" data-bind="value: displayText, disabled: ParameterTable.getNodeLockedState($data), valueUpdate: ['afterkeydown', 'input'], click: function(event, data){ParameterTable.select($data.displayText(), 'displayText', $data, $index())}, event:{blur: function(){$(event.target).removeClass('newEmpty')} ,keyup: function(event, data){ParameterTable.select($data.displayText(), 'displayText', $data, $index())}}">

<!-- ko if: Eagle.selectedLocation() === Eagle.FileType.Graph -->
<!-- ko ifnot: $root.logicalGraph().getActiveGraphConfig()?.hasField($data) -->
<button class="iconHoverEffect" data-bind="click: function(){ParameterTable.requestAddField($data)}, disabled: !Setting.findValue(Setting.ALLOW_MODIFY_GRAPH_CONFIG) || $root.getCurrentParamValueReadonly($data), eagleTooltip:'Add Field to Graph Config', style:{'visibility':'hidden'}, clickBubble:false">
Expand Down

0 comments on commit afe9cc4

Please sign in to comment.