forked from Walk4Muscle/S3PUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
283 lines (274 loc) · 13.8 KB
/
index.html
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" ng-app="app">
<head runat="server">
<meta charset="utf-8">
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Thu, 01 Jan 1970 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
<title>Social Health Platform</title>
<base href="/" />
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-select/0.19.8/select.css">
<link rel="stylesheet" href="/public/css/kendo.common.min.css" />
<link rel="stylesheet" href="/public/css/kendo.bootstrap.min.css" />
<link rel="stylesheet" href="/public/css/kendo.bootstrap.mobile.min.css" />
<link rel="stylesheet" href="/public/semantic.css" />
<link rel="stylesheet" href="/public/angular-datepicker.min.css" />
<link rel="stylesheet" href="/public/css/style.css" />
<link rel="stylesheet" href="/public/css/Animated.css" />
<link rel="stylesheet" href="/node_modules/angular-toastr/dist/angular-toastr.min.css" />
<script type="text/javascript" src="/public/jquery-2.2.4.min.js"></script>
<script type="text/javascript" src="/public/semantic.min.js"></script>
<script type="text/javascript" src="/public/echarts.min.js"></script>
<script type="text/javascript" src="/public/macarons.js"></script>
<script type="text/javascript" src="/public/echarts-wordcloud.min.js"></script>
<script type="text/javascript" src="/public/world.js"></script>
<script type="text/javascript" src="/public/jszip.min.js"></script>
<script type="text/javascript" src="/public/kendo.all.min.js"></script>
</head>
<body>
<script id="templateSubscriptionManagement" type="text/x-kendo-template">
<i class="icon remove rule" title="Remove Subscription Rule"></i>
<i class="icon write rule" title="Update Subscription Rule"></i>
</script>
<script id="templateConfirmRemoveSubscription" type="text/x-kendo-template">
<div style="line-height: 40px;">
<i class="icon sign warning" style="float: left; font-size: 40px; color: \\#FF9800;"></i>
<span style="margin-left: 10px; font-size: 16px; font-weight: bold;">Are you sure to delete subscription(s) of #=email#?</span>
</div>
</script>
<script id="templateConfirmRemoveRule" type="text/x-kendo-template">
<div style="line-height: 40px;">
<i class="icon sign warning" style="float: left; font-size: 40px; color: \\#FF9800;"></i>
<span style="margin-left: 10px; font-size: 16px; font-weight: bold;">Are you sure to delete this rule?</span>
</div>
<div class="form">
<div class="field">
<div class="caption">Email</div>
<div class="value" style="line-height: 30px;">#=email#</div>
</div>
<div class="field">
<div class="caption">Platform</div>
<div class="value" style="line-height: 30px;">#=platforms#</div>
</div>
<div class="field">
<div class="caption">Topic</div>
<div class="value" style="line-height: 30px;">#=topics#</div>
</div>
<div class="field">
<div class="caption">Message Type</div>
<div class="value" style="line-height: 30px;">#=types#</div>
</div>
</div>
</script>
<sub-window></sub-window>
<form id="form1" runat="server">
<div>
<!--********-->
<!--Top Menu-->
<!--********-->
<div class="ui top inverted menu">
<div class="ui container">
<div class="ui header item">
<!--<img class="logo" src="assets/images/logo.png">-->
<a ui-sref="home.dashboard">Social Health Platform</a>
<!--<div class="text tiny" style="margin-left:10px;">
Service Status and Sentiment Predictor
</div>-->
</div>
<div class="menu right forums" data-template="templateMenuGroupForums" data-bind="source: MenuGroups">
</div>
<script id="templateMenuGroupForums" type="text/x-kendo-template">
<div class="ui dropdown simple item #=color# #=select#">
#=name# <i class="dropdown icon"></i>
<div class="menu">
#=kendo.render(kendo.template($("\\#templateMenuForum").html()), forums)#
</div>
</div>
</script>
<script id="templateMenuForum" type="text/x-kendo-template">
<a class="item" href="#=url#">#=name#</a>
</script>
<div class="menu right">
<a class="ui item teal" ui-sref="notification" ng-class="{select: $state.includes('notification')}">
<!--<i class="alarm outline icon"></i>-->
Notification Center
<div class="mini floating circular ui red label" ng-show="Notifications.collection.length">{{Notifications.collection.length}}</div>
</a>
<a class="green ui item" ui-sref="home.about" ng-class="{select: $state.includes('home.about')}">
About
</a>
<div class="item ui label simple dropdown" style="display: flex !important;">
<!--<%=UserAlias %>-->
<span ng-if="userInfo">{{userInfo.userName||'Guest'}}</span>
<i class="dropdown icon"></i>
<div class="menu">
<!--<a class="item" ui-sref="/">Profile</a>-->
<!--<a class="item">Subscription</a>-->
<a class="item" ui-sref="admin" ng-show="isAdmin">Administrator</a>
<!--<a class="item" runat="server" id="btnSignOut" onserverclick="signoutBtn_Click">Sign Out</a>-->
<a class="item" ng-show="!(userInfo.userName)" ng-click="signIn()">Sign In</a>
<a class="item" ng-show="userInfo.userName" ng-click="signOut()">Sign Out</a>
</div>
</div>
</div>
</div>
</div>
<!--top menu end-->
</div>
<div id="main">
<!--<div ng-view></div>-->
<div ui-view></div>
<!--contain body-->
</div>
</form>
<script type="text/javascript">
if (window.location.pathname === "/report") {
$('.ui.top.inverted.menu').css("display", "none");
}
</script>
<script type="text/javascript" src="/public/angular.min.js"></script>
<script src="https://secure.aadcdn.microsoftonline-p.com/lib/1.0.13/js/adal.min.js"></script>
<script src="https://secure.aadcdn.microsoftonline-p.com/lib/1.0.13/js/adal-angular.min.js"></script>
<script type="text/javascript" src="/public/global.js"></script>
<script type="text/javascript" src="/public/main.min.js?v=2.1.0.0"></script>
<script type="text/javascript" src="/public/angular-datepicker.min.js"></script>
<script type="text/javascript" src="/public/angular-websocket.min.js"></script>
<script type="text/javascript" src="/node_modules/angular-toastr/dist/angular-toastr.tpls.min.js"></script>
<script type="text/javascript" src="/node_modules/angular-scroll/angular-scroll.min.js"></script>
<script type="text/javascript" src="/node_modules/angular-smart-table/dist/smart-table.min.js"></script>
<script type="text/javascript" src="/node_modules/angular-ui-router/release/angular-ui-router.js"></script>
<script type="text/javascript">
var allForumCategories = {
social: { name: 'Social Media', color: 'olive' },
thirdParty: { name: 'Third Party Forums', color: 'blue' },
msPlatform: { name: 'MS Platforms', color: 'yellow' }
};
var allForums = {
twitter: { name: 'Twitter', category: 'social' },
so: { name: 'Stack Overflow', category: 'thirdParty' },
su: { name: 'Super User', category: 'thirdParty' },
sf: { name: 'Server Fault', category: 'thirdParty' },
lithium: { name: 'Lithium', category: 'thirdParty' },
msdn: { name: 'MSDN Forums', category: 'msPlatform' },
tn: { name: 'Technet Forums', category: 'msPlatform' },
dyn: { name: 'Community Dynamics', category: 'msPlatform' },
gith: { name: 'GitHub', category: 'thirdParty' }
};
function getDateTimeFormat(datestring) {
return (datestring || '')
.replace(/AM|PM|am|pm/, "tt")
.replace(/2345/, "yyyy")
.replace(/45/, "yy")
.replace(/06/, "MM")
.replace(/6/, "M")
.replace(/07/, "dd")
.replace(/7/, "d")
.replace(/08/, "hh")
.replace(/8/, "h")
.replace(/09/, "mm")
.replace(/9/, "m")
.replace(/01/, "ss")
.replace(/1/, "s");
}
var localeDateTimeFormatString = getDateTimeFormat((new Date(2345,5,7,8,9,1)).toLocaleString());
var localeDateFormatString = getDateTimeFormat((new Date(2345,5,7,8,9,1)).toLocaleDateString());
var localeTimeFormatString = getDateTimeFormat((new Date(2345,5,7,8,9,1)).toLocaleTimeString());
function copyTextToClipboard(text) {
var textArea = document.createElement("textarea");
textArea.style.position = 'fixed';
textArea.style.top = 0;
textArea.style.left = 0;
textArea.style.width = '2em';
textArea.style.height = '2em';
textArea.style.padding = 0;
textArea.style.border = 'none';
textArea.style.outline = 'none';
textArea.style.boxShadow = 'none';
textArea.style.background = 'transparent';
textArea.value = text;
document.body.appendChild(textArea);
textArea.select();
try {
var successful = document.execCommand('copy');
var msg = successful ? 'successful' : 'unsuccessful';
} catch (err) {
console.log('Oops, unable to copy');
}
document.body.removeChild(textArea);
}
var menuModel = kendo.observable({
Forums: ['twitter', 'so', 'su', 'sf', 'lithium', 'msdn', 'tn','dyn','gith'],
Location: window.location.href,
MenuGroups: function () {
var swap = {
social: [],
thirdParty: [],
msPlatform: []
};
$.each(this.get('Forums'), function (i, forum) {
var menu = allForums[forum];
if (menu) {
if (menu.category in swap) {
swap[menu.category].push({
key: forum,
name: menu.name,
url: menu.category + '/' + forum
});
} else {
swap[menu.category] = [{
key: forum,
name: menu.name,
url: menu.category + '/' + forum
}];
}
}
});
var groups = [];
var location = this.get('Location');
$.each(swap, function (category, forums) {
var categoryInfo = allForumCategories[category];
groups.push({
name: categoryInfo.name,
color: categoryInfo.color,
select: location.match(new RegExp('[^/]/' + category, 'gi')) ? 'select' : '',
forums: forums
})
});
return groups;
}
});
kendo.bind($('.menu.forums'), menuModel);
$(document).ready(function () {
var endpoint = angular.element('html').scope().CONST.SERVICE_INFO.ENDPOINT2;
$.ajax({
url: endpoint + 'GetAllEnabledTopicsByPlatform',
data: {
platform: 'all',
stamp: (new Date()).getTime()
},
success: function (result, status, xhr) {
var forums = [];
$.each(result, function (i, g1) {
if (g1.isGA === true) {
$.each(g1.Platforms, function (j, g2) {
if (g2.isEnabled === true) {
if (forums.indexOf(g2.PlatformName) < 0) {
forums.push(g2.PlatformName);
}
}
});
}
});
menuModel.set('Forums', forums);
}
});
setInterval(function () {
menuModel.set('Location', window.location.href);
}, 200)
});
</script>
</body>
</html>