-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.js
78 lines (69 loc) · 2.55 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
angular.module('shield', ['ngAnimate', 'ngToast', 'ui.bootstrap','ui.router','ngAnimate', 'ngCookies','chart.js']);
angular.module('shield').config(function($stateProvider, $urlRouterProvider) {
var allowedOrigins = "http://localhost:5000";
var client = io('http://127.0.0.1:5000/stomp', {
origins: allowedOrigins
});
$stateProvider.state('login-partial', {
url: '/login',
templateUrl: 'partial/login-partial/login-partial.html'
});
$stateProvider.state('dashboard-partial', {
url: '/dashboard',
templateUrl: 'partial/dashboard-partial/dashboard-partial.html'
}).state('dashboard-partial.logs', {
url: '/logs',
templateUrl: 'partial/logs-partial/logs-partial.html'
}).state('dashboard-partial.webcam', {
url: '/webcam',
templateUrl: 'partial/webcam-partial/webcam-partial.html'
}).state('dashboard-partial.scrshot', {
url: '/scrshot',
templateUrl: 'partial/screenshot-partial/screenshot-partial.html'
}).state('dashboard-partial.statistics', {
url: '/statistics',
templateUrl: 'partial/analytics-partial/analytics-partial.html'
}).state('dashboard-partial.getHelp', {
url: '/help',
templateUrl: 'partial/help-partial/help-partial.html'
}).state('dashboard-partial.faq', {
url: '/faq',
templateUrl: 'partial/faq-partial/faq-partial.html'
}).state('dashboard-partial.subsc', {
url: '/subscribe',
templateUrl: 'partial/subscribe-partial/subscribe-partial.html'
});
$stateProvider.state('payment-modal', {
url: '/partial/',
templateUrl: 'partial/payment-modal/payment-modal.html'
});
$stateProvider.state('invoice-modal', {
url: '/invoice-modal',
templateUrl: 'partial/invoice-modal/invoice-modal.html'
});
// $stateProvider.state("webcam", {
// views: {
// "webcam": {
// template: "<h1>HELLO!</h1>"
// }
// }
// })
$stateProvider.state('screenshot-partial', {
url: '/partial',
templateUrl: 'partial/screenshot-partial/screenshot-partial.html'
});
/* Add New States Above */
$urlRouterProvider.otherwise('/home');
});
angular.module('shield').run(function($rootScope) {
$rootScope.safeApply = function(fn) {
var phase = $rootScope.$$phase;
if (phase === '$apply' || phase === '$digest') {
if (fn && (typeof(fn) === 'function')) {
fn();
}
} else {
this.$apply(fn);
}
};
});