reqmon 2.3.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (424) hide show
  1. Utils/CPMetrics.py +270 -0
  2. Utils/CertTools.py +62 -0
  3. Utils/EmailAlert.py +50 -0
  4. Utils/ExtendedUnitTestCase.py +62 -0
  5. Utils/FileTools.py +182 -0
  6. Utils/IteratorTools.py +80 -0
  7. Utils/MathUtils.py +31 -0
  8. Utils/MemoryCache.py +119 -0
  9. Utils/Patterns.py +24 -0
  10. Utils/Pipeline.py +137 -0
  11. Utils/PortForward.py +97 -0
  12. Utils/ProcessStats.py +103 -0
  13. Utils/PythonVersion.py +17 -0
  14. Utils/Signals.py +36 -0
  15. Utils/TemporaryEnvironment.py +27 -0
  16. Utils/Throttled.py +227 -0
  17. Utils/Timers.py +130 -0
  18. Utils/Timestamps.py +86 -0
  19. Utils/TokenManager.py +143 -0
  20. Utils/Tracing.py +60 -0
  21. Utils/TwPrint.py +98 -0
  22. Utils/Utilities.py +308 -0
  23. Utils/__init__.py +11 -0
  24. WMCore/Algorithms/Permissions.py +27 -0
  25. WMCore/Algorithms/__init__.py +7 -0
  26. WMCore/Cache/GenericDataCache.py +98 -0
  27. WMCore/Cache/WMConfigCache.py +572 -0
  28. WMCore/Cache/__init__.py +0 -0
  29. WMCore/Configuration.py +651 -0
  30. WMCore/DataStructs/File.py +177 -0
  31. WMCore/DataStructs/Fileset.py +140 -0
  32. WMCore/DataStructs/Job.py +182 -0
  33. WMCore/DataStructs/JobGroup.py +142 -0
  34. WMCore/DataStructs/JobPackage.py +49 -0
  35. WMCore/DataStructs/LumiList.py +734 -0
  36. WMCore/DataStructs/Mask.py +219 -0
  37. WMCore/DataStructs/Pickleable.py +24 -0
  38. WMCore/DataStructs/Run.py +256 -0
  39. WMCore/DataStructs/Subscription.py +175 -0
  40. WMCore/DataStructs/WMObject.py +47 -0
  41. WMCore/DataStructs/WorkUnit.py +112 -0
  42. WMCore/DataStructs/Workflow.py +60 -0
  43. WMCore/DataStructs/__init__.py +8 -0
  44. WMCore/Database/CMSCouch.py +1349 -0
  45. WMCore/Database/CouchUtils.py +118 -0
  46. WMCore/Database/__init__.py +9 -0
  47. WMCore/Lexicon.py +836 -0
  48. WMCore/REST/Auth.py +202 -0
  49. WMCore/REST/CherryPyPeriodicTask.py +166 -0
  50. WMCore/REST/Error.py +333 -0
  51. WMCore/REST/Format.py +642 -0
  52. WMCore/REST/HeartbeatMonitorBase.py +90 -0
  53. WMCore/REST/Main.py +623 -0
  54. WMCore/REST/Server.py +2435 -0
  55. WMCore/REST/Services.py +24 -0
  56. WMCore/REST/Test.py +120 -0
  57. WMCore/REST/Tools.py +38 -0
  58. WMCore/REST/Validation.py +250 -0
  59. WMCore/REST/__init__.py +1 -0
  60. WMCore/ReqMgr/DataStructs/AuthzByStatus.py +113 -0
  61. WMCore/ReqMgr/DataStructs/DefaultConfig/CAMPAIGN_CONFIG.py +116 -0
  62. WMCore/ReqMgr/DataStructs/DefaultConfig/DAS_RESULT_FILTER.py +3 -0
  63. WMCore/ReqMgr/DataStructs/DefaultConfig/EDITABLE_SPLITTING_PARAM_CONFIG.py +42 -0
  64. WMCore/ReqMgr/DataStructs/DefaultConfig/UNIFIED_CONFIG.py +240 -0
  65. WMCore/ReqMgr/DataStructs/DefaultConfig/__init__.py +0 -0
  66. WMCore/ReqMgr/DataStructs/ReqMgrConfigDataCache.py +65 -0
  67. WMCore/ReqMgr/DataStructs/Request.py +293 -0
  68. WMCore/ReqMgr/DataStructs/RequestError.py +21 -0
  69. WMCore/ReqMgr/DataStructs/RequestStatus.py +209 -0
  70. WMCore/ReqMgr/DataStructs/RequestType.py +13 -0
  71. WMCore/ReqMgr/DataStructs/__init__.py +0 -0
  72. WMCore/ReqMgr/__init__.py +1 -0
  73. WMCore/Services/AlertManager/AlertManagerAPI.py +111 -0
  74. WMCore/Services/AlertManager/__init__.py +0 -0
  75. WMCore/Services/CRIC/CRIC.py +238 -0
  76. WMCore/Services/CRIC/__init__.py +0 -0
  77. WMCore/Services/DBS/DBS3Reader.py +1044 -0
  78. WMCore/Services/DBS/DBSConcurrency.py +44 -0
  79. WMCore/Services/DBS/DBSErrors.py +113 -0
  80. WMCore/Services/DBS/DBSReader.py +23 -0
  81. WMCore/Services/DBS/DBSUtils.py +139 -0
  82. WMCore/Services/DBS/DBSWriterObjects.py +381 -0
  83. WMCore/Services/DBS/ProdException.py +133 -0
  84. WMCore/Services/DBS/__init__.py +8 -0
  85. WMCore/Services/FWJRDB/FWJRDBAPI.py +118 -0
  86. WMCore/Services/FWJRDB/__init__.py +0 -0
  87. WMCore/Services/HTTPS/HTTPSAuthHandler.py +66 -0
  88. WMCore/Services/HTTPS/__init__.py +0 -0
  89. WMCore/Services/LogDB/LogDB.py +201 -0
  90. WMCore/Services/LogDB/LogDBBackend.py +191 -0
  91. WMCore/Services/LogDB/LogDBExceptions.py +11 -0
  92. WMCore/Services/LogDB/LogDBReport.py +85 -0
  93. WMCore/Services/LogDB/__init__.py +0 -0
  94. WMCore/Services/MSPileup/__init__.py +0 -0
  95. WMCore/Services/MSUtils/MSUtils.py +54 -0
  96. WMCore/Services/MSUtils/__init__.py +0 -0
  97. WMCore/Services/McM/McM.py +173 -0
  98. WMCore/Services/McM/__init__.py +8 -0
  99. WMCore/Services/MonIT/Grafana.py +133 -0
  100. WMCore/Services/MonIT/__init__.py +0 -0
  101. WMCore/Services/PyCondor/PyCondorAPI.py +154 -0
  102. WMCore/Services/PyCondor/PyCondorUtils.py +105 -0
  103. WMCore/Services/PyCondor/__init__.py +0 -0
  104. WMCore/Services/ReqMgr/ReqMgr.py +261 -0
  105. WMCore/Services/ReqMgr/__init__.py +0 -0
  106. WMCore/Services/ReqMgrAux/ReqMgrAux.py +419 -0
  107. WMCore/Services/ReqMgrAux/__init__.py +0 -0
  108. WMCore/Services/RequestDB/RequestDBReader.py +267 -0
  109. WMCore/Services/RequestDB/RequestDBWriter.py +39 -0
  110. WMCore/Services/RequestDB/__init__.py +0 -0
  111. WMCore/Services/Requests.py +624 -0
  112. WMCore/Services/Rucio/Rucio.py +1287 -0
  113. WMCore/Services/Rucio/RucioUtils.py +74 -0
  114. WMCore/Services/Rucio/__init__.py +0 -0
  115. WMCore/Services/RucioConMon/RucioConMon.py +128 -0
  116. WMCore/Services/RucioConMon/__init__.py +0 -0
  117. WMCore/Services/Service.py +400 -0
  118. WMCore/Services/StompAMQ/__init__.py +0 -0
  119. WMCore/Services/TagCollector/TagCollector.py +155 -0
  120. WMCore/Services/TagCollector/XMLUtils.py +98 -0
  121. WMCore/Services/TagCollector/__init__.py +0 -0
  122. WMCore/Services/UUIDLib.py +13 -0
  123. WMCore/Services/UserFileCache/UserFileCache.py +160 -0
  124. WMCore/Services/UserFileCache/__init__.py +8 -0
  125. WMCore/Services/WMAgent/WMAgent.py +63 -0
  126. WMCore/Services/WMAgent/__init__.py +0 -0
  127. WMCore/Services/WMArchive/CMSSWMetrics.py +526 -0
  128. WMCore/Services/WMArchive/DataMap.py +463 -0
  129. WMCore/Services/WMArchive/WMArchive.py +33 -0
  130. WMCore/Services/WMArchive/__init__.py +0 -0
  131. WMCore/Services/WMBS/WMBS.py +97 -0
  132. WMCore/Services/WMBS/__init__.py +0 -0
  133. WMCore/Services/WMStats/DataStruct/RequestInfoCollection.py +300 -0
  134. WMCore/Services/WMStats/DataStruct/__init__.py +0 -0
  135. WMCore/Services/WMStats/WMStatsPycurl.py +145 -0
  136. WMCore/Services/WMStats/WMStatsReader.py +445 -0
  137. WMCore/Services/WMStats/WMStatsWriter.py +273 -0
  138. WMCore/Services/WMStats/__init__.py +0 -0
  139. WMCore/Services/WMStatsServer/WMStatsServer.py +134 -0
  140. WMCore/Services/WMStatsServer/__init__.py +0 -0
  141. WMCore/Services/WorkQueue/WorkQueue.py +492 -0
  142. WMCore/Services/WorkQueue/__init__.py +0 -0
  143. WMCore/Services/__init__.py +8 -0
  144. WMCore/Services/pycurl_manager.py +574 -0
  145. WMCore/WMBase.py +50 -0
  146. WMCore/WMException.py +183 -0
  147. WMCore/WMExceptions.py +269 -0
  148. WMCore/WMFactory.py +76 -0
  149. WMCore/WMLogging.py +108 -0
  150. WMCore/WMStats/CherryPyThreads/CleanUpTask.py +46 -0
  151. WMCore/WMStats/CherryPyThreads/DataCacheUpdate.py +45 -0
  152. WMCore/WMStats/CherryPyThreads/HeartbeatMonitor.py +6 -0
  153. WMCore/WMStats/CherryPyThreads/LogDBTasks.py +29 -0
  154. WMCore/WMStats/CherryPyThreads/__init__.py +0 -0
  155. WMCore/WMStats/DataStructs/DataCache.py +92 -0
  156. WMCore/WMStats/DataStructs/__init__.py +0 -0
  157. WMCore/WMStats/Service/ActiveRequestJobInfo.py +123 -0
  158. WMCore/WMStats/Service/MetaDataInfo.py +26 -0
  159. WMCore/WMStats/Service/RequestInfo.py +127 -0
  160. WMCore/WMStats/Service/RestApiHub.py +51 -0
  161. WMCore/WMStats/Service/__init__.py +0 -0
  162. WMCore/WMStats/T0/CherryPyThreads/T0DataCacheUpdate.py +35 -0
  163. WMCore/WMStats/T0/CherryPyThreads/__init__.py +0 -0
  164. WMCore/WMStats/T0/Service/T0RestApiHub.py +37 -0
  165. WMCore/WMStats/T0/Service/__init__.py +0 -0
  166. WMCore/WMStats/T0/__init__.py +0 -0
  167. WMCore/WMStats/WebGui/FrontPage.py +59 -0
  168. WMCore/WMStats/WebGui/__init__.py +0 -0
  169. WMCore/WMStats/__init__.py +1 -0
  170. WMCore/Wrappers/JsonWrapper/JSONThunker.py +342 -0
  171. WMCore/Wrappers/JsonWrapper/__init__.py +7 -0
  172. WMCore/Wrappers/__init__.py +6 -0
  173. WMCore/__init__.py +10 -0
  174. reqmon-2.3.10.data/data/bin/wmc-dist-patch +15 -0
  175. reqmon-2.3.10.data/data/bin/wmc-dist-unpatch +8 -0
  176. reqmon-2.3.10.data/data/bin/wmc-httpd +3 -0
  177. reqmon-2.3.10.data/data/data/couchapps/LogDB/_id +1 -0
  178. reqmon-2.3.10.data/data/data/couchapps/LogDB/couchapp.json +5 -0
  179. reqmon-2.3.10.data/data/data/couchapps/LogDB/filters/filterDeletedDocs.js +3 -0
  180. reqmon-2.3.10.data/data/data/couchapps/LogDB/language +1 -0
  181. reqmon-2.3.10.data/data/data/couchapps/LogDB/validate_doc_update.js +6 -0
  182. reqmon-2.3.10.data/data/data/couchapps/LogDB/views/logByRequest/map.js +9 -0
  183. reqmon-2.3.10.data/data/data/couchapps/LogDB/views/logByRequestAndThread/map.js +3 -0
  184. reqmon-2.3.10.data/data/data/couchapps/LogDB/views/requests/map.js +5 -0
  185. reqmon-2.3.10.data/data/data/couchapps/LogDB/views/requests/reduce.js +1 -0
  186. reqmon-2.3.10.data/data/data/couchapps/LogDB/views/tstamp/map.js +7 -0
  187. reqmon-2.3.10.data/data/data/couchapps/T0Request/_id +1 -0
  188. reqmon-2.3.10.data/data/data/couchapps/T0Request/couchapp.json +5 -0
  189. reqmon-2.3.10.data/data/data/couchapps/T0Request/filters/repfilter.js +3 -0
  190. reqmon-2.3.10.data/data/data/couchapps/T0Request/language +1 -0
  191. reqmon-2.3.10.data/data/data/couchapps/T0Request/updates/updaterequest.js +79 -0
  192. reqmon-2.3.10.data/data/data/couchapps/T0Request/validate_doc_update.js +6 -0
  193. reqmon-2.3.10.data/data/data/couchapps/T0Request/views/byrequest/map.js +3 -0
  194. reqmon-2.3.10.data/data/data/couchapps/T0Request/views/bystatus/map.js +7 -0
  195. reqmon-2.3.10.data/data/data/couchapps/T0Request/views/bystatusandtime/map.js +7 -0
  196. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/ColVis.css +76 -0
  197. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/font-awesome.min.css +4 -0
  198. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-circle-check-16.png +0 -0
  199. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-circle-cross-16.png +0 -0
  200. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-circle-plus-16.png +0 -0
  201. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-square-check-16.png +0 -0
  202. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/cms_logo.gif +0 -0
  203. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/cms_logo.jpeg +0 -0
  204. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  205. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
  206. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_100_e4f1fb_1x400.png +0 -0
  207. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  208. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_80_d7ebf9_1x400.png +0 -0
  209. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
  210. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  211. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_highlight-hard_55_5c9ccc_1x100.png +0 -0
  212. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
  213. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_inset-soft_100_fcfdfd_1x100.png +0 -0
  214. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_217bc0_256x240.png +0 -0
  215. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_2694e8_256x240.png +0 -0
  216. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_2e83ff_256x240.png +0 -0
  217. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_469bdd_256x240.png +0 -0
  218. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_6da8d5_256x240.png +0 -0
  219. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_cd0a0a_256x240.png +0 -0
  220. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_d8e7f3_256x240.png +0 -0
  221. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_f9bd01_256x240.png +0 -0
  222. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/warning-16.png +0 -0
  223. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/jquery-ui-1.12.0.css +1312 -0
  224. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/jquery.dataTables.css +241 -0
  225. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/logdb.css +60 -0
  226. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/main_layout.css +565 -0
  227. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/FontAwesome.otf +0 -0
  228. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.eot +0 -0
  229. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.svg +565 -0
  230. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.ttf +0 -0
  231. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.woff +0 -0
  232. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.woff2 +0 -0
  233. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/Sorting icons.psd +0 -0
  234. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/back_disabled.jpg +0 -0
  235. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/back_enabled.jpg +0 -0
  236. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/error.png +0 -0
  237. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/favicon.ico +0 -0
  238. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/forward_disabled.jpg +0 -0
  239. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/forward_enabled.jpg +0 -0
  240. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/loader-1.gif +0 -0
  241. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/module.caption.backg.png +0 -0
  242. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/module.caption.backg.rolledup.png +0 -0
  243. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/rollup.gif +0 -0
  244. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_asc.png +0 -0
  245. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_asc_disabled.png +0 -0
  246. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_both.png +0 -0
  247. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_desc.png +0 -0
  248. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_desc_disabled.png +0 -0
  249. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/stable.png +0 -0
  250. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/warning.png +0 -0
  251. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/index.html +105 -0
  252. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/index.html.min +106 -0
  253. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/index.html.org +125 -0
  254. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/WMStats.ActiveRequestController.js +61 -0
  255. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/WMStats.GenericController.js +38 -0
  256. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/WMStats.WorkloadSummaryController.js +12 -0
  257. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/import.js +6 -0
  258. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T0/WMStats.RequestSummary.js +71 -0
  259. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T0/WMStats.RunSummary.js +70 -0
  260. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.AgentRequestSummary.js +28 -0
  261. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.CMSSWSummary.js +28 -0
  262. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.CampaignSummary.js +28 -0
  263. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.ReqMgrRequest.js +10 -0
  264. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.RequestSummary.js +190 -0
  265. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Agents.js +98 -0
  266. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Alerts.js +21 -0
  267. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Campaigns.js +25 -0
  268. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.GenericRequests.js +728 -0
  269. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.History.js +78 -0
  270. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.JobDetails.js +19 -0
  271. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.JobSummary.js +32 -0
  272. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.LogDBData.js +93 -0
  273. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.LogMessage.js +38 -0
  274. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.SiteSummary.js +24 -0
  275. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Sites.js +25 -0
  276. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Tasks.js +107 -0
  277. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.WorkloadSummary.js +20 -0
  278. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats._StructBase.js +37 -0
  279. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/import.js +29 -0
  280. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.ActiveRequestModel.js +9 -0
  281. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestLogDetailModel.js +17 -0
  282. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestLogModel.js +14 -0
  283. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestModel.js +3 -0
  284. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestSearchModel.js +8 -0
  285. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.ActiveRequestModel.js +9 -0
  286. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.ReqMgrRequestModel.js +8 -0
  287. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.RequestLogDetailModel.js +18 -0
  288. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.RequestLogModel.js +14 -0
  289. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.RequestSearchModel.js +8 -0
  290. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.AgentModel.js +3 -0
  291. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.AlertModel.js +6 -0
  292. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.HistoryModel.js +14 -0
  293. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.JobDetailModel.js +22 -0
  294. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.JobSummaryModel.js +18 -0
  295. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.WorkloadSummaryModel.js +8 -0
  296. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats._AjaxModelBase.js +55 -0
  297. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats._ModelBase.js +77 -0
  298. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats._RequestModelBase.js +127 -0
  299. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/import.js +26 -0
  300. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/ViewModels/WMStats.ViewModel.js +511 -0
  301. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/ViewModels/import.js +2 -0
  302. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/T0/WMStats.Controls.js +117 -0
  303. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/T1/WMStats.Controls.js +158 -0
  304. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/WMStats.CommonControls.js +100 -0
  305. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/import.js +10 -0
  306. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Graphs/WMStats.SiteHistoryGraph.js +8 -0
  307. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Graphs/import.js +3 -0
  308. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.CategoryDetailList.js +38 -0
  309. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestAlertGUI.js +128 -0
  310. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestDataList.js +25 -0
  311. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestDetailList.js +68 -0
  312. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestSummaryList.js +31 -0
  313. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.CategoryDetailList.js +54 -0
  314. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestAlertGUI.js +81 -0
  315. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestDataList.js +26 -0
  316. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestDetailList.js +122 -0
  317. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestSummaryList.js +35 -0
  318. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.ResubmissionList.js +64 -0
  319. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.AgentDetailList.js +137 -0
  320. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.CategoryTitle.js +20 -0
  321. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.HTMLList.js +12 -0
  322. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.JobDetailList.js +178 -0
  323. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.RequestLogList.js +88 -0
  324. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.RequestTitle.js +33 -0
  325. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/import.js +25 -0
  326. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/WMStats.ActiveRequestTable.js +142 -0
  327. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/WMStats.RunSummaryTable.js +77 -0
  328. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/WMStats.TaskSummaryTable.js +127 -0
  329. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/addCategoryMap.js +10 -0
  330. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.ActiveRequestTable.js +132 -0
  331. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.ActiveRequestTableWithJob.js +164 -0
  332. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.AgentRequestSummaryTable.js +78 -0
  333. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.CMSSWSummaryTable.js +76 -0
  334. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.CampaignSummaryTable.js +76 -0
  335. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.SiteSummaryTable.js +63 -0
  336. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.TaskSummaryTable.js +124 -0
  337. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/addCategoryMap.js +17 -0
  338. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.JobSummaryTable.js +71 -0
  339. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.Table.js +70 -0
  340. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.TableController.js +130 -0
  341. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.WorkloadSummaryTable.js +62 -0
  342. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/import.js +26 -0
  343. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/WMStats.CategoryMap.js +45 -0
  344. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/WMStats.View.IndexHTML.js +137 -0
  345. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/import.js +3 -0
  346. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Ajax.js +74 -0
  347. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Couch.js +83 -0
  348. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Globals.js +200 -0
  349. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Utils.js +283 -0
  350. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/import-all.min.js +7 -0
  351. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/loader.js +27 -0
  352. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/minified/global.min.js +639 -0
  353. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/minified/import-all-t0.min.js +4317 -0
  354. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/minified/import-all-t1.min.js +4972 -0
  355. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/lib/jquery.dataTables.columnFilter.js +732 -0
  356. reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/lib/namespace.js +23 -0
  357. reqmon-2.3.10.data/data/data/couchapps/WMStats/filters/deleteFatDocFilter.js +3 -0
  358. reqmon-2.3.10.data/data/data/couchapps/WMStats/filters/filterDeletedDocs.js +3 -0
  359. reqmon-2.3.10.data/data/data/couchapps/WMStats/filters/repfilter.js +7 -0
  360. reqmon-2.3.10.data/data/data/couchapps/WMStats/rewrites.json +110 -0
  361. reqmon-2.3.10.data/data/data/couchapps/WMStats/shows/redirect.js +23 -0
  362. reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/agentInfo.js +17 -0
  363. reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/generalFields.js +11 -0
  364. reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/insertRequest.js +13 -0
  365. reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/jobLogArchiveLocation.js +10 -0
  366. reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/jobStateTransition.js +17 -0
  367. reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/jobSummaryState.js +5 -0
  368. reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/totalStats.js +39 -0
  369. reqmon-2.3.10.data/data/data/couchapps/WMStats/validate_doc_update.js +10 -0
  370. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl/language +1 -0
  371. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl/views/requestAgentUrl/map.erl +11 -0
  372. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl/views/requestAgentUrl/reduce.erl +1 -0
  373. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl1/language +1 -0
  374. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl1/views/byAgentURL/map.erl +11 -0
  375. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl2/language +1 -0
  376. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl2/views/allWorkflows/map.erl +10 -0
  377. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl2/views/allWorkflows/reduce.erl +1 -0
  378. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl3/language +1 -0
  379. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl3/views/jobsByStatusWorkflow/map.erl +32 -0
  380. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl3/views/jobsByStatusWorkflow/reduce.erl +1 -0
  381. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl4/language +1 -0
  382. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl4/views/cooledoffRequests/map.erl +16 -0
  383. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl4/views/cooledoffRequests/reduce.erl +1 -0
  384. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl5/language +1 -0
  385. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl5/views/time/map.erl +11 -0
  386. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl6/language +1 -0
  387. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl6/views/requestHistory/map.erl +11 -0
  388. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl6/views/requestHistory/reduce.erl +1 -0
  389. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl7/language +1 -0
  390. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl7/views/agentInfo/map.erl +10 -0
  391. reqmon-2.3.10.data/data/data/couchapps/WMStatsErl7/views/latestRequest/map.erl +11 -0
  392. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/index.html +44 -0
  393. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/js/container/histogram.js +141 -0
  394. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/js/container/tree.js +67 -0
  395. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/js/dataMap/errorData.js +69 -0
  396. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/js/htmlFormatter/listFormatter.js +79 -0
  397. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/js/layout/gridLayout.js +77 -0
  398. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/performanceHistogram.html +46 -0
  399. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/style/main.css +17 -0
  400. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/couchapp.json +4 -0
  401. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/filters/repfilter.js +3 -0
  402. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/lib/mustache.js +333 -0
  403. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/lib/validate.js +29 -0
  404. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/lists/completedWorkflows.js +27 -0
  405. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/lists/performanceHistogram.js +15 -0
  406. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/rewrites.json +65 -0
  407. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/shows/histogramByWorkflow.js +75 -0
  408. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/shows/lumiMissingByWorkflow.js +97 -0
  409. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/templates/histogramByWorkflow.html +126 -0
  410. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/templates/performanceData.html +44 -0
  411. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/updates/updateacdc.js +6 -0
  412. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/updates/updatecollection.js +5 -0
  413. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/validate_doc_update.js +8 -0
  414. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/vendor/protovis/_attachments/protovis-r3.2.js +277 -0
  415. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/views/outputDataByPrimDs/map.js +21 -0
  416. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/views/performanceDataByCampaign/map.js +19 -0
  417. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/views/summaryByInputdataset/map.js +7 -0
  418. reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/views/summaryByOutputdataset/map.js +7 -0
  419. reqmon-2.3.10.dist-info/LICENSE +202 -0
  420. reqmon-2.3.10.dist-info/METADATA +24 -0
  421. reqmon-2.3.10.dist-info/NOTICE +16 -0
  422. reqmon-2.3.10.dist-info/RECORD +424 -0
  423. reqmon-2.3.10.dist-info/WHEEL +5 -0
  424. reqmon-2.3.10.dist-info/top_level.txt +2 -0
@@ -0,0 +1,333 @@
1
+ /*
2
+ mustache.js Logic-less templates in JavaScript
3
+
4
+ See http://mustache.github.com/ for more info.
5
+
6
+ https://github.com/janl/mustache.js/
7
+ Copied from above site
8
+ */
9
+
10
+ var Mustache = function() {
11
+ var Renderer = function() {};
12
+
13
+ Renderer.prototype = {
14
+ otag: "{{",
15
+ ctag: "}}",
16
+ pragmas: {},
17
+ buffer: [],
18
+ pragmas_implemented: {
19
+ "IMPLICIT-ITERATOR": true
20
+ },
21
+ context: {},
22
+
23
+ render: function(template, context, partials, in_recursion) {
24
+ // reset buffer & set context
25
+ if(!in_recursion) {
26
+ this.context = context;
27
+ this.buffer = []; // TODO: make this non-lazy
28
+ }
29
+
30
+ // fail fast
31
+ if(!this.includes("", template)) {
32
+ if(in_recursion) {
33
+ return template;
34
+ } else {
35
+ this.send(template);
36
+ return;
37
+ }
38
+ }
39
+
40
+ template = this.render_pragmas(template);
41
+ var html = this.render_section(template, context, partials);
42
+ if(in_recursion) {
43
+ return this.render_tags(html, context, partials, in_recursion);
44
+ }
45
+
46
+ this.render_tags(html, context, partials, in_recursion);
47
+ },
48
+
49
+ /*
50
+ Sends parsed lines
51
+ */
52
+ send: function(line) {
53
+ if(line != "") {
54
+ this.buffer.push(line);
55
+ }
56
+ },
57
+
58
+ /*
59
+ Looks for %PRAGMAS
60
+ */
61
+ render_pragmas: function(template) {
62
+ // no pragmas
63
+ if(!this.includes("%", template)) {
64
+ return template;
65
+ }
66
+
67
+ var that = this;
68
+ var regex = new RegExp(this.otag + "%([\\w-]+) ?([\\w]+=[\\w]+)?" +
69
+ this.ctag);
70
+ return template.replace(regex, function(match, pragma, options) {
71
+ if(!that.pragmas_implemented[pragma]) {
72
+ throw({message:
73
+ "This implementation of mustache doesn't understand the '" +
74
+ pragma + "' pragma"});
75
+ }
76
+ that.pragmas[pragma] = {};
77
+ if(options) {
78
+ var opts = options.split("=");
79
+ that.pragmas[pragma][opts[0]] = opts[1];
80
+ }
81
+ return "";
82
+ // ignore unknown pragmas silently
83
+ });
84
+ },
85
+
86
+ /*
87
+ Tries to find a partial in the curent scope and render it
88
+ */
89
+ render_partial: function(name, context, partials) {
90
+ name = this.trim(name);
91
+ if(!partials || partials[name] === undefined) {
92
+ throw({message: "unknown_partial '" + name + "'"});
93
+ }
94
+ if(typeof(context[name]) != "object") {
95
+ return this.render(partials[name], context, partials, true);
96
+ }
97
+ return this.render(partials[name], context[name], partials, true);
98
+ },
99
+
100
+ /*
101
+ Renders inverted (^) and normal (#) sections
102
+ */
103
+ render_section: function(template, context, partials) {
104
+ if(!this.includes("#", template) && !this.includes("^", template)) {
105
+ return template;
106
+ }
107
+
108
+ var that = this;
109
+ // CSW - Added "+?" so it finds the tighest bound, not the widest
110
+ var regex = new RegExp(this.otag + "(\\^|\\#)\\s*(.+)\\s*" + this.ctag +
111
+ "\n*([\\s\\S]+?)" + this.otag + "\\/\\s*\\2\\s*" + this.ctag +
112
+ "\\s*", "mg");
113
+
114
+ // for each {{#foo}}{{/foo}} section do...
115
+ return template.replace(regex, function(match, type, name, content) {
116
+ var value = that.find(name, context);
117
+ if(type == "^") { // inverted section
118
+ if(!value || that.is_array(value) && value.length === 0) {
119
+ // false or empty list, render it
120
+ return that.render(content, context, partials, true);
121
+ } else {
122
+ return "";
123
+ }
124
+ } else if(type == "#") { // normal section
125
+ if(that.is_array(value)) { // Enumerable, Let's loop!
126
+ return that.map(value, function(row) {
127
+ return that.render(content, that.create_context(row),
128
+ partials, true);
129
+ }).join("");
130
+ } else if(that.is_object(value)) { // Object, Use it as subcontext!
131
+ return that.render(content, that.create_context(value),
132
+ partials, true);
133
+ } else if(typeof value === "function") {
134
+ // higher order section
135
+ return value.call(context, content, function(text) {
136
+ return that.render(text, context, partials, true);
137
+ });
138
+ } else if(value) { // boolean section
139
+ return that.render(content, context, partials, true);
140
+ } else {
141
+ return "";
142
+ }
143
+ }
144
+ });
145
+ },
146
+
147
+ /*
148
+ Replace {{foo}} and friends with values from our view
149
+ */
150
+ render_tags: function(template, context, partials, in_recursion) {
151
+ // tit for tat
152
+ var that = this;
153
+
154
+ var new_regex = function() {
155
+ return new RegExp(that.otag + "(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?" +
156
+ that.ctag + "+", "g");
157
+ };
158
+
159
+ var regex = new_regex();
160
+ var tag_replace_callback = function(match, operator, name) {
161
+ switch(operator) {
162
+ case "!": // ignore comments
163
+ return "";
164
+ case "=": // set new delimiters, rebuild the replace regexp
165
+ that.set_delimiters(name);
166
+ regex = new_regex();
167
+ return "";
168
+ case ">": // render partial
169
+ return that.render_partial(name, context, partials);
170
+ case "{": // the triple mustache is unescaped
171
+ return that.find(name, context);
172
+ default: // escape the value
173
+ return that.escape(that.find(name, context));
174
+ }
175
+ };
176
+ var lines = template.split("\n");
177
+ for(var i = 0; i < lines.length; i++) {
178
+ lines[i] = lines[i].replace(regex, tag_replace_callback, this);
179
+ if(!in_recursion) {
180
+ this.send(lines[i]);
181
+ }
182
+ }
183
+
184
+ if(in_recursion) {
185
+ return lines.join("\n");
186
+ }
187
+ },
188
+
189
+ set_delimiters: function(delimiters) {
190
+ var dels = delimiters.split(" ");
191
+ this.otag = this.escape_regex(dels[0]);
192
+ this.ctag = this.escape_regex(dels[1]);
193
+ },
194
+
195
+ escape_regex: function(text) {
196
+ // thank you Simon Willison
197
+ if(!arguments.callee.sRE) {
198
+ var specials = [
199
+ '/', '.', '*', '+', '?', '|',
200
+ '(', ')', '[', ']', '{', '}', '\\'
201
+ ];
202
+ arguments.callee.sRE = new RegExp(
203
+ '(\\' + specials.join('|\\') + ')', 'g'
204
+ );
205
+ }
206
+ return text.replace(arguments.callee.sRE, '\\$1');
207
+ },
208
+
209
+ /*
210
+ find `name` in current `context`. That is find me a value
211
+ from the view object
212
+ */
213
+ find: function(name, context) {
214
+ name = this.trim(name);
215
+
216
+ // Checks whether a value is thruthy or false or 0
217
+ function is_kinda_truthy(bool) {
218
+ return bool === false || bool === 0 || bool;
219
+ }
220
+
221
+ var value;
222
+ if(is_kinda_truthy(context[name])) {
223
+ value = context[name];
224
+ } else if(is_kinda_truthy(this.context[name])) {
225
+ value = this.context[name];
226
+ }
227
+
228
+ if(typeof value === "function") {
229
+ return value.apply(context);
230
+ }
231
+ if(value !== undefined) {
232
+ return value;
233
+ }
234
+ // silently ignore unkown variables
235
+ return "";
236
+ },
237
+
238
+ // Utility methods
239
+
240
+ /* includes tag */
241
+ includes: function(needle, haystack) {
242
+ return haystack.indexOf(this.otag + needle) != -1;
243
+ },
244
+
245
+ /*
246
+ Does away with nasty characters
247
+ */
248
+ escape: function(s) {
249
+ s = String(s === null ? "" : s);
250
+ return s.replace(/&(?!\w+;)|["'<>\\]/g, function(s) {
251
+ switch(s) {
252
+ case "&": return "&amp;";
253
+ case "\\": return "\\\\";
254
+ case '"': return '&quot;';
255
+ case "'": return '&#39;';
256
+ case "<": return "&lt;";
257
+ case ">": return "&gt;";
258
+ default: return s;
259
+ }
260
+ });
261
+ },
262
+
263
+ // by @langalex, support for arrays of strings
264
+ create_context: function(_context) {
265
+ if(this.is_object(_context)) {
266
+ return _context;
267
+ } else {
268
+ var iterator = ".";
269
+ if(this.pragmas["IMPLICIT-ITERATOR"]) {
270
+ iterator = this.pragmas["IMPLICIT-ITERATOR"].iterator;
271
+ }
272
+ var ctx = {};
273
+ ctx[iterator] = _context;
274
+ return ctx;
275
+ }
276
+ },
277
+
278
+ is_object: function(a) {
279
+ return a && typeof a == "object";
280
+ },
281
+
282
+ is_array: function(a) {
283
+ return Object.prototype.toString.call(a) === '[object Array]';
284
+ },
285
+
286
+ /*
287
+ Gets rid of leading and trailing whitespace
288
+ */
289
+ trim: function(s) {
290
+ return s.replace(/^\s*|\s*$/g, "");
291
+ },
292
+
293
+ /*
294
+ Why, why, why? Because IE. Cry, cry cry.
295
+ */
296
+ map: function(array, fn) {
297
+ if (typeof array.map == "function") {
298
+ return array.map(fn);
299
+ } else {
300
+ var r = [];
301
+ var l = array.length;
302
+ for(var i = 0; i < l; i++) {
303
+ r.push(fn(array[i]));
304
+ }
305
+ return r;
306
+ }
307
+ }
308
+ };
309
+
310
+ return({
311
+ name: "mustache.js",
312
+ version: "0.3.1-dev",
313
+
314
+ /*
315
+ Turns a template and view into HTML
316
+ */
317
+ to_html: function(template, view, partials, send_fun) {
318
+ var renderer = new Renderer();
319
+ if(send_fun) {
320
+ renderer.send = send_fun;
321
+ }
322
+ renderer.render(template, view, partials);
323
+ if(!send_fun) {
324
+ return renderer.buffer.join("\n");
325
+ }
326
+ }
327
+ });
328
+ }();
329
+ // for CommonJS
330
+ if (exports) {
331
+ exports.to_html = Mustache.to_html;
332
+ exports.escape = Mustache.escape;
333
+ };
@@ -0,0 +1,29 @@
1
+ // Idea from https://github.com/jchris/couchapp.org
2
+
3
+ exports.init = function(newDoc, oldDoc, userCtx) {
4
+ var v = {};
5
+
6
+ // Is this an admin
7
+ v.isAdmin = function() {
8
+ //allow local replication
9
+ if (userCtx.name === null) return true;
10
+ return userCtx.roles.indexOf('_admin') !== -1;
11
+ };
12
+
13
+ // Does person have the required role for the required group
14
+ v.hasGroupRole = function(group, role) {
15
+ for(var i = 0, l = userCtx.roles.length; i < l; i++) {
16
+ var user_role = userCtx.roles[i][0];
17
+ if (user_role === role) {
18
+ var user_groups = userCtx.roles[i][1];
19
+ if (user_groups.indexOf('group:' + group) !== -1) {
20
+ return true;
21
+ }
22
+ }
23
+ }
24
+ return false;
25
+ };
26
+
27
+
28
+ return v;
29
+ };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * This list function gets the view output from outputDataBy<*>
3
+ * and creates an html which contains the links to the
4
+ * performance histogram and summary for each row in the output view
5
+ */
6
+ function(head, req) {
7
+ var row;
8
+ start({"headers": {"Content-Type": "text/html"}});
9
+
10
+ var response = "<html><head>\n";
11
+ response += "<title> Summary of completed worklows </title>\n";
12
+ response += "</head><body style=\"font-family: arial;\">\n";
13
+
14
+ while (row = getRow()) {
15
+ var key = row.key;
16
+ var id = row.id;
17
+ response += "<b>Run:</b> " + key[2] + "\t";
18
+ response += "<b>Primary dataset:</b> " + key[0] + "\n<br>\n";
19
+ response += "<div id=output style=\"margin: 0px 0px 0px 15px;\">\n";
20
+ response += "Workflow Summary: <a href=\"../../_show/histogramByWorkflow/"+ id + "\">" + id + "</a><br>\n";
21
+ response += "</div><br>\n";
22
+ }
23
+
24
+ response += "</body></html>";
25
+ return response
26
+ };
27
+
@@ -0,0 +1,15 @@
1
+ function(head, req) {
2
+ // this function is used for elementsDetailByWorkflowAndStatus
3
+ var mainDoc = this
4
+ provides("html", function() {
5
+ var Mustache = require("lib/mustache");
6
+ var requestInfo;
7
+ if (req.query.key) {
8
+ requestInfo = {campaign: req.query.key[0]};
9
+ } else {
10
+ requestInfo = {campaign: null};
11
+ }
12
+ return Mustache.to_html(mainDoc.templates.performanceData,
13
+ requestInfo, null, send);
14
+ })
15
+ } // end function
@@ -0,0 +1,65 @@
1
+ [
2
+ {
3
+ "from": "_design/:dname/*",
4
+ "to": "*"
5
+ },
6
+
7
+ {
8
+ "from": "_all_docs",
9
+ "to": "../../_all_docs"
10
+ },
11
+
12
+ {
13
+ "from": "vendor/*",
14
+ "to": "vendor/*"
15
+ },
16
+
17
+ {
18
+ "from": "index.html",
19
+ "to": "index.html"
20
+ },
21
+ {
22
+ "from": "",
23
+ "to": "_show/redirect"
24
+ },
25
+
26
+ {
27
+ "from": "css/*",
28
+ "to": "css/*"
29
+ },
30
+
31
+ {
32
+ "from": "images/*",
33
+ "to": "images/*"
34
+ },
35
+
36
+ {
37
+ "from": "js/*",
38
+ "to": "js/*"
39
+ },
40
+
41
+ {
42
+ "from": "lib/*",
43
+ "to": "lib/*"
44
+ },
45
+
46
+ {
47
+ "from": "_view/*",
48
+ "to": "_view/*"
49
+ },
50
+
51
+ {
52
+ "from": "_list/*",
53
+ "to": "_list/*"
54
+ },
55
+
56
+ {
57
+ "from": "_show/*",
58
+ "to": "_show/*"
59
+ },
60
+
61
+ {
62
+ "from": "_update/*",
63
+ "to": "_update/*"
64
+ }
65
+ ]
@@ -0,0 +1,75 @@
1
+ function(doc, req) {
2
+ function isEmpty(obj) {
3
+ for (a in obj) {
4
+ return false;
5
+ };
6
+ return true;
7
+ };
8
+
9
+ if (doc == null) {
10
+ return {body: "Error: unknown workflow name"};
11
+ }
12
+
13
+ var Mustache = require("lib/mustache");
14
+ var mainDoc = this;
15
+ var requestInfo = {};
16
+ // req.docId is workflow name
17
+ requestInfo.workflow = doc._id;
18
+ var data = {};
19
+ var dataExist = false;
20
+ for (var task in doc.performance) {
21
+ data[task] = {};
22
+ for (var step in doc.performance[task]) {
23
+ data[task][step] = {};
24
+ for (var stat in doc.performance[task][step]) {
25
+ if (doc.performance[task][step][stat].histogram &&
26
+ doc.performance[task][step][stat].histogram.length){
27
+ data[task][step][stat] = doc.performance[task][step][stat].histogram;
28
+ dataExist = true;
29
+ };
30
+ };
31
+ if (isEmpty(data[task][step])) {delete data[task][step]};
32
+ };
33
+ if (isEmpty(data[task])) {delete data[task]};
34
+ }
35
+ var errors = {};
36
+ for (var task in doc.errors) {
37
+ errors[task] = {};
38
+ for (var step in doc.errors[task]) {
39
+ errors[task][step] = {};
40
+ for (var code in doc.errors[task][step]) {
41
+ dataExist = true;
42
+ }
43
+ }
44
+ };
45
+
46
+ requestInfo.errors = {};
47
+ if (!isEmpty(doc.errors)) {
48
+ requestInfo.errors = JSON.stringify(doc.errors);
49
+ };
50
+
51
+ requestInfo.output = {};
52
+ if (!isEmpty(doc.output)) {
53
+ requestInfo.output = JSON.stringify(doc.output);
54
+ dataExist = true;
55
+ };
56
+
57
+ provides("html", function() {
58
+ if (dataExist) {
59
+ //return JSON.stringify(data);
60
+ requestInfo.data = JSON.stringify(data);
61
+ var html = Mustache.to_html(mainDoc.templates.histogramByWorkflow,
62
+ requestInfo)
63
+ return {body: html,
64
+ headers: { "Content-Type": "text/html"}};
65
+ } else {
66
+ return {body: "No histogram data for " + doc._id,
67
+ headers: { "Content-Type": "text/html"}};
68
+ }
69
+ });
70
+
71
+ provides("json", function() {
72
+ return {body : JSON.stringify(data),
73
+ headers: {"Content-Type": "application/json"}};
74
+ });
75
+ }
@@ -0,0 +1,97 @@
1
+ function(doc, req) {
2
+
3
+ // No document found, return a nice Four Oh Four
4
+ if (doc === null){
5
+ return {"code" : 404,
6
+ "body" : "Workflow name doesn't exist.",
7
+ "headers": { "Content-Type": "text/html"}};
8
+ }
9
+
10
+ // They may want just the lost lumi in an output dataset
11
+ var searchKey = req.query.outputDataset;
12
+
13
+ // Initialize the result
14
+ var result = new Object;
15
+
16
+ // Go through the errors
17
+ for(var task in doc.errors){
18
+ var resultKeys = [];
19
+ // Check if we have output dataset - task mapping information
20
+ for (var outputDataset in doc.output){
21
+ var outputInfo = doc.output[outputDataset];
22
+ if("tasks" in outputInfo){
23
+ if(outputInfo.tasks.indexOf(task) != -1){
24
+ resultKeys.push(outputDataset);
25
+ }
26
+ }
27
+ }
28
+
29
+ // If we only have task for the errors, then that will be the key
30
+ if(resultKeys.length === 0){
31
+ resultKeys.push(task);
32
+ }
33
+ // Now record the lumi lost from all the errors
34
+ var lumiLost = new Object;
35
+ for (var step in doc.errors[task]){
36
+ for (var exitCode in doc.errors[task][step]){
37
+ for (var run in doc.errors[task][step][exitCode]["runs"]){
38
+ if (!(run in lumiLost)){
39
+ lumiLost[run] = new Object;
40
+ }
41
+ for(var i = 0; i < doc.errors[task][step][exitCode]["runs"][run].length; i++){
42
+ singleLumi = doc.errors[task][step][exitCode]["runs"][run][i]
43
+ lumiLost[run][singleLumi] = true;
44
+ }
45
+ }
46
+ }
47
+ }
48
+ // Add the lumi lost to the appropiate dataset or task
49
+ // As always avoid duplicates by using Objects instead of Arrays
50
+ for (var i = 0; i < resultKeys.length; i++){
51
+ var individualKey = resultKeys[i];
52
+ if (!(individualKey in result)){
53
+ result[individualKey] = new Object;
54
+ }
55
+ for (var run in lumiLost){
56
+ if (!(run in result[individualKey])){
57
+ result[individualKey][run] = new Object;
58
+ }
59
+ for (var singleLumi in lumiLost[run]){
60
+ result[individualKey][run][singleLumi] = true;
61
+ }
62
+ }
63
+ }
64
+ }
65
+
66
+ // We finished gathering all the lumis, generate a user-friendly
67
+ // structure like {OutputDataset : {run : [lumi,lumi]} }
68
+ var jsonResult = new Object;
69
+ for (var indexingKey in result){
70
+ if (searchKey != null && searchKey != indexingKey) continue;
71
+ jsonResult[indexingKey] = new Object;
72
+ for (var run in result[indexingKey]){
73
+ jsonResult[indexingKey][run] = [];
74
+ var allLumis = []
75
+ for (var singleLumi in result[indexingKey][run]){
76
+ allLumis.push(parseInt(singleLumi));
77
+ }
78
+ allLumis.sort(function(a,b){return a-b});
79
+ if (allLumis.length === 0) continue;
80
+ var lastLumi = allLumis[0]
81
+ var lumiBlock = [lastLumi]
82
+ for (var i = 1; i < allLumis.length; i++){
83
+ var currentLumi = allLumis[i]
84
+ if (currentLumi !== (lastLumi + 1)){
85
+ lumiBlock[1] = lastLumi
86
+ jsonResult[indexingKey][run].push(lumiBlock)
87
+ lumiBlock = [currentLumi]
88
+ }
89
+ lastLumi = currentLumi
90
+ }
91
+ lumiBlock[1] = lastLumi
92
+ jsonResult[indexingKey][run].push(lumiBlock)
93
+ }
94
+ }
95
+
96
+ send(JSON.stringify(jsonResult));
97
+ }