NIFI-1268: - In some environments it appears as though the row selection event is triggering when there is no items in the table. Verifying the item was found prior to continuing.

Signed-off-by: Aldrin Piri <aldrin@apache.org>
This commit is contained in:
Matt Gilman 2015-12-07 17:40:20 -05:00 committed by Aldrin Piri
parent 46623c2bf3
commit ee7eeb0493
2 changed files with 39 additions and 33 deletions

View File

@ -931,16 +931,18 @@ nf.CanvasToolbox = (function () {
var processorType = processorTypesGrid.getDataItem(processorTypeIndex); var processorType = processorTypesGrid.getDataItem(processorTypeIndex);
// set the processor type description // set the processor type description
if (nf.Common.isBlank(processorType.description)) { if (nf.Common.isDefinedAndNotNull(processorType)) {
$('#processor-type-description').attr('title', '').html('<span class="unset">No description specified</span>'); if (nf.Common.isBlank(processorType.description)) {
} else { $('#processor-type-description').attr('title', '').html('<span class="unset">No description specified</span>');
$('#processor-type-description').html(processorType.description).ellipsis(); } else {
} $('#processor-type-description').html(processorType.description).ellipsis();
}
// populate the dom // populate the dom
$('#processor-type-name').text(processorType.label).ellipsis(); $('#processor-type-name').text(processorType.label).ellipsis();
$('#selected-processor-name').text(processorType.label); $('#selected-processor-name').text(processorType.label);
$('#selected-processor-type').text(processorType.type); $('#selected-processor-type').text(processorType.type);
}
} }
}); });

View File

@ -414,19 +414,21 @@ nf.Settings = (function () {
var controllerServiceType = controllerServiceTypesGrid.getDataItem(controllerServiceTypeIndex); var controllerServiceType = controllerServiceTypesGrid.getDataItem(controllerServiceTypeIndex);
// set the controller service type description // set the controller service type description
if (nf.Common.isBlank(controllerServiceType.description)) { if (nf.Common.isDefinedAndNotNull(controllerServiceType)) {
$('#controller-service-type-description').attr('title', '').html('<span class="unset">No description specified</span>'); if (nf.Common.isBlank(controllerServiceType.description)) {
} else { $('#controller-service-type-description').attr('title', '').html('<span class="unset">No description specified</span>');
$('#controller-service-type-description').html(controllerServiceType.description).ellipsis(); } else {
$('#controller-service-type-description').html(controllerServiceType.description).ellipsis();
}
// populate the dom
$('#controller-service-type-name').text(controllerServiceType.label).ellipsis();
$('#selected-controller-service-name').text(controllerServiceType.label);
$('#selected-controller-service-type').text(controllerServiceType.type);
// show the selected controller service
$('#controller-service-description-container').show();
} }
// populate the dom
$('#controller-service-type-name').text(controllerServiceType.label).ellipsis();
$('#selected-controller-service-name').text(controllerServiceType.label);
$('#selected-controller-service-type').text(controllerServiceType.type);
// show the selected controller service
$('#controller-service-description-container').show();
} }
}); });
controllerServiceTypesGrid.onDblClick.subscribe(function (e, args) { controllerServiceTypesGrid.onDblClick.subscribe(function (e, args) {
@ -1110,19 +1112,21 @@ nf.Settings = (function () {
var reportingTaskType = reportingTaskTypesGrid.getDataItem(reportingTaskTypeIndex); var reportingTaskType = reportingTaskTypesGrid.getDataItem(reportingTaskTypeIndex);
// set the reporting task type description // set the reporting task type description
if (nf.Common.isBlank(reportingTaskType.description)) { if (nf.Common.isDefinedAndNotNull(reportingTaskType)) {
$('#reporting-task-type-description').attr('title', '').html('<span class="unset">No description specified</span>'); if (nf.Common.isBlank(reportingTaskType.description)) {
} else { $('#reporting-task-type-description').attr('title', '').html('<span class="unset">No description specified</span>');
$('#reporting-task-type-description').html(reportingTaskType.description).ellipsis(); } else {
$('#reporting-task-type-description').html(reportingTaskType.description).ellipsis();
}
// populate the dom
$('#reporting-task-type-name').text(reportingTaskType.label).ellipsis();
$('#selected-reporting-task-name').text(reportingTaskType.label);
$('#selected-reporting-task-type').text(reportingTaskType.type);
// show the selected reporting task
$('#reporting-task-description-container').show();
} }
// populate the dom
$('#reporting-task-type-name').text(reportingTaskType.label).ellipsis();
$('#selected-reporting-task-name').text(reportingTaskType.label);
$('#selected-reporting-task-type').text(reportingTaskType.type);
// show the selected reporting task
$('#reporting-task-description-container').show();
} }
}); });
reportingTaskTypesGrid.onDblClick.subscribe(function (e, args) { reportingTaskTypesGrid.onDblClick.subscribe(function (e, args) {