This commit is contained in:
Mark Payne 2015-01-07 14:33:21 -05:00
commit c48745817c
10 changed files with 131 additions and 39 deletions

View File

@ -82,16 +82,10 @@
log events to the root logger. These messages are only sent to the log events to the root logger. These messages are only sent to the
user-log appender. user-log appender.
--> -->
<logger name="org.apache.nifi.security.authentication.NiFiAuthenticationEntryPoint" level="INFO" additivity="false"> <logger name="org.apache.nifi.web.security" level="INFO" additivity="false">
<appender-ref ref="USER_FILE"/> <appender-ref ref="USER_FILE"/>
</logger> </logger>
<logger name="org.apache.nifi.security.authorization" level="INFO" additivity="false"> <logger name="org.apache.nifi.web.api.config" level="INFO" additivity="false">
<appender-ref ref="USER_FILE"/>
</logger>
<logger name="org.apache.nifi.security.x509" level="INFO" additivity="false">
<appender-ref ref="USER_FILE"/>
</logger>
<logger name="org.apache.nifi.web.api.config.AccessDeniedExceptionMapper" level="INFO" additivity="false">
<appender-ref ref="USER_FILE"/> <appender-ref ref="USER_FILE"/>
</logger> </logger>
<logger name="org.apache.nifi.authorization" level="INFO" additivity="false"> <logger name="org.apache.nifi.authorization" level="INFO" additivity="false">
@ -100,9 +94,6 @@
<logger name="org.apache.nifi.cluster.authorization" level="INFO" additivity="false"> <logger name="org.apache.nifi.cluster.authorization" level="INFO" additivity="false">
<appender-ref ref="USER_FILE"/> <appender-ref ref="USER_FILE"/>
</logger> </logger>
<logger name="org.apache.nifi.web.api.config" level="INFO" additivity="false">
<appender-ref ref="USER_FILE"/>
</logger>
<logger name="org.apache.nifi.web.filter.RequestLogger" level="INFO" additivity="false"> <logger name="org.apache.nifi.web.filter.RequestLogger" level="INFO" additivity="false">
<appender-ref ref="USER_FILE"/> <appender-ref ref="USER_FILE"/>
</logger> </logger>

View File

@ -102,6 +102,10 @@
<div type="text" id="scheduling-strategy-combo"></div> <div type="text" id="scheduling-strategy-combo"></div>
</div> </div>
</div> </div>
<div id="event-driven-warning" class="hidden">
<div id="event-driven-warning-icon"></div>
This strategy is experimental
</div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<div id="timer-driven-options" class="setting"> <div id="timer-driven-options" class="setting">

View File

@ -111,6 +111,21 @@ div.processor-enabled-container {
line-height: 18px; line-height: 18px;
} }
#event-driven-warning {
padding-top: 22px;
color: #f00;
}
#event-driven-warning-icon {
float: left;
margin-top: -2px;
margin-right: 5px;
margin-left: 5px;
width: 18px;
height: 16px;
background-image: url(../images/iconAlert.png);
}
#auto-terminate-relationship-names { #auto-terminate-relationship-names {
border: 0 solid #CCCCCC; border: 0 solid #CCCCCC;
height: 280px; height: 280px;

View File

