blueocean-core-js/src/js/capability/CapabilityApi.js
/**
     * Fetch the capabilities for one or more class names.
     *
     * @param {Array} classNames
     * @returns {Promise} with fulfilled {object} keyed by className, with an array of string capability names.
     * @private
     */
Fetch the capabilities for one or more class names.
@param {Array} classNames
@returns {Promise} with fulfilled {object} keyed by className, with an array of string capability names.
@private
Fetch the capabilities for one or more class names . @param { Array } classNames @returns { Promise } with fulfilled { object } keyed by className with an array of string capability names . @private
fetchCapabilities(classNames) {
        const noDuplicates = classNames.filter((item, index, self) => self.indexOf(item) === index);
        const path = UrlConfig.getJenkinsRootURL();
        const classesUrl = Utils.cleanSlashes(`${path}/blue/rest/classes/`);
        const fetchOptions = {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json',
            },
            body: JSON.stringify({ q: noDuplicates }),
        };
        return Fetch.fetchJSON(classesUrl, { disableCapabilites: true, fetchOptions });
    }
fetchCapabilities ( classNames ) { const noDuplicates = classNames . filter ( ( item , index , self ) => self . indexOf ( item ) === index ) ; const path = UrlConfig . getJenkinsRootURL ( ) ; const classesUrl = Utils . cleanSlashes ( ` ${ path } ` ) ; const fetchOptions = { method : 'POST' , headers : { 'Content-Type' : 'application/json' , } , body : JSON . stringify ( { q : noDuplicates } ) , } ; return Fetch . fetchJSON ( classesUrl , { disableCapabilites : true , fetchOptions } ) ; }
Fetch the capabilities for one or more class names.
Fetch the capabilities for one or more class names .