overview.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. <div class="container-fluid">
  2. <div class="well" ng-show="benutzer==null">
  3. Benutzer:<br/>
  4. <div class="dropdown">
  5. <a class="btn dropdown-toggle" role="button" data-toggle="dropdown">{{benutzer2||'unbekannt'}}&nbsp;<b class="caret"></b></a>
  6. <ul class="dropdown-menu" role="menu">
  7. <li ng-repeat="val in domain.benutzer"><a ng-click="benutzer2=val">{{val}}</a></li>
  8. </ul>
  9. </div>
  10. <br/>
  11. <button class="btn btn-default btn-sm" ng-click="saveUser(benutzer2)">Speichern</button>
  12. </div>
  13. <ul class="nav nav-pills">
  14. <li><a ng-href="#/overview/all/today/errors">Heutige Fehler</a></li>
  15. <li><a ng-href="#/overview/all/today/all">Heutige Statusmeldungen</a></li>
  16. <li><a ng-href="#/overview/all/all/missing">Alle Fehlenden</a></li>
  17. <li><a ng-href="#/overview/all/all/errors">Alle Fehler</a></li>
  18. </ul>
  19. </div>
  20. <div class="row">
  21. <div class="container-fluid col-md-7">
  22. <table class="table table-bordered table-striped">
  23. <tr>
  24. <th>
  25. <label>
  26. Datum <i class="glyphicon glyphicon-sort-by-alphabet" ng-click="Predicate='datum'"></i><br/>
  27. <input ng-model="Filter.datum" type="date" ng-change="refresh()" />
  28. </label>
  29. </th>
  30. <th>
  31. <label>
  32. Kunde <i class="glyphicon glyphicon-sort-by-alphabet" ng-click="Predicate='kunde'"></i><br/>
  33. <input ng-model="Filter.kunde" />
  34. </label>
  35. </th>
  36. <th>Start Soll<br/>Ende Soll <i class="glyphicon glyphicon-sort-by-alphabet" ng-click="Predicate='ende_soll'"></i></th>
  37. <th>Start Ist<br/>Ende Ist</th>
  38. <th>Abweichung</th>
  39. <th>Fehler / Statistik</th>
  40. <th>Kommentar</th>
  41. </tr>
  42. <tr>
  43. <td>
  44. </td>
  45. <td>
  46. <div class="dropdown">
  47. <a class="btn dropdown-toggle" role="button" data-toggle="dropdown">{{Filter.system||'alle'}}&nbsp;<b class="caret"></b></a>
  48. <ul class="dropdown-menu" role="menu">
  49. <li><a ng-click="Filter.system=''">alle</a></li>
  50. <li class="divider"></li>
  51. <li ng-repeat="val in domain.system"><a ng-click="Filter.system=val">{{val}}</a></li>
  52. </ul>
  53. </div>
  54. </td>
  55. <td></td>
  56. <td>
  57. <div class="dropdown">
  58. <a class="btn dropdown-toggle" role="button" data-toggle="dropdown">{{domain.fehlend[Filter.fehlend]||'alle'}}&nbsp;<b class="caret"></b></a>
  59. <ul class="dropdown-menu" role="menu">
  60. <li><a ng-click="Filter.fehlend=''">alle</a></li>
  61. <li class="divider"></li>
  62. <li ng-repeat="(key,val) in domain.fehlend"><a ng-click="Filter.fehlend=key">{{val}}</a></li>
  63. </ul>
  64. </div>
  65. </td>
  66. <td></td>
  67. <td>
  68. <div class="dropdown">
  69. <a class="btn dropdown-toggle" role="button" data-toggle="dropdown">{{domain.fehler[Filter.fehler]||'alle'}}&nbsp;<b class="caret"></b></a>
  70. <ul class="dropdown-menu" role="menu">
  71. <li><a ng-click="Filter.fehler=''">alle</a></li>
  72. <li class="divider"></li>
  73. <li ng-repeat="(key,val) in domain.fehler"><a ng-click="Filter.fehler=key">{{val}}</a></li>
  74. </ul>
  75. </div>
  76. </td>
  77. <td>
  78. <div class="dropdown">
  79. <a class="btn dropdown-toggle" role="button" data-toggle="dropdown">{{Filter.benutzer||'alle'}}&nbsp;<b class="caret"></b></a>
  80. <ul class="dropdown-menu" role="menu">
  81. <li><a ng-click="Filter.benutzer=''">alle</a></li>
  82. <li class="divider"></li>
  83. <li ng-repeat="val in domain.benutzer"><a ng-click="Filter.benutzer=val">{{val}}</a></li>
  84. </ul>
  85. </div>
  86. </td>
  87. </tr>
  88. <tr ng-repeat="zeile in overview | filter:SearchText | filter:Filter | orderBy:Predicate:Reverse" ng-class="{'danger':zeile.fehlend==1}">
  89. <td>{{dateFormat(zeile.datum)}}</td>
  90. <td><span class="label label-danger label-{{zeile.system}}">{{left(zeile.system, 1)}}</span> <a ng-href="#/overview/{{zeile.kunde}}/all/all">{{zeile.kunde}}</a></td>
  91. <td>{{zeile.start_soll}}<br/>{{zeile.ende_soll}}</td>
  92. <td>
  93. <a ng-click="saveStartTime(zeile)">{{zeile.start}}</a><br/>
  94. <a ng-click="saveEndTime(zeile)">{{zeile.ende}}</a>
  95. </td>
  96. <td>
  97. {{timeDiffStart(zeile)}}<br/>
  98. {{timeDiff(zeile)}}</td>
  99. <td>
  100. <button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#stats-modal" ng-click="setCurrent(zeile)" ng-show="zeile.anzahl != null">
  101. <span class="glyphicon glyphicon-stats"></span>
  102. </button>
  103. <!--<a ng-href="#/overview/{{zeile.kunde}}/all/all"><button type="button" class="btn btn-default" title="Fehlermeldungen"><span class="glyphicon glyphicon-exclamation-sign"></span></button></a>-->
  104. <!--<a ng-href="#/stats/{{zeile.kunde}}"><button type="button" class="btn btn-default" title="Statistik"><span class="glyphicon glyphicon-stats"></span></button></a>-->
  105. <!--<a ng-href="#/config/{{zeile.kunde}}/current"><button type="button" class="btn btn-default" title="Konfiguration"><span class="glyphicon glyphicon-list-alt"></span></button></a>-->
  106. <button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#fehler-modal" ng-click="setCurrent(zeile)" ng-show="zeile.anzahl != null">
  107. <span class="glyphicon" ng-class="{'glyphicon-check': zeile.anzahl == 0 && zeile.bearbeitet == 1, 'glyphicon-eye-close': zeile.anzahl == 0 && zeile.bearbeitet == 0, 'glyphicon-exclamation-sign': zeile.anzahl > 0 && zeile.bearbeitet == 0, 'glyphicon-ok': zeile.anzahl > 0 && zeile.bearbeitet == 1}"></span>
  108. <span class="label label-danger label-{{zeile.anzahl}}"> {{zeile.anzahl}}</span>
  109. </button>
  110. <button type="button" data-trigger="focus" class="btn btn-default btn-sm" data-toggle="modal" data-target="#fehler-modal" ng-click="setCurrent(zeile)" ng-show="zeile.anzahl == null">
  111. <span class="glyphicon glyphicon-question-sign"></span>
  112. </button>
  113. </td>
  114. <td>
  115. <button type="button" class="btn btn-default btn-sm" ng-init="c = getComments(zeile)" ng-show="c" data-toggle="popover" data-placement="bottom" title="test" data-content="{{c[0].kommentar}}
  116. {{domain.bearbeitet[c[0].status]}}">
  117. <span ng-show="c[0].datum != zeile.datum">{{dateFormat(c[0].datum)}}: </span>
  118. <span class="glyphicon {{getCommentIcon(c)}}"></span>
  119. <span class="label label-danger label-{{c[0].fehler}}"> {{c[0].fehler}}</span>
  120. {{c[0].benutzer}}
  121. </button>
  122. </td>
  123. </tr>
  124. </table>
  125. </div>
  126. </div>
  127. <!-- Modal -->
  128. <div class="modal fade" id="fehler-modal" tabindex="-1" role="dialog" aria-labelledby="fehler-modal-label" aria-hidden="true">
  129. <div class="modal-dialog modal-lg">
  130. <div class="modal-content">
  131. <div class="modal-header">
  132. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  133. <h4 class="modal-title" id="fehler-modal-label"><span class="glyphicon glyphicon-exclamation-sign"></span>&nbsp; {{current.zeile.kunde}} - {{dateFormat(current.zeile.datum)}}</h4>
  134. </div>
  135. <div class="modal-body">
  136. <table class="table table-hover table-bordered">
  137. <tr>
  138. <td>
  139. <button class="btn btn-default" ng-click="current.kommentar=current.template"><span class="glyphicon glyphicon-plus"></span></button>
  140. </td>
  141. <th style="width: 130px;">Datum</th>
  142. <th style="width: 100px;">Benutzer</th>
  143. <th style="width: 170px;">Status</th>
  144. <th style="width: 70px;">Anzahl</th>
  145. <th style="width: 340px;">Kommentar</th>
  146. </tr>
  147. <tr>
  148. <td></td>
  149. <td></td>
  150. <td></td>
  151. <td>
  152. <div class="dropdown">
  153. <a class="btn dropdown-toggle" role="button" data-toggle="dropdown">{{domain.statusfilter[current.status]||'alle'}}&nbsp;<b class="caret"></b></a>
  154. <ul class="dropdown-menu" role="menu">
  155. <li><a ng-click="current.status=''">alle</a></li>
  156. <li class="divider"></li>
  157. <li ng-repeat="(key,val) in domain.statusfilter"><a ng-click="current.status=key">{{val}}</a></li>
  158. </ul>
  159. </div>
  160. </td>
  161. <td></td>
  162. <td></td>
  163. </tr>
  164. <tr ng-repeat="c in comments[current.zeile.kunde] | filter:statusFilter | orderBy: 'datum' ">
  165. <td><button class="btn btn-default" ng-click="current.kommentar=c;c.fehler=parseInt(c.fehler,10)"><span class="glyphicon glyphicon-pencil"></span></button></td>
  166. <td>{{dateFormat(c.datum)}}</td>
  167. <td>{{c.benutzer}}</td>
  168. <td><span class="glyphicon {{getCommentIcon(c)}}"></span> {{domain.bearbeitet[c.status]}}</td>
  169. <td><span class="label label-danger label-{{c.fehler}}"> {{c.fehler}}</span></td>
  170. <td>{{c.kommentar}}</td>
  171. </tr>
  172. </table>
  173. <table class="table table-hover table-bordered">
  174. <tr>
  175. <th>Benutzer</th>
  176. <td>
  177. <div class="dropdown">
  178. <a class="btn dropdown-toggle" role="button" data-toggle="dropdown">{{current.kommentar.benutzer||'unbekannt'}}&nbsp;<b class="caret"></b></a>
  179. <ul class="dropdown-menu" role="menu">
  180. <li ng-repeat="val in domain.benutzer"><a ng-click="current.kommentar.benutzer=val">{{val}}</a></li>
  181. </ul>
  182. </div>
  183. </td>
  184. </tr>
  185. <tr>
  186. <th>Bearbeitungsstand</th>
  187. <td>
  188. <div class="dropdown">
  189. <a class="btn dropdown-toggle" role="button" data-toggle="dropdown"><span class="glyphicon {{getCommentIcon(current.kommentar)}}"></span> {{domain.bearbeitet[current.kommentar.status]||'unbekannt'}}&nbsp;<b class="caret"></b></a>
  190. <ul class="dropdown-menu" role="menu">
  191. <li ng-repeat="(key,val) in domain.bearbeitet"><a ng-click="current.kommentar.status=key"><span class="glyphicon {{domain.comment[key]}}"></span> {{val}}</a></li>
  192. </ul>
  193. </div>
  194. </td>
  195. </tr>
  196. <tr>
  197. <th>Anzahl Fehler
  198. <span class="label label-danger label-{{current.fehler.anzahl}}"> {{current.fehler.anzahl}}</span>
  199. </th>
  200. <td>
  201. <span class="label label-danger label-{{current.kommentar.fehler}}"> {{current.kommentar.fehler}}</span> &nbsp;
  202. <label>
  203. <input type="range" name="Anzahl" min="0" max="10" ng-model="current.kommentar.fehler" />
  204. </label>
  205. </td>
  206. </tr>
  207. <tr>
  208. <th>Kommentar</th>
  209. <td>
  210. <label>
  211. <textarea cols="60" rows="5" ng-model="current.kommentar.kommentar"></textarea>
  212. </label>
  213. </td>
  214. </tr>
  215. <tr>
  216. <td></td>
  217. <td>
  218. <button type="button" class="btn btn-default" ng-click="saveComments()">Speichern</button>
  219. <button type="button" class="btn btn-primary" ng-click="saveComments()" data-dismiss="modal">Speichern und schließen</button>
  220. </td>
  221. </tr>
  222. </table>
  223. <div class="logdatei" ng-repeat="e in current.fehler.fehlerbericht | filter: errorLevel | orderBy: 'ErrorLevel'">
  224. <a href="" onclick="$(this).next().toggle()">
  225. <p class="modell" ng-class="{'rot':e.ErrorLevel < 3}">{{e.Type}}: {{e.Name}} ({{errorCount(e)}})</p>
  226. </a>
  227. <div class="closed-tab">
  228. <ul class="fehler" ng-show="e.Type=='Modell'">
  229. <li ng-repeat="error in e.Errors"><a href="http://wiki.global-cube.de/{{error.Number}}">{{error.Number}}</a>:
  230. ({{error.Level}}) {{error.Message}}</li>
  231. </ul>
  232. <pre class="fehler" ng-show="e.Type=='Workflow'">{{e.Errors[0]}}</pre>
  233. <table class="ft" ng-show="e.Type=='Portal'||e.Type=='Versand'">
  234. <tbody ng-repeat="error in e.Errors">
  235. <tr>
  236. <td rowspan="5" class="number">{{$index+1}}
  237. <td>Datei:</td>
  238. <td>{{error.Filename}}</td>
  239. </tr>
  240. <tr>
  241. <td>Stand:</td>
  242. <td>{{error.Modified}}</td>
  243. </tr>
  244. <tr>
  245. <td>Benutzer:</td>
  246. <td>{{error.User}}</td>
  247. </tr>
  248. <tr>
  249. <td>Bericht:</td>
  250. <td>{{error.Report}} (Schicht {{error.Layer}})</td>
  251. </tr>
  252. <tr class="strich">
  253. <td>Empfänger:</td>
  254. <td><div ng-bind-html="mailFormat(error.MailTo)"></div></td>
  255. </tr>
  256. </tbody>
  257. </table>
  258. </div>
  259. </div>
  260. <table class="table table-hover table-bordered">
  261. <tr ng-repeat="(header, g) in current.fehler.weitere">
  262. <th>{{header}}</th>
  263. <td>
  264. <ul>
  265. <li ng-repeat="e in g">
  266. {{e.Name}}
  267. </li>
  268. </ul>
  269. </td>
  270. </tr>
  271. </table>
  272. </div>
  273. </div>
  274. </div>
  275. </div>
  276. <div class="modal fade" id="stats-modal" tabindex="-1" role="dialog" aria-labelledby="stats-modal-label" aria-hidden="true">
  277. <div class="modal-dialog modal-lg">
  278. <div class="modal-content">
  279. <div class="modal-header">
  280. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  281. <h4 class="modal-title" id="stats-modal-label"><span class="glyphicon glyphicon-stats"></span>&nbsp; {{current.zeile.kunde}} - {{dateFormat(current.zeile.datum)}}</h4>
  282. </div>
  283. <div class="modal-body">
  284. <div id="duration" style="width: 750px; height: 550px">
  285. </div>
  286. <br/><br/>
  287. <table class="table table-bordered table-striped">
  288. <tr>
  289. <th>Name</th>
  290. <th>Datum</th>
  291. <th>Zeit</th>
  292. <th>Dauer</th>
  293. <th>Quellen</th>
  294. <th>Kategorien</th>
  295. <th>Datensätze</th>
  296. </tr>
  297. <tr ng-repeat="e in current.fehler.fehlerbericht" ng-show="e.Summary.Duration != null">
  298. <td>{{e.Type}}: <a href="" ng-click="showDetails(e)">{{e.Name}}</a></td>
  299. <td>{{dateFormat(e.Modified)}}</td>
  300. <td>{{timeFormat(e.Modified)}}</td>
  301. <td>{{e.Summary.Duration}}</td>
  302. <td>{{e.Sources.length}}</td>
  303. <td>{{e.Summary.Categories}}</td>
  304. <td>{{e.Summary.Entities}}</td>
  305. </tr>
  306. </table>
  307. <div ng-show="current.details!=null">
  308. <h3>Details zu {{current.details.Type}}: {{current.details.Name}}</h3>
  309. <div id="duration_details" style="width: 750px; height: 550px">
  310. </div>
  311. <br/><br/>
  312. <table class="table table-bordered table-striped">
  313. <tr>
  314. <th>Name</th>
  315. <th ng-show="current.details.Type!='Modell'">Report</th>
  316. <th ng-show="current.details.Type=='Modell'">Datensätze</th>
  317. <th>Dauer</th>
  318. </tr>
  319. <tr ng-repeat="e in current.details.Sources">
  320. <td>{{e.Filename}}</td>
  321. <td ng-show="current.details.Type!='Modell'">{{e.Report}} ({{e.Layer}})</td>
  322. <td ng-show="current.details.Type=='Modell'">{{e.Entities}}</td>
  323. <td>{{e.Duration}}</td>
  324. </tr>
  325. </table>
  326. </div>
  327. </div>
  328. </div>
  329. </div>
  330. </div>
  331. <style>
  332. .table tbody tr td {
  333. vertical-align: middle;
  334. }
  335. .label-0 {
  336. background-color: #aaaaaa;
  337. }
  338. .label-1 {
  339. background-color: #bbbb00;
  340. }
  341. .label-2 {
  342. background-color: #bb8800;
  343. }
  344. .label-3 {
  345. background-color: #bb0000;
  346. }
  347. table.ft {
  348. border: 1px solid #888;
  349. }
  350. table.ft td {
  351. padding: 3px 5px;
  352. margin: 2px;
  353. background-color: #ddd;
  354. }
  355. .logdatei {
  356. margin: 10px 5px 20px 5px;
  357. padding: 0 20px 10px 20px;
  358. background-color: #eee;
  359. border: 1px solid #888;
  360. }
  361. .modell {
  362. font-weight: bold;
  363. background-color: #ccc;
  364. padding: 10px;
  365. margin: 0 -20px;
  366. }
  367. .rot {
  368. background-color: #e88;
  369. }
  370. .number {
  371. font-weight: bold;
  372. background-color: #ccc;
  373. border: 1px solid #888888;
  374. }
  375. .strich {
  376. border-bottom: 1px solid #888888;
  377. }
  378. </style>