当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript service.Api.all方法代码示例

本文整理汇总了TypeScript中core/api/api.service.Api.all方法的典型用法代码示例。如果您正苦于以下问题:TypeScript service.Api.all方法的具体用法?TypeScript service.Api.all怎么用?TypeScript service.Api.all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在core/api/api.service.Api的用法示例。


在下文中一共展示了service.Api.all方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: getImage

 // NB: not currently used or tested; only here to satisfy IImageReader interface
 public getImage(imageName: string, region: string, credentials: string): ng.IPromise<IDockerImage> {
   return this.API.all('images').one(credentials)
       .one(region)
       .one(imageName)
       .withParams({provider: 'docker'})
       .get()
       .then((results: IDockerImage[]) => results && results.length ? results[0] : null)
       .catch((): IDockerImage => null);
 }
开发者ID:jtk54,项目名称:deck,代码行数:10,代码来源:docker.image.reader.service.ts

示例2: getManifest

 public getManifest(account: string,
                    location: string,
                    name: string): IPromise<IManifest> {
   return this.API.all('manifests')
     .all(account)
     .all(location)
     .one(name)
     .get();
 }
开发者ID:robfletcher,项目名称:deck,代码行数:9,代码来源:manifestReader.service.ts

示例3: listHealthChecks

 listHealthChecks (type?: string): ng.IPromise<IGceHealthCheck[]> {
   if (type) {
     return this.listHealthChecks()
       .then((healthCheckWrappers: any[]) => {
         return healthCheckWrappers
           .filter((wrapper) => wrapper.healthCheck.healthCheckType === type);
       });
   } else {
     return this.API
       .all('search')
       .useCache(this.infrastructureCaches.healthChecks)
       .getList({q: '', type: 'healthChecks'})
       .then((searchEndPointWrapper: any[]) => {
         let healthCheckWrappers = searchEndPointWrapper[0].results;
         healthCheckWrappers.forEach((wrapper: any) => wrapper.healthCheck = JSON.parse(wrapper.healthCheck));
         return healthCheckWrappers;
       });
   }
 }
开发者ID:gkuchta,项目名称:deck,代码行数:19,代码来源:healthCheck.read.service.ts

示例4: listHealthChecks

 public listHealthChecks (type?: string): ng.IPromise<IGceHealthCheck[]> {
   if (type) {
     return this.listHealthChecks()
       .then((healthChecks: IGceHealthCheck[]) => {
         return healthChecks
           .filter((healthCheck) => healthCheck.healthCheckType === type);
       });
   } else {
     return this.API
       .all('search')
       .useCache(this.infrastructureCaches.get('healthChecks'))
       .getList({q: '', type: 'healthChecks'})
       .then((searchEndPointWrapper: any[]) => {
         let healthCheckWrappers = searchEndPointWrapper[0].results;
         return healthCheckWrappers.map((wrapper: any) => {
           wrapper.healthCheck = JSON.parse(wrapper.healthCheck);
           wrapper.healthCheck.account = wrapper.account;
           return wrapper.healthCheck as IGceHealthCheck;
         });
       });
   }
 }
开发者ID:jtk54,项目名称:deck,代码行数:22,代码来源:healthCheck.read.service.ts

示例5: listMetrics

 public listMetrics(provider: string, account: string, region: string, filters: any): ng.IPromise<ICloudMetricDescriptor[]> {
   return this.API.all('cloudMetrics').all(provider).all(account).all(region)
     .withParams(filters).getList();
 }
开发者ID:robfletcher,项目名称:deck,代码行数:4,代码来源:cloudMetrics.read.service.ts

示例6: getMetricStatistics

 public getMetricStatistics(provider: string, account: string, region: string, name: string, filters: any): ng.IPromise<ICloudMetricStatistics> {
   return this.API.all('cloudMetrics').all(provider).all(account).all(region).one(name, 'statistics')
     .withParams(filters).get();
 }
开发者ID:robfletcher,项目名称:deck,代码行数:4,代码来源:cloudMetrics.read.service.ts

示例7:

 return this.retryService.buildRetrySequence<String[]>(() => this.API.all('images/tags')
   .getList(params), (results: string[]) => (results.length > 0), 10, 1000)
开发者ID:brujoand,项目名称:deck,代码行数:2,代码来源:docker.image.reader.service.ts

示例8: fetchImpactCountForScope

 public fetchImpactCountForScope(fastPropertyScope: Scope): IPromise<any> {
   return this.API.all('fastproperties').all('impact').post(fastPropertyScope);
 }
开发者ID:brujoand,项目名称:deck,代码行数:3,代码来源:fastProperty.read.service.ts

示例9: listMetricAlarms

 public listMetricAlarms(): ng.IPromise<MetricAlarmDescriptor[]> {
   return this.API.all('ecs').all('cloudMetrics').all('alarms').getList();
 }
开发者ID:robfletcher,项目名称:deck,代码行数:3,代码来源:metricAlarm.read.service.ts

示例10: getLoadBalancerDetails

 public getLoadBalancerDetails(cloudProvider: string, account: string, region: string, name: string): IPromise<ILoadBalancerSourceData[]> {
   return this.API.all('loadBalancers').all(account).all(region).all(name).withParams({'provider': cloudProvider}).get();
 }
开发者ID:jcwest,项目名称:deck,代码行数:3,代码来源:loadBalancer.read.service.ts


注:本文中的core/api/api.service.Api.all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。