hunk.code_window:   return {
       get: function (id, params, callback, errorCallback) {
         $http({
           method: 'GET',
           url: API_ENDPOINT_ENDPOINTS + '/' + EndpointProvider.endpointID() + '/containers/' + id + '/top',
           params: {
             ps_args: params.ps_args
           }
  
hunk.labels: keep keep keep keep replace keep keep keep
hunk.after_edit:         url: API_ENDPOINT_ENDPOINTS + '/' + EndpointProvider.endpointID() + '/docker/containers/' + id + '/top',
  
hunk.file_path: app/rest/docker/containerTop.js
hunk.type: replace
file: angular.module('main', [])
  .controller('MainController', ['$scope', '$cookieStore', 'StateManager',
  function ($scope, $cookieStore, StateManager) {
  
    /**
    * Sidebar Toggle & Cookie Control
    */
    var mobileView = 992;
    $scope.getWidth = function() {
      return window.innerWidth;
    };
  
    $scope.applicationState = StateManager.getState();
  
    $scope.$watch($scope.getWidth, function(newValue, oldValue) {
      if (newValue >= mobileView) {
        if (angular.isDefined($cookieStore.get('toggle'))) {
          $scope.toggle = ! $cookieStore.get('toggle') ? false : true;
        } else {
          $scope.toggle = true;
        }
      } else {
        $scope.toggle = false;
      }
  
    });
  
    $scope.toggleSidebar = function() {
      $scope.toggle = !$scope.toggle;
      $cookieStore.put('toggle', $scope.toggle);
    };
  
    window.onresize = function() {
      $scope.$apply();
    };
  }]);
  