adminReports.jade 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. template(name="adminReports")
  2. .setting-content.admin-reports-content
  3. unless currentUser.isAdmin
  4. | {{_ 'error-notAuthorized'}}
  5. else
  6. .content-body
  7. .side-menu
  8. ul
  9. li
  10. a.js-report-broken(data-id="report-broken")
  11. i.fa.fa-chain-broken
  12. | {{_ 'broken-cards'}}
  13. li
  14. a.js-report-files(data-id="report-orphaned-files")
  15. i.fa.fa-paperclip
  16. | {{_ 'orphanedFilesReportTitle'}}
  17. li
  18. a.js-report-files(data-id="report-files")
  19. i.fa.fa-paperclip
  20. | {{_ 'filesReportTitle'}}
  21. li
  22. a.js-report-rules(data-id="report-rules")
  23. i.fa.fa-magic
  24. | {{_ 'rulesReportTitle'}}
  25. li
  26. a.js-report-cards(data-id="report-cards")
  27. i.fa.fa-magic
  28. | {{_ 'cardsReportTitle'}}
  29. .main-body
  30. if loading.get
  31. +spinner
  32. else if showBrokenCardsReport.get
  33. +brokenCardsReport
  34. else if showFilesReport.get
  35. +filesReport
  36. else if showOrphanedFilesReport.get
  37. +orphanedFilesReport
  38. else if showRulesReport.get
  39. +rulesReport
  40. else if showCardsReport.get
  41. +cardsReport
  42. template(name="brokenCardsReport")
  43. .global-search-results-list-wrapper
  44. h1 {{_ 'broken-cards'}}
  45. if resultsCount
  46. +resultsPaged(this)
  47. else
  48. div {{_ 'no-results' }}
  49. template(name="rulesReport")
  50. h1 {{_ 'rulesReportTitle'}}
  51. if resultsCount
  52. table.table
  53. tr
  54. th Rule Title
  55. th Board Title
  56. th actionType
  57. th activityType
  58. each rule in results
  59. tr
  60. td {{ rule.title }}
  61. td {{ rule.boardTitle }}
  62. td {{ rule.action.actionType }}
  63. td {{ rule.trigger.activityType }}
  64. else
  65. div {{_ 'no-results' }}
  66. template(name="filesReport")
  67. h1 {{_ 'filesReportTitle'}}
  68. if resultsCount
  69. table.table
  70. tr
  71. th Filename
  72. th.right Size (kB)
  73. th MIME Type
  74. th.center Usage
  75. th MD5 Sum
  76. th ID
  77. each att in results
  78. tr
  79. td {{ att.filename }}
  80. td.right {{fileSize att.length }}
  81. td {{ att.contentType }}
  82. td.center {{usageCount att._id.toHexString }}
  83. td {{ att.md5 }}
  84. td {{ att._id.toHexString }}
  85. else
  86. div {{_ 'no-results' }}
  87. template(name="orphanedFilesReport")
  88. h1 {{_ 'orphanedFilesReportTitle'}}
  89. if resultsCount
  90. table.table
  91. tr
  92. th Filename
  93. th.right Size (kB)
  94. th MIME Type
  95. th MD5 Sum
  96. th ID
  97. each att in results
  98. tr
  99. td {{ att.filename }}
  100. td.right {{fileSize att.length }}
  101. td {{ att.contentType }}
  102. td {{ att.md5 }}
  103. td {{ att._id.toHexString }}
  104. else
  105. div {{_ 'no-results' }}
  106. template(name="cardsReport")
  107. h1 {{_ 'cardsReportTitle'}}
  108. if resultsCount
  109. table.table
  110. tr
  111. th Card Title
  112. th Board
  113. th Swimlane
  114. th List
  115. th Members
  116. th Assignees
  117. each card in results
  118. tr
  119. td {{abbreviate card.title }}
  120. td {{abbreviate card.board.title }}
  121. td {{abbreviate card.swimlane.title }}
  122. td {{abbreviate card.list.title }}
  123. td {{userNames card.members }}
  124. td {{userNames card.assignees }}
  125. else
  126. div {{_ 'no-results' }}