initInstances() {
    // instances details are required to get instances name
    this.instances = this.CucControllerHelper.request.getHashLoader({
      loaderFunction: () => this.OvhApiCloudProjectInstance.v6()
        .query({
          serviceName: this.$stateParams.projectId,
        })
        .$promise.then((instances) => {
          _.forEach(_.keys(this.services), (key) => {
            _.map(this.services[key], (service) => {
              const instance = _.find(instances, { id: service.instanceId });
              if (instance) {
                _.set(service, 'name', instance.name || service.instanceId);
              } else {
                // instance deleted, name not available, show the id
                _.set(service, 'name', service.instanceId);
              }
            });
          });
        }),
    });
    return this.instances.load();
  }
/**
   * get all instances for this PCI project
   */
get all instances for this PCI project
get all instances for this PCI project
initInstances() {
    this.instances = this.CucControllerHelper.request.getHashLoader({
      loaderFunction: () => this.OvhApiCloudProjectInstance.v6()
        .query({
          serviceName: this.$stateParams.projectId,
        })
        .$promise.then((instances) => {
          _.forEach(_.keys(this.services), (key) => {
            _.map(this.services[key], (service) => {
              const instance = _.find(instances, { id: service.instanceId });
              if (instance) {
                _.set(service, 'name', instance.name || service.instanceId);
              } else {
                _.set(service, 'name', service.instanceId);
              }
            });
          });
        }),
    });
    return this.instances.load();
  }
initInstances ( ) { this . instances = this . CucControllerHelper . request . getHashLoader ( { loaderFunction : ( ) => this . OvhApiCloudProjectInstance . v6 ( ) . query ( { serviceName : this . $stateParams . projectId , } ) . $promise . then ( ( instances ) => { _ . forEach ( _ . keys ( this . services ) , ( key ) => { _ . map ( this . services [ key ] , ( service ) => { const instance = _ . find ( instances , { id : service . instanceId } ) ; if ( instance ) { _ . set ( service , 'name' , instance . name || service . instanceId ) ; } else { _ . set ( service , 'name' , service . instanceId ) ; } } ) ; } ) ; } ) , } ) ; return this . instances . load ( ) ; }
get all instances for this PCI project
get all instances for this PCI project
// instances details are required to get instances name // instance deleted, name not available, show the id