<commit_before>App.ApplicationController = Ember.Controller.extend({
  needs: ['statuses', 'build', 'login'],
  isAutoRefreshEnabled: true,
  loggedIn: Ember.computed.alias('controllers.login.loggedIn'),
  isMtWilsonInstalledBinding: 'App.mtWilson.isInstalled',
  init: function () {
    var self = this;
    this._super();
    this.autoRefresh();
    this.resizeHandler();
    $(window).bind('resize', Ember.$.proxy(this.get('resizeHandler'), this));
    // Check link for OpenStack Horizon
    Ember.$.get('/horizon').then(function () {
      self.set('isHorizonAvailable', true);
    }, function () {
      Ember.$.get('/dashboard').then(function () {
        self.set('isHorizonAvailable', true);
        self.set('horizonUrl', '/dashboard');
      }, function () {
        self.set('isHorizonAvailable', false);
      });
    });
  },
  width: null,
  height: null,
  resizeHandler: function () {
    this.set('width', $(window).width());
    this.set('height', $(window).height());
  },
  isHealthy: function () {
    var health = this.get('controllers.statuses.health');
    return health === App.SUCCESS || health === App.INFO || health === App.WARNING;
  }.property('controllers.statuses.health'),
  isConfigured: function () {
    return App.nova.get('exists') && App.openrc.get('exists') && App.quantum.get('exists');
  }.property('App.nova.exists', 'App.openrc.exists', 'App.quantum.exists'),
  isEnabled: function () {
    return this.get('isHealthy') && this.get('isConfigured');
  }.property('isHealthy', 'isConfigured'),
  isHorizonAvailable: false,
  horizonUrl: '/horizon',
  fuelUrl: function() {
    return '//' + window.location.hostname + ':8000';
  }.property(),
  logsUrl: function() {
    return '/kibana3/index.html#/dashboard/file/logs.json';
  }.property(),
  graphsUrl: function() {
    return '//' + window.location.hostname + ':85';
  }.property(),
  isDrawerExpanded: false,
  autoRefresh: function () {
    Ember.run.later(this, 'autoRefresh', 20000);
    if (this.get('loggedIn') && this.get('isEnabled') && this.get('isAutoRefreshEnabled')) {
      this.store.find('slo');
      this.store.find('sla');
      this.store.find('flavor');
      this.store.find('vm');
      if (App.mtWilson.get('isInstalled')) {
        this.store.find('trustMle');
        this.store.find('trustNode');
      }
      this.store.find('node');
    }<commit_msg>Always load Graphite over HTTP and port 85 per Sunil's request until proxying/HTTPS support is addressed<commit_after>App.ApplicationController = Ember.Controller.extend({
  needs: ['statuses', 'build', 'login'],
  isAutoRefreshEnabled: true,
  loggedIn: Ember.computed.alias('controllers.login.loggedIn'),
  isMtWilsonInstalledBinding: 'App.mtWilson.isInstalled',
  init: function () {
    var self = this;
    this._super();
    this.autoRefresh();
    this.resizeHandler();
    $(window).bind('resize', Ember.$.proxy(this.get('resizeHandler'), this));
    // Check link for OpenStack Horizon
    Ember.$.get('/horizon').then(function () {
      self.set('isHorizonAvailable', true);
    }, function () {
      Ember.$.get('/dashboard').then(function () {
        self.set('isHorizonAvailable', true);
        self.set('horizonUrl', '/dashboard');
      }, function () {
        self.set('isHorizonAvailable', false);
      });
    });
  },
  width: null,
  height: null,
  resizeHandler: function () {
    this.set('width', $(window).width());
    this.set('height', $(window).height());
  },
  isHealthy: function () {
    var health = this.get('controllers.statuses.health');
    return health === App.SUCCESS || health === App.INFO || health === App.WARNING;
  }.property('controllers.statuses.health'),
  isConfigured: function () {
    return App.nova.get('exists') && App.openrc.get('exists') && App.quantum.get('exists');
  }.property('App.nova.exists', 'App.openrc.exists', 'App.quantum.exists'),
  isEnabled: function () {
    return this.get('isHealthy') && this.get('isConfigured');
  }.property('isHealthy', 'isConfigured'),
  isHorizonAvailable: false,
  horizonUrl: '/horizon',
  fuelUrl: function() {
    return '//' + window.location.hostname + ':8000';
  }.property(),
  logsUrl: function() {
    return '/kibana3/index.html#/dashboard/file/logs.json';
  }.property(),
  graphsUrl: function() {
    return 'http://' + window.location.hostname + ':85';
  }.property(),
  isDrawerExpanded: false,
  autoRefresh: function () {
    Ember.run.later(this, 'autoRefresh', 20000);
    if (this.get('loggedIn') && this.get('isEnabled') && this.get('isAutoRefreshEnabled')) {
      this.store.find('slo');
      this.store.find('sla');
      this.store.find('flavor');
      this.store.find('vm');
      if (App.mtWilson.get('isInstalled')) {
        this.store.find('trustMle');
        this.store.find('trustNode');
      }
      this.store.find('node');
    }
{'fraction_non_alphanumeric': 0.1941006600660066, 'fraction_numerical': 0.005363036303630363, 'mean_word_length': 3.6401913875598084, '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': '2003203', 'n_tokens_mistral': 1587, 'n_tokens_neox': 1534, 'n_words': 256}