forked from FrancescoBorzi/TC-Ticket-Web-Viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
171 lines (163 loc) · 9.45 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
<!DOCTYPE html>
<html lang="en" ng-app="status" ng-controller="StatusController">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="TrinityCore Server Status">
<meta name="author" content="ShinDarth">
<title>{{ serverName }} Ticket Viewer</title>
<link rel="shortcut icon" href="">
<script src="js/lib/angular.min.js"></script>
<script src="js/lib/ui-bootstrap.min.js"></script>
<script src="js/lib/loading-bar.min.js"></script>
<script src="js/lib/angular-tablesort.js"></script>
<script src="js/app/viewer.js"></script>
<script src="config.js"></script>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/loading-bar.min.css">
<link rel="stylesheet" href="css/tablesort.css">
<link rel="stylesheet" href="css/style.css">
<!--[if IE]>
<script src="https://cdn.jsdelivr.net/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://cdn.jsdelivr.net/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container text-center">
<p class="h2 text-success">{{ serverName }} Ticket Viewer</p>
<br>
<div ng-show="apiLoaded">
<div ng-show="ticketsCount > 0">
<p class="lead h4">There are <strong class="text-danger">{{ ticketsCount }}</strong> open tickets</p>
<p>To resolve a ticket including a response, type in game <span class="text-info">.ticket complete #ID <i>response</i></span></p>
<br>
<div class="table-responsive">
<table class="table table-striped table-bordered" ts-wrapper>
<thead class="text-warning">
<th class="text-center" ts-criteria="id|parseInt" ts-default="ascending">#ID</th>
<th class="text-center" ts-criteria="name|lowercase">Character</th>
<th class="text-center" ts-criteria="description|lowercase">Description</th>
<th class="text-center" ts-criteria="createTime|parseInt">Create Time</th>
<th class="text-center" ts-criteria="lastModifiedTime|parseInt">Last Modified Time</th>
<th class="text-center" ts-criteria="comment|lowercase">Comment</th>
<th class="text-center" ts-criteria="assignedToName|lowercase">Assigned To</th>
<th class="text-center" ts-criteria="online|lowercase">Online</th>
</thead>
<tbody>
<tr ng-repeat="ticket in tickets" ng-class="ticket.faction" ts-repeat>
<td class="text-danger"><strong>{{ ticket.id }}</strong></td>
<td class="text-info"><small>[{{ ticket.playerGuid }}]</small><br><strong>{{ ticket.name }}</strong><br><small>({{ ticket.playerCurrentName }})</small></td>
<td>{{ ticket.description }}</td>
<td class="text-success">{{ ticket.createTime * 1000 | date:'yyyy-MM-dd HH:mm:ss' }}</td>
<td class="text-success">{{ ticket.lastModifiedTime * 1000 | date:'yyyy-MM-dd HH:mm:ss' }}</td>
<td class="text-muted">{{ ticket.comment }}</td>
<td class="text-warning"><strong>{{ ticket.assignedToName }}</strong></td>
<td><figure ng-show="ticket.online == 1" class="circle circle-on"></figure><figure ng-show="ticket.online == 0" class="circle circle-off"></figure></td>
</tr>
</tbody>
</table>
</div>
</div>
<div ng-show="ticketsCount == 0">
<p class="lead h4 text-primary">There are no open tickets.</p>
</div>
<div class="row gmscores">
<div class="col-md-4" ng-show="showTopGMbyCharacter">
<p class="h4">Top GM by Character</p>
<div class="table-score-container" ng-class="{'limit-height': toggleTopGMbyCharacter}">
<table class="table table-striped table-bordered">
<thead>
<th class="text-center">Character</th>
<th class="text-center">Account</th>
<th class="text-center">Tickets</th>
</thead>
<tbody>
<tr ng-repeat="gm in topGMbyCharacter">
<td style="max-width: 130px; overflow: hidden;"><strong>{{ gm.name }}</strong></td>
<td style="max-width: 170px; overflow: hidden;"><strong class="account-username">{{ gm.account }}</strong></td>
<td><strong>{{ gm.count }}</strong></td>
</tr>
</tbody>
</table>
</div>
<button type="button" class="btn btn-default btn-xs" style="cursor: pointer;" ng-click="toggleTopGMbyCharacter = !toggleTopGMbyCharacter">Toggle</button>
</div>
<div class="col-md-4" ng-show="showTopGMbyAccount">
<p class="h4">Top GM by Account</p>
<div class="table-score-container" ng-class="{'limit-height': toggleTopGMbyAccount}">
<table class="table table-striped table-bordered">
<thead>
<th class="text-center">Account</th>
<th class="text-center">Tickets</th>
</thead>
<tbody>
<tr ng-repeat="gm in topGMbyAccount">
<td><strong class="account-username">{{ gm.account }}</strong></td>
<td><strong>{{ gm.count }}</strong></td>
</tr>
</tbody>
</table>
</div>
<button type="button" class="btn btn-default btn-xs" style="cursor: pointer;" ng-click="toggleTopGMbyAccount = !toggleTopGMbyAccount">Toggle</button>
</div>
<div class="col-md-4" ng-show="showTopGMbyAccount">
<p class="h4"><span ng-click="changeMonth(-1)" class="glyphicon glyphicon-triangle-left" style="cursor: pointer;" aria-hidden="true"></span> Top Account {{ monthName }} <span ng-show="monthDiff < 0" ng-click="changeMonth(1)" class="glyphicon glyphicon-triangle-right" style="cursor: pointer;" aria-hidden="true"></span></p>
<div class="table-score-container" ng-class="{'limit-height': toggleTopAccountMonth}">
<table class="table table-striped table-bordered">
<thead>
<th class="text-center">Account</th>
<th class="text-center">Tickets</th>
</thead>
<tbody>
<tr ng-repeat="gm in month">
<td><strong class="account-username">{{ gm.account }}</strong></td>
<td><strong>{{ gm.count }}</strong></td>
</tr>
</tbody>
</table>
</div>
<button type="button" class="btn btn-default btn-xs" style="cursor: pointer;" ng-click="toggleTopAccountMonth = !toggleTopAccountMonth">Toggle</button>
</div>
</div>
<div ng-show="showRecents">
<br>
<p class="h4">Last {{ showResolvedTicketsCount }} resolved tickets</p>
<div class="table-responsive">
<table class="table table-striped table-bordered" ts-wrapper>
<thead class="text-warning">
<th class="text-center" ts-criteria="id|parseInt" ts-default="descending">#ID</th>
<th class="text-center" ts-criteria="name|lowercase">Character</th>
<th class="text-center" ts-criteria="description|lowercase">Description</th>
<th class="text-center" ts-criteria="createTime|parseInt">Create Time</th>
<th class="text-center" ts-criteria="lastModifiedTime|parseInt">Last Modified Time</th>
<th class="text-center" ts-criteria="comment|lowercase">Comment</th>
<th class="text-center" ts-criteria="assignedToName|lowercase">Assigned To</th>
<th class="text-center" ts-criteria="response|lowercase">Response</th>
<th class="text-center" ts-criteria="resolvedByName|lowercase">Resolved by</th>
</thead>
<tbody>
<tr ng-repeat="ticket in recents" ng-class="ticket.faction" ts-repeat>
<td class="text-danger"><strong>{{ ticket.id }}</strong></td>
<td class="text-info"><small>[{{ ticket.playerGuid }}]</small><br><strong>{{ ticket.name }}</strong><br><small>({{ ticket.playerCurrentName }})</small></td>
<td>{{ ticket.description }}</td>
<td class="text-success">{{ ticket.createTime * 1000 | date:'yyyy-MM-dd HH:mm:ss' }}</td>
<td class="text-success">{{ ticket.lastModifiedTime * 1000 | date:'yyyy-MM-dd HH:mm:ss' }}</td>
<td class="text-muted">{{ ticket.comment }}</td>
<td class="text-warning"><strong>{{ ticket.assignedToName }}</strong></td>
<td>{{ ticket.response }}</td>
<td class="text-warning"><strong>{{ ticket.resolvedByName }}</strong></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div ng-hide="apiLoaded">
<p class="lead h4 text-danger">ERROR: API not found, please edit your config.js file and set the path of your TrinityCore JSON API istance.</p>
</div>
<br>
<!-- I worked for free to build this software, please do not remove the credit! -->
<p class="small">Designed by <a target="_blank" href="https://github.com/ShinDarth/">ShinDarth</a></p>
</div>
</body>
</html>