This is an automated email from the ASF dual-hosted git repository.
mcgilman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/master by this push:
new 95fd148 [NIFI-6292] update variables slickgrid table row ids
95fd148 is described below
commit 95fd14866e263059c3a25bead5baa9c4c5cc368f
Author: Scott Aslan <[email protected]>
AuthorDate: Fri May 10 18:30:34 2019 -0400
[NIFI-6292] update variables slickgrid table row ids
This closes #3469
---
.../src/main/webapp/js/nf/canvas/nf-variable-registry.js | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js
index ad51d3f..120506e 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js
@@ -1077,6 +1077,8 @@
return false;
};
+ var variablesCount = 0;
+
/**
* Loads the specified variable registry.
*
@@ -1085,7 +1087,6 @@
*/
var loadVariables = function (variableRegistry, variableToSelect) {
if (nfCommon.isDefinedAndNotNull(variableRegistry)) {
- var count = 0;
var index = 0;
var variableGrid =
$('#variable-registry-table').data('gridInstance');
@@ -1098,7 +1099,7 @@
$.each(variableRegistry.variables, function (i, variableEntity) {
var variable = variableEntity.variable;
variables.push({
- id: count++,
+ id: variablesCount++,
hidden: false,
canWrite: variableEntity.canWrite,
name: variable.name,
@@ -1452,9 +1453,8 @@
if (matchingVariable === null) {
// add a row for the new variable
- var id = variableData.getLength();
variableData.addItem({
- id: id,
+ id: variablesCount,
hidden: false,
canWrite: true,
name: variableName,
@@ -1476,9 +1476,10 @@
variableData.reSort();
// select the new variable row
- var row = variableData.getRowById(id);
+ var row = variableData.getRowById(variablesCount);
variableGrid.setActiveCell(row,
variableGrid.getColumnIndex('value'));
variableGrid.editActiveCell();
+ variablesCount++
} else {
// if this row is currently hidden, clear the value and show it
if (matchingVariable.hidden === true) {
@@ -1654,4 +1655,4 @@
return showVariables(processGroupId);
}
};
-}));
\ No newline at end of file
+}));