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('Node', ['$resource', 'Settings', function NodeFactory($resource, Settings) {
    'use strict';
    return $resource(Settings.url + '/nodes/:id/:action', {}, {
      query: {method: 'GET', isArray: true},
      get: {method: 'GET', params: {id: '@id'}},
      update: { method: 'POST', params: {id: '@id', action: 'update', version: '@version'} },
      remove: { method: 'DELETE', params: {id: '@id'} }
    });
  }]);
  