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


TypeScript builder.ApplicationModelBuilder.createApplication方法代码示例

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


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

示例1: beforeEach

  beforeEach(mock.inject(($httpBackend: IHttpBackendService, _API_: Api, _clusterFilterModel_: ClusterFilterModel,
                          _clusterService_: ClusterService, applicationModelBuilder: ApplicationModelBuilder) => {
    $http = $httpBackend;
    API = _API_;
    clusterService = _clusterService_;
    clusterFilterModel = _clusterFilterModel_;

    application = applicationModelBuilder.createApplication(
      'app',
      {key: 'serverGroups'},
      {key: 'runningExecutions'},
      {key: 'runningTasks'}
    );
    application.getDataSource('serverGroups').data = [
        {name: 'the-target', account: 'not-the-target', region: 'us-east-1'},
        {name: 'the-target', account: 'test', region: 'not-the-target'},
        {name: 'the-target', account: 'test', region: 'us-east-1'},
        {name: 'not-the-target', account: 'test', region: 'us-east-1'},
        {name: 'the-source', account: 'test', region: 'us-east-1'}
      ];
  }));
开发者ID:jcwest,项目名称:deck,代码行数:21,代码来源:cluster.service.spec.ts

示例2: beforeEach

  beforeEach(function() {
    app = modelBuilder.createApplication('app', { key: 'loadBalancers', lazy: true });
    app.getDataSource('loadBalancers').data = [
      {
        name: 'elb-1',
        region: 'us-east-1',
        account: 'test',
        vpcName: '',
        serverGroups: [],
        instanceCounts: { down: 0, starting: 0, outOfService: 0 },
        usages: {},
      },
      {
        name: 'elb-1',
        region: 'us-west-1',
        account: 'test',
        vpcName: 'main',
        serverGroups: [],
        instanceCounts: { down: 0, starting: 0, outOfService: 0 },
        usages: {},
      },
      {
        name: 'elb-2',
        region: 'us-east-1',
        account: 'prod',
        vpcName: '',
        serverGroups: [],
        instanceCounts: { down: 0, starting: 0, outOfService: 0 },
        usages: {},
      },
    ];

    resultJson = [
      { heading: 'us-east-1', loadBalancer: app.loadBalancers.data[0], serverGroups: [] },
      { heading: 'us-west-1', loadBalancer: app.loadBalancers.data[1], serverGroups: [] },
      { heading: 'us-east-1', loadBalancer: app.loadBalancers.data[2], serverGroups: [] },
    ];
    LoadBalancerState.filterModel.asFilterModel.clearFilters();
  });
开发者ID:mizzy,项目名称:deck,代码行数:39,代码来源:LoadBalancerFilterService.spec.ts

示例3:

      (
        $httpBackend: IHttpBackendService,
        _clusterService_: ClusterService,
        applicationModelBuilder: ApplicationModelBuilder,
      ) => {
        $http = $httpBackend;
        clusterService = _clusterService_;

        application = applicationModelBuilder.createApplication(
          'app',
          { key: 'serverGroups' },
          { key: 'runningExecutions' },
          { key: 'runningTasks' },
        );
        application.getDataSource('serverGroups').data = [
          { name: 'the-target', account: 'not-the-target', region: 'us-east-1' },
          { name: 'the-target', account: 'test', region: 'not-the-target' },
          { name: 'the-target', account: 'test', region: 'us-east-1' },
          { name: 'not-the-target', account: 'test', region: 'us-east-1' },
          { name: 'the-source', account: 'test', region: 'us-east-1' },
        ];
      },
开发者ID:mizzy,项目名称:deck,代码行数:22,代码来源:cluster.service.spec.ts

示例4: postTask

    function postTask(serverGroupCommand: IServerGroupCommand): ITaskCommand {
      let submitted: ITaskCommand = {};
      $httpBackend
        .expectPOST(`${API.baseUrl}/applications/app/tasks`, (body: string) => {
          submitted = JSON.parse(body) as ITaskCommand;
          return true;
        })
        .respond(200, { ref: '/1' });

      const application: TestApplication = applicationModelBuilder.createApplication(
        'app',
        ApplicationDataSourceRegistry.getDataSources(),
      ) as TestApplication;
      application.tasks = {
        refresh: noop,
      };

      $httpBackend.expectGET(API.baseUrl + '/tasks/1').respond({});
      serverGroupWriter.cloneServerGroup(serverGroupCommand, application);
      $httpBackend.flush();

      return submitted;
    }
开发者ID:mizzy,项目名称:deck,代码行数:23,代码来源:serverGroupWriter.service.spec.ts

示例5: beforeEach

 beforeEach(mock.inject((serverGroupWarningMessageService: ServerGroupWarningMessageService,
                         _applicationModelBuilder_: ApplicationModelBuilder) => {
   service = serverGroupWarningMessageService;
   applicationModelBuilder = _applicationModelBuilder_;
   app = applicationModelBuilder.createApplication('app');
 }));
开发者ID:robfletcher,项目名称:deck,代码行数:6,代码来源:serverGroupWarningMessage.service.spec.ts

示例6: configureApplication

 function configureApplication() {
   applicationDataSourceRegistry.registerDataSource({key: 'serverGroups'});
   application = applicationModelBuilder.createApplication(applicationDataSourceRegistry.getDataSources());
   application.refresh();
   $scope.$digest();
 }
开发者ID:brujoand,项目名称:deck,代码行数:6,代码来源:delivery.dataSource.spec.ts

示例7:

 mock.inject((_applicationModelBuilder_: ApplicationModelBuilder) => {
   applicationModelBuilder = _applicationModelBuilder_;
   app = applicationModelBuilder.createApplication('app');
 }),
开发者ID:mizzy,项目名称:deck,代码行数:4,代码来源:serverGroupWarningMessage.service.spec.ts


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