hunk.code_window:           $state.go('auth', {error: 'Your session has expired'});
           });
         }
       }, function error(err) {
         Messages.error("Failure", err, 'Unable to retrieve application settings');
       });
  
hunk.labels: keep keep add keep keep keep keep
hunk.after_edit:       if (state.application.analytics) {
           Analytics.offline(false);
           Analytics.registerScriptTags();
           Analytics.registerTrackers();
           $rootScope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams) {
             Analytics.trackPage(toState.url);
             Analytics.pageView();
           });
         }
  
hunk.file_path: app/app.js
hunk.type: add
file: angular.module('portainer.rest')
  .factory('Container', ['$resource', 'Settings', function ContainerFactory($resource, Settings) {
    'use strict';
    return $resource(Settings.url + '/containers/:id/:action', {
      name: '@name'
    }, {
      query: {method: 'GET', params: {all: 0, action: 'json', filters: '@filters' }, isArray: true},
      get: {method: 'GET', params: {action: 'json'}},
      stop: {method: 'POST', params: {id: '@id', t: 5, action: 'stop'}},
      restart: {method: 'POST', params: {id: '@id', t: 5, action: 'restart'}},
      kill: {method: 'POST', params: {id: '@id', action: 'kill'}},
      pause: {method: 'POST', params: {id: '@id', action: 'pause'}},
      unpause: {method: 'POST', params: {id: '@id', action: 'unpause'}},
      changes: {method: 'GET', params: {action: 'changes'}, isArray: true},
      stats: {method: 'GET', params: {id: '@id', stream: false, action: 'stats'}, timeout: 5000},
      start: {
        method: 'POST', params: {id: '@id', action: 'start'},
        transformResponse: genericHandler
      },
      create: {
        method: 'POST', params: {action: 'create'},
        transformResponse: genericHandler
      },
      remove: {
        method: 'DELETE', params: {id: '@id', v: 0},
        transformResponse: genericHandler
      },
      rename: {
        method: 'POST', params: {id: '@id', action: 'rename', name: '@name'},
        transformResponse: genericHandler
      },
      exec: {
        method: 'POST', params: {id: '@id', action: 'exec'},
        transformResponse: genericHandler
      }
    });
  }]);
  