Esempio n. 1
0
      get(this, 'model.nodeDrivers').filterBy('state', 'active').sortBy('name').forEach((driver) => {
        const name         = get(driver, 'name');
        const hasUi        = get(driver, 'hasUi');
        const hasIcon      = get(driver, 'hasBuiltinIconOnly');
        const uiUrl        = get(driver, 'uiUrl');
        const configName   = `${ name }Config`;
        const driverSchema = get(this, 'globalStore').getById('schema', configName.toLowerCase());

        if ( uiUrl ) {
          const cssUrl = proxifyUrl(uiUrl.replace(/\.js$/, '.css'), get(this, 'app.proxyEndpoint'));

          loadStylesheet(cssUrl, `driver-ui-css-${ name }`);
        }


        if ( driverSchema ) {
          out.push({
            name,
            driver:        'rke',
            genericIcon:   !hasUi && !hasIcon,
            nodeComponent: hasUi ? name : 'generic',
            nodeWhich:     name,
          });
        } else {
          set(this, 'needReloadSchema', true);
        }
      }),
Esempio n. 2
0
File: component.js Progetto: go/ui
 get(this, 'availableDrivers').forEach((driver) => {
   const name = get(driver, 'name');
   const uiUrl = get(driver, 'uiUrl');
   if ( uiUrl ) {
     const jsUrl  = proxifyUrl(driver.uiUrl, this.get('app.proxyEndpoint'));
     const cssUrl = proxifyUrl(driver.uiUrl.replace(/\.js$/,'.css'), this.get('app.proxyEndpoint'));
     promises.push(loadScript(jsUrl, `driver-ui-js-${name}`));
     promises.push(loadStylesheet(cssUrl, `driver-ui-css-${name}`));
   }
 });