adminReports.jade 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. template(name="adminReports")
  2. .setting-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. .main-body
  26. if loading.get
  27. +spinner
  28. else if showBrokenCardsReport.get
  29. +brokenCardsReport
  30. else if showFilesReport.get
  31. +filesReport
  32. else if showOrphanedFilesReport.get
  33. +orphanedFilesReport
  34. else if showRulesReport.get
  35. +rulesReport
  36. template(name="brokenCardsReport")
  37. .global-search-results-list-wrapper
  38. h1 {{_ 'broken-cards'}}
  39. if resultsCount
  40. +resultsPaged(this)
  41. else
  42. div {{_ 'no-results' }}
  43. template(name="rulesReport")
  44. h1 {{_ 'rulesReportTitle'}}
  45. if resultsCount
  46. table.table
  47. tr
  48. th Rule Title
  49. th Board Title
  50. th actionType
  51. th activityType
  52. each rule in rows
  53. tr
  54. td {{ rule.title }}
  55. td {{ rule.boardTitle }}
  56. td {{ rule.action.actionType }}
  57. td {{ rule.trigger.activityType }}
  58. else
  59. div {{_ 'no-results' }}
  60. template(name="filesReport")
  61. h1 {{_ 'filesReportTitle'}}
  62. if resultsCount
  63. table.table
  64. tr
  65. th Filename
  66. th.right Size (kB)
  67. th MIME Type
  68. th.center Usage
  69. th MD5 Sum
  70. th ID
  71. each att in attachmentFiles
  72. tr
  73. td {{ att.filename }}
  74. td.right {{fileSize att.length }}
  75. td {{ att.contentType }}
  76. td.center {{usageCount att._id.toHexString }}
  77. td {{ att.md5 }}
  78. td {{ att._id.toHexString }}
  79. else
  80. div {{_ 'no-results' }}
  81. template(name="orphanedFilesReport")
  82. h1 {{_ 'orphanedFilesReportTitle'}}
  83. if resultsCount
  84. table.table
  85. tr
  86. th Filename
  87. th.right Size (kB)
  88. th MIME Type
  89. th MD5 Sum
  90. th ID
  91. each att in attachmentFiles
  92. tr
  93. td {{ att.filename }}
  94. td.right {{fileSize att.length }}
  95. td {{ att.contentType }}
  96. td {{ att.md5 }}
  97. td {{ att._id.toHexString }}
  98. else
  99. div {{_ 'no-results' }}