<commit_before>import ClusterDriver from 'shared/mixins/cluster-driver';
import Component from '@ember/component'
import {
  computed, get, set, setProperties, observer
} from '@ember/object';
import layout from './template';
import { inject as service } from '@ember/service';
import { hash } from 'rsvp';
import { on } from '@ember/object/evented';

import {
  sizes,
  aksRegions,
} from 'ui/utils/azure-choices';

export default Component.extend(ClusterDriver, {
  globalStore:  service(),
  intl:         service(),
  layout,
  configField:  'azureKubernetesServiceConfig',

  zones:        aksRegions,
  versions:     null,
  machineSizes: sizes,
  step:         1,
  netMode:      'default',

  init() {
    this._super(...arguments);

    let config = get(this, 'cluster.azureKubernetesServiceConfig');

    if ( !config ) {
      config = this.get('globalStore').createRecord({
        agentPoolName:     'rancher',
        type:              'azureKubernetesServiceConfig',
        osDiskSizeGb:      100,
        adminUsername:     'azureuser',
        kubernetesVersion: '1.11.2',
        count:             3,
        agentVmSize:       'Standard_A2',
        location:          'eastus',
      });

      set(this, 'cluster.azureKubernetesServiceConfig', config);
    }
  },

  actions: {
    authenticate(cb) {
      const store = get(this, 'globalStore')
      const data = {
        clientId:       get(this, 'config.clientId'),
        clientSecret:   get(this, 'config.clientSecret'),
        subscriptionId: get(this, 'config.subscriptionId'),
        tenantId:       get(this, 'config.tenantId'),
        region:         get(this, 'config.location')
      };
      const aksRequest = {
        versions: store.rawRequest({
          url:    '/meta/aksVersions',
          method: 'POST',
          data
        }),
        virtualNetworks: store.rawRequest({
          url:    '/meta/aksVirtualNetworks',
          method: 'POST',
          data
        })
      }<commit_msg>Change default AKS instance size to recommended<commit_after>import ClusterDriver from 'shared/mixins/cluster-driver';
import Component from '@ember/component'
import {
  computed, get, set, setProperties, observer
} from '@ember/object';
import layout from './template';
import { inject as service } from '@ember/service';
import { hash } from 'rsvp';
import { on } from '@ember/object/evented';

import {
  sizes,
  aksRegions,
} from 'ui/utils/azure-choices';

export default Component.extend(ClusterDriver, {
  globalStore:  service(),
  intl:         service(),
  layout,
  configField:  'azureKubernetesServiceConfig',

  zones:        aksRegions,
  versions:     null,
  machineSizes: sizes,
  step:         1,
  netMode:      'default',

  init() {
    this._super(...arguments);

    let config = get(this, 'cluster.azureKubernetesServiceConfig');

    if ( !config ) {
      config = this.get('globalStore').createRecord({
        agentPoolName:     'rancher',
        type:              'azureKubernetesServiceConfig',
        osDiskSizeGb:      100,
        adminUsername:     'azureuser',
        kubernetesVersion: '1.11.2',
        count:             3,
        agentVmSize:       'Standard_D2_v2',
        location:          'eastus',
      });

      set(this, 'cluster.azureKubernetesServiceConfig', config);
    }
  },

  actions: {
    authenticate(cb) {
      const store = get(this, 'globalStore')
      const data = {
        clientId:       get(this, 'config.clientId'),
        clientSecret:   get(this, 'config.clientSecret'),
        subscriptionId: get(this, 'config.subscriptionId'),
        tenantId:       get(this, 'config.tenantId'),
        region:         get(this, 'config.location')
      };
      const aksRequest = {
        versions: store.rawRequest({
          url:    '/meta/aksVersions',
          method: 'POST',
          data
        }),
        virtualNetworks: store.rawRequest({
          url:    '/meta/aksVirtualNetworks',
          method: 'POST',
          data
        })
      }
{'fraction_non_alphanumeric': 0.1255271644753163, 'fraction_numerical': 0.005209625403125776, 'mean_word_length': 2.2914285714285714, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5564800', 'n_tokens_mistral': 1179, 'n_tokens_neox': 1167, 'n_words': 260}