{"size": 712, "ext": "js", "max_stars_repo_path": "app/authenticated/controller.js", "max_stars_repo_name": "mbrukman/rancher-ui", "max_stars_repo_stars_event_min_datetime": "2015-05-29T19:50:16.000Z", "max_stars_repo_stars_event_max_datetime": "2015-05-29T19:50:16.000Z", "max_issues_repo_path": "app/authenticated/controller.js", "max_issues_repo_name": "mbrukman/rancher-ui", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/authenticated/controller.js", "max_forks_repo_name": "mbrukman/rancher-ui", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.2432432432, "max_line_length": 60, "alphanum_fraction": 0.6306179775}
import Ember from 'ember';
import Util from 'ui/utils/util';
import C from 'ui/utils/constants';

export default Ember.Controller.extend({
  error: null,

  activeTab: '',
  pageName: '',
  backRoute: null,
  backPrevious: null,
  addRoute: null,
  addParams: null,
  hasAside: false,
  asideColor: '',

  projects: null,
  project: null,

  addAuthParams: function(url) {
    var session = this.get('session');
    var token = session.get(C.SESSION.TOKEN);
    if ( token )
    {
      url = Util.addQueryParam(url, 'token', token);
    }

    var projectId = session.get(C.SESSION.PROJECT);
    if ( projectId )
    {
      url = Util.addQueryParam(url, 'projectId', projectId);
    }

    return url;
  }
});
