NIFI-956: - Initialize the filter controls prior to the new processor table. Because of this, items were being incorrectly filtered on load. - Clean up in web.xml.

Signed-off-by: Aldrin Piri <aldrin@apache.org>
This commit is contained in:
Matt Gilman 2015-12-07 19:43:56 -05:00 committed by Aldrin Piri
parent ee7eeb0493
commit 08d0f3e596
2 changed files with 13 additions and 14 deletions

View File

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

View File

@ -349,8 +349,8 @@ nf.CanvasToolbox = (function () {
});
// adjust the grid canvas now that its been rendered
grid.setSelectedRows([0]);
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.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
var processorTypesColumns = [
{id: 'type', name: 'Type', field: 'label', sortable: true, resizable: true},
@ -1008,17 +1019,6 @@ nf.CanvasToolbox = (function () {
});
}).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
$('#new-processor-dialog').modal({
headerText: 'Add Processor',