當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。