mirror of https://github.com/apache/nifi.git
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:
parent
ee7eeb0493
commit
08d0f3e596
|
@ -23,7 +23,6 @@
|
|||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>NiFiCanvas</servlet-name>
|
||||
<!--<url-pattern>/token</url-pattern>-->
|
||||
<url-pattern>/canvas</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
|
|
@ -337,7 +337,7 @@ nf.CanvasToolbox = (function () {
|
|||
|
||||
// show the dialog
|
||||
$('#new-processor-dialog').modal('show');
|
||||
|
||||
|
||||
// setup the filter
|
||||
$('#processor-type-filter').focus().off('keyup').on('keyup', function (e) {
|
||||
var code = e.keyCode ? e.keyCode : e.which;
|
||||
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue