<commit_before>import Ember from 'ember';

var SiteController = Ember.ObjectController.extend({
  needs: ['sites'],
  userSites: Ember.computed.alias('controllers.sites.model'),
  selectedSite: Ember.computed.oneWay('model'),

  hideNav: Ember.computed.match('currentPath', /(error|login|forgotten)/),

  selectedSiteChanged: function() {
    if (this.get('selectedSite').get('id') !== this.get('model').get('id')) {
      // hard load to reset all controllers
      // @todo Find a better way to do that !
      window.location = window.location.origin + "/" + this.get('selectedSite').get('id');
      // this.transitionToRoute('site', this.get('selectedSite'));
      // this.unloadModels();
    }
  }.observes('selectedSite'),

  viewSiteUrl: function() {
    // @todo FIXME !
    return "http://127.0.0.1:48910";
  }.property(),<commit_msg>Fixes visit link<commit_after>import Ember from 'ember';

var SiteController = Ember.ObjectController.extend({
  needs: ['sites'],
  userSites: Ember.computed.alias('controllers.sites.model'),
  selectedSite: Ember.computed.oneWay('model'),

  hideNav: Ember.computed.match('currentPath', /(error|login|forgotten)/),

  selectedSiteChanged: function() {
    if (this.get('selectedSite').get('id') !== this.get('model').get('id')) {
      // hard load to reset all controllers
      // @todo Find a better way to do that !
      window.location = window.location.origin + "/" + this.get('selectedSite').get('id');
      // this.transitionToRoute('site', this.get('selectedSite'));
      // this.unloadModels();
    }
  }.observes('selectedSite'),

  viewSiteUrl: function() {
    // @todo FIXME !
    return "http://127.0.0.1:48910/" + this.get('selectedSite').get('id');
  }.property('selectedSite'),
{'fraction_non_alphanumeric': 0.18796561604584527, 'fraction_numerical': 0.012607449856733524, 'mean_word_length': 3.9322033898305087, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '7623335', 'n_tokens_mistral': 573, 'n_tokens_neox': 546, 'n_words': 100}