Sha256: 271fcb7aee01306fe48570cd15e5bfb83d187a2090e8aa5c816b50187948e80e

Contents?: true

Size: 867 Bytes

Versions: 6

Compression:

Stored size: 867 Bytes

Contents

(function() {
  'use strict';

  angular.module('app.resources')
    .factory('AwsData', AwsDataFactory);

  /** @ngInject */
  function AwsDataFactory($resource) {
    var base = '/api/v1/aws/providers/:id/:action';
    var AwsData = $resource(base, {action: '@action', id: '@id'});

    AwsData.ec2Flavors = ec2Flavors;
    AwsData.ec2Images = ec2Images;
    AwsData.subnets = subnets;
    AwsData.zones = zones;

    return AwsData;

    function ec2Flavors(id) {
      return AwsData.query({id: id, action: 'ec2_flavors'}).$promise;
    }

    function ec2Images(id) {
      return AwsData.query({id: id, action: 'ec2_images'}).$promise;
    }

    function subnets(id) {
      return AwsData.query({id: id, action: 'subnets'}).$promise;
    }

    function zones(id) {
      return AwsData.query({id: id, action: 'availability_zones'}).$promise;
    }
  }
})();

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
jellyfish-aws-0.0.8 public/extensions/aws/resources/aws-data.factory.js
jellyfish-aws-0.0.6 public/extensions/aws/resources/aws-data.factory.js
jellyfish-aws-0.0.5 public/extensions/aws/resources/aws-data.factory.js
jellyfish-aws-0.0.4 public/extensions/aws/resources/aws-data.factory.js
jellyfish-aws-0.0.3 public/extensions/aws/resources/aws-data.factory.js
jellyfish-aws-0.0.2 public/extensions/aws/resources/aws-data.factory.js