" )
- .attr({
- id: id,
- role: "tooltip"
- })
- .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " +
- ( this.options.tooltipClass || "" ) );
- $( "
" )
- .addClass( "ui-tooltip-content" )
- .appendTo( tooltip );
- tooltip.appendTo( this.document[0].body );
- this.tooltips[ id ] = element;
- return tooltip;
- },
-
- _find: function( target ) {
- var id = target.data( "ui-tooltip-id" );
- return id ? $( "#" + id ) : $();
- },
-
- _removeTooltip: function( tooltip ) {
- tooltip.remove();
- delete this.tooltips[ tooltip.attr( "id" ) ];
- },
-
- _destroy: function() {
- var that = this;
-
- // close open tooltips
- $.each( this.tooltips, function( id, element ) {
- // Delegate to close method to handle common cleanup
- var event = $.Event( "blur" );
- event.target = event.currentTarget = element[0];
- that.close( event, true );
-
- // Remove immediately; destroying an open tooltip doesn't use the
- // hide animation
- $( "#" + id ).remove();
-
- // Restore the title
- if ( element.data( "ui-tooltip-title" ) ) {
- element.attr( "title", element.data( "ui-tooltip-title" ) );
- element.removeData( "ui-tooltip-title" );
- }
- });
- }
-});
-
-}( jQuery ) );
-(function($, undefined) {
-
-var dataSpace = "ui-effects-";
-
-$.effects = {
- effect: {}
-};
-
-/*!
- * jQuery Color Animations v2.1.2
- * https://github.com/jquery/jquery-color
- *
- * Copyright 2013 jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * Date: Wed Jan 16 08:47:09 2013 -0600
- */
-(function( jQuery, undefined ) {
-
- var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
-
- // plusequals test for += 100 -= 100
- rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
- // a set of RE's that can match strings and generate color tuples.
- stringParsers = [{
- re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ],
- execResult[ 3 ],
- execResult[ 4 ]
- ];
- }
- }, {
- re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ] * 2.55,
- execResult[ 2 ] * 2.55,
- execResult[ 3 ] * 2.55,
- execResult[ 4 ]
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ], 16 )
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
- ];
- }
- }, {
- re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- space: "hsla",
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ] / 100,
- execResult[ 3 ] / 100,
- execResult[ 4 ]
- ];
- }
- }],
-
- // jQuery.Color( )
- color = jQuery.Color = function( color, green, blue, alpha ) {
- return new jQuery.Color.fn.parse( color, green, blue, alpha );
- },
- spaces = {
- rgba: {
- props: {
- red: {
- idx: 0,
- type: "byte"
- },
- green: {
- idx: 1,
- type: "byte"
- },
- blue: {
- idx: 2,
- type: "byte"
- }
- }
- },
-
- hsla: {
- props: {
- hue: {
- idx: 0,
- type: "degrees"
- },
- saturation: {
- idx: 1,
- type: "percent"
- },
- lightness: {
- idx: 2,
- type: "percent"
- }
- }
- }
- },
- propTypes = {
- "byte": {
- floor: true,
- max: 255
- },
- "percent": {
- max: 1
- },
- "degrees": {
- mod: 360,
- floor: true
- }
- },
- support = color.support = {},
-
- // element for support tests
- supportElem = jQuery( "
" )[ 0 ],
-
- // colors = jQuery.Color.names
- colors,
-
- // local aliases of functions called often
- each = jQuery.each;
-
-// determine rgba support immediately
-supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
-support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
-
-// define cache name and alpha properties
-// for rgba and hsla spaces
-each( spaces, function( spaceName, space ) {
- space.cache = "_" + spaceName;
- space.props.alpha = {
- idx: 3,
- type: "percent",
- def: 1
- };
-});
-
-function clamp( value, prop, allowEmpty ) {
- var type = propTypes[ prop.type ] || {};
-
- if ( value == null ) {
- return (allowEmpty || !prop.def) ? null : prop.def;
- }
-
- // ~~ is an short way of doing floor for positive numbers
- value = type.floor ? ~~value : parseFloat( value );
-
- // IE will pass in empty strings as value for alpha,
- // which will hit this case
- if ( isNaN( value ) ) {
- return prop.def;
- }
-
- if ( type.mod ) {
- // we add mod before modding to make sure that negatives values
- // get converted properly: -10 -> 350
- return (value + type.mod) % type.mod;
- }
-
- // for now all property types without mod have min and max
- return 0 > value ? 0 : type.max < value ? type.max : value;
-}
-
-function stringParse( string ) {
- var inst = color(),
- rgba = inst._rgba = [];
-
- string = string.toLowerCase();
-
- each( stringParsers, function( i, parser ) {
- var parsed,
- match = parser.re.exec( string ),
- values = match && parser.parse( match ),
- spaceName = parser.space || "rgba";
-
- if ( values ) {
- parsed = inst[ spaceName ]( values );
-
- // if this was an rgba parse the assignment might happen twice
- // oh well....
- inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
- rgba = inst._rgba = parsed._rgba;
-
- // exit each( stringParsers ) here because we matched
- return false;
- }
- });
-
- // Found a stringParser that handled it
- if ( rgba.length ) {
-
- // if this came from a parsed string, force "transparent" when alpha is 0
- // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
- if ( rgba.join() === "0,0,0,0" ) {
- jQuery.extend( rgba, colors.transparent );
- }
- return inst;
- }
-
- // named colors
- return colors[ string ];
-}
-
-color.fn = jQuery.extend( color.prototype, {
- parse: function( red, green, blue, alpha ) {
- if ( red === undefined ) {
- this._rgba = [ null, null, null, null ];
- return this;
- }
- if ( red.jquery || red.nodeType ) {
- red = jQuery( red ).css( green );
- green = undefined;
- }
-
- var inst = this,
- type = jQuery.type( red ),
- rgba = this._rgba = [];
-
- // more than 1 argument specified - assume ( red, green, blue, alpha )
- if ( green !== undefined ) {
- red = [ red, green, blue, alpha ];
- type = "array";
- }
-
- if ( type === "string" ) {
- return this.parse( stringParse( red ) || colors._default );
- }
-
- if ( type === "array" ) {
- each( spaces.rgba.props, function( key, prop ) {
- rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
- });
- return this;
- }
-
- if ( type === "object" ) {
- if ( red instanceof color ) {
- each( spaces, function( spaceName, space ) {
- if ( red[ space.cache ] ) {
- inst[ space.cache ] = red[ space.cache ].slice();
- }
- });
- } else {
- each( spaces, function( spaceName, space ) {
- var cache = space.cache;
- each( space.props, function( key, prop ) {
-
- // if the cache doesn't exist, and we know how to convert
- if ( !inst[ cache ] && space.to ) {
-
- // if the value was null, we don't need to copy it
- // if the key was alpha, we don't need to copy it either
- if ( key === "alpha" || red[ key ] == null ) {
- return;
- }
- inst[ cache ] = space.to( inst._rgba );
- }
-
- // this is the only case where we allow nulls for ALL properties.
- // call clamp with alwaysAllowEmpty
- inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
- });
-
- // everything defined but alpha?
- if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
- // use the default of 1
- inst[ cache ][ 3 ] = 1;
- if ( space.from ) {
- inst._rgba = space.from( inst[ cache ] );
- }
- }
- });
- }
- return this;
- }
- },
- is: function( compare ) {
- var is = color( compare ),
- same = true,
- inst = this;
-
- each( spaces, function( _, space ) {
- var localCache,
- isCache = is[ space.cache ];
- if (isCache) {
- localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
- each( space.props, function( _, prop ) {
- if ( isCache[ prop.idx ] != null ) {
- same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
- return same;
- }
- });
- }
- return same;
- });
- return same;
- },
- _space: function() {
- var used = [],
- inst = this;
- each( spaces, function( spaceName, space ) {
- if ( inst[ space.cache ] ) {
- used.push( spaceName );
- }
- });
- return used.pop();
- },
- transition: function( other, distance ) {
- var end = color( other ),
- spaceName = end._space(),
- space = spaces[ spaceName ],
- startColor = this.alpha() === 0 ? color( "transparent" ) : this,
- start = startColor[ space.cache ] || space.to( startColor._rgba ),
- result = start.slice();
-
- end = end[ space.cache ];
- each( space.props, function( key, prop ) {
- var index = prop.idx,
- startValue = start[ index ],
- endValue = end[ index ],
- type = propTypes[ prop.type ] || {};
-
- // if null, don't override start value
- if ( endValue === null ) {
- return;
- }
- // if null - use end
- if ( startValue === null ) {
- result[ index ] = endValue;
- } else {
- if ( type.mod ) {
- if ( endValue - startValue > type.mod / 2 ) {
- startValue += type.mod;
- } else if ( startValue - endValue > type.mod / 2 ) {
- startValue -= type.mod;
- }
- }
- result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
- }
- });
- return this[ spaceName ]( result );
- },
- blend: function( opaque ) {
- // if we are already opaque - return ourself
- if ( this._rgba[ 3 ] === 1 ) {
- return this;
- }
-
- var rgb = this._rgba.slice(),
- a = rgb.pop(),
- blend = color( opaque )._rgba;
-
- return color( jQuery.map( rgb, function( v, i ) {
- return ( 1 - a ) * blend[ i ] + a * v;
- }));
- },
- toRgbaString: function() {
- var prefix = "rgba(",
- rgba = jQuery.map( this._rgba, function( v, i ) {
- return v == null ? ( i > 2 ? 1 : 0 ) : v;
- });
-
- if ( rgba[ 3 ] === 1 ) {
- rgba.pop();
- prefix = "rgb(";
- }
-
- return prefix + rgba.join() + ")";
- },
- toHslaString: function() {
- var prefix = "hsla(",
- hsla = jQuery.map( this.hsla(), function( v, i ) {
- if ( v == null ) {
- v = i > 2 ? 1 : 0;
- }
-
- // catch 1 and 2
- if ( i && i < 3 ) {
- v = Math.round( v * 100 ) + "%";
- }
- return v;
- });
-
- if ( hsla[ 3 ] === 1 ) {
- hsla.pop();
- prefix = "hsl(";
- }
- return prefix + hsla.join() + ")";
- },
- toHexString: function( includeAlpha ) {
- var rgba = this._rgba.slice(),
- alpha = rgba.pop();
-
- if ( includeAlpha ) {
- rgba.push( ~~( alpha * 255 ) );
- }
-
- return "#" + jQuery.map( rgba, function( v ) {
-
- // default to 0 when nulls exist
- v = ( v || 0 ).toString( 16 );
- return v.length === 1 ? "0" + v : v;
- }).join("");
- },
- toString: function() {
- return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
- }
-});
-color.fn.parse.prototype = color.fn;
-
-// hsla conversions adapted from:
-// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
-
-function hue2rgb( p, q, h ) {
- h = ( h + 1 ) % 1;
- if ( h * 6 < 1 ) {
- return p + (q - p) * h * 6;
- }
- if ( h * 2 < 1) {
- return q;
- }
- if ( h * 3 < 2 ) {
- return p + (q - p) * ((2/3) - h) * 6;
- }
- return p;
-}
-
-spaces.hsla.to = function ( rgba ) {
- if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
- return [ null, null, null, rgba[ 3 ] ];
- }
- var r = rgba[ 0 ] / 255,
- g = rgba[ 1 ] / 255,
- b = rgba[ 2 ] / 255,
- a = rgba[ 3 ],
- max = Math.max( r, g, b ),
- min = Math.min( r, g, b ),
- diff = max - min,
- add = max + min,
- l = add * 0.5,
- h, s;
-
- if ( min === max ) {
- h = 0;
- } else if ( r === max ) {
- h = ( 60 * ( g - b ) / diff ) + 360;
- } else if ( g === max ) {
- h = ( 60 * ( b - r ) / diff ) + 120;
- } else {
- h = ( 60 * ( r - g ) / diff ) + 240;
- }
-
- // chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
- // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
- if ( diff === 0 ) {
- s = 0;
- } else if ( l <= 0.5 ) {
- s = diff / add;
- } else {
- s = diff / ( 2 - add );
- }
- return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
-};
-
-spaces.hsla.from = function ( hsla ) {
- if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
- return [ null, null, null, hsla[ 3 ] ];
- }
- var h = hsla[ 0 ] / 360,
- s = hsla[ 1 ],
- l = hsla[ 2 ],
- a = hsla[ 3 ],
- q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
- p = 2 * l - q;
-
- return [
- Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
- Math.round( hue2rgb( p, q, h ) * 255 ),
- Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
- a
- ];
-};
-
-
-each( spaces, function( spaceName, space ) {
- var props = space.props,
- cache = space.cache,
- to = space.to,
- from = space.from;
-
- // makes rgba() and hsla()
- color.fn[ spaceName ] = function( value ) {
-
- // generate a cache for this space if it doesn't exist
- if ( to && !this[ cache ] ) {
- this[ cache ] = to( this._rgba );
- }
- if ( value === undefined ) {
- return this[ cache ].slice();
- }
-
- var ret,
- type = jQuery.type( value ),
- arr = ( type === "array" || type === "object" ) ? value : arguments,
- local = this[ cache ].slice();
-
- each( props, function( key, prop ) {
- var val = arr[ type === "object" ? key : prop.idx ];
- if ( val == null ) {
- val = local[ prop.idx ];
- }
- local[ prop.idx ] = clamp( val, prop );
- });
-
- if ( from ) {
- ret = color( from( local ) );
- ret[ cache ] = local;
- return ret;
- } else {
- return color( local );
- }
- };
-
- // makes red() green() blue() alpha() hue() saturation() lightness()
- each( props, function( key, prop ) {
- // alpha is included in more than one space
- if ( color.fn[ key ] ) {
- return;
- }
- color.fn[ key ] = function( value ) {
- var vtype = jQuery.type( value ),
- fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
- local = this[ fn ](),
- cur = local[ prop.idx ],
- match;
-
- if ( vtype === "undefined" ) {
- return cur;
- }
-
- if ( vtype === "function" ) {
- value = value.call( this, cur );
- vtype = jQuery.type( value );
- }
- if ( value == null && prop.empty ) {
- return this;
- }
- if ( vtype === "string" ) {
- match = rplusequals.exec( value );
- if ( match ) {
- value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
- }
- }
- local[ prop.idx ] = value;
- return this[ fn ]( local );
- };
- });
-});
-
-// add cssHook and .fx.step function for each named hook.
-// accept a space separated string of properties
-color.hook = function( hook ) {
- var hooks = hook.split( " " );
- each( hooks, function( i, hook ) {
- jQuery.cssHooks[ hook ] = {
- set: function( elem, value ) {
- var parsed, curElem,
- backgroundColor = "";
-
- if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
- value = color( parsed || value );
- if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
- curElem = hook === "backgroundColor" ? elem.parentNode : elem;
- while (
- (backgroundColor === "" || backgroundColor === "transparent") &&
- curElem && curElem.style
- ) {
- try {
- backgroundColor = jQuery.css( curElem, "backgroundColor" );
- curElem = curElem.parentNode;
- } catch ( e ) {
- }
- }
-
- value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
- backgroundColor :
- "_default" );
- }
-
- value = value.toRgbaString();
- }
- try {
- elem.style[ hook ] = value;
- } catch( e ) {
- // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
- }
- }
- };
- jQuery.fx.step[ hook ] = function( fx ) {
- if ( !fx.colorInit ) {
- fx.start = color( fx.elem, hook );
- fx.end = color( fx.end );
- fx.colorInit = true;
- }
- jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
- };
- });
-
-};
-
-color.hook( stepHooks );
-
-jQuery.cssHooks.borderColor = {
- expand: function( value ) {
- var expanded = {};
-
- each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
- expanded[ "border" + part + "Color" ] = value;
- });
- return expanded;
- }
-};
-
-// Basic color names only.
-// Usage of any of the other color names requires adding yourself or including
-// jquery.color.svg-names.js.
-colors = jQuery.Color.names = {
- // 4.1. Basic color keywords
- aqua: "#00ffff",
- black: "#000000",
- blue: "#0000ff",
- fuchsia: "#ff00ff",
- gray: "#808080",
- green: "#008000",
- lime: "#00ff00",
- maroon: "#800000",
- navy: "#000080",
- olive: "#808000",
- purple: "#800080",
- red: "#ff0000",
- silver: "#c0c0c0",
- teal: "#008080",
- white: "#ffffff",
- yellow: "#ffff00",
-
- // 4.2.3. "transparent" color keyword
- transparent: [ null, null, null, 0 ],
-
- _default: "#ffffff"
-};
-
-})( jQuery );
-
-
-/******************************************************************************/
-/****************************** CLASS ANIMATIONS ******************************/
-/******************************************************************************/
-(function() {
-
-var classAnimationActions = [ "add", "remove", "toggle" ],
- shorthandStyles = {
- border: 1,
- borderBottom: 1,
- borderColor: 1,
- borderLeft: 1,
- borderRight: 1,
- borderTop: 1,
- borderWidth: 1,
- margin: 1,
- padding: 1
- };
-
-$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {
- $.fx.step[ prop ] = function( fx ) {
- if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
- jQuery.style( fx.elem, prop, fx.end );
- fx.setAttr = true;
- }
- };
-});
-
-function getElementStyles( elem ) {
- var key, len,
- style = elem.ownerDocument.defaultView ?
- elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
- elem.currentStyle,
- styles = {};
-
- if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
- len = style.length;
- while ( len-- ) {
- key = style[ len ];
- if ( typeof style[ key ] === "string" ) {
- styles[ $.camelCase( key ) ] = style[ key ];
- }
- }
- // support: Opera, IE <9
- } else {
- for ( key in style ) {
- if ( typeof style[ key ] === "string" ) {
- styles[ key ] = style[ key ];
- }
- }
- }
-
- return styles;
-}
-
-
-function styleDifference( oldStyle, newStyle ) {
- var diff = {},
- name, value;
-
- for ( name in newStyle ) {
- value = newStyle[ name ];
- if ( oldStyle[ name ] !== value ) {
- if ( !shorthandStyles[ name ] ) {
- if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
- diff[ name ] = value;
- }
- }
- }
- }
-
- return diff;
-}
-
-// support: jQuery <1.8
-if ( !$.fn.addBack ) {
- $.fn.addBack = function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter( selector )
- );
- };
-}
-
-$.effects.animateClass = function( value, duration, easing, callback ) {
- var o = $.speed( duration, easing, callback );
-
- return this.queue( function() {
- var animated = $( this ),
- baseClass = animated.attr( "class" ) || "",
- applyClassChange,
- allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
-
- // map the animated objects to store the original styles.
- allAnimations = allAnimations.map(function() {
- var el = $( this );
- return {
- el: el,
- start: getElementStyles( this )
- };
- });
-
- // apply class change
- applyClassChange = function() {
- $.each( classAnimationActions, function(i, action) {
- if ( value[ action ] ) {
- animated[ action + "Class" ]( value[ action ] );
- }
- });
- };
- applyClassChange();
-
- // map all animated objects again - calculate new styles and diff
- allAnimations = allAnimations.map(function() {
- this.end = getElementStyles( this.el[ 0 ] );
- this.diff = styleDifference( this.start, this.end );
- return this;
- });
-
- // apply original class
- animated.attr( "class", baseClass );
-
- // map all animated objects again - this time collecting a promise
- allAnimations = allAnimations.map(function() {
- var styleInfo = this,
- dfd = $.Deferred(),
- opts = $.extend({}, o, {
- queue: false,
- complete: function() {
- dfd.resolve( styleInfo );
- }
- });
-
- this.el.animate( this.diff, opts );
- return dfd.promise();
- });
-
- // once all animations have completed:
- $.when.apply( $, allAnimations.get() ).done(function() {
-
- // set the final class
- applyClassChange();
-
- // for each animated element,
- // clear all css properties that were animated
- $.each( arguments, function() {
- var el = this.el;
- $.each( this.diff, function(key) {
- el.css( key, "" );
- });
- });
-
- // this is guarnteed to be there if you use jQuery.speed()
- // it also handles dequeuing the next anim...
- o.complete.call( animated[ 0 ] );
- });
- });
-};
-
-$.fn.extend({
- addClass: (function( orig ) {
- return function( classNames, speed, easing, callback ) {
- return speed ?
- $.effects.animateClass.call( this,
- { add: classNames }, speed, easing, callback ) :
- orig.apply( this, arguments );
- };
- })( $.fn.addClass ),
-
- removeClass: (function( orig ) {
- return function( classNames, speed, easing, callback ) {
- return arguments.length > 1 ?
- $.effects.animateClass.call( this,
- { remove: classNames }, speed, easing, callback ) :
- orig.apply( this, arguments );
- };
- })( $.fn.removeClass ),
-
- toggleClass: (function( orig ) {
- return function( classNames, force, speed, easing, callback ) {
- if ( typeof force === "boolean" || force === undefined ) {
- if ( !speed ) {
- // without speed parameter
- return orig.apply( this, arguments );
- } else {
- return $.effects.animateClass.call( this,
- (force ? { add: classNames } : { remove: classNames }),
- speed, easing, callback );
- }
- } else {
- // without force parameter
- return $.effects.animateClass.call( this,
- { toggle: classNames }, force, speed, easing );
- }
- };
- })( $.fn.toggleClass ),
-
- switchClass: function( remove, add, speed, easing, callback) {
- return $.effects.animateClass.call( this, {
- add: add,
- remove: remove
- }, speed, easing, callback );
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EFFECTS **********************************/
-/******************************************************************************/
-
-(function() {
-
-$.extend( $.effects, {
- version: "1.10.4",
-
- // Saves a set of properties in a data storage
- save: function( element, set ) {
- for( var i=0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
- }
- }
- },
-
- // Restores a set of previously saved properties from a data storage
- restore: function( element, set ) {
- var val, i;
- for( i=0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- val = element.data( dataSpace + set[ i ] );
- // support: jQuery 1.6.2
- // http://bugs.jquery.com/ticket/9917
- // jQuery 1.6.2 incorrectly returns undefined for any falsy value.
- // We can't differentiate between "" and 0 here, so we just assume
- // empty string since it's likely to be a more common value...
- if ( val === undefined ) {
- val = "";
- }
- element.css( set[ i ], val );
- }
- }
- },
-
- setMode: function( el, mode ) {
- if (mode === "toggle") {
- mode = el.is( ":hidden" ) ? "show" : "hide";
- }
- return mode;
- },
-
- // Translates a [top,left] array into a baseline value
- // this should be a little more flexible in the future to handle a string & hash
- getBaseline: function( origin, original ) {
- var y, x;
- switch ( origin[ 0 ] ) {
- case "top": y = 0; break;
- case "middle": y = 0.5; break;
- case "bottom": y = 1; break;
- default: y = origin[ 0 ] / original.height;
- }
- switch ( origin[ 1 ] ) {
- case "left": x = 0; break;
- case "center": x = 0.5; break;
- case "right": x = 1; break;
- default: x = origin[ 1 ] / original.width;
- }
- return {
- x: x,
- y: y
- };
- },
-
- // Wraps the element around a wrapper that copies position properties
- createWrapper: function( element ) {
-
- // if the element is already wrapped, return it
- if ( element.parent().is( ".ui-effects-wrapper" )) {
- return element.parent();
- }
-
- // wrap the element
- var props = {
- width: element.outerWidth(true),
- height: element.outerHeight(true),
- "float": element.css( "float" )
- },
- wrapper = $( "
" )
- .addClass( "ui-effects-wrapper" )
- .css({
- fontSize: "100%",
- background: "transparent",
- border: "none",
- margin: 0,
- padding: 0
- }),
- // Store the size in case width/height are defined in % - Fixes #5245
- size = {
- width: element.width(),
- height: element.height()
- },
- active = document.activeElement;
-
- // support: Firefox
- // Firefox incorrectly exposes anonymous content
- // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
- try {
- active.id;
- } catch( e ) {
- active = document.body;
- }
-
- element.wrap( wrapper );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
-
- wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element
-
- // transfer positioning properties to the wrapper
- if ( element.css( "position" ) === "static" ) {
- wrapper.css({ position: "relative" });
- element.css({ position: "relative" });
- } else {
- $.extend( props, {
- position: element.css( "position" ),
- zIndex: element.css( "z-index" )
- });
- $.each([ "top", "left", "bottom", "right" ], function(i, pos) {
- props[ pos ] = element.css( pos );
- if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
- props[ pos ] = "auto";
- }
- });
- element.css({
- position: "relative",
- top: 0,
- left: 0,
- right: "auto",
- bottom: "auto"
- });
- }
- element.css(size);
-
- return wrapper.css( props ).show();
- },
-
- removeWrapper: function( element ) {
- var active = document.activeElement;
-
- if ( element.parent().is( ".ui-effects-wrapper" ) ) {
- element.parent().replaceWith( element );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
- }
-
-
- return element;
- },
-
- setTransition: function( element, list, factor, value ) {
- value = value || {};
- $.each( list, function( i, x ) {
- var unit = element.cssUnit( x );
- if ( unit[ 0 ] > 0 ) {
- value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
- }
- });
- return value;
- }
-});
-
-// return an effect options object for the given parameters:
-function _normalizeArguments( effect, options, speed, callback ) {
-
- // allow passing all options as the first parameter
- if ( $.isPlainObject( effect ) ) {
- options = effect;
- effect = effect.effect;
- }
-
- // convert to an object
- effect = { effect: effect };
-
- // catch (effect, null, ...)
- if ( options == null ) {
- options = {};
- }
-
- // catch (effect, callback)
- if ( $.isFunction( options ) ) {
- callback = options;
- speed = null;
- options = {};
- }
-
- // catch (effect, speed, ?)
- if ( typeof options === "number" || $.fx.speeds[ options ] ) {
- callback = speed;
- speed = options;
- options = {};
- }
-
- // catch (effect, options, callback)
- if ( $.isFunction( speed ) ) {
- callback = speed;
- speed = null;
- }
-
- // add options to effect
- if ( options ) {
- $.extend( effect, options );
- }
-
- speed = speed || options.duration;
- effect.duration = $.fx.off ? 0 :
- typeof speed === "number" ? speed :
- speed in $.fx.speeds ? $.fx.speeds[ speed ] :
- $.fx.speeds._default;
-
- effect.complete = callback || options.complete;
-
- return effect;
-}
-
-function standardAnimationOption( option ) {
- // Valid standard speeds (nothing, number, named speed)
- if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
- return true;
- }
-
- // Invalid strings - treat as "normal" speed
- if ( typeof option === "string" && !$.effects.effect[ option ] ) {
- return true;
- }
-
- // Complete callback
- if ( $.isFunction( option ) ) {
- return true;
- }
-
- // Options hash (but not naming an effect)
- if ( typeof option === "object" && !option.effect ) {
- return true;
- }
-
- // Didn't match any standard API
- return false;
-}
-
-$.fn.extend({
- effect: function( /* effect, options, speed, callback */ ) {
- var args = _normalizeArguments.apply( this, arguments ),
- mode = args.mode,
- queue = args.queue,
- effectMethod = $.effects.effect[ args.effect ];
-
- if ( $.fx.off || !effectMethod ) {
- // delegate to the original method (e.g., .show()) if possible
- if ( mode ) {
- return this[ mode ]( args.duration, args.complete );
- } else {
- return this.each( function() {
- if ( args.complete ) {
- args.complete.call( this );
- }
- });
- }
- }
-
- function run( next ) {
- var elem = $( this ),
- complete = args.complete,
- mode = args.mode;
-
- function done() {
- if ( $.isFunction( complete ) ) {
- complete.call( elem[0] );
- }
- if ( $.isFunction( next ) ) {
- next();
- }
- }
-
- // If the element already has the correct final state, delegate to
- // the core methods so the internal tracking of "olddisplay" works.
- if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
- elem[ mode ]();
- done();
- } else {
- effectMethod.call( elem[0], args, done );
- }
- }
-
- return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
- },
-
- show: (function( orig ) {
- return function( option ) {
- if ( standardAnimationOption( option ) ) {
- return orig.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "show";
- return this.effect.call( this, args );
- }
- };
- })( $.fn.show ),
-
- hide: (function( orig ) {
- return function( option ) {
- if ( standardAnimationOption( option ) ) {
- return orig.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "hide";
- return this.effect.call( this, args );
- }
- };
- })( $.fn.hide ),
-
- toggle: (function( orig ) {
- return function( option ) {
- if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
- return orig.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "toggle";
- return this.effect.call( this, args );
- }
- };
- })( $.fn.toggle ),
-
- // helper functions
- cssUnit: function(key) {
- var style = this.css( key ),
- val = [];
-
- $.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
- if ( style.indexOf( unit ) > 0 ) {
- val = [ parseFloat( style ), unit ];
- }
- });
- return val;
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EASING ***********************************/
-/******************************************************************************/
-
-(function() {
-
-// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
-
-var baseEasings = {};
-
-$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
- baseEasings[ name ] = function( p ) {
- return Math.pow( p, i + 2 );
- };
-});
-
-$.extend( baseEasings, {
- Sine: function ( p ) {
- return 1 - Math.cos( p * Math.PI / 2 );
- },
- Circ: function ( p ) {
- return 1 - Math.sqrt( 1 - p * p );
- },
- Elastic: function( p ) {
- return p === 0 || p === 1 ? p :
- -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
- },
- Back: function( p ) {
- return p * p * ( 3 * p - 2 );
- },
- Bounce: function ( p ) {
- var pow2,
- bounce = 4;
-
- while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
- return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
- }
-});
-
-$.each( baseEasings, function( name, easeIn ) {
- $.easing[ "easeIn" + name ] = easeIn;
- $.easing[ "easeOut" + name ] = function( p ) {
- return 1 - easeIn( 1 - p );
- };
- $.easing[ "easeInOut" + name ] = function( p ) {
- return p < 0.5 ?
- easeIn( p * 2 ) / 2 :
- 1 - easeIn( p * -2 + 2 ) / 2;
- };
-});
-
-})();
-
-})(jQuery);
-(function( $, undefined ) {
-
-var rvertical = /up|down|vertical/,
- rpositivemotion = /up|left|vertical|horizontal/;
-
-$.effects.effect.blind = function( o, done ) {
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- direction = o.direction || "up",
- vertical = rvertical.test( direction ),
- ref = vertical ? "height" : "width",
- ref2 = vertical ? "top" : "left",
- motion = rpositivemotion.test( direction ),
- animation = {},
- show = mode === "show",
- wrapper, distance, margin;
-
- // if already wrapped, the wrapper's properties are my property. #6245
- if ( el.parent().is( ".ui-effects-wrapper" ) ) {
- $.effects.save( el.parent(), props );
- } else {
- $.effects.save( el, props );
- }
- el.show();
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
-
- distance = wrapper[ ref ]();
- margin = parseFloat( wrapper.css( ref2 ) ) || 0;
-
- animation[ ref ] = show ? distance : 0;
- if ( !motion ) {
- el
- .css( vertical ? "bottom" : "right", 0 )
- .css( vertical ? "top" : "left", "auto" )
- .css({ position: "absolute" });
-
- animation[ ref2 ] = show ? margin : distance + margin;
- }
-
- // start at 0 if we are showing
- if ( show ) {
- wrapper.css( ref, 0 );
- if ( ! motion ) {
- wrapper.css( ref2, margin + distance );
- }
- }
-
- // Animate
- wrapper.animate( animation, {
- duration: o.duration,
- easing: o.easing,
- queue: false,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.bounce = function( o, done ) {
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
-
- // defaults:
- mode = $.effects.setMode( el, o.mode || "effect" ),
- hide = mode === "hide",
- show = mode === "show",
- direction = o.direction || "up",
- distance = o.distance,
- times = o.times || 5,
-
- // number of internal animations
- anims = times * 2 + ( show || hide ? 1 : 0 ),
- speed = o.duration / anims,
- easing = o.easing,
-
- // utility:
- ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
- motion = ( direction === "up" || direction === "left" ),
- i,
- upAnim,
- downAnim,
-
- // we will need to re-assemble the queue to stack our animations in place
- queue = el.queue(),
- queuelen = queue.length;
-
- // Avoid touching opacity to prevent clearType and PNG issues in IE
- if ( show || hide ) {
- props.push( "opacity" );
- }
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el ); // Create Wrapper
-
- // default distance for the BIGGEST bounce is the outer Distance / 3
- if ( !distance ) {
- distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
- }
-
- if ( show ) {
- downAnim = { opacity: 1 };
- downAnim[ ref ] = 0;
-
- // if we are showing, force opacity 0 and set the initial position
- // then do the "first" animation
- el.css( "opacity", 0 )
- .css( ref, motion ? -distance * 2 : distance * 2 )
- .animate( downAnim, speed, easing );
- }
-
- // start at the smallest distance if we are hiding
- if ( hide ) {
- distance = distance / Math.pow( 2, times - 1 );
- }
-
- downAnim = {};
- downAnim[ ref ] = 0;
- // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
- for ( i = 0; i < times; i++ ) {
- upAnim = {};
- upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
-
- el.animate( upAnim, speed, easing )
- .animate( downAnim, speed, easing );
-
- distance = hide ? distance * 2 : distance / 2;
- }
-
- // Last Bounce when Hiding
- if ( hide ) {
- upAnim = { opacity: 0 };
- upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
-
- el.animate( upAnim, speed, easing );
- }
-
- el.queue(function() {
- if ( hide ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
- // inject all the animations we just queued to be first in line (after "inprogress")
- if ( queuelen > 1) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- el.dequeue();
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.clip = function( o, done ) {
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- direction = o.direction || "vertical",
- vert = direction === "vertical",
- size = vert ? "height" : "width",
- position = vert ? "top" : "left",
- animation = {},
- wrapper, animate, distance;
-
- // Save & Show
- $.effects.save( el, props );
- el.show();
-
- // Create Wrapper
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
- animate = ( el[0].tagName === "IMG" ) ? wrapper : el;
- distance = animate[ size ]();
-
- // Shift
- if ( show ) {
- animate.css( size, 0 );
- animate.css( position, distance / 2 );
- }
-
- // Create Animation Object:
- animation[ size ] = show ? distance : 0;
- animation[ position ] = show ? 0 : distance / 2;
-
- // Animate
- animate.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( !show ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.drop = function( o, done ) {
-
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- direction = o.direction || "left",
- ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
- motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg",
- animation = {
- opacity: show ? 1 : 0
- },
- distance;
-
- // Adjust
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
-
- distance = o.distance || el[ ref === "top" ? "outerHeight": "outerWidth" ]( true ) / 2;
-
- if ( show ) {
- el
- .css( "opacity", 0 )
- .css( ref, motion === "pos" ? -distance : distance );
- }
-
- // Animation
- animation[ ref ] = ( show ?
- ( motion === "pos" ? "+=" : "-=" ) :
- ( motion === "pos" ? "-=" : "+=" ) ) +
- distance;
-
- // Animate
- el.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.explode = function( o, done ) {
-
- var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
- cells = rows,
- el = $( this ),
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
-
- // show and then visibility:hidden the element before calculating offset
- offset = el.show().css( "visibility", "hidden" ).offset(),
-
- // width and height of a piece
- width = Math.ceil( el.outerWidth() / cells ),
- height = Math.ceil( el.outerHeight() / rows ),
- pieces = [],
-
- // loop
- i, j, left, top, mx, my;
-
- // children animate complete:
- function childComplete() {
- pieces.push( this );
- if ( pieces.length === rows * cells ) {
- animComplete();
- }
- }
-
- // clone the element for each row and cell.
- for( i = 0; i < rows ; i++ ) { // ===>
- top = offset.top + i * height;
- my = i - ( rows - 1 ) / 2 ;
-
- for( j = 0; j < cells ; j++ ) { // |||
- left = offset.left + j * width;
- mx = j - ( cells - 1 ) / 2 ;
-
- // Create a clone of the now hidden main element that will be absolute positioned
- // within a wrapper div off the -left and -top equal to size of our pieces
- el
- .clone()
- .appendTo( "body" )
- .wrap( "
" )
- .css({
- position: "absolute",
- visibility: "visible",
- left: -j * width,
- top: -i * height
- })
-
- // select the wrapper - make it overflow: hidden and absolute positioned based on
- // where the original was located +left and +top equal to the size of pieces
- .parent()
- .addClass( "ui-effects-explode" )
- .css({
- position: "absolute",
- overflow: "hidden",
- width: width,
- height: height,
- left: left + ( show ? mx * width : 0 ),
- top: top + ( show ? my * height : 0 ),
- opacity: show ? 0 : 1
- }).animate({
- left: left + ( show ? 0 : mx * width ),
- top: top + ( show ? 0 : my * height ),
- opacity: show ? 1 : 0
- }, o.duration || 500, o.easing, childComplete );
- }
- }
-
- function animComplete() {
- el.css({
- visibility: "visible"
- });
- $( pieces ).remove();
- if ( !show ) {
- el.hide();
- }
- done();
- }
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.fade = function( o, done ) {
- var el = $( this ),
- mode = $.effects.setMode( el, o.mode || "toggle" );
-
- el.animate({
- opacity: mode
- }, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: done
- });
-};
-
-})( jQuery );
-(function( $, undefined ) {
-
-$.effects.effect.fold = function( o, done ) {
-
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- hide = mode === "hide",
- size = o.size || 15,
- percent = /([0-9]+)%/.exec( size ),
- horizFirst = !!o.horizFirst,
- widthFirst = show !== horizFirst,
- ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ],
- duration = o.duration / 2,
- wrapper, distance,
- animation1 = {},
- animation2 = {};
-
- $.effects.save( el, props );
- el.show();
-
- // Create Wrapper
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
- distance = widthFirst ?
- [ wrapper.width(), wrapper.height() ] :
- [ wrapper.height(), wrapper.width() ];
-
- if ( percent ) {
- size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
- }
- if ( show ) {
- wrapper.css( horizFirst ? {
- height: 0,
- width: size
- } : {
- height: size,
- width: 0
- });
- }
-
- // Animation
- animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size;
- animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0;
-
- // Animate
- wrapper
- .animate( animation1, duration, o.easing )
- .animate( animation2, duration, o.easing, function() {
- if ( hide ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.highlight = function( o, done ) {
- var elem = $( this ),
- props = [ "backgroundImage", "backgroundColor", "opacity" ],
- mode = $.effects.setMode( elem, o.mode || "show" ),
- animation = {
- backgroundColor: elem.css( "backgroundColor" )
- };
-
- if (mode === "hide") {
- animation.opacity = 0;
- }
-
- $.effects.save( elem, props );
-
- elem
- .show()
- .css({
- backgroundImage: "none",
- backgroundColor: o.color || "#ffff99"
- })
- .animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- elem.hide();
- }
- $.effects.restore( elem, props );
- done();
- }
- });
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.pulsate = function( o, done ) {
- var elem = $( this ),
- mode = $.effects.setMode( elem, o.mode || "show" ),
- show = mode === "show",
- hide = mode === "hide",
- showhide = ( show || mode === "hide" ),
-
- // showing or hiding leaves of the "last" animation
- anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
- duration = o.duration / anims,
- animateTo = 0,
- queue = elem.queue(),
- queuelen = queue.length,
- i;
-
- if ( show || !elem.is(":visible")) {
- elem.css( "opacity", 0 ).show();
- animateTo = 1;
- }
-
- // anims - 1 opacity "toggles"
- for ( i = 1; i < anims; i++ ) {
- elem.animate({
- opacity: animateTo
- }, duration, o.easing );
- animateTo = 1 - animateTo;
- }
-
- elem.animate({
- opacity: animateTo
- }, duration, o.easing);
-
- elem.queue(function() {
- if ( hide ) {
- elem.hide();
- }
- done();
- });
-
- // We just queued up "anims" animations, we need to put them next in the queue
- if ( queuelen > 1 ) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- elem.dequeue();
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.puff = function( o, done ) {
- var elem = $( this ),
- mode = $.effects.setMode( elem, o.mode || "hide" ),
- hide = mode === "hide",
- percent = parseInt( o.percent, 10 ) || 150,
- factor = percent / 100,
- original = {
- height: elem.height(),
- width: elem.width(),
- outerHeight: elem.outerHeight(),
- outerWidth: elem.outerWidth()
- };
-
- $.extend( o, {
- effect: "scale",
- queue: false,
- fade: true,
- mode: mode,
- complete: done,
- percent: hide ? percent : 100,
- from: hide ?
- original :
- {
- height: original.height * factor,
- width: original.width * factor,
- outerHeight: original.outerHeight * factor,
- outerWidth: original.outerWidth * factor
- }
- });
-
- elem.effect( o );
-};
-
-$.effects.effect.scale = function( o, done ) {
-
- // Create element
- var el = $( this ),
- options = $.extend( true, {}, o ),
- mode = $.effects.setMode( el, o.mode || "effect" ),
- percent = parseInt( o.percent, 10 ) ||
- ( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ),
- direction = o.direction || "both",
- origin = o.origin,
- original = {
- height: el.height(),
- width: el.width(),
- outerHeight: el.outerHeight(),
- outerWidth: el.outerWidth()
- },
- factor = {
- y: direction !== "horizontal" ? (percent / 100) : 1,
- x: direction !== "vertical" ? (percent / 100) : 1
- };
-
- // We are going to pass this effect to the size effect:
- options.effect = "size";
- options.queue = false;
- options.complete = done;
-
- // Set default origin and restore for show/hide
- if ( mode !== "effect" ) {
- options.origin = origin || ["middle","center"];
- options.restore = true;
- }
-
- options.from = o.from || ( mode === "show" ? {
- height: 0,
- width: 0,
- outerHeight: 0,
- outerWidth: 0
- } : original );
- options.to = {
- height: original.height * factor.y,
- width: original.width * factor.x,
- outerHeight: original.outerHeight * factor.y,
- outerWidth: original.outerWidth * factor.x
- };
-
- // Fade option to support puff
- if ( options.fade ) {
- if ( mode === "show" ) {
- options.from.opacity = 0;
- options.to.opacity = 1;
- }
- if ( mode === "hide" ) {
- options.from.opacity = 1;
- options.to.opacity = 0;
- }
- }
-
- // Animate
- el.effect( options );
-
-};
-
-$.effects.effect.size = function( o, done ) {
-
- // Create element
- var original, baseline, factor,
- el = $( this ),
- props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ],
-
- // Always restore
- props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ],
-
- // Copy for children
- props2 = [ "width", "height", "overflow" ],
- cProps = [ "fontSize" ],
- vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
- hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
-
- // Set options
- mode = $.effects.setMode( el, o.mode || "effect" ),
- restore = o.restore || mode !== "effect",
- scale = o.scale || "both",
- origin = o.origin || [ "middle", "center" ],
- position = el.css( "position" ),
- props = restore ? props0 : props1,
- zero = {
- height: 0,
- width: 0,
- outerHeight: 0,
- outerWidth: 0
- };
-
- if ( mode === "show" ) {
- el.show();
- }
- original = {
- height: el.height(),
- width: el.width(),
- outerHeight: el.outerHeight(),
- outerWidth: el.outerWidth()
- };
-
- if ( o.mode === "toggle" && mode === "show" ) {
- el.from = o.to || zero;
- el.to = o.from || original;
- } else {
- el.from = o.from || ( mode === "show" ? zero : original );
- el.to = o.to || ( mode === "hide" ? zero : original );
- }
-
- // Set scaling factor
- factor = {
- from: {
- y: el.from.height / original.height,
- x: el.from.width / original.width
- },
- to: {
- y: el.to.height / original.height,
- x: el.to.width / original.width
- }
- };
-
- // Scale the css box
- if ( scale === "box" || scale === "both" ) {
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- props = props.concat( vProps );
- el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );
- el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );
- }
-
- // Horizontal props scaling
- if ( factor.from.x !== factor.to.x ) {
- props = props.concat( hProps );
- el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );
- el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );
- }
- }
-
- // Scale the content
- if ( scale === "content" || scale === "both" ) {
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- props = props.concat( cProps ).concat( props2 );
- el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );
- el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );
- }
- }
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
- el.css( "overflow", "hidden" ).css( el.from );
-
- // Adjust
- if (origin) { // Calculate baseline shifts
- baseline = $.effects.getBaseline( origin, original );
- el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y;
- el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x;
- el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y;
- el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x;
- }
- el.css( el.from ); // set top & left
-
- // Animate
- if ( scale === "content" || scale === "both" ) { // Scale the children
-
- // Add margins/font-size
- vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps);
- hProps = hProps.concat([ "marginLeft", "marginRight" ]);
- props2 = props0.concat(vProps).concat(hProps);
-
- el.find( "*[width]" ).each( function(){
- var child = $( this ),
- c_original = {
- height: child.height(),
- width: child.width(),
- outerHeight: child.outerHeight(),
- outerWidth: child.outerWidth()
- };
- if (restore) {
- $.effects.save(child, props2);
- }
-
- child.from = {
- height: c_original.height * factor.from.y,
- width: c_original.width * factor.from.x,
- outerHeight: c_original.outerHeight * factor.from.y,
- outerWidth: c_original.outerWidth * factor.from.x
- };
- child.to = {
- height: c_original.height * factor.to.y,
- width: c_original.width * factor.to.x,
- outerHeight: c_original.height * factor.to.y,
- outerWidth: c_original.width * factor.to.x
- };
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );
- child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );
- }
-
- // Horizontal props scaling
- if ( factor.from.x !== factor.to.x ) {
- child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );
- child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );
- }
-
- // Animate children
- child.css( child.from );
- child.animate( child.to, o.duration, o.easing, function() {
-
- // Restore children
- if ( restore ) {
- $.effects.restore( child, props2 );
- }
- });
- });
- }
-
- // Animate
- el.animate( el.to, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( el.to.opacity === 0 ) {
- el.css( "opacity", el.from.opacity );
- }
- if( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- if ( !restore ) {
-
- // we need to calculate our new positioning based on the scaling
- if ( position === "static" ) {
- el.css({
- position: "relative",
- top: el.to.top,
- left: el.to.left
- });
- } else {
- $.each([ "top", "left" ], function( idx, pos ) {
- el.css( pos, function( _, str ) {
- var val = parseInt( str, 10 ),
- toRef = idx ? el.to.left : el.to.top;
-
- // if original was "auto", recalculate the new value from wrapper
- if ( str === "auto" ) {
- return toRef + "px";
- }
-
- return val + toRef + "px";
- });
- });
- }
- }
-
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.shake = function( o, done ) {
-
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "effect" ),
- direction = o.direction || "left",
- distance = o.distance || 20,
- times = o.times || 3,
- anims = times * 2 + 1,
- speed = Math.round(o.duration/anims),
- ref = (direction === "up" || direction === "down") ? "top" : "left",
- positiveMotion = (direction === "up" || direction === "left"),
- animation = {},
- animation1 = {},
- animation2 = {},
- i,
-
- // we will need to re-assemble the queue to stack our animations in place
- queue = el.queue(),
- queuelen = queue.length;
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
-
- // Animation
- animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
- animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
- animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
-
- // Animate
- el.animate( animation, speed, o.easing );
-
- // Shakes
- for ( i = 1; i < times; i++ ) {
- el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing );
- }
- el
- .animate( animation1, speed, o.easing )
- .animate( animation, speed / 2, o.easing )
- .queue(function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
- // inject all the animations we just queued to be first in line (after "inprogress")
- if ( queuelen > 1) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- el.dequeue();
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.slide = function( o, done ) {
-
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "width", "height" ],
- mode = $.effects.setMode( el, o.mode || "show" ),
- show = mode === "show",
- direction = o.direction || "left",
- ref = (direction === "up" || direction === "down") ? "top" : "left",
- positiveMotion = (direction === "up" || direction === "left"),
- distance,
- animation = {};
-
- // Adjust
- $.effects.save( el, props );
- el.show();
- distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true );
-
- $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
-
- if ( show ) {
- el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance );
- }
-
- // Animation
- animation[ ref ] = ( show ?
- ( positiveMotion ? "+=" : "-=") :
- ( positiveMotion ? "-=" : "+=")) +
- distance;
-
- // Animate
- el.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.transfer = function( o, done ) {
- var elem = $( this ),
- target = $( o.to ),
- targetFixed = target.css( "position" ) === "fixed",
- body = $("body"),
- fixTop = targetFixed ? body.scrollTop() : 0,
- fixLeft = targetFixed ? body.scrollLeft() : 0,
- endPosition = target.offset(),
- animation = {
- top: endPosition.top - fixTop ,
- left: endPosition.left - fixLeft ,
- height: target.innerHeight(),
- width: target.innerWidth()
- },
- startPosition = elem.offset(),
- transfer = $( "
" )
- .appendTo( document.body )
- .addClass( o.className )
- .css({
- top: startPosition.top - fixTop ,
- left: startPosition.left - fixLeft ,
- height: elem.innerHeight(),
- width: elem.innerWidth(),
- position: targetFixed ? "fixed" : "absolute"
- })
- .animate( animation, o.duration, o.easing, function() {
- transfer.remove();
- done();
- });
-};
-
-})(jQuery);
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/bulletin-board/nf-bulletin-board.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/bulletin-board/nf-bulletin-board.js
index 864eb70e66..f181016c27 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/bulletin-board/nf-bulletin-board.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/bulletin-board/nf-bulletin-board.js
@@ -112,14 +112,14 @@ nf.BulletinBoard = (function () {
type: 'GET',
url: config.urls.controllerAbout,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var aboutDetails = response.about;
var bulletinBoardTitle = aboutDetails.title + ' Bulletin Board';
// set the document title and the about title
document.title = bulletinBoardTitle;
$('#bulletin-board-header-text').text(bulletinBoardTitle);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
// get the banners if we're not in the shell
var loadBanners = $.Deferred(function (deferred) {
@@ -128,7 +128,7 @@ nf.BulletinBoard = (function () {
type: 'GET',
url: config.urls.banners,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// ensure the banners response is specified
if (nf.Common.isDefinedAndNotNull(response.banners)) {
if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
@@ -160,7 +160,7 @@ nf.BulletinBoard = (function () {
}
deferred.resolve();
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
nf.Common.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -170,9 +170,9 @@ nf.BulletinBoard = (function () {
});
return $.Deferred(function (deferred) {
- $.when(getTitle, loadBanners).then(function () {
+ $.when(getTitle, loadBanners).done(function () {
deferred.resolve();
- }, function () {
+ }).fail(function () {
deferred.reject();
});
}).promise();
@@ -294,7 +294,7 @@ nf.BulletinBoard = (function () {
url: config.urls.bulletinBoard,
data: data,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// ensure the bulletin board was specified
if (nf.Common.isDefinedAndNotNull(response.bulletinBoard)) {
var bulletinBoard = response.bulletinBoard;
@@ -369,7 +369,7 @@ nf.BulletinBoard = (function () {
bulletinContainer.prepend('
…
');
}
}
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
// likely caused by a invalid regex
if (xhr.status === 404) {
$('#bulletin-error-message').text(xhr.responseText).show();
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
index f73545d697..dc8ca31505 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
@@ -40,10 +40,10 @@ nf.Actions = (function () {
url: uri,
data: data,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
nf.Dialog.showOkDialog({
dialogContent: nf.Common.escapeHtml(xhr.responseText),
@@ -86,12 +86,14 @@ nf.Actions = (function () {
nf.CanvasUtils.enterGroup(selectionData.component.id);
}
},
+
/**
* Exits the current process group but entering the parent group.
*/
leaveGroup: function () {
nf.CanvasUtils.enterGroup(nf.Canvas.getParentGroupId());
},
+
/**
* Refresh the flow of the remote process group in the specified selection.
*
@@ -153,6 +155,7 @@ nf.Actions = (function () {
poll(1);
}
},
+
/**
* Opens the remote process group in the specified selection.
*
@@ -172,6 +175,7 @@ nf.Actions = (function () {
}
}
},
+
/**
* Shows and selects the source of the connection in the specified selection.
*
@@ -190,6 +194,7 @@ nf.Actions = (function () {
}
}
},
+
/**
* Shows and selects the destination of the connection in the specified selection.
*
@@ -208,6 +213,7 @@ nf.Actions = (function () {
}
}
},
+
/**
* Shows the downstream components from the specified selection.
*
@@ -230,6 +236,7 @@ nf.Actions = (function () {
}
}
},
+
/**
* Shows the upstream components from the specified selection.
*
@@ -252,6 +259,7 @@ nf.Actions = (function () {
}
}
},
+
/**
* Shows and selects the component in the specified selection.
*
@@ -268,6 +276,7 @@ nf.Actions = (function () {
nf.Actions.center(selection);
}
},
+
/**
* Selects all components in the specified selection.
*
@@ -276,12 +285,14 @@ nf.Actions = (function () {
select: function (selection) {
selection.classed('selected', true);
},
+
/**
* Selects all components.
*/
selectAll: function () {
nf.Actions.select(d3.selectAll('g.component, g.connection'));
},
+
/**
* Centers the component in the specified selection.
*
@@ -331,6 +342,7 @@ nf.Actions = (function () {
});
}
},
+
/**
* Enables all eligible selected components.
*/
@@ -360,6 +372,7 @@ nf.Actions = (function () {
});
}
},
+
/**
* Disables all eligible selected components.
*/
@@ -389,6 +402,7 @@ nf.Actions = (function () {
});
}
},
+
/**
* Starts the components in the specified selection.
*
@@ -443,6 +457,7 @@ nf.Actions = (function () {
}
}
},
+
/**
* Stops the components in the specified selection.
*
@@ -496,6 +511,7 @@ nf.Actions = (function () {
}
}
},
+
/**
* Enables transmission for the components in the specified selection.
*
@@ -513,6 +529,7 @@ nf.Actions = (function () {
});
});
},
+
/**
* Disables transmission for the components in the specified selection.
*
@@ -530,6 +547,7 @@ nf.Actions = (function () {
});
});
},
+
/**
* Shows the configuration dialog for the specified selection.
*
@@ -557,6 +575,7 @@ nf.Actions = (function () {
}
}
},
+
// Defines an action for showing component details (like configuration but read only).
showDetails: function (selection) {
if (selection.size() === 1) {
@@ -579,6 +598,7 @@ nf.Actions = (function () {
}
}
},
+
/**
* Shows the usage documentation for the component in the specified selection.
*
@@ -592,6 +612,7 @@ nf.Actions = (function () {
}));
}
},
+
/**
* Shows the stats for the specified selection.
*
@@ -623,6 +644,7 @@ nf.Actions = (function () {
}
}
},
+
/**
* Opens the remote ports dialog for the remote process group in the specified selection.
*
@@ -633,6 +655,7 @@ nf.Actions = (function () {
nf.RemoteProcessGroupPorts.showPorts(selection);
}
},
+
/**
* Hides and open cancellable dialogs.
*/
@@ -646,12 +669,14 @@ nf.Actions = (function () {
}
});
},
+
/**
* Reloads the status for the entire canvas (components and flow.)
*/
reloadStatus: function () {
nf.Canvas.reloadStatus();
},
+
/**
* Deletes the component in the specified selection.
*
@@ -675,7 +700,7 @@ nf.Actions = (function () {
clientId: revision.clientId
}),
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -723,15 +748,15 @@ nf.Actions = (function () {
// refresh the birdseye/toolbar
nf.Birdseye.refresh();
nf.CanvasToolbar.refresh();
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
} else {
// create a snippet for the specified component and link to the data flow
var snippetDetails = nf.Snippet.marshal(selection, true);
- nf.Snippet.create(snippetDetails).then(function (response) {
+ nf.Snippet.create(snippetDetails).done(function (response) {
var snippet = response.snippet;
// remove the snippet, effectively removing the components
- nf.Snippet.remove(snippet.id).then(function () {
+ nf.Snippet.remove(snippet.id).done(function () {
var components = d3.map();
// add the id to the type's array
@@ -797,7 +822,7 @@ nf.Actions = (function () {
// refresh the birdseye/toolbar
nf.Birdseye.refresh();
nf.CanvasToolbar.refresh();
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
// unable to acutally remove the components so attempt to
// unlink and remove just the snippet - if unlinking fails
// just ignore
@@ -807,10 +832,11 @@ nf.Actions = (function () {
nf.Common.handleAjaxError(xhr, status, error);
});
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
}
}
},
+
/**
* Opens the fill color dialog for the component in the specified selection.
*
@@ -842,6 +868,7 @@ nf.Actions = (function () {
$('#fill-color-dialog').modal('show');
}
},
+
/**
* Groups the currently selected components into a new group.
*/
@@ -865,6 +892,7 @@ nf.Actions = (function () {
});
});
},
+
/**
* Creates a new template based off the currently selected components. If no components
* are selected, a template of the entire canvas is made.
@@ -914,7 +942,7 @@ nf.Actions = (function () {
var snippetDetails = nf.Snippet.marshal(selection, false);
// create the snippet
- nf.Snippet.create(snippetDetails).then(function (response) {
+ nf.Snippet.create(snippetDetails).done(function (response) {
var snippet = response.snippet;
// create the template
@@ -927,21 +955,21 @@ nf.Actions = (function () {
snippetId: snippet.id
},
dataType: 'json'
- }).then(function () {
+ }).done(function () {
// show the confirmation dialog
nf.Dialog.showOkDialog({
dialogContent: "Template '" + nf.Common.escapeHtml(templateName) + "' was successfully created.",
overlayBackground: false
});
- }, nf.Common.handleAjaxError).always(function () {
+ }).always(function () {
// remove the snippet
nf.Snippet.remove(snippet.id);
// clear the template dialog fields
$('#new-template-name').val('');
$('#new-template-description').val('');
- });
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
}
}
}, {
@@ -956,6 +984,7 @@ nf.Actions = (function () {
// auto focus on the template name
$('#new-template-name').focus();
},
+
/**
* Copies the component in the specified selection.
*
@@ -975,6 +1004,7 @@ nf.Actions = (function () {
origin: origin
});
},
+
/**
* Pastes the currently copied selection.
*
@@ -1009,7 +1039,7 @@ nf.Actions = (function () {
};
// create a snippet from the details
- nf.Snippet.create(data['snippet']).then(function (createResponse) {
+ nf.Snippet.create(data['snippet']).done(function (createResponse) {
var snippet = createResponse.snippet;
// determine the origin of the bounding box of the copy
@@ -1024,7 +1054,7 @@ nf.Actions = (function () {
}
// copy the snippet to the new location
- nf.Snippet.copy(snippet.id, nf.Canvas.getGroupId(), origin).then(function (copyResponse) {
+ nf.Snippet.copy(snippet.id, nf.Canvas.getGroupId(), origin).done(function (copyResponse) {
var snippetContents = copyResponse.contents;
// update the graph accordingly
@@ -1039,7 +1069,7 @@ nf.Actions = (function () {
// remove the original snippet
nf.Snippet.remove(snippet.id).fail(reject);
- }, function () {
+ }).fail(function () {
// an error occured while performing the copy operation, reload the
// graph in case it was a partial success
nf.Canvas.reload().done(function () {
@@ -1054,7 +1084,7 @@ nf.Actions = (function () {
// reject the deferred
reject();
});
- }, reject);
+ }).fail(reject);
}).promise();
// show the appropriate message is the copy fails
@@ -1067,6 +1097,7 @@ nf.Actions = (function () {
});
});
},
+
/**
* Moves the connection in the specified selection to the front.
*
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-birdseye.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-birdseye.js
index 175b7c3537..b409434d1a 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-birdseye.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-birdseye.js
@@ -335,6 +335,7 @@ nf.Birdseye = (function () {
})
.call(brush);
},
+
/**
* Handles rendering of the birdseye tool.
*/
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-header.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-header.js
index 7d8b7b9cd9..edd2000e57 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-header.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-header.js
@@ -103,7 +103,7 @@ nf.CanvasHeader = (function () {
// setup the refresh link actions
$('#refresh-required-link').click(function () {
- nf.Canvas.reload().then(function () {
+ nf.Canvas.reload().done(function () {
// update component visibility
nf.Canvas.View.updateVisibility();
@@ -113,7 +113,7 @@ nf.CanvasHeader = (function () {
// hide the refresh link
$('#stats-last-refreshed').removeClass('alert');
$('#refresh-required-container').hide();
- }, function () {
+ }).fail(function () {
nf.Dialog.showOkDialog({
dialogContent: 'Unable to refresh the current group.',
overlayBackground: true
@@ -126,12 +126,12 @@ nf.CanvasHeader = (function () {
type: 'GET',
url: config.urls.controllerAbout,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var aboutDetails = response.about;
// set the document title and the about title
document.title = aboutDetails.title;
$('#nf-version').text(aboutDetails.version);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
// configure the about dialog
$('#nf-about').modal({
@@ -192,7 +192,7 @@ nf.CanvasHeader = (function () {
'style[background-color]': color
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -202,7 +202,7 @@ nf.CanvasHeader = (function () {
} else {
nf.Label.set(response.label);
}
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
nf.Dialog.showOkDialog({
dialogContent: nf.Common.escapeHtml(xhr.responseText),
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-toolbar.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-toolbar.js
index ef7486f0a0..23cb20f053 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-toolbar.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-toolbar.js
@@ -95,6 +95,7 @@ nf.CanvasToolbar = (function () {
});
}
},
+
/**
* Called when the selection changes to update the toolbar appropriately.
*/
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-toolbox.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-toolbox.js
index d8cccd0a42..530c8a2ac0 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-toolbox.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-toolbox.js
@@ -394,7 +394,7 @@ nf.CanvasToolbox = (function () {
y: pt.y
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.processor)) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -410,7 +410,7 @@ nf.CanvasToolbox = (function () {
// update the birdseye
nf.Birdseye.refresh();
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -481,7 +481,7 @@ nf.CanvasToolbox = (function () {
y: pt.y
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.inputPort)) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -497,7 +497,7 @@ nf.CanvasToolbox = (function () {
// update the birdseye
nf.Birdseye.refresh();
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -568,7 +568,7 @@ nf.CanvasToolbox = (function () {
y: pt.y
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.outputPort)) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -584,7 +584,7 @@ nf.CanvasToolbox = (function () {
// update the birdseye
nf.Birdseye.refresh();
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -608,7 +608,7 @@ nf.CanvasToolbox = (function () {
y: pt.y
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.processGroup)) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -624,7 +624,7 @@ nf.CanvasToolbox = (function () {
// update the birdseye
nf.Birdseye.refresh();
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -692,7 +692,7 @@ nf.CanvasToolbox = (function () {
y: pt.y
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.remoteProcessGroup)) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -708,7 +708,7 @@ nf.CanvasToolbox = (function () {
// update the birdseye
nf.Birdseye.refresh();
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -730,7 +730,7 @@ nf.CanvasToolbox = (function () {
y: pt.y
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.funnel)) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -743,7 +743,7 @@ nf.CanvasToolbox = (function () {
// update the birdseye
nf.Birdseye.refresh();
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -756,7 +756,7 @@ nf.CanvasToolbox = (function () {
type: 'GET',
url: config.urls.templates,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var templates = response.templates;
if (nf.Common.isDefinedAndNotNull(templates) && templates.length > 0) {
var options = [];
@@ -809,7 +809,7 @@ nf.CanvasToolbox = (function () {
});
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -833,7 +833,7 @@ nf.CanvasToolbox = (function () {
originY: pt.y
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -845,7 +845,7 @@ nf.CanvasToolbox = (function () {
// update the birdseye
nf.Birdseye.refresh();
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -869,7 +869,7 @@ nf.CanvasToolbox = (function () {
height: nf.Label.config.height
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.label)) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -880,7 +880,7 @@ nf.CanvasToolbox = (function () {
// update the birdseye
nf.Birdseye.refresh();
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
return {
@@ -987,7 +987,7 @@ nf.CanvasToolbox = (function () {
type: 'GET',
url: config.urls.processorTypes,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var tagCloud = {};
var tags = [];
@@ -1090,7 +1090,7 @@ nf.CanvasToolbox = (function () {
processorTypesGrid.render();
});
processorTypesData.syncGridSelection(processorTypesGrid, false);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
// define the function for filtering the list
$('#processor-type-filter').keyup(function () {
@@ -1146,6 +1146,7 @@ nf.CanvasToolbox = (function () {
$('
').attr('title', nf.Common.config.type.label).addClass('label-icon-disable').addClass('toolbox-icon').appendTo(toolbox);
}
},
+
/**
* Prompts the user to enter the name for the group.
*
@@ -1162,9 +1163,9 @@ nf.CanvasToolbox = (function () {
$('#new-process-group-name').val('');
// create the group and resolve the deferred accordingly
- $.when(createGroup(groupName, pt)).then(function (response) {
+ createGroup(groupName, pt).done(function (response) {
deferred.resolve(response.processGroup);
- }, function () {
+ }).fail(function () {
deferred.reject();
});
};
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
index 8cb2b33eae..00142c5a5a 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
@@ -91,6 +91,7 @@ nf.CanvasUtils = (function () {
}
}
},
+
/**
* Calculates the point on the specified bounding box that is closest to the
* specified point.
@@ -151,6 +152,7 @@ nf.CanvasUtils = (function () {
};
}
},
+
/**
* Shows the specified component in the specified group.
*
@@ -165,9 +167,9 @@ nf.CanvasUtils = (function () {
// load a different group if necessary
if (groupId !== nf.Canvas.getGroupId()) {
nf.Canvas.setGroupId(groupId);
- nf.Canvas.reload().then(function () {
+ nf.Canvas.reload().done(function () {
deferred.resolve();
- }, function () {
+ }).fail(function () {
nf.Dialog.showOkDialog({
dialogContent: 'Unable to load the group for the specified component.',
overlayBackground: false
@@ -194,6 +196,7 @@ nf.CanvasUtils = (function () {
});
}
},
+
/**
* Gets the currently selected components and connections.
*
@@ -221,6 +224,7 @@ nf.CanvasUtils = (function () {
// calculate the difference between the center point and the position of this component and convert to screen space
nf.Canvas.View.translate([(center[0] - boundingBox.x) * scale, (center[1] - boundingBox.y) * scale]);
},
+
/**
* Position the component accordingly.
*
@@ -236,6 +240,7 @@ nf.CanvasUtils = (function () {
return 'translate(' + d.component.position.x + ', ' + d.component.position.y + ')';
});
},
+
/**
* Applies single line ellipsis to the component in the specified selection if necessary.
*
@@ -271,6 +276,7 @@ nf.CanvasUtils = (function () {
selection.text(text.substring(0, i) + String.fromCharCode(8230));
}
},
+
/**
* Applies multiline ellipsis to the component in the specified seleciton. Text will
* wrap for the specified number of lines. The last line will be ellipsis if necessary.
@@ -343,6 +349,7 @@ nf.CanvasUtils = (function () {
word = words.pop();
}
},
+
/**
* Updates the active thread count on the specified selection.
*
@@ -388,6 +395,7 @@ nf.CanvasUtils = (function () {
selection.selectAll('text.active-thread-count, rect.active-thread-count-background').style('display', 'none');
}
},
+
/**
* Disables the default browser behavior of following image href when control clicking.
*
@@ -400,6 +408,7 @@ nf.CanvasUtils = (function () {
}
});
},
+
/**
* Handles component bulletins.
*
@@ -456,6 +465,7 @@ nf.CanvasUtils = (function () {
selection.selectAll('image.bulletin-icon').style('display', 'none');
}
},
+
/**
* Adds the specified tooltip to the specified target.
*
@@ -473,6 +483,7 @@ nf.CanvasUtils = (function () {
tip.style('display', 'none');
});
},
+
/**
* Determines if the specified selection is a connection.
*
@@ -481,6 +492,7 @@ nf.CanvasUtils = (function () {
isConnection: function (selection) {
return selection.classed('connection');
},
+
/**
* Determines if the specified selection is a remote process group.
*
@@ -489,6 +501,7 @@ nf.CanvasUtils = (function () {
isRemoteProcessGroup: function (selection) {
return selection.classed('remote-process-group');
},
+
/**
* Determines if the specified selection is a processor.
*
@@ -497,6 +510,7 @@ nf.CanvasUtils = (function () {
isProcessor: function (selection) {
return selection.classed('processor');
},
+
/**
* Determines if the specified selection is a label.
*
@@ -505,6 +519,7 @@ nf.CanvasUtils = (function () {
isLabel: function (selection) {
return selection.classed('label');
},
+
/**
* Determines if the specified selection is an input port.
*
@@ -513,6 +528,7 @@ nf.CanvasUtils = (function () {
isInputPort: function (selection) {
return selection.classed('input-port');
},
+
/**
* Determines if the specified selection is an output port.
*
@@ -521,6 +537,7 @@ nf.CanvasUtils = (function () {
isOutputPort: function (selection) {
return selection.classed('output-port');
},
+
/**
* Determines if the specified selection is a process group.
*
@@ -529,6 +546,7 @@ nf.CanvasUtils = (function () {
isProcessGroup: function (selection) {
return selection.classed('process-group');
},
+
/**
* Determines if the specified selection is a funnel.
*
@@ -537,6 +555,7 @@ nf.CanvasUtils = (function () {
isFunnel: function (selection) {
return selection.classed('funnel');
},
+
/**
* Determines if the components in the specified selection are runnable.
*
@@ -558,6 +577,7 @@ nf.CanvasUtils = (function () {
return runnable;
},
+
/**
* Determines if the component in the specified selection is runnable.
*
@@ -578,6 +598,7 @@ nf.CanvasUtils = (function () {
return runnable;
},
+
/**
* Determines if the components in the specified selection are stoppable.
*
@@ -599,6 +620,7 @@ nf.CanvasUtils = (function () {
return stoppable;
},
+
/**
* Determines if the component in the specified selection is runnable.
*
@@ -617,6 +639,7 @@ nf.CanvasUtils = (function () {
return stoppable;
},
+
/**
* Determines if the specified selection can all start transmitting.
*
@@ -637,6 +660,7 @@ nf.CanvasUtils = (function () {
});
return canStartTransmitting;
},
+
/**
* Determines if the specified selection supports starting transmission.
*
@@ -645,6 +669,7 @@ nf.CanvasUtils = (function () {
canStartTransmitting: function (selection) {
return nf.CanvasUtils.isRemoteProcessGroup(selection);
},
+
/**
* Determines if the specified selection can all stop transmitting.
*
@@ -665,6 +690,7 @@ nf.CanvasUtils = (function () {
});
return canStopTransmitting;
},
+
/**
* Determines if the specified selection can stop transmission.
*
@@ -673,6 +699,7 @@ nf.CanvasUtils = (function () {
canStopTransmitting: function (selection) {
return nf.CanvasUtils.isRemoteProcessGroup(selection);
},
+
/**
* Determines whether the components in the specified selection are deletable.
*
@@ -686,6 +713,7 @@ nf.CanvasUtils = (function () {
return nf.CanvasUtils.supportsModification(selection);
},
+
/**
* Determines whether the specified selection is in a state to support modification.
*
@@ -741,6 +769,7 @@ nf.CanvasUtils = (function () {
}
return supportsModification;
},
+
/**
* Determines the connectable type for the specified source selection.
*
@@ -761,6 +790,7 @@ nf.CanvasUtils = (function () {
}
return type;
},
+
/**
* Determines the connectable type for the specified destination selection.
*
@@ -781,6 +811,7 @@ nf.CanvasUtils = (function () {
}
return type;
},
+
/**
* Determines if the graph is currently in a state to copy.
*
@@ -813,12 +844,14 @@ nf.CanvasUtils = (function () {
// ensure everything selected is copyable
return selection.size() === copyable.size();
},
+
/**
* Determines if something is currently pastable.
*/
isPastable: function () {
return nf.Clipboard.isCopied();
},
+
/**
* Persists the current user view.
*/
@@ -836,6 +869,7 @@ nf.CanvasUtils = (function () {
// store the item
nf.Storage.setItem(name, item);
},
+
/**
* Gets the name for this connection.
*
@@ -849,6 +883,7 @@ nf.CanvasUtils = (function () {
}
return '';
},
+
/**
* Returns the component id of the source of this processor. If the connection is attached
* to a port in a [sub|remote] group, the component id will be that of the group. Otherwise
@@ -863,6 +898,7 @@ nf.CanvasUtils = (function () {
}
return sourceId;
},
+
/**
* Returns the component id of the source of this processor. If the connection is attached
* to a port in a [sub|remote] group, the component id will be that of the group. Otherwise
@@ -877,6 +913,7 @@ nf.CanvasUtils = (function () {
}
return destinationId;
},
+
/**
* Attempts to restore a persisted view. Returns a flag that indicates if the
* view was restored.
@@ -911,6 +948,7 @@ nf.CanvasUtils = (function () {
return viewRestored;
},
+
/**
* Enters the specified group.
*
@@ -944,6 +982,7 @@ nf.CanvasUtils = (function () {
});
});
},
+
/**
* Gets the origin of the bounding box for the specified selection.
*
@@ -966,6 +1005,7 @@ nf.CanvasUtils = (function () {
return origin;
},
+
/**
* Moves the specified components into the specified group.
*
@@ -979,11 +1019,11 @@ nf.CanvasUtils = (function () {
nf.CanvasUtils.eligibleForMove(components, group).done(function () {
// create a snippet for the specified components and link to the data flow
var snippetDetails = nf.Snippet.marshal(components, true);
- nf.Snippet.create(snippetDetails).then(function (response) {
+ nf.Snippet.create(snippetDetails).done(function (response) {
var snippet = response.snippet;
// move the snippet into the target
- nf.Snippet.move(snippet.id, groupData.component.id).then(function () {
+ nf.Snippet.move(snippet.id, groupData.component.id).done(function () {
var componentMap = d3.map();
// add the id to the type's array
@@ -1006,16 +1046,17 @@ nf.CanvasUtils = (function () {
// reload the target group
nf.ProcessGroup.reload(groupData.component);
- }, nf.Common.handleAjaxError).always(function () {
+ }).fail(nf.Common.handleAjaxError).always(function () {
// unable to acutally move the components so attempt to
// unlink and remove just the snippet
nf.Snippet.unlink(snippet.id).done(function () {
nf.Snippet.remove(snippet.id);
});
});
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
});
},
+
/**
* Removes any dangling edges. All components are retained as well as any
* edges whose source and destination are also retained.
@@ -1053,6 +1094,7 @@ nf.CanvasUtils = (function () {
}
});
},
+
/**
* Determines if the specified selection is disconnected from other nodes.
*
@@ -1098,6 +1140,7 @@ nf.CanvasUtils = (function () {
return isDisconnected;
},
+
/**
* Ensures components are eligible to be moved. The new target can be optionally specified.
*
@@ -1138,7 +1181,7 @@ nf.CanvasUtils = (function () {
type: 'GET',
url: config.urls.controller + '/process-groups/' + encodeURIComponent(nf.Canvas.getParentGroupId()) + '/connections',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var connections = response.connections;
var conflictingPorts = [];
@@ -1173,7 +1216,7 @@ nf.CanvasUtils = (function () {
portConnectionDeferred.resolve();
}
- }, function () {
+ }).fail(function () {
portConnectionDeferred.reject();
});
}
@@ -1193,7 +1236,7 @@ nf.CanvasUtils = (function () {
verbose: true
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var processGroup = response.processGroup;
var processGroupContents = processGroup.contents;
@@ -1224,24 +1267,24 @@ nf.CanvasUtils = (function () {
} else {
portNameDeferred.resolve();
}
- }, function () {
+ }).fail(function () {
portNameDeferred.reject();
});
}).promise();
};
// execute the checks in order
- $.when(portConnectionCheck()).then(function () {
+ portConnectionCheck().done(function () {
if (nf.Common.isDefinedAndNotNull(group)) {
- $.when(portNameCheck()).then(function () {
+ $.when(portNameCheck()).done(function () {
deferred.resolve();
- }, function () {
+ }).fail(function () {
deferred.reject();
});
} else {
deferred.resolve();
}
- }, function () {
+ }).fail(function () {
deferred.reject();
});
} else {
@@ -1249,6 +1292,7 @@ nf.CanvasUtils = (function () {
}
}).promise();
},
+
/**
* Determines if the component in the specified selection is a valid connection source.
*
@@ -1264,6 +1308,7 @@ nf.CanvasUtils = (function () {
nf.CanvasUtils.isRemoteProcessGroup(selection) || nf.CanvasUtils.isInputPort(selection) ||
nf.CanvasUtils.isFunnel(selection);
},
+
/**
* Determines if the component in the specified selection is a valid connection destination.
*
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
index e72b5c86f3..c4798beadc 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
@@ -170,7 +170,7 @@ nf.Canvas = (function () {
type: 'GET',
url: config.urls.revision,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.revision)) {
var revision = response.revision;
var currentRevision = nf.Client.getRevision();
@@ -187,7 +187,7 @@ nf.Canvas = (function () {
}
}
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -534,7 +534,7 @@ nf.Canvas = (function () {
type: 'GET',
url: config.urls.banners,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// ensure the banners response is specified
if (nf.Common.isDefinedAndNotNull(response.banners)) {
if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
@@ -558,7 +558,7 @@ nf.Canvas = (function () {
// update the graph dimensions
updateGraphSize();
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -614,7 +614,7 @@ nf.Canvas = (function () {
type: 'GET',
url: config.urls.status,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// report the updated status
if (nf.Common.isDefinedAndNotNull(response.controllerStatus)) {
var controllerStatus = response.controllerStatus;
@@ -712,7 +712,7 @@ nf.Canvas = (function () {
$('#has-pending-accounts').hide();
}
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -729,7 +729,7 @@ nf.Canvas = (function () {
verbose: true
},
dataType: 'json'
- }).then(function (processGroupResponse) {
+ }).done(function (processGroupResponse) {
// set the revision
nf.Client.setRevision(processGroupResponse.revision);
@@ -759,7 +759,7 @@ nf.Canvas = (function () {
// update the toolbar
nf.CanvasToolbar.refresh();
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -777,7 +777,7 @@ nf.Canvas = (function () {
recursive: false
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// report the updated stats
if (nf.Common.isDefinedAndNotNull(response.processGroupStatus)) {
var processGroupStatus = response.processGroupStatus;
@@ -789,7 +789,7 @@ nf.Canvas = (function () {
$('#stats-last-refreshed').text(processGroupStatus.statsLastRefreshed);
}
deferred.resolve();
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
// if clustered, a 404 likely means the flow status at the ncm is stale
if (!nf.Canvas.isClustered() || xhr.status !== 404) {
nf.Common.handleAjaxError(xhr, status, error);
@@ -857,9 +857,9 @@ nf.Canvas = (function () {
}
// don't load the status until the graph is loaded
- reloadStatus(nf.Canvas.getGroupId()).then(function () {
+ reloadStatus(nf.Canvas.getGroupId()).done(function () {
deferred.resolve(processGroupResult);
- }, function () {
+ }).fail(function () {
deferred.reject();
});
});
@@ -871,9 +871,9 @@ nf.Canvas = (function () {
reloadStatus: function () {
return $.Deferred(function (deferred) {
// refresh the status and check any bulletins
- $.when(reloadStatus(nf.Canvas.getGroupId()), reloadFlowStatus()).then(function () {
+ $.when(reloadStatus(nf.Canvas.getGroupId()), reloadFlowStatus()).done(function () {
deferred.resolve();
- }, function () {
+ }).fail(function () {
deferred.reject();
});
}).promise();
@@ -900,13 +900,13 @@ nf.Canvas = (function () {
url: config.urls.cluster
}).done(function (response, status, xhr) {
clustered = true;
- deferred.resolveWith(xhr, [response, status, xhr]);
+ deferred.resolve(response, status, xhr);
}).fail(function (xhr, status, error) {
if (xhr.status === 404) {
clustered = false;
- deferred.resolveWith(xhr, ['', 'success', xhr]);
+ deferred.resolve('', 'success', xhr);
} else {
- deferred.rejectWith(xhr, [xhr, status, error]);
+ deferred.reject(xhr, status, error);
}
});
}).promise();
@@ -919,7 +919,7 @@ nf.Canvas = (function () {
});
// ensure the authorities and config request is processed first
- $.when(authoritiesXhr, configXhr).then(function (authoritiesResult, configResult) {
+ $.when(authoritiesXhr, configXhr).done(function (authoritiesResult, configResult) {
var authoritiesResponse = authoritiesResult[0];
var configResponse = configResult[0];
@@ -934,7 +934,7 @@ nf.Canvas = (function () {
var configDetails = configResponse.config;
// when both request complete, load the application
- isClusteredRequest.then(function () {
+ isClusteredRequest.done(function () {
// get the auto refresh interval
var autoRefreshIntervalSeconds = parseInt(configDetails.autoRefreshIntervalSeconds, 10);
@@ -942,7 +942,7 @@ nf.Canvas = (function () {
secureSiteToSite = configDetails.siteToSiteSecure;
// load d3
- loadD3().then(function () {
+ loadD3().done(function () {
nf.Storage.init();
// initialize the application
@@ -982,7 +982,7 @@ nf.Canvas = (function () {
nf.ConnectionDetails.init();
nf.RemoteProcessGroupDetails.init();
nf.GoTo.init();
- nf.Graph.init().then(function () {
+ nf.Graph.init().done(function () {
// determine the split between the polling
var pollingSplit = autoRefreshIntervalSeconds / 2;
@@ -994,10 +994,10 @@ nf.Canvas = (function () {
// hide the splash screen
nf.Canvas.hideSplash();
- }, nf.Common.handleAjaxError);
- }, nf.Common.handleAjaxError);
- }, nf.Common.handleAjaxError);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
/**
* Defines the gradient colors used to render processors.
@@ -1214,6 +1214,7 @@ nf.Canvas = (function () {
// add the behavior to the canvas and disable dbl click zoom
svg.call(behavior).on('dblclick.zoom', null);
},
+
/**
* Whether or not a component should be rendered based solely on the current scale.
*
@@ -1222,6 +1223,7 @@ nf.Canvas = (function () {
shouldRenderPerScale: function () {
return nf.Canvas.View.scale() >= MIN_SCALE_TO_RENDER;
},
+
/**
* Updates component visibility based on the current translation/scale.
*/
@@ -1229,6 +1231,7 @@ nf.Canvas = (function () {
updateComponentVisibility();
nf.Graph.pan();
},
+
/**
* Sets/gets the current translation.
*
@@ -1241,6 +1244,7 @@ nf.Canvas = (function () {
behavior.translate(translate);
}
},
+
/**
* Sets/gets the current scale.
*
@@ -1253,6 +1257,7 @@ nf.Canvas = (function () {
behavior.scale(scale);
}
},
+
/**
* Zooms in a single zoom increment.
*/
@@ -1277,6 +1282,7 @@ nf.Canvas = (function () {
height: 1
});
},
+
/**
* Zooms out a single zoom increment.
*/
@@ -1301,6 +1307,7 @@ nf.Canvas = (function () {
height: 1
});
},
+
/**
* Zooms to fit the entire graph on the canvas.
*/
@@ -1347,6 +1354,7 @@ nf.Canvas = (function () {
height: canvasHeight / newScale
});
},
+
/**
* Zooms to the actual size (1 to 1).
*/
@@ -1395,6 +1403,7 @@ nf.Canvas = (function () {
// center as appropriate
nf.CanvasUtils.centerBoundingBox(box);
},
+
/**
* Refreshes the view based on the configured translation and scale.
*
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-clipboard.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-clipboard.js
index d4a035b37f..4f22d7e697 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-clipboard.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-clipboard.js
@@ -34,6 +34,7 @@ nf.Clipboard = (function () {
addListener: function (listener, funct) {
listeners[listener] = funct;
},
+
/**
* Remove the specified listener.
*
@@ -44,6 +45,7 @@ nf.Clipboard = (function () {
delete listeners[listener];
}
},
+
/**
* Copy the specified data.
*
@@ -57,12 +59,14 @@ nf.Clipboard = (function () {
listeners[listener].call(listener, COPY, data);
}
},
+
/**
* Checks to see if any data has been copied.
*/
isCopied: function () {
return nf.Common.isDefinedAndNotNull(data);
},
+
/**
* Gets the most recent data thats copied. This operation
* will remove the corresponding data from the clipboard.
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connectable.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connectable.js
index 31370b8dc4..598b2ef601 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connectable.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connectable.js
@@ -157,6 +157,7 @@ nf.Connectable = (function () {
d3.select(this).remove();
});
},
+
activate: function (components) {
components
.on('mouseenter.connectable', function (d) {
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
index d9d1f7703c..a8e4accbfb 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
@@ -250,7 +250,7 @@ nf.ConnectionConfiguration = (function () {
verbose: true
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var processGroup = response.processGroup;
var processGroupContents = processGroup.contents;
@@ -301,7 +301,7 @@ nf.ConnectionConfiguration = (function () {
deferred.reject();
}
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
// handle the error
nf.Common.handleAjaxError(xhr, status, error);
@@ -327,7 +327,7 @@ nf.ConnectionConfiguration = (function () {
verbose: true
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var remoteProcessGroup = response.remoteProcessGroup;
var remoteProcessGroupContents = remoteProcessGroup.contents;
@@ -379,7 +379,7 @@ nf.ConnectionConfiguration = (function () {
deferred.reject();
}
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
// handle the error
nf.Common.handleAjaxError(xhr, status, error);
@@ -475,7 +475,7 @@ nf.ConnectionConfiguration = (function () {
verbose: true
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var processGroup = response.processGroup;
var processGroupContents = processGroup.contents;
@@ -526,7 +526,7 @@ nf.ConnectionConfiguration = (function () {
deferred.reject();
}
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
// handle the error
nf.Common.handleAjaxError(xhr, status, error);
@@ -551,7 +551,7 @@ nf.ConnectionConfiguration = (function () {
verbose: true
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var remoteProcessGroup = response.remoteProcessGroup;
var remoteProcessGroupContents = remoteProcessGroup.contents;
@@ -603,7 +603,7 @@ nf.ConnectionConfiguration = (function () {
deferred.reject();
}
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
// handle the error
nf.Common.handleAjaxError(xhr, status, error);
@@ -848,7 +848,7 @@ nf.ConnectionConfiguration = (function () {
destinationType: destinationType
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -876,7 +876,7 @@ nf.ConnectionConfiguration = (function () {
// update the birdseye
nf.Birdseye.refresh();
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
// handle the error
nf.Common.handleAjaxError(xhr, status, error);
});
@@ -935,7 +935,7 @@ nf.ConnectionConfiguration = (function () {
destinationGroupId: destinationGroupId
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.connection)) {
var connection = response.connection;
@@ -959,7 +959,7 @@ nf.ConnectionConfiguration = (function () {
nf.RemoteProcessGroup.reload(destinationData.component);
}
}
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
nf.Dialog.showOkDialog({
dialogContent: nf.Common.escapeHtml(xhr.responseText),
@@ -1128,7 +1128,7 @@ nf.ConnectionConfiguration = (function () {
type: 'GET',
url: config.urls.prioritizers,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// create an element for each available prioritizer
$.each(response.prioritizerTypes, function (i, documentedType) {
nf.ConnectionConfiguration.addAvailablePrioritizer('#prioritizer-available', documentedType);
@@ -1142,8 +1142,9 @@ nf.ConnectionConfiguration = (function () {
opacity: 0.6
});
$('#prioritizer-available, #prioritizer-selected').disableSelection();
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Adds the specified prioritizer to the specified container.
*
@@ -1165,6 +1166,7 @@ nf.ConnectionConfiguration = (function () {
}));
}
},
+
/**
* Shows the dialog for creating a new connection.
*
@@ -1209,6 +1211,7 @@ nf.ConnectionConfiguration = (function () {
removeTempEdge();
});
},
+
/**
* Shows the configuration for the specified connection. If a destination is
* specified it will be considered a new destination.
@@ -1232,7 +1235,7 @@ nf.ConnectionConfiguration = (function () {
}
// initialize the connection dialog
- $.when(initializeSourceEditConnectionDialog(source), initializeDestinationEditConnectionDialog(destination)).then(function () {
+ $.when(initializeSourceEditConnectionDialog(source), initializeDestinationEditConnectionDialog(destination)).done(function () {
var availableRelationships = connection.availableRelationships;
var selectedRelationships = connection.selectedRelationships;
@@ -1311,9 +1314,9 @@ nf.ConnectionConfiguration = (function () {
if (nf.CanvasUtils.isProcessor(source)) {
if (selectedRelationships.length > 0) {
// if there are relationships selected update
- updateConnection(selectedRelationships).then(function () {
+ updateConnection(selectedRelationships).done(function () {
deferred.resolve();
- }, function () {
+ }).fail(function () {
deferred.reject();
});
} else {
@@ -1328,9 +1331,9 @@ nf.ConnectionConfiguration = (function () {
}
} else {
// there are no relationships, but the source wasn't a processor, so update anyway
- updateConnection(undefined).then(function () {
+ updateConnection(undefined).done(function () {
deferred.resolve();
- }, function () {
+ }).fail(function () {
deferred.reject();
});
}
@@ -1366,7 +1369,7 @@ nf.ConnectionConfiguration = (function () {
if (relationshipNames.is(':visible') && relationshipNames.get(0).scrollHeight > relationshipNames.innerHeight()) {
relationshipNames.css('border-width', '1px');
}
- }, function () {
+ }).fail(function () {
deferred.reject();
});
}).promise();
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js
index d30eae580f..0b0c40a18d 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js
@@ -945,13 +945,13 @@ nf.Connection = (function () {
data: JSON.stringify(entity),
dataType: 'json',
contentType: 'application/json'
- }).then(function (response) {
+ }).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
// request was successful, update the entry
nf.Connection.set(response.connection);
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
nf.Dialog.showOkDialog({
dialogContent: nf.Common.escapeHtml(xhr.responseText),
@@ -973,6 +973,7 @@ nf.Connection = (function () {
selfLoopXOffset: (dimensions.width / 2) + 5,
selfLoopYOffset: 25
},
+
init: function () {
connectionMap = d3.map();
@@ -1122,7 +1123,7 @@ nf.Connection = (function () {
url: connectionData.component.uri,
data: updatedConnectionData,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var connectionData = response.connection;
// update the revision
@@ -1130,7 +1131,7 @@ nf.Connection = (function () {
// refresh to update the label
nf.Connection.set(connectionData);
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
nf.Dialog.showOkDialog({
dialogContent: nf.Common.escapeHtml(xhr.responseText),
@@ -1268,6 +1269,7 @@ nf.Connection = (function () {
d3.event.sourceEvent.stopPropagation();
});
},
+
/**
* Populates the graph with the specified connections.
*
@@ -1304,12 +1306,14 @@ nf.Connection = (function () {
// apply the selection and handle all new connection
select().enter().call(renderConnections, selectAll);
},
+
/**
* Reorders the connections based on their current z index.
*/
reorder: function () {
d3.selectAll('g.connection').call(sort);
},
+
/**
* Sets the value of the specified connection.
*
@@ -1343,6 +1347,7 @@ nf.Connection = (function () {
set(connection);
}
},
+
/**
* Sets the connection status using the specified status.
*
@@ -1364,6 +1369,7 @@ nf.Connection = (function () {
// update the visible connections
d3.selectAll('g.connection.visible').call(updateConnectionStatus);
},
+
/**
* Refreshes the connection in the UI.
*
@@ -1376,12 +1382,14 @@ nf.Connection = (function () {
d3.selectAll('g.connection').call(updateConnections, true, true);
}
},
+
/**
* Refreshes the components necessary after a pan event.
*/
pan: function () {
d3.selectAll('g.connection.entering, g.connection.leaving').call(updateConnections, false, true);
},
+
/**
* Removes the specified connection.
*
@@ -1399,12 +1407,14 @@ nf.Connection = (function () {
// apply the selection and handle all removed connections
select().exit().call(removeConnections);
},
+
/**
* Removes all processors.
*/
removeAll: function () {
nf.Connection.remove(connectionMap.keys());
},
+
/**
* Reloads the connection state from the server and refreshes the UI.
*
@@ -1421,6 +1431,7 @@ nf.Connection = (function () {
});
}
},
+
/**
* Gets the connection that have a source or destination component with the specified id.
*
@@ -1439,6 +1450,7 @@ nf.Connection = (function () {
});
return connections;
},
+
/**
* If the connection id is specified it is returned. If no connection id
* specified, all connections are returned.
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-context-menu.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-context-menu.js
index dff1fdd00a..6365dd5f6d 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-context-menu.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-context-menu.js
@@ -417,12 +417,14 @@ nf.ContextMenu = (function () {
'y': position[1]
});
},
+
/**
* Hides the context menu.
*/
hide: function () {
$('#context-menu').hide();
},
+
/**
* Activates the context menu for the components in the specified selection.
*
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-draggable.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-draggable.js
index 0865e7ea6a..2eb3f1b3b8 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-draggable.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-draggable.js
@@ -57,7 +57,7 @@ nf.Draggable = (function () {
y: newPosition.y
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -69,7 +69,7 @@ nf.Draggable = (function () {
type: d.type,
id: d.component.id
});
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
nf.Dialog.showOkDialog({
dialogContent: nf.Common.escapeHtml(xhr.responseText),
@@ -114,7 +114,7 @@ nf.Draggable = (function () {
data: JSON.stringify(entity),
dataType: 'json',
contentType: 'application/json'
- }).then(function (response) {
+ }).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -132,7 +132,7 @@ nf.Draggable = (function () {
type: d.type,
id: d.component.id
});
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
nf.Dialog.showOkDialog({
dialogContent: nf.Common.escapeHtml(xhr.responseText),
@@ -300,6 +300,7 @@ nf.Draggable = (function () {
dragSelection.remove();
});
},
+
/**
* Activates the drag behavior for the components in the specified selection.
*
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-funnel.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-funnel.js
index 84263d6542..c21969e312 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-funnel.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-funnel.js
@@ -135,6 +135,7 @@ nf.Funnel = (function () {
'class': 'funnels'
});
},
+
/**
* Populates the graph with the specified funnels.
*
@@ -165,6 +166,7 @@ nf.Funnel = (function () {
// apply the selection and handle all new processors
select().enter().call(renderFunnels, selectAll);
},
+
/**
* If the funnel id is specified it is returned. If no funnel id
* specified, all funnels are returned.
@@ -178,6 +180,7 @@ nf.Funnel = (function () {
return funnelMap.get(id);
}
},
+
/**
* If the funnel id is specified it is refresh according to the current
* state. If not funnel id is specified, all funnels are refreshed.
@@ -191,6 +194,7 @@ nf.Funnel = (function () {
d3.selectAll('g.funnel').call(updateFunnels);
}
},
+
/**
* Reloads the funnel state from the server and refreshes the UI.
* If the funnel is currently unknown, this function just returns.
@@ -208,6 +212,7 @@ nf.Funnel = (function () {
});
}
},
+
/**
* Positions the component.
*
@@ -216,6 +221,7 @@ nf.Funnel = (function () {
position: function (id) {
d3.select('#id-' + id).call(nf.CanvasUtils.position);
},
+
/**
* Sets the specified funnel(s). If the is an array, it
* will set each funnel. If it is not an array, it will
@@ -244,6 +250,7 @@ nf.Funnel = (function () {
set(funnels);
}
},
+
/**
* Removes the specified funnel.
*
@@ -261,6 +268,7 @@ nf.Funnel = (function () {
// apply the selection and handle all removed funnels
select().exit().call(removeFunnels);
},
+
/**
* Removes all processors.
*/
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js
index 4eeee43cb1..ddc501a7f7 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js
@@ -336,6 +336,7 @@ nf.GoTo = (function () {
}
});
},
+
/**
* Shows components downstream from a processor.
*
@@ -348,7 +349,7 @@ nf.GoTo = (function () {
type: 'GET',
url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var connections = response.connections;
// populate the downstream dialog
@@ -372,8 +373,9 @@ nf.GoTo = (function () {
// show the downstream dialog
$('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show');
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Shows components upstream from a processor.
*
@@ -386,7 +388,7 @@ nf.GoTo = (function () {
type: 'GET',
url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var connections = response.connections;
// populate the upstream dialog
@@ -410,8 +412,9 @@ nf.GoTo = (function () {
// show the upstream dialog
$('#connections-dialog').modal('setHeaderText', 'Upstream Connections').modal('show');
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Shows components downstream from a process group or a remote process group.
*
@@ -424,7 +427,7 @@ nf.GoTo = (function () {
type: 'GET',
url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var connections = response.connections;
// populate the downstream dialog
@@ -448,8 +451,9 @@ nf.GoTo = (function () {
// show the downstream dialog
$('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show');
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Shows components upstream from a process group or a remote process group.
*
@@ -462,7 +466,7 @@ nf.GoTo = (function () {
type: 'GET',
url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var connections = response.connections;
// populate the upstream dialog
@@ -486,8 +490,9 @@ nf.GoTo = (function () {
// show the dialog
$('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show');
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Shows components downstream from an input port.
*
@@ -500,7 +505,7 @@ nf.GoTo = (function () {
type: 'GET',
url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var connections = response.connections;
// populate the downstream dialog
@@ -524,8 +529,9 @@ nf.GoTo = (function () {
// show the downstream dialog
$('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show');
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Shows components upstream from an input port.
*
@@ -538,7 +544,7 @@ nf.GoTo = (function () {
type: 'GET',
url: config.urls.controller + '/process-groups/' + encodeURIComponent(nf.Canvas.getParentGroupId()) + '/connections',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var connections = response.connections;
// populate the upstream dialog
@@ -565,8 +571,9 @@ nf.GoTo = (function () {
// show the upstream dialog
$('#connections-dialog').modal('setHeaderText', 'Upstream Connections').modal('show');
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Shows components downstream from an output port.
*
@@ -579,7 +586,7 @@ nf.GoTo = (function () {
type: 'GET',
url: config.urls.controller + '/process-groups/' + encodeURIComponent(nf.Canvas.getParentGroupId()) + '/connections',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var connections = response.connections;
// populate the downstream dialog
@@ -606,8 +613,9 @@ nf.GoTo = (function () {
// show the downstream dialog
$('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show');
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Shows components upstream from an output port.
*
@@ -620,7 +628,7 @@ nf.GoTo = (function () {
type: 'GET',
url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var connections = response.connections;
// populate the upstream dialog
@@ -644,8 +652,9 @@ nf.GoTo = (function () {
// show the upstream dialog
$('#connections-dialog').modal('setHeaderText', 'Upstream Connections').modal('show');
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Shows components downstream from a funnel.
*
@@ -658,7 +667,7 @@ nf.GoTo = (function () {
type: 'GET',
url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var connections = response.connections;
// populate the downstream dialog
@@ -679,8 +688,9 @@ nf.GoTo = (function () {
// show the downstream dialog
$('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show');
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Shows components upstream from a funnel.
*
@@ -693,7 +703,7 @@ nf.GoTo = (function () {
type: 'GET',
url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var connections = response.connections;
// populate the upstream dialog
@@ -714,7 +724,7 @@ nf.GoTo = (function () {
// show the upstream dialog
$('#connections-dialog').modal('setHeaderText', 'Upstream Connections').modal('show');
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
}
};
}());
\ No newline at end of file
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-graph.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-graph.js
index b1c5f17e06..100f0f8e4b 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-graph.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-graph.js
@@ -55,6 +55,7 @@ nf.Graph = (function () {
// load the graph
return nf.CanvasUtils.enterGroup(nf.Canvas.getGroupId());
},
+
/**
* Populates the graph with the resources defined in the response.
*
@@ -96,6 +97,7 @@ nf.Graph = (function () {
nf.Connection.add(processGroupContents.connections, selectAll);
}
},
+
/**
* Gets the components currently on the canvas.
*/
@@ -110,6 +112,7 @@ nf.Graph = (function () {
connections: nf.Connection.get()
};
},
+
/**
* Sets the components contained within the specified process group.
*
@@ -142,6 +145,7 @@ nf.Graph = (function () {
nf.Connection.set(processGroupContents.connections);
}
},
+
/**
* Populates the status for the components specified. This will update the content
* of the existing components on the graph and will not cause them to be repainted.
@@ -160,6 +164,7 @@ nf.Graph = (function () {
nf.Processor.setStatus(processGroupStatus.processorStatus);
nf.Connection.setStatus(processGroupStatus.connectionStatus);
},
+
/**
* Clears all the components currently on the canvas. This function does not automatically refresh.
*/
@@ -173,6 +178,7 @@ nf.Graph = (function () {
nf.Processor.removeAll();
nf.Connection.removeAll();
},
+
/**
* Refreshes all components currently on the canvas.
*/
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js
index 51dacfc37a..4c8e5553c9 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js
@@ -41,13 +41,13 @@ nf.LabelConfiguration = (function () {
'style[font-size]': fontSize.value
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
// get the label out of the response
nf.Label.set(response.label);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
// reset and hide the dialog
@@ -92,6 +92,7 @@ nf.LabelConfiguration = (function () {
}
});
},
+
/**
* Shows the configuration for the specified label.
*
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js
index 0d5db9e7e0..c1754186c7 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js
@@ -283,6 +283,7 @@ nf.Label = (function () {
width: dimensions.width,
height: dimensions.height
},
+
/**
* Initializes of the Processor handler.
*/
@@ -342,13 +343,13 @@ nf.Label = (function () {
'height': labelData.dimensions.height
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
// request was successful, update the entry
nf.Label.set(response.label);
- }, function () {
+ }).fail(function () {
// determine the previous width
var width = dimensions.width;
if (nf.Common.isDefinedAndNotNull(labelData.component.width)) {
@@ -376,6 +377,7 @@ nf.Label = (function () {
d3.event.sourceEvent.stopPropagation();
});
},
+
/**
* Populates the graph with the specified labels.
*
@@ -421,6 +423,7 @@ nf.Label = (function () {
// apply the selection and handle all new labels
select().enter().call(renderLabels, selectAll);
},
+
/**
* If the label id is specified it is returned. If no label id
* specified, all labels are returned.
@@ -434,6 +437,7 @@ nf.Label = (function () {
return labelMap.get(id);
}
},
+
/**
* If the label id is specified it is refresh according to the current
* state. If not label id is specified, all labels are refreshed.
@@ -447,6 +451,7 @@ nf.Label = (function () {
d3.selectAll('g.label').call(updateLabels);
}
},
+
/**
* Reloads the label state from the server and refreshes the UI.
* If the label is currently unknown, this function just returns.
@@ -464,6 +469,7 @@ nf.Label = (function () {
});
}
},
+
/**
* Positions the component.
*
@@ -472,6 +478,7 @@ nf.Label = (function () {
position: function (id) {
d3.select('#id-' + id).call(position);
},
+
/**
* Sets the specified label(s). If the is an array, it
* will set each label. If it is not an array, it will
@@ -516,6 +523,7 @@ nf.Label = (function () {
set(labels);
}
},
+
/**
* Removes the specified label.
*
@@ -533,12 +541,14 @@ nf.Label = (function () {
// apply the selection and handle all removed labels
select().exit().call(removeLabels);
},
+
/**
* Removes all label.
*/
removeAll: function () {
nf.Label.remove(labelMap.keys());
},
+
/**
* Returns the default color that should be used when drawing a label.
*/
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js
index 2b31401cec..189f19f677 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js
@@ -58,7 +58,7 @@ nf.PortConfiguration = (function () {
data: data,
url: portData.component.uri,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -74,7 +74,7 @@ nf.PortConfiguration = (function () {
// close the details panel
$('#port-configuration').modal('hide');
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
// handle bad request locally to keep the dialog open, allowing the user
// to make changes. if the request fails for another reason, the dialog
// should be closed so the issue can be addressed (stale flow for instance)
@@ -128,6 +128,7 @@ nf.PortConfiguration = (function () {
init: function () {
initPortConfigurationDialog();
},
+
/**
* Shows the details for the specified selection.
*
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-details.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-details.js
index 2c19898184..6b4bd8f021 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-details.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-details.js
@@ -41,6 +41,7 @@ nf.PortDetails = (function () {
}
});
},
+
showDetails: function (selection) {
// if the specified component is a processor, load its properties
if (nf.CanvasUtils.isInputPort(selection) || nf.CanvasUtils.isOutputPort(selection)) {
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js
index e80ff561da..4eb365399d 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js
@@ -446,6 +446,7 @@ nf.Port = (function () {
'class': 'ports'
});
},
+
/**
* Populates the graph with the specified ports.
*
@@ -485,6 +486,7 @@ nf.Port = (function () {
// apply the selection and handle all new ports
select().enter().call(renderPorts, selectAll);
},
+
/**
* If the port id is specified it is returned. If no port id
* specified, all ports are returned.
@@ -498,6 +500,7 @@ nf.Port = (function () {
return portMap.get(id);
}
},
+
/**
* If the port id is specified it is refresh according to the current
* state. If not port id is specified, all ports are refreshed.
@@ -511,12 +514,14 @@ nf.Port = (function () {
d3.selectAll('g.input-port, g.output-port').call(updatePorts);
}
},
+
/**
* Refreshes the components necessary after a pan event.
*/
pan: function () {
d3.selectAll('g.input-port.entering, g.output-port.entering, g.input-port.leaving, g.output-port.leaving').call(updatePorts);
},
+
/**
* Reloads the port state from the server and refreshes the UI.
* If the port is currently unknown, this function just returns.
@@ -538,6 +543,7 @@ nf.Port = (function () {
});
}
},
+
/**
* Positions the component.
*
@@ -546,6 +552,7 @@ nf.Port = (function () {
position: function (id) {
d3.select('#id-' + id).call(nf.CanvasUtils.position);
},
+
/**
* Sets the specified port(s). If the is an array, it
* will set each port. If it is not an array, it will
@@ -574,6 +581,7 @@ nf.Port = (function () {
set(ports);
}
},
+
/**
* Sets the port status using the specified status.
*
@@ -595,6 +603,7 @@ nf.Port = (function () {
// update the visible ports
d3.selectAll('g.input-port.visible, g.output-port.visible').call(updatePortStatus);
},
+
/**
* Removes the specified port.
*
@@ -612,6 +621,7 @@ nf.Port = (function () {
// apply the selection and handle all removed ports
select().exit().call(removePorts);
},
+
/**
* Removes all ports..
*/
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js
index b74d0b49c6..de7a2d8a4a 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js
@@ -42,7 +42,7 @@ nf.ProcessGroupConfiguration = (function () {
},
url: processGroupData.component.uri,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.processGroup)) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -53,7 +53,7 @@ nf.ProcessGroupConfiguration = (function () {
// close the details panel
$('#process-group-configuration').modal('hide');
}
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
// close the details panel
$('#process-group-configuration').modal('hide');
@@ -80,6 +80,7 @@ nf.ProcessGroupConfiguration = (function () {
}
});
},
+
/**
* Shows the details for the specified selection.
*
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-details.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-details.js
index 56f00612d8..7c6baddc81 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-details.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-details.js
@@ -40,6 +40,7 @@ nf.ProcessGroupDetails = (function () {
}
});
},
+
showDetails: function (selection) {
// if the specified selection is a process group
if (nf.CanvasUtils.isProcessGroup(selection)) {
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js
index 180484af67..a585fc807b 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js
@@ -888,6 +888,7 @@ nf.ProcessGroup = (function () {
'class': 'process-groups'
});
},
+
/**
* Populates the graph with the specified process groups.
*
@@ -918,6 +919,7 @@ nf.ProcessGroup = (function () {
// apply the selection and handle all new process group
select().enter().call(renderProcessGroups, selectAll);
},
+
/**
* If the process group id is specified it is returned. If no process group id
* specified, all process groups are returned.
@@ -931,6 +933,7 @@ nf.ProcessGroup = (function () {
return processGroupMap.get(id);
}
},
+
/**
* If the process group id is specified it is refresh according to the current
* state. If no process group id is specified, all process groups are refreshed.
@@ -944,12 +947,14 @@ nf.ProcessGroup = (function () {
d3.selectAll('g.process-group').call(updateProcessGroups);
}
},
+
/**
* Refreshes the components necessary after a pan event.
*/
pan: function () {
d3.selectAll('g.process-group.entering, g.process-group.leaving').call(updateProcessGroups);
},
+
/**
* Reloads the process group state from the server and refreshes the UI.
* If the process group is currently unknown, this function just returns.
@@ -967,6 +972,7 @@ nf.ProcessGroup = (function () {
});
}
},
+
/**
* Positions the component.
*
@@ -975,6 +981,7 @@ nf.ProcessGroup = (function () {
position: function (id) {
d3.select('#id-' + id).call(nf.CanvasUtils.position);
},
+
/**
* Sets the specified process group(s). If the is an array, it
* will set each process group. If it is not an array, it will
@@ -1003,6 +1010,7 @@ nf.ProcessGroup = (function () {
set(processGroups);
}
},
+
/**
* Sets the process group status using the specified status.
*
@@ -1024,6 +1032,7 @@ nf.ProcessGroup = (function () {
// update the visible process groups
d3.selectAll('g.process-group.visible').call(updateProcessGroupStatus);
},
+
/**
* Removes the specified process group.
*
@@ -1041,6 +1050,7 @@ nf.ProcessGroup = (function () {
// apply the selection and handle all removed process groups
select().exit().call(removeProcessGroups);
},
+
/**
* Removes all process groups.
*/
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
index d8025ecf88..a904e6da67 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
@@ -454,6 +454,7 @@ nf.ProcessorConfiguration = (function () {
// initialize the property table
nf.ProcessorPropertyTable.init();
},
+
/**
* Shows the configuration dialog for the specified processor.
*
@@ -586,7 +587,7 @@ nf.ProcessorConfiguration = (function () {
dataType: 'json',
processData: false,
contentType: 'application/json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.processor)) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -597,7 +598,7 @@ nf.ProcessorConfiguration = (function () {
// close the details panel
$('#processor-configuration').modal('hide');
}
- }, handleProcessorConfigurationError);
+ }).fail(handleProcessorConfigurationError);
}
}
}
@@ -650,7 +651,7 @@ nf.ProcessorConfiguration = (function () {
dataType: 'json',
processData: false,
contentType: 'application/json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.processor)) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -658,7 +659,7 @@ nf.ProcessorConfiguration = (function () {
// open the custom ui
openCustomUi();
}
- }, handleProcessorConfigurationError);
+ }).fail(handleProcessorConfigurationError);
}
}
});
@@ -679,7 +680,7 @@ nf.ProcessorConfiguration = (function () {
type: 'GET',
url: '../nifi-api/controller/history/processors/' + encodeURIComponent(processor.id),
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var processorHistory = response.processorHistory;
// record the processor history
@@ -696,7 +697,7 @@ nf.ProcessorConfiguration = (function () {
if (processorRelationships.is(':visible') && processorRelationships.get(0).scrollHeight > processorRelationships.innerHeight()) {
processorRelationships.css('border-width', '1px');
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
}
}
};
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-table.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-table.js
index 486ded6aaa..3ffc17bde4 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-table.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-table.js
@@ -325,6 +325,7 @@ nf.ProcessorPropertyTable = (function () {
config: {
sensitiveText: 'Sensitive value set'
},
+
/**
* Initializes the property table.
*/
@@ -332,6 +333,7 @@ nf.ProcessorPropertyTable = (function () {
initNewPropertyDialog();
initProcessorPropertiesTable();
},
+
/**
* Determines if the specified property is sensitive.
*
@@ -344,6 +346,7 @@ nf.ProcessorPropertyTable = (function () {
return false;
}
},
+
/**
* Determines if the specified property is required.
*
@@ -356,6 +359,7 @@ nf.ProcessorPropertyTable = (function () {
return false;
}
},
+
/**
* Determines if the specified property is required.
*
@@ -368,6 +372,7 @@ nf.ProcessorPropertyTable = (function () {
return false;
}
},
+
/**
* Gets the allowable values for the specified property.
*
@@ -380,6 +385,7 @@ nf.ProcessorPropertyTable = (function () {
return null;
}
},
+
/**
* Returns whether the specified property supports EL.
*
@@ -392,6 +398,7 @@ nf.ProcessorPropertyTable = (function () {
return false;
}
},
+
/**
* Saves the last edited row in the specified grid.
*/
@@ -403,6 +410,7 @@ nf.ProcessorPropertyTable = (function () {
editController.commitCurrentEdit();
}
},
+
/**
* Cancels the edit in the specified row.
*/
@@ -414,6 +422,7 @@ nf.ProcessorPropertyTable = (function () {
editController.cancelCurrentEdit();
}
},
+
/**
* Deletes the property in the specified row.
*
@@ -432,6 +441,7 @@ nf.ProcessorPropertyTable = (function () {
propertyData.updateItem(property.id, property);
}
},
+
/**
* Update the size of the grid based on its container's current size.
*/
@@ -441,6 +451,7 @@ nf.ProcessorPropertyTable = (function () {
propertyGrid.resizeCanvas();
}
},
+
/**
* Loads the specified properties.
*
@@ -497,6 +508,7 @@ nf.ProcessorPropertyTable = (function () {
propertyData.endUpdate();
}
},
+
/**
* Determines if a save is required.
*/
@@ -515,6 +527,7 @@ nf.ProcessorPropertyTable = (function () {
});
return isSaveRequired;
},
+
/**
* Marshal's the properties to send to the server.
*/
@@ -535,6 +548,7 @@ nf.ProcessorPropertyTable = (function () {
return properties;
},
+
/**
* Clears the property table.
*/
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js
index cbf980dd53..11bc106de8 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js
@@ -651,6 +651,7 @@ nf.Processor = (function () {
'class': 'processors'
});
},
+
/**
* Populates the graph with the specified processors.
*
@@ -681,6 +682,7 @@ nf.Processor = (function () {
// apply the selection and handle all new processors
select().enter().call(renderProcessors, selectAll);
},
+
/**
* If the processor id is specified it is returned. If no processor id
* specified, all processors are returned.
@@ -694,6 +696,7 @@ nf.Processor = (function () {
return processorMap.get(id);
}
},
+
/**
* If the processor id is specified it is refresh according to the current
* state. If not processor id is specified, all processors are refreshed.
@@ -707,6 +710,7 @@ nf.Processor = (function () {
d3.selectAll('g.processor').call(updateProcessors);
}
},
+
/**
* Positions the component.
*
@@ -715,12 +719,14 @@ nf.Processor = (function () {
position: function (id) {
d3.select('#id-' + id).call(nf.CanvasUtils.position);
},
+
/**
* Refreshes the components necessary after a pan event.
*/
pan: function () {
d3.selectAll('g.processor.entering, g.processor.leaving').call(updateProcessors);
},
+
/**
* Reloads the processor state from the server and refreshes the UI.
* If the processor is currently unknown, this function just returns.
@@ -738,6 +744,7 @@ nf.Processor = (function () {
});
}
},
+
/**
* Sets the specified processor(s). If the is an array, it
* will set each processor. If it is not an array, it will
@@ -766,6 +773,7 @@ nf.Processor = (function () {
set(processors);
}
},
+
/**
* Removes the specified processor.
*
@@ -783,12 +791,14 @@ nf.Processor = (function () {
// apply the selection and handle all removed processors
select().exit().call(removeProcessors);
},
+
/**
* Removes all processors.
*/
removeAll: function () {
nf.Processor.remove(processorMap.keys());
},
+
/**
* Sets the processor status using the specified status.
*
@@ -810,6 +820,7 @@ nf.Processor = (function () {
// update the visible processor status
d3.selectAll('g.processor.visible').call(updateProcessorStatus);
},
+
/**
* Returns the default color that should be used when drawing a processor.
*/
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-registration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-registration.js
index 293539eb90..ec646775c2 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-registration.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-registration.js
@@ -53,7 +53,7 @@ nf.Registration = (function () {
data: {
'justification': justification
}
- }).then(function (response) {
+ }).done(function (response) {
// hide the registration pane
$('#registration-pane').hide();
@@ -61,7 +61,7 @@ nf.Registration = (function () {
$('#message-pane').show();
$('#message-title').text('Thanks');
$('#message-content').text('Your request will be processed shortly.');
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
});
}
};
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js
index b2639b3ce0..8920bdd7ef 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js
@@ -45,13 +45,13 @@ nf.RemoteProcessGroupConfiguration = (function () {
dataType: 'json',
processData: false,
contentType: 'application/json'
- }).then(function (response) {
+ }).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
// close the details panel
$('#remote-process-group-configuration').modal('hide');
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
if (xhr.status === 400) {
var errors = xhr.responseText.split('\n');
@@ -93,6 +93,7 @@ nf.RemoteProcessGroupConfiguration = (function () {
}
});
},
+
/**
* Shows the details for the remote process group in the specified selection.
*
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-details.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-details.js
index 87cbbb1978..296652b06c 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-details.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-details.js
@@ -39,6 +39,7 @@ nf.RemoteProcessGroupDetails = (function () {
}
});
},
+
/**
* Shows the details for the remote process group in the specified selection.
*
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js
index 4e8eca61bd..3d68fe56cd 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js
@@ -59,7 +59,7 @@ nf.RemoteProcessGroupPorts = (function () {
dataType: 'json',
processData: false,
contentType: 'application/json'
- }).then(function (response) {
+ }).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -75,7 +75,7 @@ nf.RemoteProcessGroupPorts = (function () {
// set the new values
$('#' + remotePortId + '-concurrent-tasks').text(remotePort.concurrentlySchedulableTaskCount);
$('#' + remotePortId + '-compression').text(compressionLabel);
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
if (xhr.status === 400) {
var errors = xhr.responseText.split('\n');
@@ -270,7 +270,7 @@ nf.RemoteProcessGroupPorts = (function () {
dataType: 'json',
processData: false,
contentType: 'application/json'
- }).then(function (response) {
+ }).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -306,7 +306,7 @@ nf.RemoteProcessGroupPorts = (function () {
}
}
}
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
if (xhr.status === 400) {
var errors = xhr.responseText.split('\n');
@@ -428,6 +428,7 @@ nf.RemoteProcessGroupPorts = (function () {
initRemotePortConfigurationDialog();
initRemoteProcessGroupConfigurationDialog();
},
+
/**
* Shows the details for the remote process group in the specified selection.
*
@@ -446,7 +447,7 @@ nf.RemoteProcessGroupPorts = (function () {
verbose: true
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var remoteProcessGroup = response.remoteProcessGroup;
// set the model locally
@@ -509,7 +510,7 @@ nf.RemoteProcessGroupPorts = (function () {
// show the details
$('#remote-process-group-ports').modal('show');
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
}
}
};
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js
index 6665d481c4..9c6da4c327 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js
@@ -881,6 +881,7 @@ nf.RemoteProcessGroup = (function () {
'class': 'remote-process-groups'
});
},
+
/**
* Populates the graph with the specified remote process groups.
*
@@ -911,6 +912,7 @@ nf.RemoteProcessGroup = (function () {
// apply the selection and handle all new remote process groups
select().enter().call(renderRemoteProcessGroups, selectAll);
},
+
/**
* If the remote process group id is specified it is returned. If no remote process
* group id specified, all remote process groups are returned.
@@ -924,6 +926,7 @@ nf.RemoteProcessGroup = (function () {
return remoteProcessGroupMap.get(id);
}
},
+
/**
* If the remote process group id is specified it is refresh according to the current
* state. If no remote process group id is specified, all remote process groups are refreshed.
@@ -937,12 +940,14 @@ nf.RemoteProcessGroup = (function () {
d3.selectAll('g.remote-process-group').call(updateRemoteProcessGroups);
}
},
+
/**
* Refreshes the components necessary after a pan event.
*/
pan: function () {
d3.selectAll('g.remote-process-group.entering, g.remote-process-group.leaving').call(updateRemoteProcessGroups);
},
+
/**
* Reloads the remote process group state from the server and refreshes the UI.
* If the remote process group is currently unknown, this function just returns.
@@ -966,6 +971,7 @@ nf.RemoteProcessGroup = (function () {
});
}
},
+
/**
* Positions the component.
*
@@ -974,6 +980,7 @@ nf.RemoteProcessGroup = (function () {
position: function (id) {
d3.select('#id-' + id).call(nf.CanvasUtils.position);
},
+
/**
* Sets the specified remote process group(s). If the is an array, it
* will set each remote process group. If it is not an array, it will
@@ -1002,6 +1009,7 @@ nf.RemoteProcessGroup = (function () {
set(remoteProcessGroups);
}
},
+
/**
* Sets the remote process group status using the specified status.
*
@@ -1023,6 +1031,7 @@ nf.RemoteProcessGroup = (function () {
// only update the visible components
d3.selectAll('g.remote-process-group.visible').call(updateProcessGroupStatus);
},
+
/**
* Removes the specified process group.
*
@@ -1040,6 +1049,7 @@ nf.RemoteProcessGroup = (function () {
// apply the selection and handle all removed remote process groups
select().exit().call(removeRemoteProcessGroups);
},
+
/**
* Removes all remote process groups.
*/
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js
index b21b1bf21b..54e2bb2cd4 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js
@@ -80,7 +80,7 @@ nf.SecurePortConfiguration = (function () {
contentType: 'application/json',
url: portUri,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -96,7 +96,7 @@ nf.SecurePortConfiguration = (function () {
// close the details panel
$('#secure-port-configuration').modal('hide');
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
// close the details panel
$('#secure-port-configuration').modal('hide');
@@ -322,6 +322,7 @@ nf.SecurePortConfiguration = (function () {
init: function () {
initPortConfigurationDialog();
},
+
/**
* Shows the details for the port specified selection.
*
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-details.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-details.js
index de9769ea69..9b66b09d2c 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-details.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-details.js
@@ -85,6 +85,7 @@ nf.SecurePortDetails = (function () {
}
});
},
+
showDetails: function (selection) {
// if the specified component is a port, load its properties
if (nf.CanvasUtils.isInputPort(selection) || nf.CanvasUtils.isOutputPort(selection)) {
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-selectable.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-selectable.js
index 47ac47706e..552d51e723 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-selectable.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-selectable.js
@@ -20,6 +20,7 @@ nf.Selectable = (function () {
init: function () {
},
+
select: function (g) {
// hide any context menus as necessary
nf.ContextMenu.hide();
@@ -46,6 +47,7 @@ nf.Selectable = (function () {
// stop propagation
d3.event.stopPropagation();
},
+
activate: function (components) {
components.on('mousedown.selection', function () {
// get the clicked component to update selection
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
index 2769ab3ce8..3d573b36dd 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
@@ -54,7 +54,7 @@ nf.Settings = (function () {
clientId: revision.clientId
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -63,7 +63,7 @@ nf.Settings = (function () {
dialogContent: 'A new flow archive was successfully created.',
overlayBackground: false
});
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
// close the details panel
$('#settings-cancel').click();
@@ -87,7 +87,7 @@ nf.Settings = (function () {
url: config.urls.controllerConfig,
data: configuration,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -99,7 +99,7 @@ nf.Settings = (function () {
// close the settings dialog
$('#shell-close-button').click();
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
// close the details panel
$('#settings-cancel').click();
@@ -113,6 +113,7 @@ nf.Settings = (function () {
$('#shell-close-button').click();
});
},
+
/**
* Shows the settings dialog.
*/
@@ -121,7 +122,7 @@ nf.Settings = (function () {
type: 'GET',
url: config.urls.controllerConfig,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// ensure the config is present
if (nf.Common.isDefinedAndNotNull(response.config)) {
// set the header
@@ -139,7 +140,7 @@ nf.Settings = (function () {
// reset button state
$('#settings-save, #settings-cancel').mouseout();
});
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
}
};
}());
\ No newline at end of file
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js
index 4da7841d91..aa2ecf6890 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js
@@ -69,6 +69,7 @@ nf.Snippet = (function () {
return snippet;
},
+
/**
* Creates a snippet.
*
@@ -90,6 +91,7 @@ nf.Snippet = (function () {
nf.Client.setRevision(response.revision);
});
},
+
/**
* Copies the snippet to the specified group and origin.
*
@@ -116,6 +118,7 @@ nf.Snippet = (function () {
nf.Client.setRevision(response.revision);
});
},
+
/**
* Removes the specified snippet.
*
@@ -135,6 +138,7 @@ nf.Snippet = (function () {
nf.Client.setRevision(response.revision);
});
},
+
/**
* Moves the snippet into the specified group.
*
@@ -158,6 +162,7 @@ nf.Snippet = (function () {
nf.Client.setRevision(response.revision);
});
},
+
/**
* Unlinks the snippet from the actual data flow.
*
@@ -180,6 +185,7 @@ nf.Snippet = (function () {
nf.Client.setRevision(response.revision);
});
},
+
/**
* Links the snippet from the actual data flow.
*
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-storage.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-storage.js
index 1dab55f132..0be05fee87 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-storage.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-storage.js
@@ -67,6 +67,7 @@ nf.Storage = (function () {
alternativeStorage = d3.map();
}
},
+
/**
* Stores the specified item. If supported, will be persisted
* in localStorage.
@@ -91,6 +92,7 @@ nf.Storage = (function () {
alternativeStorage.set(key, item);
}
},
+
/**
* Gets the item with the specified key. If an item with this key does
* not exist, null is returned. If an item exists but cannot be parsed
@@ -117,6 +119,7 @@ nf.Storage = (function () {
return alternativeStorage.get(key);
}
},
+
/**
* Removes the item with the specified key.
*
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js
index 12ee71bdbf..c82caa0087 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js
@@ -95,14 +95,14 @@ nf.ClusterTable = (function () {
status: 'CONNECTING'
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var node = response.node;
// update the node in the table
var clusterGrid = $('#cluster-table').data('gridInstance');
var clusterData = clusterGrid.getData();
clusterData.updateItem(node.nodeId, node);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -118,14 +118,14 @@ nf.ClusterTable = (function () {
status: 'DISCONNECTING'
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var node = response.node;
// update the node in the table
var clusterGrid = $('#cluster-table').data('gridInstance');
var clusterData = clusterGrid.getData();
clusterData.updateItem(node.nodeId, node);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -138,12 +138,12 @@ nf.ClusterTable = (function () {
type: 'DELETE',
url: config.urls.nodes + '/' + encodeURIComponent(nodeId),
dataType: 'json'
- }).then(function () {
+ }).done(function () {
// get the table and update the row accordingly
var clusterGrid = $('#cluster-table').data('gridInstance');
var clusterData = clusterGrid.getData();
clusterData.deleteItem(nodeId);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -391,6 +391,7 @@ nf.ClusterTable = (function () {
// initialize the number of displayed items
$('#displayed-nodes').text('0');
},
+
/**
* Prompts to verify node connection.
*
@@ -413,6 +414,7 @@ nf.ClusterTable = (function () {
}
},
+
/**
* Prompts to verify node disconnection.
*
@@ -434,6 +436,7 @@ nf.ClusterTable = (function () {
});
}
},
+
/**
* Makes the specified node the primary node of the cluster.
*
@@ -452,7 +455,7 @@ nf.ClusterTable = (function () {
primary: true
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var node = response.node;
var clusterGrid = $('#cluster-table').data('gridInstance');
@@ -482,9 +485,10 @@ nf.ClusterTable = (function () {
// end the update
clusterData.endUpdate();
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
}
},
+
/**
* Prompts to verify node disconnection.
*
@@ -506,6 +510,7 @@ nf.ClusterTable = (function () {
});
}
},
+
/**
* Update the size of the grid based on its container's current size.
*/
@@ -515,6 +520,7 @@ nf.ClusterTable = (function () {
clusterGrid.resizeCanvas();
}
},
+
/**
* Load the processor cluster table.
*/
@@ -523,7 +529,7 @@ nf.ClusterTable = (function () {
type: 'GET',
url: config.urls.cluster,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var cluster = response.cluster;
// ensure there are groups specified
@@ -544,8 +550,9 @@ nf.ClusterTable = (function () {
} else {
$('#total-nodes').text('0');
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Populate the expanded row.
*
@@ -561,7 +568,7 @@ nf.ClusterTable = (function () {
type: 'GET',
url: config.urls.nodes + '/' + encodeURIComponent(item.nodeId),
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var node = response.node;
// update the dialog fields
@@ -582,7 +589,7 @@ nf.ClusterTable = (function () {
// show the dialog
$('#node-details-dialog').modal('show');
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
}
}
};
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster.js
index 3e6946e43e..f6cbdc6ed0 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster.js
@@ -41,7 +41,7 @@ nf.Cluster = (function () {
type: 'GET',
url: config.urls.authorities,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.authorities)) {
// record the users authorities
nf.Common.setAuthorities(response.authorities);
@@ -49,7 +49,7 @@ nf.Cluster = (function () {
} else {
deferred.reject();
}
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
nf.Common.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -73,7 +73,7 @@ nf.Cluster = (function () {
type: 'GET',
url: config.urls.banners,
dataType: 'json'
- }).then(function (bannerResponse) {
+ }).done(function (bannerResponse) {
// ensure the banners response is specified
if (nf.Common.isDefinedAndNotNull(bannerResponse.banners)) {
if (nf.Common.isDefinedAndNotNull(bannerResponse.banners.headerText) && bannerResponse.banners.headerText !== '') {
@@ -105,7 +105,7 @@ nf.Cluster = (function () {
}
deferred.resolve();
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
nf.Common.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -137,14 +137,14 @@ nf.Cluster = (function () {
type: 'GET',
url: config.urls.controllerAbout,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var aboutDetails = response.about;
var countersTitle = aboutDetails.title + ' Cluster';
// set the document title and the about title
document.title = countersTitle;
$('#counters-header-text').text(countersTitle);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
});
});
});
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/counters/nf-counters-table.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/counters/nf-counters-table.js
index 01c359aacd..536ffdbcf3 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/counters/nf-counters-table.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/counters/nf-counters-table.js
@@ -222,6 +222,7 @@ nf.CountersTable = (function () {
// initialize the number of display items
$('#displayed-counters').text('0');
},
+
/**
* Resets the specified counter.
*
@@ -237,16 +238,17 @@ nf.CountersTable = (function () {
type: 'PUT',
url: config.urls.counters + '/' + encodeURIComponent(item.id),
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var counter = response.counter;
// get the table and update the row accordingly
var countersGrid = $('#counters-table').data('gridInstance');
var countersData = countersGrid.getData();
countersData.updateItem(counter.id, counter);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
}
},
+
/**
* Update the size of the grid based on its container's current size.
*/
@@ -256,6 +258,7 @@ nf.CountersTable = (function () {
countersGrid.resizeCanvas();
}
},
+
/**
* Load the processor counters table.
*/
@@ -264,7 +267,7 @@ nf.CountersTable = (function () {
type: 'GET',
url: config.urls.counters,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var report = response.counters;
// ensure there are groups specified
@@ -285,7 +288,7 @@ nf.CountersTable = (function () {
} else {
$('#total-counters').text('0');
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
}
};
}());
\ No newline at end of file
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/counters/nf-counters.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/counters/nf-counters.js
index 83029dad77..1f9a86162a 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/counters/nf-counters.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/counters/nf-counters.js
@@ -41,7 +41,7 @@ nf.Counters = (function () {
type: 'GET',
url: config.urls.authorities,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.authorities)) {
// record the users authorities
nf.Common.setAuthorities(response.authorities);
@@ -49,7 +49,7 @@ nf.Counters = (function () {
} else {
deferred.reject();
}
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
nf.Common.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -73,7 +73,7 @@ nf.Counters = (function () {
type: 'GET',
url: config.urls.banners,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// ensure the banners response is specified
if (nf.Common.isDefinedAndNotNull(response.banners)) {
if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
@@ -105,7 +105,7 @@ nf.Counters = (function () {
}
deferred.resolve();
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
nf.Common.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -137,14 +137,14 @@ nf.Counters = (function () {
type: 'GET',
url: config.urls.controllerAbout,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var aboutDetails = response.about;
var countersTitle = aboutDetails.title + ' Counters';
// set the document title and the about title
document.title = countersTitle;
$('#counters-header-text').text(countersTitle);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
});
});
});
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-model.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-model.js
index 324f736819..0564b1723f 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-model.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-model.js
@@ -123,7 +123,7 @@
url: '../nifi-api/controller/history',
data: query,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var history = response.history;
// calculate the indices
@@ -160,7 +160,7 @@
from: from,
to: to
});
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
xhr.fromPage = fromPage;
xhr.toPage = toPage;
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js
index 0d2f15d0ba..be0ea73bc1 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js
@@ -321,9 +321,9 @@ nf.HistoryTable = (function () {
endDate: endDateTime
}),
dataType: 'json'
- }).then(function () {
+ }).done(function () {
nf.HistoryTable.loadHistoryTable();
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
return {
@@ -333,6 +333,7 @@ nf.HistoryTable = (function () {
initPurgeDialog();
initHistoryTable();
},
+
/**
* Update the size of the grid based on its container's current size.
*/
@@ -342,6 +343,7 @@ nf.HistoryTable = (function () {
historyGrid.resizeCanvas();
}
},
+
/**
* Load the processor status table.
*/
@@ -355,6 +357,7 @@ nf.HistoryTable = (function () {
// request refresh of the current 'page'
historyGrid.onViewportChanged.notify();
},
+
/**
* Shows the details for the specified action.
*
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history.js
index 330d2d6e46..36364dfaeb 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history.js
@@ -42,7 +42,7 @@ nf.History = (function () {
type: 'GET',
url: config.urls.authorities,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.authorities)) {
// record the users authorities
nf.Common.setAuthorities(response.authorities);
@@ -50,7 +50,7 @@ nf.History = (function () {
} else {
deferred.reject();
}
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
nf.Common.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -74,7 +74,7 @@ nf.History = (function () {
type: 'GET',
url: config.urls.banners,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// ensure the banners response is specified
if (nf.Common.isDefinedAndNotNull(response.banners)) {
if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
@@ -106,7 +106,7 @@ nf.History = (function () {
}
deferred.resolve();
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
nf.Common.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -139,14 +139,14 @@ nf.History = (function () {
type: 'GET',
url: config.urls.controllerAbout,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var aboutDetails = response.about;
var historyTitle = aboutDetails.title + ' History';
// set the document title and the about title
document.title = historyTitle;
$('#history-header-text').text(historyTitle);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
});
});
}
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
index 9e2514cd43..cdc3ea7cfa 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
@@ -72,14 +72,17 @@ nf.Common = {
}
}
},
+
/**
* Determines if the current broswer supports SVG.
*/
SUPPORTS_SVG: !!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect,
+
/**
* The authorities for the current user.
*/
authorities: undefined,
+
/**
* Sets the authorities for the current user.
*
@@ -88,6 +91,7 @@ nf.Common = {
setAuthorities: function (roles) {
nf.Common.authorities = roles;
},
+
/**
* Loads a script at the specified URL. Supports caching the script on the browser.
*
@@ -100,6 +104,7 @@ nf.Common = {
url: url
});
},
+
/**
* Determines whether the current user can access provenance.
*
@@ -117,6 +122,7 @@ nf.Common = {
}
return canAccessProvenance;
},
+
/**
* Returns whether or not the current user is a DFM.
*/
@@ -132,6 +138,7 @@ nf.Common = {
}
return dfm;
},
+
/**
* Returns whether or not the current user is a DFM.
*/
@@ -147,6 +154,7 @@ nf.Common = {
}
return admin;
},
+
/**
* Adds a mouse over effect for the specified selector using
* the specified styles.
@@ -163,6 +171,7 @@ nf.Common = {
});
return $(selector).addClass(normalStyle);
},
+
/**
* Method for handling ajax errors.
*
@@ -237,6 +246,7 @@ nf.Common = {
nf.Common.closeCanvas();
}
},
+
/**
* Closes the canvas by removing the splash screen and stats poller.
*/
@@ -256,6 +266,7 @@ nf.Common = {
nf.Canvas.stopStatusPolling();
}
},
+
/**
* Populates the specified field with the specified value. If the value is
* undefined, the field will read 'No value set.' If the value is an empty
@@ -273,6 +284,7 @@ nf.Common = {
return $('#' + target).text(value);
}
},
+
/**
* Clears the specified field. Removes any style that may have been applied
* by a preceeding call to populateField.
@@ -282,6 +294,7 @@ nf.Common = {
clearField: function (target) {
return $('#' + target).removeClass('unset blank').text('');
},
+
/**
* Formats the tooltip for the specified property.
*
@@ -321,6 +334,7 @@ nf.Common = {
return null;
}
},
+
/**
* Formats the specified property (name and value) accordingly.
*
@@ -330,6 +344,7 @@ nf.Common = {
formatProperty: function (name, value) {
return '
' + nf.Common.formatValue(name) + ': ' + nf.Common.formatValue(value) + '
';
},
+
/**
* Formats the specified value accordingly.
*
@@ -346,6 +361,7 @@ nf.Common = {
return '
No value set';
}
},
+
/**
* HTML escapes the specified string. If the string is null
* or undefined, an empty string is returned.
@@ -372,6 +388,7 @@ nf.Common = {
}
};
}()),
+
/**
* Creates a form inline in order to submit the specified params to the specified URL
* using the specified method.
@@ -407,6 +424,7 @@ nf.Common = {
window.onbeforeunload = previousBeforeUnload;
}
},
+
/**
* Formats the specified array as an unordered list. If the array is not an
* array, null is returned.
@@ -429,6 +447,7 @@ nf.Common = {
return null;
}
},
+
/**
* Extracts the contents of the specified str after the strToFind. If the
* strToFind is not found or the last part of the str, an empty string is
@@ -448,6 +467,7 @@ nf.Common = {
}
return result;
},
+
/**
* Updates the mouse pointer.
*
@@ -461,6 +481,7 @@ nf.Common = {
$('#' + domId).removeClass('pointer');
}
},
+
/**
* Constants for time duration formatting.
*/
@@ -468,6 +489,7 @@ nf.Common = {
MILLIS_PER_HOUR: 3600000,
MILLIS_PER_MINUTE: 60000,
MILLIS_PER_SECOND: 1000,
+
/**
* Formats the specified duration.
*
@@ -515,6 +537,7 @@ nf.Common = {
return time;
}
},
+
/**
* Constants for formatting data size.
*/
@@ -522,6 +545,7 @@ nf.Common = {
BYTES_IN_MEGABYTE: 1048576,
BYTES_IN_GIGABYTE: 1073741824,
BYTES_IN_TERABYTE: 1099511627776,
+
/**
* Formats the specified number of bytes into a human readable string.
*
@@ -556,6 +580,7 @@ nf.Common = {
// default to bytes
return parseFloat(dataSize).toFixed(2) + " bytes";
},
+
/**
* Formats the specified integer as a string (adding commas). At this
* point this does not take into account any locales.
@@ -570,6 +595,7 @@ nf.Common = {
}
return string;
},
+
/**
* Formats the specified float using two demical places.
*
@@ -581,6 +607,7 @@ nf.Common = {
}
return f.toFixed(2) + '';
},
+
/**
* Pads the specified value to the specified width with the specified character.
* If the specified value is already wider than the specified width, the original
@@ -601,6 +628,7 @@ nf.Common = {
return s;
},
+
/**
* Formats the specified DateTime.
*
@@ -622,6 +650,7 @@ nf.Common = {
'.' +
nf.Common.pad(date.getMilliseconds(), 3, '0');
},
+
/**
* Parses the specified date time into a Date object. The resulting
* object does not account for timezone and should only be used for
@@ -667,6 +696,7 @@ nf.Common = {
return new Date(parseInt(date[2], 10), parseInt(date[0], 10), parseInt(date[1], 10), parseInt(time[0], 10), parseInt(time[1], 10), parseInt(time[2], 10), 0);
}
},
+
/**
* Parses the specified duration and returns the total number of millis.
*
@@ -689,6 +719,7 @@ nf.Common = {
return new Date(1970, 0, 1, parseInt(duration[0], 10), parseInt(duration[1], 10), parseInt(duration[2], 10), 0).getTime();
}
},
+
/**
* Parses the specified size.
*
@@ -712,6 +743,7 @@ nf.Common = {
return size;
}
},
+
/**
* Parses the specified count.
*
@@ -736,6 +768,7 @@ nf.Common = {
}
return intCount;
},
+
/**
* Determines if the specified object is defined and not null.
*
@@ -744,6 +777,7 @@ nf.Common = {
isDefinedAndNotNull: function (obj) {
return !nf.Common.isUndefined(obj) && !nf.Common.isNull(obj);
},
+
/**
* Determines if the specified object is undefined or null.
*
@@ -752,6 +786,7 @@ nf.Common = {
isUndefinedOrNull: function (obj) {
return nf.Common.isUndefined(obj) || nf.Common.isNull(obj);
},
+
/**
* Determines if the specified object is undefined.
*
@@ -760,6 +795,7 @@ nf.Common = {
isUndefined: function (obj) {
return typeof obj === 'undefined';
},
+
/**
* Determines whether the specified string is blank (or null or undefined).
*
@@ -768,6 +804,7 @@ nf.Common = {
isBlank: function (str) {
return nf.Common.isUndefined(str) || nf.Common.isNull(str) || $.trim(str) === '';
},
+
/**
* Determines if the specified object is null.
*
@@ -776,6 +813,7 @@ nf.Common = {
isNull: function (obj) {
return obj === null;
},
+
/**
* Determines if the specified array is empty. If the specified arg is not an
* array, then true is returned.
@@ -785,6 +823,7 @@ nf.Common = {
isEmpty: function (arr) {
return $.isArray(arr) ? arr.length === 0 : true;
},
+
/**
* Determines if these are the same bulletins. If both arguments are not
* arrays, false is returned.
@@ -809,6 +848,7 @@ nf.Common = {
}
return false;
},
+
/**
* Formats the specified bulletin list.
*
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js
index bffcf5e0ce..4ba2a1d008 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js
@@ -47,7 +47,7 @@ nf.ConnectionDetails = (function () {
type: 'GET',
url: '../nifi-api/controller/process-groups/' + encodeURIComponent(groupId) + '/processors/' + encodeURIComponent(source.id),
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var processor = response.processor;
var processorName = $('
').text(processor.name);
var processorType = $('
').text(nf.Common.substringAfterLast(processor.type, '.'));
@@ -124,7 +124,7 @@ nf.ConnectionDetails = (function () {
verbose: true
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var processGroup = response.processGroup;
// populate source port details
@@ -133,7 +133,7 @@ nf.ConnectionDetails = (function () {
$('#read-only-connection-source-group-name').text(processGroup.name);
deferred.resolve();
- }, function () {
+ }).fail(function () {
deferred.reject();
});
}
@@ -172,7 +172,7 @@ nf.ConnectionDetails = (function () {
type: 'GET',
url: '../nifi-api/controller/process-groups/' + encodeURIComponent(groupId) + '/processors/' + encodeURIComponent(destination.id),
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var processor = response.processor;
var processorName = $('
').text(processor.name);
var processorType = $('
').text(nf.Common.substringAfterLast(processor.type, '.'));
@@ -183,7 +183,7 @@ nf.ConnectionDetails = (function () {
$('#read-only-connection-target-group-name').text(groupName);
deferred.resolve();
- }, function () {
+ }).fail(function () {
deferred.reject();
});
}).promise();
@@ -254,7 +254,7 @@ nf.ConnectionDetails = (function () {
verbose: true
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var processGroup = response.processGroup;
// populate destination port details
@@ -263,7 +263,7 @@ nf.ConnectionDetails = (function () {
$('#read-only-connection-target-group-name').text(processGroup.name);
deferred.resolve();
- }, function () {
+ }).fail(function () {
deferred.reject();
});
}
@@ -346,6 +346,7 @@ nf.ConnectionDetails = (function () {
}
});
},
+
/**
* Shows the details for the specified edge.
*
@@ -368,7 +369,7 @@ nf.ConnectionDetails = (function () {
});
// populate the dialog once get have all necessary details
- $.when(groupXhr, connectionXhr).then(function (groupResult, connectionResult) {
+ $.when(groupXhr, connectionXhr).done(function (groupResult, connectionResult) {
var groupResponse = groupResult[0];
var connectionResponse = connectionResult[0];
@@ -453,7 +454,7 @@ nf.ConnectionDetails = (function () {
}
});
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
}
};
}());
\ No newline at end of file
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-dialog.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-dialog.js
index b474f2b1bb..174f8bd18d 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-dialog.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-dialog.js
@@ -78,6 +78,7 @@ nf.Dialog = (function () {
// show the dialog
$('#nf-ok-dialog').modal('setHeaderText', options.headerText).modal('setOverlayBackground', options.overlayBackground).modal('show');
},
+
/**
* Shows an general dialog with Yes and No buttons populated with the
* specified dialog content.
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
index b4c1da9bfa..480a380b9f 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
@@ -381,6 +381,7 @@ nf.ProcessorDetails = (function () {
}
});
},
+
/**
* Shows the details for the specified processor.
*
@@ -508,7 +509,7 @@ nf.ProcessorDetails = (function () {
});
// show the dialog once we have the processor and its history
- $.when(getProcessor, getProcessorHistory).then(function (response) {
+ $.when(getProcessor, getProcessorHistory).done(function (response) {
var processorResponse = response[0];
var processor = processorResponse.processor;
@@ -549,7 +550,7 @@ nf.ProcessorDetails = (function () {
if (processorRelationships.is(':visible') && processorRelationships.get(0).scrollHeight > processorRelationships.innerHeight()) {
processorRelationships.css('border-width', '1px');
}
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
nf.Dialog.showOkDialog({
dialogContent: nf.Common.escapeHtml(xhr.responseText),
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-shell.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-shell.js
index 5c52f8f60e..b0793a9ea7 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-shell.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-shell.js
@@ -100,6 +100,7 @@ nf.Shell = (function () {
});
}).promise();
},
+
/**
* Shows the specified content in the shell. When the shell is closed, the content
* will be hidden and returned to its previous location in the dom.
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
index 178207ead3..c75728ba72 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
@@ -1175,6 +1175,7 @@ nf.StatusHistory = (function () {
instances = null;
});
},
+
/**
* Shows the status history for the specified connection across the cluster.
*
@@ -1187,10 +1188,11 @@ nf.StatusHistory = (function () {
type: 'GET',
url: config.urls.clusterConnection + encodeURIComponent(connectionId) + '/status/history',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
handleClusteredStatusHistoryResponse(groupId, connectionId, response.clusterStatusHistory, config.type.connection, selectedDescriptor);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Shows the status history for the specified processor across the cluster.
*
@@ -1203,10 +1205,11 @@ nf.StatusHistory = (function () {
type: 'GET',
url: config.urls.clusterProcessor + encodeURIComponent(processorId) + '/status/history',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
handleClusteredStatusHistoryResponse(groupId, processorId, response.clusterStatusHistory, config.type.processor, selectedDescriptor);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Shows the status history for the specified process group across the cluster.
*
@@ -1219,10 +1222,11 @@ nf.StatusHistory = (function () {
type: 'GET',
url: config.urls.clusterProcessGroup + encodeURIComponent(processGroupId) + '/status/history',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
handleClusteredStatusHistoryResponse(groupId, processGroupId, response.clusterStatusHistory, config.type.processGroup, selectedDescriptor);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Shows the status history for the specified remote process group across the cluster.
*
@@ -1235,10 +1239,11 @@ nf.StatusHistory = (function () {
type: 'GET',
url: config.urls.clusterRemoteProcessGroup + encodeURIComponent(remoteProcessGroupId) + '/status/history',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
handleClusteredStatusHistoryResponse(groupId, remoteProcessGroupId, response.clusterStatusHistory, config.type.remoteProcessGroup, selectedDescriptor);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Shows the status history for the specified connection in this instance.
*
@@ -1251,10 +1256,11 @@ nf.StatusHistory = (function () {
type: 'GET',
url: config.urls.processGroups + encodeURIComponent(groupId) + '/connections/' + encodeURIComponent(connectionId) + '/status/history',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
handleStandaloneStatusHistoryResponse(groupId, connectionId, response.statusHistory, config.type.connection, selectedDescriptor);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Shows the status history for the specified processor in this instance.
*
@@ -1267,10 +1273,11 @@ nf.StatusHistory = (function () {
type: 'GET',
url: config.urls.processGroups + encodeURIComponent(groupId) + '/processors/' + encodeURIComponent(processorId) + '/status/history',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
handleStandaloneStatusHistoryResponse(groupId, processorId, response.statusHistory, config.type.processor, selectedDescriptor);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Shows the status history for the specified process group in this instance.
*
@@ -1283,10 +1290,11 @@ nf.StatusHistory = (function () {
type: 'GET',
url: config.urls.processGroups + encodeURIComponent(processGroupId) + '/status/history',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
handleStandaloneStatusHistoryResponse(groupId, processGroupId, response.statusHistory, config.type.processGroup, selectedDescriptor);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Shows the status history for the specified remote process group in this instance.
*
@@ -1299,9 +1307,9 @@ nf.StatusHistory = (function () {
type: 'GET',
url: config.urls.processGroups + encodeURIComponent(groupId) + '/remote-process-groups/' + encodeURIComponent(remoteProcessGroupId) + '/status/history',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
handleStandaloneStatusHistoryResponse(groupId, remoteProcessGroupId, response.statusHistory, config.type.remoteProcessGroup, selectedDescriptor);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
}
};
}());
\ No newline at end of file
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-lineage.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-lineage.js
index 1a325144f5..1f05caa698 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-lineage.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-lineage.js
@@ -864,12 +864,12 @@ nf.ProvenanceLineage = (function () {
// polls for the event lineage
var pollLineage = function (nextDelay) {
- getLineage(lineage).then(function (response) {
+ getLineage(lineage).done(function (response) {
lineage = response.lineage;
// process the lineage, if its not done computing wait delay seconds before checking again
processLineage(nextDelay);
- }, closeDialog);
+ }).fail(closeDialog);
};
// processes the event lineage
@@ -929,12 +929,12 @@ nf.ProvenanceLineage = (function () {
};
// once the query is submitted wait until its finished
- submitLineage(lineageRequest).then(function (response) {
+ submitLineage(lineageRequest).done(function (response) {
lineage = response.lineage;
// process the lineage, if its not done computing wait 1 second before checking again
processLineage(1);
- }, closeDialog);
+ }).fail(closeDialog);
};
// handles updating the lineage graph
@@ -1284,6 +1284,7 @@ nf.ProvenanceLineage = (function () {
initLineageQueryDialog();
},
+
/**
* Shows the lineage for the specified flowfile uuid.
*
@@ -1347,12 +1348,12 @@ nf.ProvenanceLineage = (function () {
// polls the server for the status of the lineage, if the lineage is not
// done wait nextDelay seconds before trying again
var pollLineage = function (nextDelay) {
- getLineage(lineage).then(function (response) {
+ getLineage(lineage).done(function (response) {
lineage = response.lineage;
// process the lineage, if its not done computing wait delay seconds before checking again
processLineage(nextDelay);
- }, closeDialog);
+ }).fail(closeDialog);
};
var processLineage = function (delay) {
@@ -1401,12 +1402,12 @@ nf.ProvenanceLineage = (function () {
};
// once the query is submitted wait until its finished
- submitLineage(lineageRequest).then(function (response) {
+ submitLineage(lineageRequest).done(function (response) {
lineage = response.lineage;
// process the results, if they are not done wait 1 second before trying again
processLineage(1);
- }, closeDialog);
+ }).fail(closeDialog);
}
};
}());
\ No newline at end of file
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-table.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-table.js
index 9b4dc9660f..bcd0fced82 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-table.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-table.js
@@ -49,15 +49,15 @@ nf.ProvenanceTable = (function () {
var loadLineageCapabilities = function () {
return $.Deferred(function (deferred) {
if (nf.Common.SUPPORTS_SVG) {
- nf.Common.cachedScript(config.urls.d3Script).then(function () {
- nf.Common.cachedScript(config.urls.lineageScript).then(function () {
+ nf.Common.cachedScript(config.urls.d3Script).done(function () {
+ nf.Common.cachedScript(config.urls.lineageScript).done(function () {
// initialize the lineage graph
nf.ProvenanceLineage.init();
deferred.resolve();
- }, function () {
+ }).fail(function () {
deferred.reject();
});
- }, function () {
+ }).fail(function () {
deferred.reject();
});
} else {
@@ -210,12 +210,12 @@ nf.ProvenanceTable = (function () {
url: config.urls.replays,
data: parameters,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
nf.Dialog.showOkDialog({
dialogContent: 'Successfully submitted replay request.',
overlayBackground: false
});
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
$('#event-details-dialog').modal('hide');
});
@@ -294,7 +294,7 @@ nf.ProvenanceTable = (function () {
type: 'GET',
url: config.urls.cluster,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var cluster = response.cluster;
var nodes = cluster.nodes;
@@ -323,7 +323,7 @@ nf.ProvenanceTable = (function () {
$('#provenance-search-location').combo({
options: searchableOptions
});
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
// show the node search combo
$('#provenance-search-location-container').show();
@@ -888,23 +888,26 @@ nf.ProvenanceTable = (function () {
* The max delay between requests.
*/
MAX_DELAY: 4,
+
/**
* The server time offset
*/
serverTimeOffset: null,
+
/**
* Initializes the provenance table. Returns a deferred that will indicate when/if the table has initialized successfully.
*
* @param {boolean} isClustered Whether or not this instance is clustered
*/
init: function (isClustered) {
- return loadLineageCapabilities().then(function () {
+ return loadLineageCapabilities().done(function () {
initDetailsDialog();
initProvenanceQueryDialog();
initSearchDialog(isClustered);
initProvenanceTable(isClustered);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Goes to the specified component if possible.
*
@@ -929,6 +932,7 @@ nf.ProvenanceTable = (function () {
}
}
},
+
/**
* Update the size of the grid based on its container's current size.
*/
@@ -938,6 +942,7 @@ nf.ProvenanceTable = (function () {
provenanceGrid.resizeCanvas();
}
},
+
/**
* Updates the value of the specified progress bar.
*
@@ -953,6 +958,7 @@ nf.ProvenanceTable = (function () {
var label = $('
').text(value + '%');
progressBar.progressbar('value', value).append(label);
},
+
/**
* Loads the provenance table with events according to the specified optional
* query. If not query is specified or it is empty, the most recent entries will
@@ -1025,13 +1031,13 @@ nf.ProvenanceTable = (function () {
// polls the server for the status of the provenance, if the provenance is not
// done wait nextDelay seconds before trying again
var pollProvenance = function (nextDelay) {
- getProvenance(provenance).then(function (response) {
+ getProvenance(provenance).done(function (response) {
// update the provenance
provenance = response.provenance;
// process the provenance
processProvenanceResponse(nextDelay);
- }, closeDialog);
+ }).fail(closeDialog);
};
// processes the provenance, if the provenance is not done wait delay
@@ -1079,14 +1085,15 @@ nf.ProvenanceTable = (function () {
};
// once the query is submitted wait until its finished
- submitProvenance(query).then(function (response) {
+ submitProvenance(query).done(function (response) {
// update the provenance
provenance = response.provenance;
// process the results, if they are not done wait 1 second before trying again
processProvenanceResponse(1);
- }, closeDialog);
+ }).fail(closeDialog);
},
+
/**
* Shows the lineage for the event in the specified row.
*
@@ -1100,6 +1107,7 @@ nf.ProvenanceTable = (function () {
nf.ProvenanceLineage.showLineage(item.flowFileUuid, item.eventId.toString(), item.clusterNodeId);
}
},
+
/**
* Gets the event details and shows the details dialog.
*
@@ -1115,6 +1123,7 @@ nf.ProvenanceTable = (function () {
nf.ProvenanceTable.showEventDetails(event);
}
},
+
/**
* Shows the details for the specified action.
*
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance.js
index 6d618290ea..33338a555b 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance.js
@@ -47,10 +47,10 @@ nf.Provenance = (function () {
$.ajax({
type: 'HEAD',
url: config.urls.cluster
- }).then(function () {
+ }).done(function () {
isClustered = true;
deferred.resolve();
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
if (xhr.status === 404) {
isClustered = false;
deferred.resolve();
@@ -70,7 +70,7 @@ nf.Provenance = (function () {
type: 'GET',
url: config.urls.config,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var config = response.config;
// store the controller name
@@ -80,7 +80,7 @@ nf.Provenance = (function () {
if (!nf.Common.isBlank(config.contentViewerUrl)) {
$('#nifi-content-viewer-url').text(config.contentViewerUrl);
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -92,7 +92,7 @@ nf.Provenance = (function () {
type: 'GET',
url: config.urls.authorities,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.authorities)) {
// record the users authorities
nf.Common.setAuthorities(response.authorities);
@@ -100,7 +100,7 @@ nf.Provenance = (function () {
} else {
deferred.reject();
}
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
nf.Common.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -124,7 +124,7 @@ nf.Provenance = (function () {
type: 'GET',
url: config.urls.banners,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// ensure the banners response is specified
if (nf.Common.isDefinedAndNotNull(response.banners)) {
if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
@@ -156,7 +156,7 @@ nf.Provenance = (function () {
}
deferred.resolve();
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
nf.Common.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -188,14 +188,14 @@ nf.Provenance = (function () {
type: 'GET',
url: config.urls.controllerAbout,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var aboutDetails = response.about;
var provenanceTitle = aboutDetails.title + ' Data Provenance';
// set the document title and the about title
document.title = provenanceTitle;
$('#provenance-header-text').text(provenanceTitle);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
});
});
});
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js
index c47d790cae..f3150b0341 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js
@@ -45,7 +45,7 @@ nf.SummaryTable = (function () {
var loadChartCapabilities = function () {
return $.Deferred(function (deferred) {
if (nf.Common.SUPPORTS_SVG) {
- nf.Common.cachedScript(config.urls.d3Script).then(function () {
+ nf.Common.cachedScript(config.urls.d3Script).done(function () {
// get the controller config to get the server offset
var configRequest = $.ajax({
type: 'GET',
@@ -54,17 +54,17 @@ nf.SummaryTable = (function () {
});
// get the config details and load the chart script
- $.when(configRequest, nf.Common.cachedScript(config.urls.statusHistory)).then(function (response) {
+ $.when(configRequest, nf.Common.cachedScript(config.urls.statusHistory)).done(function (response) {
var configResponse = response[0];
var configDetails = configResponse.config;
// initialize the chart
nf.StatusHistory.init(configDetails.timeOffset);
deferred.resolve();
- }, function () {
+ }).fail(function () {
deferred.reject();
});
- }, function () {
+ }).fail(function () {
deferred.reject();
});
} else {
@@ -1549,7 +1549,7 @@ nf.SummaryTable = (function () {
type: 'GET',
url: nf.SummaryTable.systemDiagnosticsUrl,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var systemDiagnostics = response.systemDiagnostics;
// heap
@@ -1588,7 +1588,7 @@ nf.SummaryTable = (function () {
// update the stats last refreshed timestamp
$('#system-diagnostics-last-refreshed').text(systemDiagnostics.statsLastRefreshed);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -1717,7 +1717,7 @@ nf.SummaryTable = (function () {
verbose: true
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.clusterProcessorStatus)) {
var clusterProcessorStatus = response.clusterProcessorStatus;
@@ -1755,7 +1755,7 @@ nf.SummaryTable = (function () {
// update the stats last refreshed timestamp
$('#cluster-processor-summary-last-refreshed').text(clusterProcessorStatus.statsLastRefreshed);
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -1772,7 +1772,7 @@ nf.SummaryTable = (function () {
verbose: true
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.clusterConnectionStatus)) {
var clusterConnectionStatus = response.clusterConnectionStatus;
@@ -1807,7 +1807,7 @@ nf.SummaryTable = (function () {
// update the stats last refreshed timestamp
$('#cluster-connection-summary-last-refreshed').text(clusterConnectionStatus.statsLastRefreshed);
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -1824,7 +1824,7 @@ nf.SummaryTable = (function () {
verbose: true
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.clusterPortStatus)) {
var clusterInputPortStatus = response.clusterPortStatus;
@@ -1856,7 +1856,7 @@ nf.SummaryTable = (function () {
// update the stats last refreshed timestamp
$('#cluster-input-port-summary-last-refreshed').text(clusterInputPortStatus.statsLastRefreshed);
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -1873,7 +1873,7 @@ nf.SummaryTable = (function () {
verbose: true
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.clusterPortStatus)) {
var clusterOutputPortStatus = response.clusterPortStatus;
@@ -1905,7 +1905,7 @@ nf.SummaryTable = (function () {
// update the stats last refreshed timestamp
$('#cluster-output-port-summary-last-refreshed').text(clusterOutputPortStatus.statsLastRefreshed);
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -1922,7 +1922,7 @@ nf.SummaryTable = (function () {
verbose: true
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.clusterRemoteProcessGroupStatus)) {
var clusterRemoteProcessGroupStatus = response.clusterRemoteProcessGroupStatus;
@@ -1957,7 +1957,7 @@ nf.SummaryTable = (function () {
// update the stats last refreshed timestamp
$('#cluster-remote-process-group-summary-last-refreshed').text(clusterRemoteProcessGroupStatus.statsLastRefreshed);
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
return {
@@ -1965,10 +1965,12 @@ nf.SummaryTable = (function () {
* URL for loading system diagnostics.
*/
systemDiagnosticsUrl: null,
+
/**
* URL for loading the summary.
*/
url: null,
+
/**
* Initializes the status table.
*
@@ -1980,18 +1982,19 @@ nf.SummaryTable = (function () {
nf.SummaryTable.systemDiagnosticsUrl = config.urls.systemDiagnostics;
return $.Deferred(function (deferred) {
- loadChartCapabilities().then(function () {
+ loadChartCapabilities().done(function () {
// initialize the processor/connection details dialog
nf.ProcessorDetails.init(false);
nf.ConnectionDetails.init(false);
initSummaryTable(isClustered);
deferred.resolve();
- }, function () {
+ }).fail(function () {
deferred.reject();
});
}).promise();
},
+
/**
* Update the size of the grid based on its container's current size.
*/
@@ -2021,6 +2024,7 @@ nf.SummaryTable = (function () {
remoteProcessGroupGrid.resizeCanvas();
}
},
+
/**
* Load the processor status table.
*/
@@ -2032,7 +2036,7 @@ nf.SummaryTable = (function () {
recursive: true
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var processGroupStatus = response.processGroupStatus;
if (nf.Common.isDefinedAndNotNull(processGroupStatus)) {
@@ -2103,8 +2107,9 @@ nf.SummaryTable = (function () {
} else {
$('#total-items').text('0');
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
// processor actions
/**
@@ -2120,6 +2125,7 @@ nf.SummaryTable = (function () {
nf.ProcessorDetails.showDetails(item.groupId, item.id);
}
},
+
/**
* Goes to the specified processor.
*
@@ -2133,6 +2139,7 @@ nf.SummaryTable = (function () {
goTo(item.groupId, item.id);
}
},
+
/**
* Shows the processor status history for a cluster.
*
@@ -2146,6 +2153,7 @@ nf.SummaryTable = (function () {
nf.StatusHistory.showClusterProcessorChart(item.groupId, item.id);
}
},
+
/**
* Shows the processor status history.
*
@@ -2159,6 +2167,7 @@ nf.SummaryTable = (function () {
nf.StatusHistory.showStandaloneProcessorChart(item.groupId, item.id);
}
},
+
/**
* Shows the cluster processor details dialog for the specified processor.
*
@@ -2180,6 +2189,7 @@ nf.SummaryTable = (function () {
$('#cluster-processor-summary-dialog').modal('show');
}
},
+
// connection actions
/**
@@ -2195,6 +2205,7 @@ nf.SummaryTable = (function () {
nf.ConnectionDetails.showDetails(item.groupId, item.id);
}
},
+
/**
* Goes to the specified connection.
*
@@ -2208,6 +2219,7 @@ nf.SummaryTable = (function () {
goTo(item.groupId, item.id);
}
},
+
/**
* Shows the connection status history for a cluster.
*
@@ -2221,6 +2233,7 @@ nf.SummaryTable = (function () {
nf.StatusHistory.showClusterConnectionChart(item.groupId, item.id);
}
},
+
/**
* Shows the connection status history.
*
@@ -2234,6 +2247,7 @@ nf.SummaryTable = (function () {
nf.StatusHistory.showStandaloneConnectionChart(item.groupId, item.id);
}
},
+
/**
* Shows the cluster connection details dialog for the specified connection.
*
@@ -2255,6 +2269,7 @@ nf.SummaryTable = (function () {
$('#cluster-connection-summary-dialog').modal('show');
}
},
+
// input actions
/**
@@ -2270,6 +2285,7 @@ nf.SummaryTable = (function () {
goTo(item.groupId, item.id);
}
},
+
/**
* Shows the cluster input port details dialog for the specified connection.
*
@@ -2291,6 +2307,7 @@ nf.SummaryTable = (function () {
$('#cluster-input-port-summary-dialog').modal('show');
}
},
+
// output actions
/**
@@ -2306,6 +2323,7 @@ nf.SummaryTable = (function () {
goTo(item.groupId, item.id);
}
},
+
/**
* Shows the cluster output port details dialog for the specified connection.
*
@@ -2327,6 +2345,7 @@ nf.SummaryTable = (function () {
$('#cluster-output-port-summary-dialog').modal('show');
}
},
+
// remote process group actions
/**
@@ -2342,6 +2361,7 @@ nf.SummaryTable = (function () {
goTo(item.groupId, item.id);
}
},
+
/**
* Shows the remote process group status history for a cluster.
*
@@ -2355,6 +2375,7 @@ nf.SummaryTable = (function () {
nf.StatusHistory.showClusterRemoteProcessGroupChart(item.groupId, item.id);
}
},
+
/**
* Shows the remote process group status history.
*
@@ -2368,6 +2389,7 @@ nf.SummaryTable = (function () {
nf.StatusHistory.showStandaloneRemoteProcessGroupChart(item.groupId, item.id);
}
},
+
/**
* Shows the cluster remote process group details dialog for the specified connection.
*
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary.js
index d28f751617..7b90a0f5e9 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary.js
@@ -40,17 +40,17 @@ nf.Summary = (function () {
$.ajax({
type: 'HEAD',
url: config.urls.cluster
- }).then(function () {
- nf.SummaryTable.init(true).then(function () {
+ }).done(function () {
+ nf.SummaryTable.init(true).done(function () {
deferred.resolve();
- }, function () {
+ }).fail(function () {
deferred.reject();
});
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
if (xhr.status === 404) {
- nf.SummaryTable.init(false).then(function () {
+ nf.SummaryTable.init(false).done(function () {
deferred.resolve();
- }, function () {
+ }).fail(function () {
deferred.reject();
});
} else {
@@ -84,7 +84,7 @@ nf.Summary = (function () {
type: 'GET',
url: config.urls.banners,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// ensure the banners response is specified
if (nf.Common.isDefinedAndNotNull(response.banners)) {
if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
@@ -116,7 +116,7 @@ nf.Summary = (function () {
}
deferred.resolve();
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
nf.Common.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -145,14 +145,14 @@ nf.Summary = (function () {
type: 'GET',
url: config.urls.controllerAbout,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var aboutDetails = response.about;
var statusTitle = aboutDetails.title + ' Summary';
// set the document title and the about title
document.title = statusTitle;
$('#status-header-text').text(statusTitle);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
var setBodySize = function () {
$('body').css({
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates-table.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates-table.js
index da40002724..7f486de761 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates-table.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates-table.js
@@ -63,11 +63,11 @@ nf.TemplatesTable = (function () {
type: 'DELETE',
url: config.urls.templates + '/' + encodeURIComponent(templateId),
dataType: 'json'
- }).then(function () {
+ }).done(function () {
var templatesGrid = $('#templates-table').data('gridInstance');
var templatesData = templatesGrid.getData();
templatesData.deleteItem(templateId);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
};
/**
@@ -249,6 +249,7 @@ nf.TemplatesTable = (function () {
// initialize the number of displayed items
$('#displayed-templates').text('0');
},
+
/**
* Update the size of the grid based on its container's current size.
*/
@@ -258,6 +259,7 @@ nf.TemplatesTable = (function () {
templateGrid.resizeCanvas();
}
},
+
/**
* Exports the specified template.
*
@@ -271,6 +273,7 @@ nf.TemplatesTable = (function () {
nf.Common.submit('GET', config.urls.templates + '/' + encodeURIComponent(item.id));
}
},
+
/**
* Prompts the user before attempting to delete the specified template.
*
@@ -292,6 +295,7 @@ nf.TemplatesTable = (function () {
});
}
},
+
/**
* Load the processor templates table.
*/
@@ -303,7 +307,7 @@ nf.TemplatesTable = (function () {
verbose: false
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// ensure there are groups specified
if (nf.Common.isDefinedAndNotNull(response.templates)) {
var templatesGrid = $('#templates-table').data('gridInstance');
@@ -322,7 +326,7 @@ nf.TemplatesTable = (function () {
} else {
$('#total-templates').text('0');
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
}
};
}());
\ No newline at end of file
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates.js
index 9fff79ad0a..0602c37819 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates.js
@@ -41,7 +41,7 @@ nf.Templates = (function () {
type: 'GET',
url: config.urls.authorities,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.authorities)) {
// record the users authorities
nf.Common.setAuthorities(response.authorities);
@@ -49,7 +49,7 @@ nf.Templates = (function () {
} else {
deferred.reject();
}
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
nf.Common.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -154,7 +154,7 @@ nf.Templates = (function () {
type: 'GET',
url: config.urls.banners,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// ensure the banners response is specified
if (nf.Common.isDefinedAndNotNull(response.banners)) {
if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
@@ -186,7 +186,7 @@ nf.Templates = (function () {
}
deferred.resolve();
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
nf.Common.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -219,14 +219,14 @@ nf.Templates = (function () {
type: 'GET',
url: config.urls.controllerAbout,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var aboutDetails = response.about;
var templatesTitle = aboutDetails.title + ' Templates';
// set the document title and the about title
document.title = templatesTitle;
$('#templates-header-text').text(templatesTitle);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
});
});
});
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
index dd78eb58fd..996544f142 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
@@ -114,7 +114,7 @@ nf.UsersTable = (function () {
data: JSON.stringify(userEntity),
contentType: 'application/json',
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.user)) {
var user = response.user;
@@ -123,7 +123,7 @@ nf.UsersTable = (function () {
var usersData = usersGrid.getData();
usersData.updateItem(user.id, user);
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
// hide the dialog
$('#user-roles-dialog').modal('hide');
@@ -203,9 +203,9 @@ nf.UsersTable = (function () {
data: JSON.stringify(userGroupEntity),
contentType: 'application/json',
dataType: 'json'
- }).then(function () {
+ }).done(function () {
nf.UsersTable.loadUsersTable();
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
// hide the dialog
$('#group-roles-dialog').modal('hide');
@@ -244,9 +244,9 @@ nf.UsersTable = (function () {
type: 'DELETE',
url: config.urls.users + '/' + encodeURIComponent(userId),
dataType: 'json'
- }).then(function () {
+ }).done(function () {
nf.UsersTable.loadUsersTable();
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
// hide the dialog
$('#user-delete-dialog').modal('hide');
@@ -291,7 +291,7 @@ nf.UsersTable = (function () {
'status': 'DISABLED'
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.user)) {
var user = response.user;
@@ -300,7 +300,7 @@ nf.UsersTable = (function () {
var usersData = usersGrid.getData();
usersData.updateItem(user.id, user);
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
// hide the dialog
$('#user-revoke-dialog').modal('hide');
@@ -345,9 +345,9 @@ nf.UsersTable = (function () {
'status': 'DISABLED'
},
dataType: 'json'
- }).then(function () {
+ }).done(function () {
nf.UsersTable.loadUsersTable();
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
// hide the dialog
$('#group-revoke-dialog').modal('hide');
@@ -407,9 +407,9 @@ nf.UsersTable = (function () {
data: JSON.stringify(userGroupEntity),
contentType: 'application/json',
dataType: 'json'
- }).then(function () {
+ }).done(function () {
nf.UsersTable.loadUsersTable();
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
}
// hide the dialog
@@ -815,6 +815,7 @@ nf.UsersTable = (function () {
initGroupRevokeDialog();
initUsersTable();
},
+
/**
* Disables the specified user's account.
*
@@ -834,6 +835,7 @@ nf.UsersTable = (function () {
$('#user-revoke-dialog').modal('show');
}
},
+
/**
* Delete's the specified user's account.
*
@@ -853,6 +855,7 @@ nf.UsersTable = (function () {
$('#user-delete-dialog').modal('show');
}
},
+
/**
* Disables the specified group's account.
*
@@ -871,6 +874,7 @@ nf.UsersTable = (function () {
$('#group-revoke-dialog').modal('show');
}
},
+
/**
* Updates the specified users's level of access.
*
@@ -913,6 +917,7 @@ nf.UsersTable = (function () {
$('#user-roles-dialog').modal('show');
}
},
+
/**
* Updates the specified groups level of access.
*
@@ -931,6 +936,7 @@ nf.UsersTable = (function () {
$('#group-roles-dialog').modal('show');
}
},
+
/**
* Prompts to verify group removal.
*
@@ -951,13 +957,14 @@ nf.UsersTable = (function () {
type: 'DELETE',
url: config.urls.userGroups + '/' + encodeURIComponent(item.userGroup) + '/users/' + encodeURIComponent(item.id),
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
nf.UsersTable.loadUsersTable();
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
}
});
}
},
+
/**
* Ungroups the specified group.
*
@@ -978,13 +985,14 @@ nf.UsersTable = (function () {
type: 'DELETE',
url: config.urls.userGroups + '/' + encodeURIComponent(item.userGroup),
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
nf.UsersTable.loadUsersTable();
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
}
});
}
},
+
/**
* Update the size of the grid based on its container's current size.
*/
@@ -994,6 +1002,7 @@ nf.UsersTable = (function () {
grid.resizeCanvas();
}
},
+
/**
* Load the processor status table.
*/
@@ -1005,7 +1014,7 @@ nf.UsersTable = (function () {
'grouped': $('#group-collaspe-checkbox').hasClass('checkbox-checked')
},
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
// ensure there are users
if (nf.Common.isDefinedAndNotNull(response.users)) {
var usersGrid = $('#users-table').data('gridInstance');
@@ -1027,8 +1036,9 @@ nf.UsersTable = (function () {
} else {
$('#total-users').text('0');
}
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
},
+
/**
* Shows details for the specified user.
*
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users.js
index c1fac39002..96f73a5ec9 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users.js
@@ -41,7 +41,7 @@ nf.Users = (function () {
type: 'GET',
url: config.urls.authorities,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.authorities)) {
// record the users authorities
nf.Common.setAuthorities(response.authorities);
@@ -49,7 +49,7 @@ nf.Users = (function () {
} else {
deferred.reject();
}
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
nf.Common.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -69,7 +69,7 @@ nf.Users = (function () {
type: 'GET',
url: config.urls.banners,
dataType: 'json'
- }).then(function (bannerResponse) {
+ }).done(function (bannerResponse) {
// ensure the banners response is specified
if (nf.Common.isDefinedAndNotNull(bannerResponse.banners)) {
if (nf.Common.isDefinedAndNotNull(bannerResponse.banners.headerText) && bannerResponse.banners.headerText !== '') {
@@ -101,7 +101,7 @@ nf.Users = (function () {
}
deferred.resolve();
- }, function (xhr, status, error) {
+ }).fail(function (xhr, status, error) {
nf.Common.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -133,14 +133,14 @@ nf.Users = (function () {
type: 'GET',
url: config.urls.controllerAbout,
dataType: 'json'
- }).then(function (response) {
+ }).done(function (response) {
var aboutDetails = response.about;
var countersTitle = aboutDetails.title + ' Users';
// set the document title and the about title
document.title = countersTitle;
$('#users-header-text').text(countersTitle);
- }, nf.Common.handleAjaxError);
+ }).fail(nf.Common.handleAjaxError);
});
});
});