@ -46,6 +46,13 @@
* The optionClass option supports specifying a class to apply to the * The optionClass option supports specifying a class to apply to the
* option element. * option element.
*/ */
/**
* jQuery plugin for a NiFi style combo box.
*
* @param {type} $
* @returns {undefined}
*/
(function ($) { (function ($) {
var isUndefined = function (obj) { var isUndefined = function (obj) {
@ -93,7 +100,7 @@
// ensure we found the selected option // ensure we found the selected option
if (isDefinedAndNotNull(selectedOption)) { if (isDefinedAndNotNull(selectedOption)) {
$(comboText).removeClass('selected-disabled-option').attr('title', selectedOption.text).text(selectedOption.text).data('text', selectedOption.text).width(combo.outerWidth() - 25); comboText.removeClass('selected-disabled-option').attr('title', selectedOption.text).text(selectedOption.text).data('text', selectedOption.text).width(combo.outerWidth() - 25);
// if the selected option is disabled show it // if the selected option is disabled show it
if (selectedOption.disabled === true) { if (selectedOption.disabled === true) {
@ -112,6 +119,7 @@
}; };
var methods = { var methods = {
/** /**
* Initializes the combo box. * Initializes the combo box.
* *
@ -130,24 +138,24 @@
combo.empty().unbind().data('options', options); combo.empty().unbind().data('options', options);
// add a div to hold the text // add a div to hold the text
var comboText = $('<div class="combo-text"></div>').appendTo(combo); $('<div class="combo-text"></div>').appendTo(combo);
// add hover effect and handle a combo click // add hover effect and handle a combo click
combo.addClass('button-normal pointer combo').hover(function () { combo.addClass('button-normal pointer combo').hover(function () {
$(combo).removeClass('button-normal').addClass('button-over'); combo.removeClass('button-normal').addClass('button-over');
}, function () { }, function () {
$(combo).removeClass('button-over').addClass('button-normal'); combo.removeClass('button-over').addClass('button-normal');
}).click(function (event) { }).click(function (event) {
// determine the position of the element in question // determine the position of the element in question
var position = $(combo).offset(); var position = combo.offset();
// create the combo box options beneath it // create the combo box options beneath it
var comboOptions = $('<div></div>').addClass('combo-options').css({ var comboOptions = $('<div></div>').addClass('combo-options').css({
'position': 'absolute', 'position': 'absolute',
'left': position.left + 'px', 'left': position.left + 'px',
'top': (position.top + $(combo).outerHeight() + 1) + 'px', 'top': (position.top + combo.outerHeight() + 1) + 'px',
'width': ($(combo).outerWidth() - 10) + 'px', 'width': (combo.outerWidth() - 10) + 'px',
'overflow-y': 'auto' 'overflow-y': 'auto'
}); });
@ -195,7 +203,7 @@
$('<img style="float: left; margin-left: 5px; margin-top: 3px;" src="images/iconInfo.png"></img>').appendTo(optionElement).qtip({ $('<img style="float: left; margin-left: 5px; margin-top: 3px;" src="images/iconInfo.png"></img>').appendTo(optionElement).qtip({
content: option.description, content: option.description,
style: { style: {
classes: 'ui-tooltip-tipped ui-tooltip-shadow' classes: 'nifi-tooltip'
}, },
show: { show: {
solo: true, solo: true,
@ -224,14 +232,26 @@
if (maxHeight > 0 && actualHeight > maxHeight) { if (maxHeight > 0 && actualHeight > maxHeight) {
offset += 20; offset += 20;
} }
comboOptionText.width($(combo).outerWidth() - offset); comboOptionText.width(combo.outerWidth() - offset);
}); });
// show the glass pane to catch the click events // show the glass pane to catch the click events
var comboGlassPane = $('<div class="combo-glass-pane"></div>').one('click', function () { var comboGlassPane = $('<div class="combo-glass-pane"></div>').one('click', function () {
if ($(comboOptions).length !== 0) { if (comboOptions.length !== 0) {
$(comboOptions).remove(); // clean up tooltips
comboOptions.find('img').each(function () {
var tip = $(this);
if (tip.data('qtip')) {
var api = tip.qtip('api');
api.destroy(true);
} }
});
// remove the options
comboOptions.remove();
}
// remove the glass pane
$(this).remove(); $(this).remove();
}); });
@ -254,6 +274,7 @@
} }
}); });
}, },
/** /**
* Returns the selected option of the first matching element. * Returns the selected option of the first matching element.
*/ */
@ -267,6 +288,7 @@
return value; return value;
}, },
/** /**
* Sets the selected option. * Sets the selected option.
* *

View File

@ -37,14 +37,14 @@ nf.ProcessorConfiguration = (function () {
strategies.push({ strategies.push({
text: 'Event driven', text: 'Event driven',
value: 'EVENT_DRIVEN', value: 'EVENT_DRIVEN',
description: 'Processor will be scheduled to run when triggered by an event (e.g. a FlowFile enters an incoming queue).' description: 'Processor will be scheduled to run when triggered by an event (e.g. a FlowFile enters an incoming queue). This scheduling strategy is experimental.'
}); });
} else if (processor.config['schedulingStrategy'] === 'EVENT_DRIVEN') { } else if (processor.config['schedulingStrategy'] === 'EVENT_DRIVEN') {
// the processor was once configured for event driven but no longer supports it // the processor was once configured for event driven but no longer supports it
strategies.push({ strategies.push({
text: 'Event driven', text: 'Event driven',
value: 'EVENT_DRIVEN', value: 'EVENT_DRIVEN',
description: 'Processor will be scheduled to run when triggered by an event (e.g. a FlowFile enters an incoming queue).', description: 'Processor will be scheduled to run when triggered by an event (e.g. a FlowFile enters an incoming queue). This scheduling strategy is experimental.',
disabled: true disabled: true
}); });
} }
@ -506,10 +506,15 @@ nf.ProcessorConfiguration = (function () {
select: function (selectedOption) { select: function (selectedOption) {
// show the appropriate panel // show the appropriate panel
if (selectedOption.value === 'EVENT_DRIVEN') { if (selectedOption.value === 'EVENT_DRIVEN') {
$('#event-driven-warning').show();
$('#timer-driven-options').hide(); $('#timer-driven-options').hide();
$('#event-driven-options').show(); $('#event-driven-options').show();
$('#cron-driven-options').hide(); $('#cron-driven-options').hide();
} else if (selectedOption.value === 'CRON_DRIVEN') { } else {
$('#event-driven-warning').hide();
if (selectedOption.value === 'CRON_DRIVEN') {
$('#timer-driven-options').hide(); $('#timer-driven-options').hide();
$('#event-driven-options').hide(); $('#event-driven-options').hide();
$('#cron-driven-options').show(); $('#cron-driven-options').show();
@ -519,6 +524,7 @@ nf.ProcessorConfiguration = (function () {
$('#cron-driven-options').hide(); $('#cron-driven-options').hide();
} }
} }
}
}); });
// initialize the concurrentTasks // initialize the concurrentTasks

View File

@ -553,7 +553,13 @@ nf.ProcessorPropertyTable = (function () {
* Clears the property table. * Clears the property table.
*/ */
clear: function () { clear: function () {
var propertyGrid = $('#processor-properties').data('gridInstance'); var propertyGridElement = $('#processor-properties');
// clean up any tooltips that may have been generated
nf.Common.cleanUpTooltips(propertyGridElement, 'img.icon-info');
// clear the data in the grid
var propertyGrid = propertyGridElement.data('gridInstance');
var propertyData = propertyGrid.getData(); var propertyData = propertyGrid.getData();
propertyData.setItems([]); propertyData.setItems([]);
} }

View File

@ -162,6 +162,11 @@ nf.RemoteProcessGroupPorts = (function () {
$('#remote-process-group-ports-name').text(''); $('#remote-process-group-ports-name').text('');
$('#remote-process-group-ports-url').text(''); $('#remote-process-group-ports-url').text('');
// clear any tooltips
var dialog = $('#remote-process-group-ports');
nf.Common.cleanUpTooltips(dialog, 'div.remote-port-removed');
nf.Common.cleanUpTooltips(dialog, 'img.concurrent-tasks-info');
// clear the input and output ports // clear the input and output ports
$('#remote-process-group-input-ports-container').empty(); $('#remote-process-group-input-ports-container').empty();
$('#remote-process-group-output-ports-container').empty(); $('#remote-process-group-output-ports-container').empty();

View File

@ -295,6 +295,22 @@ nf.Common = {
return $('#' + target).removeClass('unset blank').text(''); return $('#' + target).removeClass('unset blank').text('');
}, },
/**
* Cleans up any tooltips that have been created for the specified container.
*
* @param {jQuery} container
* @param {string} tooltipTarget
*/
cleanUpTooltips: function(container, tooltipTarget) {
container.find(tooltipTarget).each(function () {
var tip = $(this);
if (tip.data('qtip')) {
var api = tip.qtip('api');
api.destroy(true);
}
});
},
/** /**
* Formats the tooltip for the specified property. * Formats the tooltip for the specified property.
* *

View File

@ -230,8 +230,14 @@ nf.ProcessorDetails = (function () {
// empty the relationship list // empty the relationship list
$('#read-only-auto-terminate-relationship-names').css('border-width', '0').empty(); $('#read-only-auto-terminate-relationship-names').css('border-width', '0').empty();
// clear the grid // get the property grid element
var propertyGrid = $('#read-only-processor-properties').data('gridInstance'); var propertyGridElement = $('#read-only-processor-properties');
// clean up any tooltips that may have been generated
nf.Common.cleanUpTooltips(propertyGridElement, 'img.icon-info');
// clear the data in the grid
var propertyGrid = propertyGridElement.data('gridInstance');
var propertyData = propertyGrid.getData(); var propertyData = propertyGrid.getData();
propertyData.setItems([]); propertyData.setItems([]);

View File

@ -2040,19 +2040,40 @@ nf.SummaryTable = (function () {
var processGroupStatus = response.processGroupStatus; var processGroupStatus = response.processGroupStatus;
if (nf.Common.isDefinedAndNotNull(processGroupStatus)) { if (nf.Common.isDefinedAndNotNull(processGroupStatus)) {
var processorsGrid = $('#processor-summary-table').data('gridInstance'); // remove any tooltips from the processor table
var processorsGridElement = $('#processor-summary-table');
nf.Common.cleanUpTooltips(processorsGridElement, 'img.has-bulletins');
// get the processor grid/data
var processorsGrid = processorsGridElement.data('gridInstance');
var processorsData = processorsGrid.getData(); var processorsData = processorsGrid.getData();
// get the connections grid/data (do not render bulletins)
var connectionsGrid = $('#connection-summary-table').data('gridInstance'); var connectionsGrid = $('#connection-summary-table').data('gridInstance');
var connectionsData = connectionsGrid.getData(); var connectionsData = connectionsGrid.getData();
var inputPortsGrid = $('#input-port-summary-table').data('gridInstance'); // remove any tooltips from the input port table
var inputPortsGridElement = $('#input-port-summary-table');
nf.Common.cleanUpTooltips(inputPortsGridElement, 'img.has-bulletins');
// get the input ports grid/data
var inputPortsGrid = inputPortsGridElement.data('gridInstance');
var inputPortsData = inputPortsGrid.getData(); var inputPortsData = inputPortsGrid.getData();
var outputPortsGrid = $('#output-port-summary-table').data('gridInstance'); // remove any tooltips from the output port table
var outputPortsGridElement = $('#output-port-summary-table');
nf.Common.cleanUpTooltips(outputPortsGridElement, 'img.has-bulletins');
// get the output ports grid/data
var outputPortsGrid = outputPortsGridElement.data('gridInstance');
var outputPortsData = outputPortsGrid.getData(); var outputPortsData = outputPortsGrid.getData();
var remoteProcessGroupsGrid = $('#remote-process-group-summary-table').data('gridInstance'); // remove any tooltips from the remote process group table
var remoteProcessGroupsGridElement = $('#remote-process-group-summary-table');
nf.Common.cleanUpTooltips(remoteProcessGroupsGridElement, 'img.has-bulletins');
// get the remote process groups grid
var remoteProcessGroupsGrid = remoteProcessGroupsGridElement.data('gridInstance');
var remoteProcessGroupsData = remoteProcessGroupsGrid.getData(); var remoteProcessGroupsData = remoteProcessGroupsGrid.getData();
var processorItems = []; var processorItems = [];