Merge branch 'master' into NIFI-1267

This commit is contained in:
joewitt 2015-12-07 20:38:44 -05:00
commit 9524f63766
3 changed files with 52 additions and 47 deletions

View File

@ -23,7 +23,6 @@
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>NiFiCanvas</servlet-name> <servlet-name>NiFiCanvas</servlet-name>
<!--<url-pattern>/token</url-pattern>-->
<url-pattern>/canvas</url-pattern> <url-pattern>/canvas</url-pattern>
</servlet-mapping> </servlet-mapping>

View File

@ -337,7 +337,7 @@ nf.CanvasToolbox = (function () {
// show the dialog // show the dialog
$('#new-processor-dialog').modal('show'); $('#new-processor-dialog').modal('show');
// setup the filter // setup the filter
$('#processor-type-filter').focus().off('keyup').on('keyup', function (e) { $('#processor-type-filter').focus().off('keyup').on('keyup', function (e) {
var code = e.keyCode ? e.keyCode : e.which; var code = e.keyCode ? e.keyCode : e.which;
@ -349,8 +349,8 @@ nf.CanvasToolbox = (function () {
}); });
// adjust the grid canvas now that its been rendered // adjust the grid canvas now that its been rendered
grid.setSelectedRows([0]);
grid.resizeCanvas(); grid.resizeCanvas();
grid.setSelectedRows([0]);
}; };
/** /**
@ -884,6 +884,17 @@ nf.CanvasToolbox = (function () {
addToolboxIcon(config.type.template, toolbox, 'template-icon', 'template-icon-hover', 'template-icon-drag', promptForTemplate); addToolboxIcon(config.type.template, toolbox, 'template-icon', 'template-icon-hover', 'template-icon-drag', promptForTemplate);
addToolboxIcon(config.type.label, toolbox, 'label-icon', 'label-icon-hover', 'label-icon-drag', createLabel); addToolboxIcon(config.type.label, toolbox, 'label-icon', 'label-icon-hover', 'label-icon-drag', createLabel);
// define the function for filtering the list
$('#processor-type-filter').focus(function () {
if ($(this).hasClass(config.styles.filterList)) {
$(this).removeClass(config.styles.filterList).val('');
}
}).blur(function () {
if ($(this).val() === '') {
$(this).addClass(config.styles.filterList).val(config.filterText);
}
}).addClass(config.styles.filterList).val(config.filterText);
// initialize the processor type table // initialize the processor type table
var processorTypesColumns = [ var processorTypesColumns = [
{id: 'type', name: 'Type', field: 'label', sortable: true, resizable: true}, {id: 'type', name: 'Type', field: 'label', sortable: true, resizable: true},
@ -931,16 +942,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);
}
} }
}); });
@ -1006,17 +1019,6 @@ nf.CanvasToolbox = (function () {
}); });
}).fail(nf.Common.handleAjaxError); }).fail(nf.Common.handleAjaxError);
// define the function for filtering the list
$('#processor-type-filter').focus(function () {
if ($(this).hasClass(config.styles.filterList)) {
$(this).removeClass(config.styles.filterList).val('');
}
}).blur(function () {
if ($(this).val() === '') {
$(this).addClass(config.styles.filterList).val(config.filterText);
}
}).addClass(config.styles.filterList).val(config.filterText);
// configure the new processor dialog // configure the new processor dialog
$('#new-processor-dialog').modal({ $('#new-processor-dialog').modal({
headerText: 'Add Processor', headerText: 'Add Processor',

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) {