improve tooltips in parameter providers
* clean up tooltips in parameter providers
* more clean up
This closes
// load the controller services
var controllerServicesUri = config.urls.api + '/flow/controller/controller-services';
- var groupCount = 0;
- var parameterCount = 0;
-
var SENSITIVE = 'SENSITIVE';
var NON_SENSITIVE = 'NON_SENSITIVE';
var updatedParameterProviderEntity = _.cloneDeep(response);
currentParameterProviderEntity = response;
- groupCount = 0;
- parameterCount = 0;
-
// populate the fetch parameters dialog
$('#fetch-parameters-id').text(updatedParameterProviderEntity.id);
$('#fetch-parameters-name').text(nfCommon.getComponentName(updatedParameterProviderEntity));
var loadParameterGroups = function (parameterProviderGroupEntity) {
// providedGroups will be an array of groups
if (nfCommon.isDefinedAndNotNull(parameterProviderGroupEntity)) {
+ var groupCount = 0;
var groupsGrid = $('#parameter-groups-table').data('gridInstance');
var groupsData = groupsGrid.getData();
selectableParametersGrid.setSortColumn('name', true);
selectableParametersGrid.onSort.subscribe(function (e, args) {
+ // clean up tooltips
+ nfCommon.cleanUpTooltips($('#selectable-parameters-table'), 'div.fa-asterisk');
+ nfCommon.cleanUpTooltips($('#selectable-parameters-table'), 'div.fa-hashtag');
+
sortParameters({
columnId: args.sortCol.id,
sortAsc: args.sortAsc
selectableParametersTable.data('gridInstance', selectableParametersGrid).on('mouseenter', 'div.slick-cell', function (e) {
var asteriskIconElement = $(this).find('div.fa-asterisk');
+ if (asteriskIconElement.length && !asteriskIconElement.data('qtip')) {
var asteriskTooltipContent = '';
+
if (asteriskIconElement.hasClass('new')) {
asteriskTooltipContent = nfCommon.escapeHtml('Newly discovered parameter.');
} else if (asteriskIconElement.hasClass('changed')) {
{
content: asteriskTooltipContent
}));
+ }
var hashtagIconElement = $(this).find('div.fa-hashtag');
+ if (hashtagIconElement.length && !hashtagIconElement.data('qtip')) {
var hashtagTooltipContent = nfCommon.escapeHtml('This parameter is currently referenced by a property. The sensitivity cannot be changed.');
// initialize tooltip
{
content: hashtagTooltipContent
}));
+ }
});
/**
groupsGrid.registerPlugin(new Slick.AutoTooltips());
groupsGrid.setSortColumn('name', true);
groupsGrid.onSort.subscribe(function (e, args) {
+ // clean up tooltips
+ nfCommon.cleanUpTooltips($('#parameter-groups-table'), 'div.fa-star');
+
sortParameters({
columnId: args.sortCol.id,
sortAsc: args.sortAsc
// hold onto an instance of the grid and create parameter context tooltip
parameterGroupsTable.data('gridInstance', groupsGrid).on('mouseenter', 'div.slick-cell', function (e) {
var starIconElement = $(this).find('div.fa-star');
+ if (starIconElement.length && !starIconElement.data('qtip')) {
var tooltipContent = nfCommon.escapeHtml('Synced to a parameter context.');
// initialize tooltip
{
content: tooltipContent
}));
+ }
});
};
// end initParameterGroupTable
// clean up tooltips
nfCommon.cleanUpTooltips($('#parameter-groups-table'), 'div.fa-star');
+ nfCommon.cleanUpTooltips($('#selectable-parameters-table'), 'div.fa-asterisk');
+ nfCommon.cleanUpTooltips($('#selectable-parameters-table'), 'div.fa-hashtag');
// reset progress
$('div.parameter-contexts-to-update').removeClass('ajax-loading ajax-complete ajax-error');
