wmglobalqueue 2.4.5.1__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 (347) hide show
  1. Utils/CPMetrics.py +270 -0
  2. Utils/CertTools.py +100 -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/ProcFS.py +112 -0
  13. Utils/ProcessStats.py +194 -0
  14. Utils/PythonVersion.py +17 -0
  15. Utils/Signals.py +36 -0
  16. Utils/TemporaryEnvironment.py +27 -0
  17. Utils/Throttled.py +227 -0
  18. Utils/Timers.py +130 -0
  19. Utils/Timestamps.py +86 -0
  20. Utils/TokenManager.py +143 -0
  21. Utils/Tracing.py +60 -0
  22. Utils/TwPrint.py +98 -0
  23. Utils/Utilities.py +318 -0
  24. Utils/__init__.py +11 -0
  25. Utils/wmcoreDTools.py +707 -0
  26. WMCore/ACDC/Collection.py +57 -0
  27. WMCore/ACDC/CollectionTypes.py +12 -0
  28. WMCore/ACDC/CouchCollection.py +67 -0
  29. WMCore/ACDC/CouchFileset.py +238 -0
  30. WMCore/ACDC/CouchService.py +73 -0
  31. WMCore/ACDC/DataCollectionService.py +485 -0
  32. WMCore/ACDC/Fileset.py +94 -0
  33. WMCore/ACDC/__init__.py +11 -0
  34. WMCore/Algorithms/Alarm.py +39 -0
  35. WMCore/Algorithms/MathAlgos.py +274 -0
  36. WMCore/Algorithms/MiscAlgos.py +67 -0
  37. WMCore/Algorithms/ParseXMLFile.py +115 -0
  38. WMCore/Algorithms/Permissions.py +27 -0
  39. WMCore/Algorithms/Singleton.py +58 -0
  40. WMCore/Algorithms/SubprocessAlgos.py +129 -0
  41. WMCore/Algorithms/__init__.py +7 -0
  42. WMCore/Cache/GenericDataCache.py +98 -0
  43. WMCore/Cache/WMConfigCache.py +572 -0
  44. WMCore/Cache/__init__.py +0 -0
  45. WMCore/Configuration.py +659 -0
  46. WMCore/DAOFactory.py +47 -0
  47. WMCore/DataStructs/File.py +177 -0
  48. WMCore/DataStructs/Fileset.py +140 -0
  49. WMCore/DataStructs/Job.py +182 -0
  50. WMCore/DataStructs/JobGroup.py +142 -0
  51. WMCore/DataStructs/JobPackage.py +49 -0
  52. WMCore/DataStructs/LumiList.py +734 -0
  53. WMCore/DataStructs/Mask.py +219 -0
  54. WMCore/DataStructs/MathStructs/ContinuousSummaryHistogram.py +197 -0
  55. WMCore/DataStructs/MathStructs/DiscreteSummaryHistogram.py +92 -0
  56. WMCore/DataStructs/MathStructs/SummaryHistogram.py +117 -0
  57. WMCore/DataStructs/MathStructs/__init__.py +0 -0
  58. WMCore/DataStructs/Pickleable.py +24 -0
  59. WMCore/DataStructs/Run.py +256 -0
  60. WMCore/DataStructs/Subscription.py +175 -0
  61. WMCore/DataStructs/WMObject.py +47 -0
  62. WMCore/DataStructs/WorkUnit.py +112 -0
  63. WMCore/DataStructs/Workflow.py +60 -0
  64. WMCore/DataStructs/__init__.py +8 -0
  65. WMCore/Database/CMSCouch.py +1430 -0
  66. WMCore/Database/ConfigDBMap.py +29 -0
  67. WMCore/Database/CouchMonitoring.py +450 -0
  68. WMCore/Database/CouchUtils.py +118 -0
  69. WMCore/Database/DBCore.py +198 -0
  70. WMCore/Database/DBCreator.py +113 -0
  71. WMCore/Database/DBExceptionHandler.py +59 -0
  72. WMCore/Database/DBFactory.py +117 -0
  73. WMCore/Database/DBFormatter.py +177 -0
  74. WMCore/Database/Dialects.py +13 -0
  75. WMCore/Database/ExecuteDAO.py +327 -0
  76. WMCore/Database/MongoDB.py +241 -0
  77. WMCore/Database/MySQL/Destroy.py +42 -0
  78. WMCore/Database/MySQL/ListUserContent.py +20 -0
  79. WMCore/Database/MySQL/__init__.py +9 -0
  80. WMCore/Database/MySQLCore.py +132 -0
  81. WMCore/Database/Oracle/Destroy.py +56 -0
  82. WMCore/Database/Oracle/ListUserContent.py +19 -0
  83. WMCore/Database/Oracle/__init__.py +9 -0
  84. WMCore/Database/ResultSet.py +44 -0
  85. WMCore/Database/Transaction.py +91 -0
  86. WMCore/Database/__init__.py +9 -0
  87. WMCore/Database/ipy_profile_couch.py +438 -0
  88. WMCore/GlobalWorkQueue/CherryPyThreads/CleanUpTask.py +29 -0
  89. WMCore/GlobalWorkQueue/CherryPyThreads/HeartbeatMonitor.py +105 -0
  90. WMCore/GlobalWorkQueue/CherryPyThreads/LocationUpdateTask.py +28 -0
  91. WMCore/GlobalWorkQueue/CherryPyThreads/ReqMgrInteractionTask.py +35 -0
  92. WMCore/GlobalWorkQueue/CherryPyThreads/__init__.py +0 -0
  93. WMCore/GlobalWorkQueue/__init__.py +0 -0
  94. WMCore/GroupUser/CouchObject.py +127 -0
  95. WMCore/GroupUser/Decorators.py +51 -0
  96. WMCore/GroupUser/Group.py +33 -0
  97. WMCore/GroupUser/Interface.py +73 -0
  98. WMCore/GroupUser/User.py +96 -0
  99. WMCore/GroupUser/__init__.py +11 -0
  100. WMCore/Lexicon.py +836 -0
  101. WMCore/REST/Auth.py +202 -0
  102. WMCore/REST/CherryPyPeriodicTask.py +166 -0
  103. WMCore/REST/Error.py +333 -0
  104. WMCore/REST/Format.py +642 -0
  105. WMCore/REST/HeartbeatMonitorBase.py +90 -0
  106. WMCore/REST/Main.py +636 -0
  107. WMCore/REST/Server.py +2435 -0
  108. WMCore/REST/Services.py +24 -0
  109. WMCore/REST/Test.py +120 -0
  110. WMCore/REST/Tools.py +38 -0
  111. WMCore/REST/Validation.py +250 -0
  112. WMCore/REST/__init__.py +1 -0
  113. WMCore/ReqMgr/DataStructs/RequestStatus.py +209 -0
  114. WMCore/ReqMgr/DataStructs/RequestType.py +13 -0
  115. WMCore/ReqMgr/DataStructs/__init__.py +0 -0
  116. WMCore/ReqMgr/__init__.py +1 -0
  117. WMCore/Services/AlertManager/AlertManagerAPI.py +111 -0
  118. WMCore/Services/AlertManager/__init__.py +0 -0
  119. WMCore/Services/CRIC/CRIC.py +238 -0
  120. WMCore/Services/CRIC/__init__.py +0 -0
  121. WMCore/Services/DBS/DBS3Reader.py +1044 -0
  122. WMCore/Services/DBS/DBSConcurrency.py +44 -0
  123. WMCore/Services/DBS/DBSErrors.py +112 -0
  124. WMCore/Services/DBS/DBSReader.py +23 -0
  125. WMCore/Services/DBS/DBSUtils.py +166 -0
  126. WMCore/Services/DBS/DBSWriterObjects.py +381 -0
  127. WMCore/Services/DBS/ProdException.py +133 -0
  128. WMCore/Services/DBS/__init__.py +8 -0
  129. WMCore/Services/FWJRDB/FWJRDBAPI.py +118 -0
  130. WMCore/Services/FWJRDB/__init__.py +0 -0
  131. WMCore/Services/HTTPS/HTTPSAuthHandler.py +66 -0
  132. WMCore/Services/HTTPS/__init__.py +0 -0
  133. WMCore/Services/LogDB/LogDB.py +201 -0
  134. WMCore/Services/LogDB/LogDBBackend.py +191 -0
  135. WMCore/Services/LogDB/LogDBExceptions.py +11 -0
  136. WMCore/Services/LogDB/LogDBReport.py +85 -0
  137. WMCore/Services/LogDB/__init__.py +0 -0
  138. WMCore/Services/MSPileup/__init__.py +0 -0
  139. WMCore/Services/MSUtils/MSUtils.py +54 -0
  140. WMCore/Services/MSUtils/__init__.py +0 -0
  141. WMCore/Services/McM/McM.py +173 -0
  142. WMCore/Services/McM/__init__.py +8 -0
  143. WMCore/Services/MonIT/Grafana.py +133 -0
  144. WMCore/Services/MonIT/__init__.py +0 -0
  145. WMCore/Services/PyCondor/PyCondorAPI.py +154 -0
  146. WMCore/Services/PyCondor/__init__.py +0 -0
  147. WMCore/Services/ReqMgr/ReqMgr.py +261 -0
  148. WMCore/Services/ReqMgr/__init__.py +0 -0
  149. WMCore/Services/ReqMgrAux/ReqMgrAux.py +419 -0
  150. WMCore/Services/ReqMgrAux/__init__.py +0 -0
  151. WMCore/Services/RequestDB/RequestDBReader.py +267 -0
  152. WMCore/Services/RequestDB/RequestDBWriter.py +39 -0
  153. WMCore/Services/RequestDB/__init__.py +0 -0
  154. WMCore/Services/Requests.py +624 -0
  155. WMCore/Services/Rucio/Rucio.py +1290 -0
  156. WMCore/Services/Rucio/RucioUtils.py +74 -0
  157. WMCore/Services/Rucio/__init__.py +0 -0
  158. WMCore/Services/RucioConMon/RucioConMon.py +121 -0
  159. WMCore/Services/RucioConMon/__init__.py +0 -0
  160. WMCore/Services/Service.py +400 -0
  161. WMCore/Services/StompAMQ/__init__.py +0 -0
  162. WMCore/Services/TagCollector/TagCollector.py +155 -0
  163. WMCore/Services/TagCollector/XMLUtils.py +98 -0
  164. WMCore/Services/TagCollector/__init__.py +0 -0
  165. WMCore/Services/UUIDLib.py +13 -0
  166. WMCore/Services/UserFileCache/UserFileCache.py +160 -0
  167. WMCore/Services/UserFileCache/__init__.py +8 -0
  168. WMCore/Services/WMAgent/WMAgent.py +63 -0
  169. WMCore/Services/WMAgent/__init__.py +0 -0
  170. WMCore/Services/WMArchive/CMSSWMetrics.py +526 -0
  171. WMCore/Services/WMArchive/DataMap.py +463 -0
  172. WMCore/Services/WMArchive/WMArchive.py +33 -0
  173. WMCore/Services/WMArchive/__init__.py +0 -0
  174. WMCore/Services/WMBS/WMBS.py +97 -0
  175. WMCore/Services/WMBS/__init__.py +0 -0
  176. WMCore/Services/WMStats/DataStruct/RequestInfoCollection.py +300 -0
  177. WMCore/Services/WMStats/DataStruct/__init__.py +0 -0
  178. WMCore/Services/WMStats/WMStatsPycurl.py +145 -0
  179. WMCore/Services/WMStats/WMStatsReader.py +445 -0
  180. WMCore/Services/WMStats/WMStatsWriter.py +273 -0
  181. WMCore/Services/WMStats/__init__.py +0 -0
  182. WMCore/Services/WMStatsServer/WMStatsServer.py +134 -0
  183. WMCore/Services/WMStatsServer/__init__.py +0 -0
  184. WMCore/Services/WorkQueue/WorkQueue.py +492 -0
  185. WMCore/Services/WorkQueue/__init__.py +0 -0
  186. WMCore/Services/__init__.py +8 -0
  187. WMCore/Services/pycurl_manager.py +574 -0
  188. WMCore/WMBase.py +50 -0
  189. WMCore/WMConnectionBase.py +164 -0
  190. WMCore/WMException.py +183 -0
  191. WMCore/WMExceptions.py +269 -0
  192. WMCore/WMFactory.py +76 -0
  193. WMCore/WMInit.py +377 -0
  194. WMCore/WMLogging.py +104 -0
  195. WMCore/WMSpec/ConfigSectionTree.py +442 -0
  196. WMCore/WMSpec/Persistency.py +135 -0
  197. WMCore/WMSpec/Steps/BuildMaster.py +87 -0
  198. WMCore/WMSpec/Steps/BuildTools.py +201 -0
  199. WMCore/WMSpec/Steps/Builder.py +97 -0
  200. WMCore/WMSpec/Steps/Diagnostic.py +89 -0
  201. WMCore/WMSpec/Steps/Emulator.py +62 -0
  202. WMCore/WMSpec/Steps/ExecuteMaster.py +208 -0
  203. WMCore/WMSpec/Steps/Executor.py +210 -0
  204. WMCore/WMSpec/Steps/StepFactory.py +213 -0
  205. WMCore/WMSpec/Steps/TaskEmulator.py +75 -0
  206. WMCore/WMSpec/Steps/Template.py +204 -0
  207. WMCore/WMSpec/Steps/Templates/AlcaHarvest.py +76 -0
  208. WMCore/WMSpec/Steps/Templates/CMSSW.py +613 -0
  209. WMCore/WMSpec/Steps/Templates/DQMUpload.py +59 -0
  210. WMCore/WMSpec/Steps/Templates/DeleteFiles.py +70 -0
  211. WMCore/WMSpec/Steps/Templates/LogArchive.py +84 -0
  212. WMCore/WMSpec/Steps/Templates/LogCollect.py +105 -0
  213. WMCore/WMSpec/Steps/Templates/StageOut.py +105 -0
  214. WMCore/WMSpec/Steps/Templates/__init__.py +10 -0
  215. WMCore/WMSpec/Steps/WMExecutionFailure.py +21 -0
  216. WMCore/WMSpec/Steps/__init__.py +8 -0
  217. WMCore/WMSpec/Utilities.py +63 -0
  218. WMCore/WMSpec/WMSpecErrors.py +12 -0
  219. WMCore/WMSpec/WMStep.py +347 -0
  220. WMCore/WMSpec/WMTask.py +1997 -0
  221. WMCore/WMSpec/WMWorkload.py +2288 -0
  222. WMCore/WMSpec/WMWorkloadTools.py +382 -0
  223. WMCore/WMSpec/__init__.py +9 -0
  224. WMCore/WorkQueue/DataLocationMapper.py +273 -0
  225. WMCore/WorkQueue/DataStructs/ACDCBlock.py +47 -0
  226. WMCore/WorkQueue/DataStructs/Block.py +48 -0
  227. WMCore/WorkQueue/DataStructs/CouchWorkQueueElement.py +148 -0
  228. WMCore/WorkQueue/DataStructs/WorkQueueElement.py +274 -0
  229. WMCore/WorkQueue/DataStructs/WorkQueueElementResult.py +152 -0
  230. WMCore/WorkQueue/DataStructs/WorkQueueElementsSummary.py +185 -0
  231. WMCore/WorkQueue/DataStructs/__init__.py +0 -0
  232. WMCore/WorkQueue/Policy/End/EndPolicyInterface.py +44 -0
  233. WMCore/WorkQueue/Policy/End/SingleShot.py +22 -0
  234. WMCore/WorkQueue/Policy/End/__init__.py +32 -0
  235. WMCore/WorkQueue/Policy/PolicyInterface.py +17 -0
  236. WMCore/WorkQueue/Policy/Start/Block.py +258 -0
  237. WMCore/WorkQueue/Policy/Start/Dataset.py +180 -0
  238. WMCore/WorkQueue/Policy/Start/MonteCarlo.py +131 -0
  239. WMCore/WorkQueue/Policy/Start/ResubmitBlock.py +171 -0
  240. WMCore/WorkQueue/Policy/Start/StartPolicyInterface.py +316 -0
  241. WMCore/WorkQueue/Policy/Start/__init__.py +34 -0
  242. WMCore/WorkQueue/Policy/__init__.py +57 -0
  243. WMCore/WorkQueue/WMBSHelper.py +772 -0
  244. WMCore/WorkQueue/WorkQueue.py +1237 -0
  245. WMCore/WorkQueue/WorkQueueBackend.py +750 -0
  246. WMCore/WorkQueue/WorkQueueBase.py +39 -0
  247. WMCore/WorkQueue/WorkQueueExceptions.py +44 -0
  248. WMCore/WorkQueue/WorkQueueReqMgrInterface.py +278 -0
  249. WMCore/WorkQueue/WorkQueueUtils.py +130 -0
  250. WMCore/WorkQueue/__init__.py +13 -0
  251. WMCore/Wrappers/JsonWrapper/JSONThunker.py +342 -0
  252. WMCore/Wrappers/JsonWrapper/__init__.py +7 -0
  253. WMCore/Wrappers/__init__.py +6 -0
  254. WMCore/__init__.py +10 -0
  255. wmglobalqueue-2.4.5.1.data/data/bin/wmc-dist-patch +15 -0
  256. wmglobalqueue-2.4.5.1.data/data/bin/wmc-dist-unpatch +8 -0
  257. wmglobalqueue-2.4.5.1.data/data/bin/wmc-httpd +3 -0
  258. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/.couchapprc +1 -0
  259. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/README.md +40 -0
  260. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/_attachments/index.html +264 -0
  261. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/_attachments/js/ElementInfoByWorkflow.js +96 -0
  262. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/_attachments/js/StuckElementInfo.js +57 -0
  263. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/_attachments/js/WorkloadInfoTable.js +80 -0
  264. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/_attachments/js/dataTable.js +70 -0
  265. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/_attachments/js/namespace.js +23 -0
  266. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/_attachments/style/main.css +75 -0
  267. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/couchapp.json +4 -0
  268. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/filters/childQueueFilter.js +13 -0
  269. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/filters/filterDeletedDocs.js +3 -0
  270. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/filters/queueFilter.js +11 -0
  271. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/language +1 -0
  272. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/lib/mustache.js +333 -0
  273. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/lib/validate.js +27 -0
  274. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/lib/workqueue_utils.js +61 -0
  275. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/lists/elementsDetail.js +28 -0
  276. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/lists/filter.js +86 -0
  277. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/lists/stuckElements.js +38 -0
  278. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/lists/workRestrictions.js +153 -0
  279. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/lists/workflowSummary.js +28 -0
  280. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/rewrites.json +73 -0
  281. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/shows/redirect.js +23 -0
  282. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/shows/status.js +40 -0
  283. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/templates/ElementSummaryByWorkflow.html +27 -0
  284. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/templates/StuckElementSummary.html +26 -0
  285. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/templates/TaskStatus.html +23 -0
  286. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/templates/WorkflowSummary.html +27 -0
  287. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/templates/partials/workqueue-common-lib.html +2 -0
  288. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/templates/partials/yui-lib-remote.html +16 -0
  289. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/templates/partials/yui-lib.html +18 -0
  290. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/updates/in-place.js +50 -0
  291. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/validate_doc_update.js +8 -0
  292. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/vendor/couchapp/_attachments/jquery.couch.app.js +235 -0
  293. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/vendor/couchapp/_attachments/jquery.pathbinder.js +173 -0
  294. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/activeData/map.js +8 -0
  295. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/activeData/reduce.js +2 -0
  296. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/activeParentData/map.js +8 -0
  297. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/activeParentData/reduce.js +2 -0
  298. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/activePileupData/map.js +8 -0
  299. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/activePileupData/reduce.js +2 -0
  300. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/analyticsData/map.js +11 -0
  301. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/analyticsData/reduce.js +1 -0
  302. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/availableByPriority/map.js +6 -0
  303. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/conflicts/map.js +5 -0
  304. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elements/map.js +5 -0
  305. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elementsByData/map.js +8 -0
  306. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elementsByParent/map.js +8 -0
  307. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elementsByParentData/map.js +8 -0
  308. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elementsByPileupData/map.js +8 -0
  309. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elementsByStatus/map.js +8 -0
  310. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elementsBySubscription/map.js +6 -0
  311. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elementsByWorkflow/map.js +8 -0
  312. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elementsByWorkflow/reduce.js +3 -0
  313. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elementsDetailByWorkflowAndStatus/map.js +26 -0
  314. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobInjectStatusByRequest/map.js +10 -0
  315. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobInjectStatusByRequest/reduce.js +1 -0
  316. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobStatusByRequest/map.js +6 -0
  317. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobStatusByRequest/reduce.js +1 -0
  318. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByChildQueueAndPriority/map.js +6 -0
  319. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByChildQueueAndPriority/reduce.js +1 -0
  320. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByChildQueueAndStatus/map.js +6 -0
  321. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByChildQueueAndStatus/reduce.js +1 -0
  322. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByRequest/map.js +6 -0
  323. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByRequest/reduce.js +1 -0
  324. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByStatus/map.js +6 -0
  325. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByStatus/reduce.js +1 -0
  326. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByStatusAndPriority/map.js +6 -0
  327. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByStatusAndPriority/reduce.js +1 -0
  328. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/openRequests/map.js +6 -0
  329. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/recent-items/map.js +5 -0
  330. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/siteWhitelistByRequest/map.js +6 -0
  331. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/siteWhitelistByRequest/reduce.js +1 -0
  332. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/specsByWorkflow/map.js +5 -0
  333. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/stuckElements/map.js +38 -0
  334. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/wmbsInjectStatusByRequest/map.js +12 -0
  335. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/wmbsInjectStatusByRequest/reduce.js +3 -0
  336. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/wmbsUrl/map.js +6 -0
  337. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/wmbsUrl/reduce.js +2 -0
  338. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/wmbsUrlByRequest/map.js +6 -0
  339. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/wmbsUrlByRequest/reduce.js +2 -0
  340. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/workflowSummary/map.js +9 -0
  341. wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/workflowSummary/reduce.js +10 -0
  342. wmglobalqueue-2.4.5.1.dist-info/METADATA +26 -0
  343. wmglobalqueue-2.4.5.1.dist-info/RECORD +347 -0
  344. wmglobalqueue-2.4.5.1.dist-info/WHEEL +5 -0
  345. wmglobalqueue-2.4.5.1.dist-info/licenses/LICENSE +202 -0
  346. wmglobalqueue-2.4.5.1.dist-info/licenses/NOTICE +16 -0
  347. wmglobalqueue-2.4.5.1.dist-info/top_level.txt +2 -0
@@ -0,0 +1,264 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
5
+ <title>WorkQueue Monitor</title>
6
+ <style type="text/css">
7
+ /*margin and padding on body element
8
+ can introduce errors in determining
9
+ element position and are not recommended;
10
+ we turn them off as a foundation for YUI
11
+ CSS treatments. */
12
+ body {
13
+ margin:0;
14
+ padding:0;
15
+ }
16
+ </style>
17
+ <!-- Individual YUI CSS files -->
18
+ <link rel="help" type="text/html" href="ElementTable.html" target="_blank" />
19
+ <link rel="stylesheet" type="text/css" href="vendor/yui/build/reset-fonts-grids/reset-fonts-grids.css" />
20
+ <link rel="stylesheet" type="text/css" href="vendor/yui/build/menu/assets/skins/sam/menu.css" />
21
+ <link rel="stylesheet" type="text/css" href="vendor/yui/build/resize/assets/skins/sam/resize.css" />
22
+ <link rel="stylesheet" type="text/css" href="vendor/yui/build/layout/assets/skins/sam/layout.css" />
23
+ <link rel="stylesheet" type="text/css" href="vendor/yui/build/fonts/fonts-min.css" />
24
+ <link rel="stylesheet" type="text/css" href="vendor/yui/build/paginator/assets/skins/sam/paginator.css" />
25
+ <link rel="stylesheet" type="text/css" href="vendor/yui/build/datatable/assets/skins/sam/datatable.css" />
26
+ <link rel="stylesheet" type="text/css" href="vendor/yui/build/progressbar/assets/skins/sam/progressbar.css" />
27
+
28
+ <!-- Individual YUI JS files -->
29
+ <script src="vendor/yui/build/yahoo-dom-event/yahoo-dom-event.js"></script>
30
+ <script src="vendor/yui/build/dragdrop/dragdrop-min.js"></script>
31
+ <script src="vendor/yui/build/connection/connection-min.js"></script>
32
+ <script src="vendor/yui/build/element/element-min.js"></script>
33
+ <script src="vendor/yui/build/datasource/datasource-min.js"></script>
34
+ <script src="vendor/yui/build/datatable/datatable-min.js"></script>
35
+ <script src="vendor/yui/build/json/json-min.js"></script>
36
+ <script src="vendor/yui/build/paginator/paginator-min.js"></script>
37
+
38
+ <script src="vendor/yui/build/utilities/utilities.js"></script>
39
+ <script src="vendor/yui/build/container/container-min.js"></script>
40
+ <script src="vendor/yui/build/resize/resize-min.js"></script>
41
+ <script src="vendor/yui/build/layout/layout-min.js"></script>
42
+ <script src="vendor/yui/build/menu/menu-min.js"></script>
43
+ <!-- Optional dependency source file -->
44
+ <script src="vendor/yui/build/animation/animation-min.js"></script>
45
+ <script src="vendor/yui/build/progressbar/progressbar-min.js"></script>
46
+
47
+ <script src="js/namespace.js"></script>
48
+ <script src="js/dataTable.js"></script>
49
+
50
+ <!--<script src="javascript/WorkQueue/ElementInfoWithPagination2.js"></script>
51
+ <script src="javascript/WorkQueue/ElementInfoWithServerPagination.js"></script>
52
+ This script uses client side pagination
53
+ -->
54
+ <script src="js/ElementInfoByWorkflow.js"></script>
55
+ <script src="js/WorkloadInfoTable.js"></script>
56
+ <style>
57
+ /*
58
+ For IE 6: trigger "haslayout" for the anchor elements in the root Menu by
59
+ setting the "zoom" property to 1. This ensures that the selected state of
60
+ MenuItems doesn't get dropped when the user mouses off of the text node of
61
+ the anchor element that represents a MenuItem's text label.
62
+ */
63
+
64
+ /*
65
+ Turn off the border on the top unit since Menu has it's own border
66
+ */
67
+ .yui-skin-sam .yui-layout .yui-layout-unit-top div.yui-layout-bd {
68
+ border: none;
69
+ }
70
+ /*
71
+ Change some of the Menu colors
72
+ */
73
+ .yui-skin-sam .yuimenu .bd {
74
+ background-color: #F2F2F2;
75
+ }
76
+
77
+ #workqueuetree {background: #fff; padding:1em;}
78
+
79
+ div.percentDiv {
80
+ position: relative;
81
+ left: 5%;
82
+ font-size: 10px;
83
+ }
84
+
85
+ </style>
86
+ <!--begin custom header content for this example-->
87
+ <style type="text/css">
88
+ .chart
89
+ {
90
+ float: right;
91
+ width: 90%;
92
+ height: 200px;
93
+ }
94
+
95
+ .title
96
+ {
97
+ display: block;
98
+ font-size: 1.2em;
99
+ font-weight: bold;
100
+ margin-bottom: 0.4em;
101
+ }
102
+ </style>
103
+ <!--end custom header content for this example-->
104
+ </head>
105
+
106
+ <body class="yui-skin-sam">
107
+ <div id="top1">
108
+ <div id="menubar" class="yuimenubar yuimenubarnav">
109
+ <div class="bd">
110
+ <ul class="first-of-type">
111
+ <li class="yuimenubaritem first-of-type">
112
+ <a class="yuimenubaritemlabel">Views</a>
113
+ </li>
114
+ <li class="yuimenubaritem">
115
+ <a class="yuimenubaritemlabel">Related Links</a>
116
+ </li>
117
+ <li class="yuimenubaritem">
118
+ <a class="yuimenubaritemlabel">Help</a>
119
+ </li>
120
+ </ul>
121
+ </div>
122
+ </div>
123
+ </div>
124
+ <div id="bottom1"></div>
125
+
126
+ <div id="center1">
127
+ <span class="title">Workload Infomation</span>
128
+ <div id="workloadprogress">
129
+ Error: check the workload retieval call
130
+ </div>
131
+ <span class="title">Element Infomation</span>
132
+ <div id="elements">
133
+ Click the request to retrieve elements for that request
134
+ </div>
135
+ </div>
136
+
137
+
138
+ <script>
139
+
140
+ (function() {
141
+ var Dom = YAHOO.util.Dom,
142
+ Event = YAHOO.util.Event;
143
+
144
+ var initTopMenu = function() {
145
+ /*
146
+ Instantiate a MenuBar: The first argument passed to the
147
+ constructor is the id of the element in the page
148
+ representing the MenuBar; the second is an object literal
149
+ of configuration properties.
150
+ */
151
+
152
+ var oMenuBar = new YAHOO.widget.MenuBar("menubar", {
153
+ autosubmenudisplay: true,
154
+ hidedelay: 750,
155
+ lazyload: true,
156
+ effect: {
157
+ effect: YAHOO.widget.ContainerEffect.FADE,
158
+ duration: 0.25
159
+ }
160
+ });
161
+
162
+ /*
163
+ Define an array of object literals, each containing
164
+ the data necessary to create a submenu.
165
+ */
166
+
167
+ var aSubmenuData = [
168
+
169
+ {
170
+ id: "Views",
171
+ itemdata: [
172
+ {text: "Main view",
173
+ url: "index.html" },
174
+ {text: "Workflow view",
175
+ url: "workflowInfo" },
176
+ {text: "Elements View",
177
+ url: "elementsInfo" },
178
+ {text: "Stuck elements",
179
+ url: "stuckElementsInfo" },
180
+ {text: "WorkQueue tasks status",
181
+ url: "_show/status/task_activity" },
182
+ ]
183
+ },
184
+
185
+ {
186
+ id: "Related Links",
187
+ itemdata: [
188
+ { text: "Request Manager", url: "/reqmgr" }
189
+ ]
190
+ },
191
+
192
+ {
193
+ id: "Help",
194
+ itemdata: [
195
+ { text: "WorkQueue twiki", url: "https://twiki.cern.ch/twiki/bin/viewauth/CMS/WMCoreWorkQueue" },
196
+ { text: "Web docs", url: "https://twiki.cern.ch/twiki/bin/view/CMS/WorkQueueMonitorPlan" }
197
+ ]
198
+ }
199
+
200
+ ];
201
+
202
+
203
+ /*
204
+ Subscribe to the "beforerender" event, adding a submenu
205
+ to each of the items in the MenuBar instance.
206
+ */
207
+
208
+ oMenuBar.subscribe("beforeRender", function () {
209
+
210
+ if (this.getRoot() == this) {
211
+
212
+ this.getItem(0).cfg.setProperty("submenu", aSubmenuData[0]);
213
+ this.getItem(1).cfg.setProperty("submenu", aSubmenuData[1]);
214
+ this.getItem(2).cfg.setProperty("submenu", aSubmenuData[2]);
215
+ }
216
+
217
+ });
218
+
219
+
220
+ /*
221
+ Call the "render" method with no arguments since the
222
+ markup for this MenuBar instance is already exists in
223
+ the page.
224
+ */
225
+
226
+ oMenuBar.render();
227
+ };
228
+
229
+
230
+ Event.onDOMReady(function() {
231
+ var layout = new YAHOO.widget.Layout({
232
+ units: [
233
+ { position: 'top', height: 28, body: 'top1', scroll: null, zIndex: 2 },
234
+ { position: 'center', body: 'center1', gutter: '5 0', scroll: true},
235
+ { position: 'bottom', height: 30, body: 'bottom1' },
236
+
237
+ ]
238
+ });
239
+
240
+ var callBackFunction = function(e, oArgs) {
241
+ layout.on('render', this, args.firstWorkflow);
242
+ layout.render();
243
+ };
244
+
245
+ var elementDisplay = function(e, workflow) {
246
+
247
+ YAHOO.util.Event.onContentReady("menubar", initTopMenu);
248
+
249
+ var args = {};
250
+ args.divID = "workloadprogress";
251
+ args.workflow = ""; //get all the workflow
252
+ args.task = WQ.ElementInfoByWorkflow.elementTable
253
+ YAHOO.util.Event.onContentReady("workloadprogress",
254
+ WQ.WorkloadInfoTable.workloadTable, args);
255
+ };
256
+
257
+ layout.on('render', elementDisplay);
258
+ layout.render();
259
+ });
260
+ })();
261
+
262
+ </script>
263
+ </body>
264
+ </html>
@@ -0,0 +1,96 @@
1
+ WQ.namespace("ElementInfoByWorkflow")
2
+
3
+ WQ.ElementInfoByWorkflow.elementTable = function(args) {
4
+
5
+ var agentName = function(elCell, oRecord, oColumn, sData) {
6
+ var host;
7
+ if (!sData) {
8
+ host = sData;
9
+ } else {
10
+ host = sData.split("//")[1]
11
+ host = host.split(":")[0]
12
+ }
13
+ elCell.innerHTML = host;
14
+ };
15
+
16
+ var elementUrl = function(elCell, oRecord, oColumn, sData) {
17
+ elCell.innerHTML = "<a href='" + 'element/' + sData +
18
+ "' target='_blank'>" + sData + "</a>";
19
+ }
20
+
21
+ var percentFormat = function(elCell, oRecord, oColumn, sData) {
22
+ if (!sData) {
23
+ percent = 0;
24
+ } else {
25
+ percent = sData
26
+ }
27
+ elCell.innerHTML = sData + "%";
28
+ };
29
+
30
+ var dateFormatter = function(elCell, oRecord, oColumn, oData) {
31
+
32
+ var oDate = new Date(oData*1000);
33
+ //for the formatting check
34
+ // http://developer.yahoo.com/yui/docs/YAHOO.util.Date.html#method_format
35
+ var str = YAHOO.util.Date.format(oDate, { format:"%D %T"});
36
+ elCell.innerHTML = str;
37
+ }
38
+
39
+ var inputFormatter = function(elCell, oRecord, oColumn, oData) {
40
+
41
+ if (oData) {
42
+ for (a in oData) {
43
+ //If there are more than one input data add
44
+ elCell.innerHTML = a;
45
+ }
46
+ }else {
47
+ elCell.innerHTML = "No Input";
48
+ }
49
+
50
+ }
51
+
52
+ var siteFormatter= function(elCell, oRecord, oColumn, oData) {
53
+ var siteInfo = oRecord.getData("Inputs");
54
+ if (siteInfo) {
55
+ for (a in siteInfo) {
56
+ //If there are more than one input data add
57
+ elCell.innerHTML = siteInfo[a];
58
+ }
59
+ }else {
60
+ elCell.innerHTML = "No sites"
61
+ };
62
+ };
63
+
64
+ var dataSchema = {
65
+ fields: [{key: "Id", label: "Id", formatter : elementUrl},
66
+ {key: "RequestName", label: "Request Name"},
67
+ {key: "TaskName", label: "Task Name"},
68
+ {key: "Inputs", formatter: inputFormatter},
69
+ {key: "Status"},
70
+ {key: "ChildQueueUrl", label:"Child Agent", formatter: agentName},
71
+ {key: "Priority"},
72
+ {key: "Jobs", label: "jobs"},
73
+ {key: "TeamName", label: "Team"},
74
+ {key: "PercentComplete", label: "Complete", formatter:percentFormat},
75
+ {key: "PercentSuccess", label: "Success", formatter:percentFormat},
76
+ {key: "InsertTime", label: "Insert Time", formatter:dateFormatter},
77
+ {key: "UpdateTime", label: "Update Time", formatter:dateFormatter},
78
+ {key: "Sites", formatter:siteFormatter}
79
+ //,{key: "error"},
80
+ //{key: "reason"}
81
+ ]
82
+ };
83
+
84
+ //This makes this javascript not reusable but solves the path issue on
85
+ //different deployment (using proxy, rewrite rules.
86
+ var dataUrl = "elementsInfo?request=" + args.workflow
87
+ var dataSource = WQ.createDataSource(dataUrl, dataSchema)
88
+
89
+ var tableConfig = WQ.createDefaultTableConfig();
90
+
91
+ tableConfig.paginator = new YAHOO.widget.Paginator({rowsPerPage : 25});
92
+
93
+ var dataTable = WQ.createDataTable(args.divID, dataSource,
94
+ WQ.createDefaultTableDef(dataSchema.fields),
95
+ tableConfig, 600000);
96
+ }
@@ -0,0 +1,57 @@
1
+ WQ.namespace("StuckElementInfo")
2
+
3
+ WQ.StuckElementInfo.elementTable = function(args) {
4
+
5
+ var dateFormatter = function(elCell, oRecord, oColumn, oData) {
6
+
7
+ var oDate = new Date(oData*1000);
8
+ //for the formatting check
9
+ // http://developer.yahoo.com/yui/docs/YAHOO.util.Date.html#method_format
10
+ var str = YAHOO.util.Date.format(oDate, { format:"%D %T"});
11
+ elCell.innerHTML = str;
12
+ }
13
+
14
+ var siteFormatter = function(elCell, oRecord, oColumn, oData) {
15
+ var label = ""
16
+ if (oData) {
17
+ for (a in oData) {
18
+ label += a + " : [" + oData[a].join() + "], ";
19
+ }
20
+ }
21
+ elCell.innerHTML = label
22
+
23
+ };
24
+
25
+ var listFormatter= function(elCell, oRecord, oColumn, oData) {
26
+ elCell.innerHTML = oData.join()
27
+ };
28
+
29
+ var dataSchema = {
30
+ fields: [
31
+ {key: "reason"},
32
+ {key: "RequestName", label: "Request Name"},
33
+ {key: "SiteWhitelist", formatter: listFormatter},
34
+ {key: "SiteBlacklist", formatter: listFormatter},
35
+ {key: "Inputs", formatter: siteFormatter},
36
+ {key: "PileupData", formatter: siteFormatter},
37
+ {key: "ParentData", formatter: siteFormatter},
38
+ {key: "Priority"},
39
+ {key: "TeamName", label: "Team"},
40
+ {key: "InsertTime", label: "Insert Time", formatter:dateFormatter},
41
+ {key: "UpdateTime", label: "Update Time", formatter:dateFormatter},
42
+ {key: "id"}
43
+ ]
44
+ };
45
+
46
+ //workqueue database name is hardcoded, need to change to get from config
47
+ var dataUrl = "stuckElementsInfo/";
48
+ var dataSource = WQ.createDataSource(dataUrl, dataSchema);
49
+
50
+ var tableConfig = WQ.createDefaultTableConfig();
51
+
52
+ tableConfig.paginator = new YAHOO.widget.Paginator({rowsPerPage : 50});
53
+
54
+ var dataTable = WQ.createDataTable(args.divID, dataSource,
55
+ WQ.createDefaultTableDef(dataSchema.fields),
56
+ tableConfig, 600000);
57
+ }
@@ -0,0 +1,80 @@
1
+ WQ.namespace("WorkloadInfoTable")
2
+ /*
3
+ * To do: Maybe needs to add YUI loader for the support library
4
+ */
5
+
6
+ WQ.WorkloadInfoTable.workloadTable = function(args) {
7
+
8
+ var pbs = [];
9
+ var progressFormatter = function (elLiner, oRecord, oColumn, oData) {
10
+ total = oRecord.getData('Jobs')
11
+ if (total === 0 || total === null) {
12
+ total = 1;
13
+ rTotal = 0;
14
+ } else {
15
+ rTotal = total;
16
+ };
17
+ if (oData === null) {
18
+ oData = 0;
19
+ };
20
+ percent = oData/total*100;
21
+ elLiner.innerHTML = "<div class='percentDiv'>" + percent.toFixed(1) +
22
+ "% (" + oData + '/' + rTotal + ")</div>";
23
+ var pb = new YAHOO.widget.ProgressBar({
24
+ width:'90px',
25
+ height:'11px',
26
+ maxValue:total,
27
+ value: oData
28
+ }).render(elLiner);
29
+ pbs.push(pb);
30
+ };
31
+
32
+ var dataSchema = {
33
+ fields: [{key: "RequestName", label: "Request"},
34
+ {key: "Team"}, {key: "Jobs", label: "Top level Jobs"},
35
+ {key: "CompleteJobs", label: "progress",
36
+ formatter: progressFormatter, parser: "number"}]
37
+ };
38
+
39
+ //workqueue database name is hardcoded, need to change to get from config
40
+ //This makes this javascript not reusable but solves the path issue on
41
+ //different deployment (using proxy, rewrite rules.
42
+ var dataUrl = "workflowInfo?request=" + args.workflow
43
+ var dataSource = WQ.createDataSource(dataUrl, dataSchema);
44
+ var tableConfig = WQ.createDefaultTableConfig();
45
+ tableConfig.paginator = new YAHOO.widget.Paginator({rowsPerPage : 5});
46
+ /*
47
+ tableConfig.sortedBy ={
48
+ key: "spec_id", dir:YAHOO.widget.DataTable.CLASS_ASC
49
+ };
50
+ */
51
+ var dataTable = WQ.createDataTable(args.divID, dataSource,
52
+ WQ.createDefaultTableDef(dataSchema.fields),
53
+ tableConfig, 600000);
54
+
55
+ // Set up editing flow
56
+ // TODO: not sure why this is not working
57
+ var highlightRequestCell = function(oArgs) {
58
+ var column = this.getColumn(oArgs.target);
59
+ if (column.key == 'RequestName') {
60
+ this.onEventHighlightCell(oArgs.event, oArgs.target);
61
+ };
62
+ };
63
+
64
+ var elementTableHandler = function (oArgs) {
65
+
66
+ var target = oArgs.target;
67
+ var column = this.getColumn(target);
68
+ if (column.key == 'RequestName') {
69
+ var record = this.getRecord(target);
70
+ var eleTableArgs = {};
71
+ eleTableArgs.divID ="elements";
72
+ eleTableArgs.workflow = record.getData('RequestName');
73
+ args.task(eleTableArgs);
74
+ };
75
+ };
76
+
77
+ dataTable.subscribe("cellMouseoverEvent", dataTable.onEventHighlightCell);
78
+ dataTable.subscribe("cellMouseoutEvent", dataTable.onEventUnhighlightCell);
79
+ dataTable.subscribe("cellClickEvent", elementTableHandler);
80
+ };
@@ -0,0 +1,70 @@
1
+ /*
2
+ * Provide default values for datasource and table.
3
+ *
4
+ */
5
+
6
+ WQ.createDataSource = function (dataUrl, dataSchema, type) {
7
+
8
+ if (type == "Local") {
9
+ var myDataSource = new YAHOO.util.LocalDataSource(dataUrl);
10
+ } else {
11
+ var myDataSource = new YAHOO.util.XHRDataSource(dataUrl);
12
+ };
13
+
14
+ //var myDataSource = YAHOO.util.ScriptNodeDataSource(dataUrl);
15
+ myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY;
16
+ myDataSource.responseSchema = dataSchema;
17
+
18
+ //Always send accept type as application/json
19
+ YAHOO.util.Connect.initHeader("Accept", "application/json", true);
20
+
21
+ return myDataSource;
22
+ };
23
+
24
+ WQ.createDefaultTableDef = function (tableDef) {
25
+ var defaultDef = new Array();
26
+ for (var i in tableDef) {
27
+ defaultDef[i] = YAHOO.lang.merge(tableDef[i], {
28
+ sortable: true,
29
+ resizeable: true
30
+ });
31
+ }
32
+ return defaultDef;
33
+ };
34
+
35
+ WQ.createDefaultTableConfig = function(sortBy) {
36
+
37
+ var defaultConfig = {};
38
+ // Set up pagination
39
+ defaultConfig.paginator = new YAHOO.widget.Paginator({rowsPerPage : 25});
40
+ // Set up pagination
41
+ if (sortBy) {
42
+ defaultConfig.sortedBy = {key: sortBy, dir:YAHOO.widget.DataTable.CLASS_ASC};
43
+ };
44
+
45
+ return defaultConfig
46
+ };
47
+
48
+
49
+ WQ.createDataTable = function (container, dataSource, columnDefs,
50
+ tableConfig, pollingCycle, myCallback) {
51
+
52
+ var myDataTable = new YAHOO.widget.DataTable(container,
53
+ columnDefs, dataSource, tableConfig);
54
+
55
+ if (myCallback === undefined) {
56
+ // Set up polling
57
+ myCallback = {
58
+ success: myDataTable.onDataReturnReplaceRows,
59
+ failure: function(){
60
+ YAHOO.log("Polling failure", "error");
61
+ },
62
+ scope: myDataTable,
63
+ arguments: myDataTable.getState()
64
+ };
65
+ dataSource.sendRequest(null, myCallback);
66
+ dataSource.setInterval(pollingCycle, null, myCallback);
67
+ };
68
+
69
+ return myDataTable;
70
+ };
@@ -0,0 +1,23 @@
1
+ /*
2
+ Copied from exteranl code
3
+ Copyright (c) 2009, Yahoo! Inc. All rights reserved.
4
+ Code licensed under the BSD License:
5
+ http://developer.yahoo.net/yui/license.txt
6
+ version: 2.8.0r4
7
+ */
8
+ if (typeof WQ == "undefined" || !WQ) {
9
+ var WQ = {};
10
+ }
11
+
12
+ WQ.namespace = function(){
13
+ var A = arguments, E = null, C, B, D;
14
+ for (C = 0; C < A.length; C = C + 1) {
15
+ D = ("" + A[C]).split(".");
16
+ E = WQ;
17
+ for (B = (D[0] == "WQ") ? 1 : 0; B < D.length; B = B + 1) {
18
+ E[D[B]] = E[D[B]] || {};
19
+ E = E[D[B]];
20
+ }
21
+ }
22
+ return E;
23
+ };
@@ -0,0 +1,75 @@
1
+ /* add styles here */
2
+
3
+ body {
4
+ font:1em Helvetica, sans-serif;
5
+ padding:4px;
6
+ }
7
+
8
+ h1 {
9
+ margin-top:0;
10
+ }
11
+
12
+ #account {
13
+ float:right;
14
+ }
15
+
16
+ #profile {
17
+ border:4px solid #edd;
18
+ background:#fee;
19
+ padding:8px;
20
+ margin-bottom:8px;
21
+ }
22
+
23
+ #items {
24
+ border:4px solid #dde;
25
+ background:#eef;
26
+ padding:8px;
27
+ width:60%;
28
+ float:left;
29
+ }
30
+
31
+ #sidebar {
32
+ border:4px solid #dfd;
33
+ padding:8px;
34
+ float:right;
35
+ width:30%;
36
+ }
37
+
38
+ #items li {
39
+ border:4px solid #f5f5ff;
40
+ background:#fff;
41
+ padding:8px;
42
+ margin:4px 0;
43
+ }
44
+
45
+ form {
46
+ padding:4px;
47
+ margin:6px;
48
+ background-color:#ddd;
49
+ }
50
+
51
+ div.avatar {
52
+ padding:2px;
53
+ padding-bottom:0;
54
+ margin-right:4px;
55
+ float:left;
56
+ font-size:0.78em;
57
+ width : 60px;
58
+ height : 60px;
59
+ text-align: center;
60
+ }
61
+
62
+ div.avatar .name {
63
+ padding-top:2px;
64
+ }
65
+
66
+ div.avatar img {
67
+ margin:0 auto;
68
+ padding:0;
69
+ width : 40px;
70
+ height : 40px;
71
+ }
72
+
73
+ #items ul {
74
+ list-style: none;
75
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "WorkQueue",
3
+ "description": "WorkQueue buffers units of work for WMAgents"
4
+ }
@@ -0,0 +1,13 @@
1
+ function(doc, req) {
2
+ if (doc._deleted){
3
+ return false;
4
+ }
5
+
6
+ if (doc.type && doc.type === "WMCore.WorkQueue.DataStructs.WorkQueueElement.WorkQueueElement") {
7
+ var ele = doc["WMCore.WorkQueue.DataStructs.WorkQueueElement.WorkQueueElement"];
8
+ if (ele['ChildQueueUrl'] === req.query.queueUrl) {
9
+ return true;
10
+ }
11
+ }
12
+ return false;
13
+ }
@@ -0,0 +1,3 @@
1
+ function(doc, req) {
2
+ return !doc._deleted;
3
+ }