client/splunk.ui.charting.js
function() {
            var output = '', seg, len;
            for (var i=0,l=arguments.length; i<l; i++) {
                seg = arguments[i].toString();
                len = seg.length;
                if (len > 1 && seg.charAt(len-1) == '/') {
                    seg = seg.substring(0, len-1);
                }
                if (seg.charAt(0) != '/') {
                    output += '/' + seg;
                } else {
                    output += seg;
                }
            }

            // augment static dirs with build number
            if (output!='/') {
                var segments = output.split('/');
                var firstseg = segments[1];
                if (firstseg=='static' || firstseg=='modules') {
                    var postfix = output.substring(firstseg.length+2, output.length);
                    output = '/'+firstseg+'/@' + window.$C['BUILD_NUMBER'];
                    if (window.$C['BUILD_PUSH_NUMBER']) output += '.' + window.$C['BUILD_PUSH_NUMBER'];
                    if (segments[2] == 'app')
                        output += ':'+this.getConfigValue('APP_BUILD', 0);
                    output += '/' + postfix;
                }
            }

            var root = Splunk.util.getConfigValue('MRSPARKLE_ROOT_PATH', '/');
            var locale = Splunk.util.getConfigValue('LOCALE', 'en-US');
            if (root == '' || root == '/') {
                return '/' + locale + output;
            } else {
                return root + '/' + locale + output;
            }
        }
function() {
            var output = '', seg, len;
            for (var i=0,l=arguments.length; i<l; i++) {
                seg = arguments[i].toString();
                len = seg.length;
                if (len > 1 && seg.charAt(len-1) == '/') {
                    seg = seg.substring(0, len-1);
                }
                if (seg.charAt(0) != '/') {
                    output += '/' + seg;
                } else {
                    output += seg;
                }
            }

            // augment static dirs with build number
            if (output!='/') {
                var segments = output.split('/');
                var firstseg = segments[1];
                if (firstseg=='static' || firstseg=='modules') {
                    var postfix = output.substring(firstseg.length+2, output.length);
                    output = '/'+firstseg+'/@' + window.$C['BUILD_NUMBER'];
                    if (window.$C['BUILD_PUSH_NUMBER']) output += '.' + window.$C['BUILD_PUSH_NUMBER'];
                    if (segments[2] == 'app')
                        output += ':'+this.getConfigValue('APP_BUILD', 0);
                    output += '/' + postfix;
                }
            }

            var root = Splunk.util.getConfigValue('MRSPARKLE_ROOT_PATH', '/');
            var locale = Splunk.util.getConfigValue('LOCALE', 'en-US');
            if (root == '' || root == '/') {
                return '/' + locale + output;
            } else {
                return root + '/' + locale + output;
            }
        }
function ( ) { var output = '' , seg , len ; for ( var i = 0 , l = arguments . length ; i < l ; i ++ ) { seg = arguments [ i ] . toString ( ) ; len = seg . length ; if ( len > 1 && seg . charAt ( len - 1 ) == '/' ) { seg = seg . substring ( 0 , len - 1 ) ; } if ( seg . charAt ( 0 ) != '/' ) { output += '/' + seg ; } else { output += seg ; } } // augment static dirs with build number if ( output != '/' ) { var segments = output . split ( '/' ) ; var firstseg = segments [ 1 ] ; if ( firstseg == 'static' || firstseg == 'modules' ) { var postfix = output . substring ( firstseg . length + 2 , output . length ) ; output = '/' + firstseg + '/@' + window . $C [ 'BUILD_NUMBER' ] ; if ( window . $C [ 'BUILD_PUSH_NUMBER' ] ) output += '.' + window . $C [ 'BUILD_PUSH_NUMBER' ] ; if ( segments [ 2 ] == 'app' ) output += ':' + this . getConfigValue ( 'APP_BUILD' , 0 ) ; output += '/' + postfix ; } } var root = Splunk . util . getConfigValue ( 'MRSPARKLE_ROOT_PATH' , '/' ) ; var locale = Splunk . util . getConfigValue ( 'LOCALE' , 'en-US' ) ; if ( root == '' || root == '/' ) { return '/' + locale + output ; } else { return root + '/' + locale + output ; } }
Returns a proper path that is relative to the current appserver location.
This is critical to ensure that we are proxy compatible. This method
takes 1 or more arguments, which will all be stiched together in sequence.

Ex: make_url('search/job'); // "/splunk/search/job"
Ex: make_url('/search/job'); // "/splunk/search/job"
Ex: make_url('/search', '/job'); // "/splunk/search/job"
Ex: make_url('/search', '/job', 1234); // "/splunk/search/job/1234"

Static paths are augmented with a cache defeater

Ex: make_url('/static/js/foo.js'); // "/splunk/static/@12345/js/foo.js"
Ex: make_url('/static/js/foo.js'); // "/splunk/static/@12345.1/js/foo.js"

@param path {String} The relative path to extend

TODO: lots of fancy URL munging
Returns a proper path that is relative to the current appserver location . This is critical to ensure that we are proxy compatible . This method takes 1 or more arguments which will all be stiched together in sequence .