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.
- Utils/CPMetrics.py +270 -0
- Utils/CertTools.py +62 -0
- Utils/EmailAlert.py +50 -0
- Utils/ExtendedUnitTestCase.py +62 -0
- Utils/FileTools.py +182 -0
- Utils/IteratorTools.py +80 -0
- Utils/MathUtils.py +31 -0
- Utils/MemoryCache.py +119 -0
- Utils/Patterns.py +24 -0
- Utils/Pipeline.py +137 -0
- Utils/PortForward.py +97 -0
- Utils/ProcessStats.py +103 -0
- Utils/PythonVersion.py +17 -0
- Utils/Signals.py +36 -0
- Utils/TemporaryEnvironment.py +27 -0
- Utils/Throttled.py +227 -0
- Utils/Timers.py +130 -0
- Utils/Timestamps.py +86 -0
- Utils/TokenManager.py +143 -0
- Utils/Tracing.py +60 -0
- Utils/TwPrint.py +98 -0
- Utils/Utilities.py +308 -0
- Utils/__init__.py +11 -0
- WMCore/Algorithms/Permissions.py +27 -0
- WMCore/Algorithms/__init__.py +7 -0
- WMCore/Cache/GenericDataCache.py +98 -0
- WMCore/Cache/WMConfigCache.py +572 -0
- WMCore/Cache/__init__.py +0 -0
- WMCore/Configuration.py +651 -0
- WMCore/DataStructs/File.py +177 -0
- WMCore/DataStructs/Fileset.py +140 -0
- WMCore/DataStructs/Job.py +182 -0
- WMCore/DataStructs/JobGroup.py +142 -0
- WMCore/DataStructs/JobPackage.py +49 -0
- WMCore/DataStructs/LumiList.py +734 -0
- WMCore/DataStructs/Mask.py +219 -0
- WMCore/DataStructs/Pickleable.py +24 -0
- WMCore/DataStructs/Run.py +256 -0
- WMCore/DataStructs/Subscription.py +175 -0
- WMCore/DataStructs/WMObject.py +47 -0
- WMCore/DataStructs/WorkUnit.py +112 -0
- WMCore/DataStructs/Workflow.py +60 -0
- WMCore/DataStructs/__init__.py +8 -0
- WMCore/Database/CMSCouch.py +1349 -0
- WMCore/Database/CouchUtils.py +118 -0
- WMCore/Database/__init__.py +9 -0
- WMCore/Lexicon.py +836 -0
- WMCore/REST/Auth.py +202 -0
- WMCore/REST/CherryPyPeriodicTask.py +166 -0
- WMCore/REST/Error.py +333 -0
- WMCore/REST/Format.py +642 -0
- WMCore/REST/HeartbeatMonitorBase.py +90 -0
- WMCore/REST/Main.py +623 -0
- WMCore/REST/Server.py +2435 -0
- WMCore/REST/Services.py +24 -0
- WMCore/REST/Test.py +120 -0
- WMCore/REST/Tools.py +38 -0
- WMCore/REST/Validation.py +250 -0
- WMCore/REST/__init__.py +1 -0
- WMCore/ReqMgr/DataStructs/AuthzByStatus.py +113 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/CAMPAIGN_CONFIG.py +116 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/DAS_RESULT_FILTER.py +3 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/EDITABLE_SPLITTING_PARAM_CONFIG.py +42 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/UNIFIED_CONFIG.py +240 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/__init__.py +0 -0
- WMCore/ReqMgr/DataStructs/ReqMgrConfigDataCache.py +65 -0
- WMCore/ReqMgr/DataStructs/Request.py +293 -0
- WMCore/ReqMgr/DataStructs/RequestError.py +21 -0
- WMCore/ReqMgr/DataStructs/RequestStatus.py +209 -0
- WMCore/ReqMgr/DataStructs/RequestType.py +13 -0
- WMCore/ReqMgr/DataStructs/__init__.py +0 -0
- WMCore/ReqMgr/__init__.py +1 -0
- WMCore/Services/AlertManager/AlertManagerAPI.py +111 -0
- WMCore/Services/AlertManager/__init__.py +0 -0
- WMCore/Services/CRIC/CRIC.py +238 -0
- WMCore/Services/CRIC/__init__.py +0 -0
- WMCore/Services/DBS/DBS3Reader.py +1044 -0
- WMCore/Services/DBS/DBSConcurrency.py +44 -0
- WMCore/Services/DBS/DBSErrors.py +113 -0
- WMCore/Services/DBS/DBSReader.py +23 -0
- WMCore/Services/DBS/DBSUtils.py +139 -0
- WMCore/Services/DBS/DBSWriterObjects.py +381 -0
- WMCore/Services/DBS/ProdException.py +133 -0
- WMCore/Services/DBS/__init__.py +8 -0
- WMCore/Services/FWJRDB/FWJRDBAPI.py +118 -0
- WMCore/Services/FWJRDB/__init__.py +0 -0
- WMCore/Services/HTTPS/HTTPSAuthHandler.py +66 -0
- WMCore/Services/HTTPS/__init__.py +0 -0
- WMCore/Services/LogDB/LogDB.py +201 -0
- WMCore/Services/LogDB/LogDBBackend.py +191 -0
- WMCore/Services/LogDB/LogDBExceptions.py +11 -0
- WMCore/Services/LogDB/LogDBReport.py +85 -0
- WMCore/Services/LogDB/__init__.py +0 -0
- WMCore/Services/MSPileup/__init__.py +0 -0
- WMCore/Services/MSUtils/MSUtils.py +54 -0
- WMCore/Services/MSUtils/__init__.py +0 -0
- WMCore/Services/McM/McM.py +173 -0
- WMCore/Services/McM/__init__.py +8 -0
- WMCore/Services/MonIT/Grafana.py +133 -0
- WMCore/Services/MonIT/__init__.py +0 -0
- WMCore/Services/PyCondor/PyCondorAPI.py +154 -0
- WMCore/Services/PyCondor/PyCondorUtils.py +105 -0
- WMCore/Services/PyCondor/__init__.py +0 -0
- WMCore/Services/ReqMgr/ReqMgr.py +261 -0
- WMCore/Services/ReqMgr/__init__.py +0 -0
- WMCore/Services/ReqMgrAux/ReqMgrAux.py +419 -0
- WMCore/Services/ReqMgrAux/__init__.py +0 -0
- WMCore/Services/RequestDB/RequestDBReader.py +267 -0
- WMCore/Services/RequestDB/RequestDBWriter.py +39 -0
- WMCore/Services/RequestDB/__init__.py +0 -0
- WMCore/Services/Requests.py +624 -0
- WMCore/Services/Rucio/Rucio.py +1287 -0
- WMCore/Services/Rucio/RucioUtils.py +74 -0
- WMCore/Services/Rucio/__init__.py +0 -0
- WMCore/Services/RucioConMon/RucioConMon.py +128 -0
- WMCore/Services/RucioConMon/__init__.py +0 -0
- WMCore/Services/Service.py +400 -0
- WMCore/Services/StompAMQ/__init__.py +0 -0
- WMCore/Services/TagCollector/TagCollector.py +155 -0
- WMCore/Services/TagCollector/XMLUtils.py +98 -0
- WMCore/Services/TagCollector/__init__.py +0 -0
- WMCore/Services/UUIDLib.py +13 -0
- WMCore/Services/UserFileCache/UserFileCache.py +160 -0
- WMCore/Services/UserFileCache/__init__.py +8 -0
- WMCore/Services/WMAgent/WMAgent.py +63 -0
- WMCore/Services/WMAgent/__init__.py +0 -0
- WMCore/Services/WMArchive/CMSSWMetrics.py +526 -0
- WMCore/Services/WMArchive/DataMap.py +463 -0
- WMCore/Services/WMArchive/WMArchive.py +33 -0
- WMCore/Services/WMArchive/__init__.py +0 -0
- WMCore/Services/WMBS/WMBS.py +97 -0
- WMCore/Services/WMBS/__init__.py +0 -0
- WMCore/Services/WMStats/DataStruct/RequestInfoCollection.py +300 -0
- WMCore/Services/WMStats/DataStruct/__init__.py +0 -0
- WMCore/Services/WMStats/WMStatsPycurl.py +145 -0
- WMCore/Services/WMStats/WMStatsReader.py +445 -0
- WMCore/Services/WMStats/WMStatsWriter.py +273 -0
- WMCore/Services/WMStats/__init__.py +0 -0
- WMCore/Services/WMStatsServer/WMStatsServer.py +134 -0
- WMCore/Services/WMStatsServer/__init__.py +0 -0
- WMCore/Services/WorkQueue/WorkQueue.py +492 -0
- WMCore/Services/WorkQueue/__init__.py +0 -0
- WMCore/Services/__init__.py +8 -0
- WMCore/Services/pycurl_manager.py +574 -0
- WMCore/WMBase.py +50 -0
- WMCore/WMException.py +183 -0
- WMCore/WMExceptions.py +269 -0
- WMCore/WMFactory.py +76 -0
- WMCore/WMLogging.py +108 -0
- WMCore/WMStats/CherryPyThreads/CleanUpTask.py +46 -0
- WMCore/WMStats/CherryPyThreads/DataCacheUpdate.py +45 -0
- WMCore/WMStats/CherryPyThreads/HeartbeatMonitor.py +6 -0
- WMCore/WMStats/CherryPyThreads/LogDBTasks.py +29 -0
- WMCore/WMStats/CherryPyThreads/__init__.py +0 -0
- WMCore/WMStats/DataStructs/DataCache.py +92 -0
- WMCore/WMStats/DataStructs/__init__.py +0 -0
- WMCore/WMStats/Service/ActiveRequestJobInfo.py +123 -0
- WMCore/WMStats/Service/MetaDataInfo.py +26 -0
- WMCore/WMStats/Service/RequestInfo.py +127 -0
- WMCore/WMStats/Service/RestApiHub.py +51 -0
- WMCore/WMStats/Service/__init__.py +0 -0
- WMCore/WMStats/T0/CherryPyThreads/T0DataCacheUpdate.py +35 -0
- WMCore/WMStats/T0/CherryPyThreads/__init__.py +0 -0
- WMCore/WMStats/T0/Service/T0RestApiHub.py +37 -0
- WMCore/WMStats/T0/Service/__init__.py +0 -0
- WMCore/WMStats/T0/__init__.py +0 -0
- WMCore/WMStats/WebGui/FrontPage.py +59 -0
- WMCore/WMStats/WebGui/__init__.py +0 -0
- WMCore/WMStats/__init__.py +1 -0
- WMCore/Wrappers/JsonWrapper/JSONThunker.py +342 -0
- WMCore/Wrappers/JsonWrapper/__init__.py +7 -0
- WMCore/Wrappers/__init__.py +6 -0
- WMCore/__init__.py +10 -0
- reqmon-2.3.10.data/data/bin/wmc-dist-patch +15 -0
- reqmon-2.3.10.data/data/bin/wmc-dist-unpatch +8 -0
- reqmon-2.3.10.data/data/bin/wmc-httpd +3 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/_id +1 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/couchapp.json +5 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/filters/filterDeletedDocs.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/validate_doc_update.js +6 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/views/logByRequest/map.js +9 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/views/logByRequestAndThread/map.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/views/requests/map.js +5 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/views/requests/reduce.js +1 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/views/tstamp/map.js +7 -0
- reqmon-2.3.10.data/data/data/couchapps/T0Request/_id +1 -0
- reqmon-2.3.10.data/data/data/couchapps/T0Request/couchapp.json +5 -0
- reqmon-2.3.10.data/data/data/couchapps/T0Request/filters/repfilter.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/T0Request/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/T0Request/updates/updaterequest.js +79 -0
- reqmon-2.3.10.data/data/data/couchapps/T0Request/validate_doc_update.js +6 -0
- reqmon-2.3.10.data/data/data/couchapps/T0Request/views/byrequest/map.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/T0Request/views/bystatus/map.js +7 -0
- reqmon-2.3.10.data/data/data/couchapps/T0Request/views/bystatusandtime/map.js +7 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/ColVis.css +76 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/font-awesome.min.css +4 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-circle-check-16.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-circle-cross-16.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-circle-plus-16.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-square-check-16.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/cms_logo.gif +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/cms_logo.jpeg +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_100_e4f1fb_1x400.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_80_d7ebf9_1x400.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_highlight-hard_55_5c9ccc_1x100.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_inset-soft_100_fcfdfd_1x100.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_217bc0_256x240.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_2694e8_256x240.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_2e83ff_256x240.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_469bdd_256x240.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_6da8d5_256x240.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_cd0a0a_256x240.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_d8e7f3_256x240.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_f9bd01_256x240.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/warning-16.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/jquery-ui-1.12.0.css +1312 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/jquery.dataTables.css +241 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/logdb.css +60 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/main_layout.css +565 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/FontAwesome.otf +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.eot +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.svg +565 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.ttf +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.woff +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.woff2 +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/Sorting icons.psd +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/back_disabled.jpg +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/back_enabled.jpg +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/error.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/favicon.ico +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/forward_disabled.jpg +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/forward_enabled.jpg +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/loader-1.gif +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/module.caption.backg.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/module.caption.backg.rolledup.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/rollup.gif +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_asc.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_asc_disabled.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_both.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_desc.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_desc_disabled.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/stable.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/warning.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/index.html +105 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/index.html.min +106 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/index.html.org +125 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/WMStats.ActiveRequestController.js +61 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/WMStats.GenericController.js +38 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/WMStats.WorkloadSummaryController.js +12 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/import.js +6 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T0/WMStats.RequestSummary.js +71 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T0/WMStats.RunSummary.js +70 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.AgentRequestSummary.js +28 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.CMSSWSummary.js +28 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.CampaignSummary.js +28 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.ReqMgrRequest.js +10 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.RequestSummary.js +190 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Agents.js +98 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Alerts.js +21 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Campaigns.js +25 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.GenericRequests.js +728 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.History.js +78 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.JobDetails.js +19 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.JobSummary.js +32 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.LogDBData.js +93 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.LogMessage.js +38 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.SiteSummary.js +24 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Sites.js +25 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Tasks.js +107 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.WorkloadSummary.js +20 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats._StructBase.js +37 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/import.js +29 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.ActiveRequestModel.js +9 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestLogDetailModel.js +17 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestLogModel.js +14 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestModel.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestSearchModel.js +8 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.ActiveRequestModel.js +9 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.ReqMgrRequestModel.js +8 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.RequestLogDetailModel.js +18 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.RequestLogModel.js +14 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.RequestSearchModel.js +8 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.AgentModel.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.AlertModel.js +6 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.HistoryModel.js +14 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.JobDetailModel.js +22 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.JobSummaryModel.js +18 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.WorkloadSummaryModel.js +8 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats._AjaxModelBase.js +55 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats._ModelBase.js +77 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats._RequestModelBase.js +127 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/import.js +26 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/ViewModels/WMStats.ViewModel.js +511 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/ViewModels/import.js +2 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/T0/WMStats.Controls.js +117 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/T1/WMStats.Controls.js +158 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/WMStats.CommonControls.js +100 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/import.js +10 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Graphs/WMStats.SiteHistoryGraph.js +8 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Graphs/import.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.CategoryDetailList.js +38 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestAlertGUI.js +128 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestDataList.js +25 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestDetailList.js +68 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestSummaryList.js +31 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.CategoryDetailList.js +54 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestAlertGUI.js +81 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestDataList.js +26 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestDetailList.js +122 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestSummaryList.js +35 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.ResubmissionList.js +64 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.AgentDetailList.js +137 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.CategoryTitle.js +20 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.HTMLList.js +12 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.JobDetailList.js +178 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.RequestLogList.js +88 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.RequestTitle.js +33 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/import.js +25 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/WMStats.ActiveRequestTable.js +142 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/WMStats.RunSummaryTable.js +77 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/WMStats.TaskSummaryTable.js +127 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/addCategoryMap.js +10 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.ActiveRequestTable.js +132 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.ActiveRequestTableWithJob.js +164 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.AgentRequestSummaryTable.js +78 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.CMSSWSummaryTable.js +76 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.CampaignSummaryTable.js +76 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.SiteSummaryTable.js +63 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.TaskSummaryTable.js +124 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/addCategoryMap.js +17 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.JobSummaryTable.js +71 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.Table.js +70 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.TableController.js +130 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.WorkloadSummaryTable.js +62 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/import.js +26 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/WMStats.CategoryMap.js +45 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/WMStats.View.IndexHTML.js +137 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/import.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Ajax.js +74 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Couch.js +83 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Globals.js +200 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Utils.js +283 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/import-all.min.js +7 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/loader.js +27 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/minified/global.min.js +639 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/minified/import-all-t0.min.js +4317 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/minified/import-all-t1.min.js +4972 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/lib/jquery.dataTables.columnFilter.js +732 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/lib/namespace.js +23 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/filters/deleteFatDocFilter.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/filters/filterDeletedDocs.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/filters/repfilter.js +7 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/rewrites.json +110 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/shows/redirect.js +23 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/agentInfo.js +17 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/generalFields.js +11 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/insertRequest.js +13 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/jobLogArchiveLocation.js +10 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/jobStateTransition.js +17 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/jobSummaryState.js +5 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/totalStats.js +39 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/validate_doc_update.js +10 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl/views/requestAgentUrl/map.erl +11 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl/views/requestAgentUrl/reduce.erl +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl1/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl1/views/byAgentURL/map.erl +11 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl2/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl2/views/allWorkflows/map.erl +10 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl2/views/allWorkflows/reduce.erl +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl3/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl3/views/jobsByStatusWorkflow/map.erl +32 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl3/views/jobsByStatusWorkflow/reduce.erl +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl4/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl4/views/cooledoffRequests/map.erl +16 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl4/views/cooledoffRequests/reduce.erl +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl5/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl5/views/time/map.erl +11 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl6/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl6/views/requestHistory/map.erl +11 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl6/views/requestHistory/reduce.erl +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl7/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl7/views/agentInfo/map.erl +10 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl7/views/latestRequest/map.erl +11 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/index.html +44 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/js/container/histogram.js +141 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/js/container/tree.js +67 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/js/dataMap/errorData.js +69 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/js/htmlFormatter/listFormatter.js +79 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/js/layout/gridLayout.js +77 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/performanceHistogram.html +46 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/style/main.css +17 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/couchapp.json +4 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/filters/repfilter.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/lib/mustache.js +333 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/lib/validate.js +29 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/lists/completedWorkflows.js +27 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/lists/performanceHistogram.js +15 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/rewrites.json +65 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/shows/histogramByWorkflow.js +75 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/shows/lumiMissingByWorkflow.js +97 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/templates/histogramByWorkflow.html +126 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/templates/performanceData.html +44 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/updates/updateacdc.js +6 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/updates/updatecollection.js +5 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/validate_doc_update.js +8 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/vendor/protovis/_attachments/protovis-r3.2.js +277 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/views/outputDataByPrimDs/map.js +21 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/views/performanceDataByCampaign/map.js +19 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/views/summaryByInputdataset/map.js +7 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/views/summaryByOutputdataset/map.js +7 -0
- reqmon-2.3.10.dist-info/LICENSE +202 -0
- reqmon-2.3.10.dist-info/METADATA +24 -0
- reqmon-2.3.10.dist-info/NOTICE +16 -0
- reqmon-2.3.10.dist-info/RECORD +424 -0
- reqmon-2.3.10.dist-info/WHEEL +5 -0
- reqmon-2.3.10.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,639 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Define Global values in WMStats Application
|
|
3
|
+
* TODO: This will contain configuration result for Tier0, Tier1,
|
|
4
|
+
* PromptScheme specific config
|
|
5
|
+
*/
|
|
6
|
+
WMStats.namespace("Globals");
|
|
7
|
+
|
|
8
|
+
WMStats.Globals = function($){
|
|
9
|
+
var _dbVariants = {'wmstats': 'tier1', 'tier0_wmstats': 'tier0'};
|
|
10
|
+
|
|
11
|
+
var reqPropertyMap = {
|
|
12
|
+
"_id": "_id",
|
|
13
|
+
"InputDataset": "inputdataset",
|
|
14
|
+
"PrepID": "prep_id",
|
|
15
|
+
"Group": "group",
|
|
16
|
+
"RequestDate": "request_date",
|
|
17
|
+
"Campaign": "campaign",
|
|
18
|
+
"RequestName": "workflow",
|
|
19
|
+
"RequestorDN": "user_dn",
|
|
20
|
+
"RequestPriority": "priority",
|
|
21
|
+
"Requestor": "requestor",
|
|
22
|
+
"RequestType": "request_type",
|
|
23
|
+
"DbsUrl": "dbs_url",
|
|
24
|
+
"CMSSWVersion": "cmssw",
|
|
25
|
+
"OutputDatasets": "outputdatasets",
|
|
26
|
+
"RequestTransition": "request_status", // Status: status, UpdateTime: update_time
|
|
27
|
+
"SiteWhitelist": "site_white_list",
|
|
28
|
+
"Team": "team",
|
|
29
|
+
"TotalEstimatedJobs": "total_jobs",
|
|
30
|
+
"TotalInputEvents": "input_events",
|
|
31
|
+
"TotalInputLumis": "input_lumis",
|
|
32
|
+
"TotalInputFiles": "input_num_files",
|
|
33
|
+
"Run": "run",
|
|
34
|
+
"AgentJobInfo": "AgentJobInfo"
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
function convertRequestDocToWMStatsFormat(doc) {
|
|
38
|
+
// check document type whether it is reqmgr doc
|
|
39
|
+
// this is hacky way to check - need better checking
|
|
40
|
+
if (doc.RequestName == undefined) {
|
|
41
|
+
return doc;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// this is temporary hack to identify missing RequestTransition property
|
|
45
|
+
// all the workflows which has missing info need to be manually updated
|
|
46
|
+
if (doc.RequestTransition == undefined || doc.RequestTransition.length == 0) {
|
|
47
|
+
doc.RequestTransition = [{"Status": "N/A", "UpdateTime": 0}];
|
|
48
|
+
}
|
|
49
|
+
var wmstatsReq = {};
|
|
50
|
+
for (var key in doc) {
|
|
51
|
+
if (reqPropertyMap[key]) {
|
|
52
|
+
if (key == "RequestTransition") {
|
|
53
|
+
wmstatsReq[reqPropertyMap[key]] = [];
|
|
54
|
+
for (var index = 0; index < doc[key].length; index++) {
|
|
55
|
+
wmstatsReq[reqPropertyMap[key]][index] = {"status": doc[key][index]["Status"],
|
|
56
|
+
"update_time": doc[key][index]["UpdateTime"]};
|
|
57
|
+
}
|
|
58
|
+
} else {
|
|
59
|
+
wmstatsReq[reqPropertyMap[key]] = doc[key];
|
|
60
|
+
}
|
|
61
|
+
} else {
|
|
62
|
+
// use original key
|
|
63
|
+
wmstatsReq[key] = doc[key];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
return wmstatsReq;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
function getReqDetailPrefix () {
|
|
71
|
+
if (_dbVariants[dbname] == "tier1") {
|
|
72
|
+
return "/reqmgr2/fetch?rid=";
|
|
73
|
+
} else {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
function getAlertCollectorLink() {
|
|
80
|
+
return "/couchdb/alertscollector/_design/AlertsCollector/index.html";
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
function getWorkloadSummaryPrefix () {
|
|
84
|
+
return "/couchdb/" + getWorkloadSummaryDB() + "/_design/WorkloadSummary/_show/histogramByWorkflow/";
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
function getGQLink(request) {
|
|
88
|
+
var gqLink = "/couchdb/workqueue/_design/WorkQueue/_rewrite/elementsInfo?request=" + request;
|
|
89
|
+
return "<a href='" + gqLink + "' target='_blank'>GQ</a>";
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
function getLQLink(agentURLs, request){
|
|
93
|
+
if (agentURLs.constructor.name === "String"){
|
|
94
|
+
agentURL = agentURLs;
|
|
95
|
+
} else if (agentURLs.length && (agentURLs[0].constructor.name === "String")){
|
|
96
|
+
//TODO: need to handle properly multiple agent
|
|
97
|
+
agentURL = agentURLs[0];
|
|
98
|
+
};
|
|
99
|
+
var lqLink = "http://" + agentURL.split(':')[0] +
|
|
100
|
+
":5984/workqueue/_design/WorkQueue/_rewrite/elementsInfo?request=" + request;
|
|
101
|
+
return "<a href='" + lqLink + "' target='_blank'>LQ</a>";
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
function getWorkloadSummaryDB() {
|
|
105
|
+
if (_dbVariants[dbname] == "tier1") {
|
|
106
|
+
return "workloadsummary";
|
|
107
|
+
} else if (_dbVariants[dbname] == "tier0") {
|
|
108
|
+
return "t0_workloadsummary";
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
function getAgentUrlForJobs(agentURL, workflow, status) {
|
|
113
|
+
return "http://" + agentURL.split(':')[0] + ":5984/wmagent_jobdump%2Fjobs/_design/JobDump/_list/" +
|
|
114
|
+
status + "Jobs/statusByWorkflowName?startkey=[%22" +
|
|
115
|
+
workflow + "%22]&endkey=[%22" + workflow + "%22%2C{}]&reduce=false&stale=ok";
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function formatJobLink(jobNumber, agentURLs, workflow, status) {
|
|
119
|
+
if (jobNumber !== 0) {
|
|
120
|
+
if (agentURLs.constructor.name === "String"){
|
|
121
|
+
agentURL = agentURLs;
|
|
122
|
+
} else if (agentURLs.length && (agentURLs[0].constructor.name === "String")){
|
|
123
|
+
//TODO: need to handle properly multiple agent
|
|
124
|
+
agentURL = agentURLs[0];
|
|
125
|
+
} else {
|
|
126
|
+
return jobNumber;
|
|
127
|
+
}
|
|
128
|
+
return "<a href='" + getAgentUrlForJobs(agentURL, workflow, status) +
|
|
129
|
+
"' target='_blank'>" + jobNumber + "</a>";
|
|
130
|
+
} else {
|
|
131
|
+
return jobNumber;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
return {
|
|
136
|
+
REQ_DETAIL_URL_PREFIX: getReqDetailPrefix(),
|
|
137
|
+
WORKLOAD_SUMMARY_URL_PREFIX: getWorkloadSummaryPrefix(),
|
|
138
|
+
AJAX_LOADING_STATUS: {beforeSend: function(){$('#loading_page').addClass('front').show();},
|
|
139
|
+
complete: function(){$('#loading_page').hide();}},
|
|
140
|
+
COUCHDB_NAME: dbname,
|
|
141
|
+
WORKLOAD_SUMMARY_COUCHDB_NAME: getWorkloadSummaryDB(),
|
|
142
|
+
REQMGR_COUCHDB_NAME: "reqmgr_workload_cache", //TODO: need to be configurable"reqmgrdb"
|
|
143
|
+
VARIANT: _dbVariants[dbname],
|
|
144
|
+
COUCHAPP_DESIGN: "WMStats",
|
|
145
|
+
WORKLOAD_SUMMARY_COUCHAPP_DESIGN: "WorkloadSummary",
|
|
146
|
+
REQMGR_COUCHAPP_DESIGN: "ReqMgr",
|
|
147
|
+
ALERT_COLLECTOR_LINK: getAlertCollectorLink(),
|
|
148
|
+
T0_COUCHAPP_DESIGN: "T0Request",
|
|
149
|
+
T0_COUCHDB_NAME: "t0_request",
|
|
150
|
+
LOGDB_DESIGN: "LogDB",
|
|
151
|
+
LOGDB_NAME: "wmstats_logdb",
|
|
152
|
+
T0_LOGDB_NAME: "t0_logdb",
|
|
153
|
+
CONFIG: null, //this will be set when WMStats.Couch.loadConfig is called. just place holder or have default config
|
|
154
|
+
loadScript: function (url, success) {
|
|
155
|
+
$.ajax({async: false, url: url, dataType: 'script', success: success});
|
|
156
|
+
},
|
|
157
|
+
importScripts: function (scripts) {
|
|
158
|
+
for (var i=0; i < scripts.length; i++) {
|
|
159
|
+
document.write('<script src="'+scripts[i]+'"><\/script>');
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
Event: {}, // name space for Global Custom event
|
|
163
|
+
formatJobLink: formatJobLink,
|
|
164
|
+
getGQLink: getGQLink,
|
|
165
|
+
getLQLink: getLQLink,
|
|
166
|
+
convertRequestDocToWMStatsFormat: convertRequestDocToWMStatsFormat
|
|
167
|
+
};
|
|
168
|
+
}(jQuery);
|
|
169
|
+
|
|
170
|
+
WMStats.namespace("CustomEvents");
|
|
171
|
+
|
|
172
|
+
WMStats.CustomEvents.REQUESTS_LOADED = "C_1";
|
|
173
|
+
WMStats.CustomEvents.AGENTS_LOADED = "C_2";
|
|
174
|
+
//logDB list page event
|
|
175
|
+
WMStats.CustomEvents.LOG_LOADED = "L_1";
|
|
176
|
+
WMStats.CustomEvents.ERROR_LOG_LOADED = "L_2";
|
|
177
|
+
|
|
178
|
+
WMStats.CustomEvents.REQUEST_SUMMARY_READY = "C_3";
|
|
179
|
+
WMStats.CustomEvents.CATEGORY_SUMMARY_READY = "C_4";
|
|
180
|
+
|
|
181
|
+
WMStats.CustomEvents.REQUEST_DETAIL_READY = "C_5";
|
|
182
|
+
WMStats.CustomEvents.CATEGORY_DETAIL_READY = "C_6";
|
|
183
|
+
|
|
184
|
+
WMStats.CustomEvents.JOB_SUMMARY_READY = "C_7";
|
|
185
|
+
WMStats.CustomEvents.JOB_DETAIL_READY = "C_8";
|
|
186
|
+
|
|
187
|
+
WMStats.CustomEvents.LOADING_DIV_START = "C_9";
|
|
188
|
+
WMStats.CustomEvents.LOADING_DIV_END = "C_10";
|
|
189
|
+
|
|
190
|
+
WMStats.CustomEvents.HISTORY_LOADED = "C_11";
|
|
191
|
+
WMStats.CustomEvents.AJAX_LOADING_START = "C_12";
|
|
192
|
+
WMStats.CustomEvents.RESUBMISSION_SUMMARY_READY = "C_13";
|
|
193
|
+
WMStats.CustomEvents.RESUBMISSION_SUCCESS = "C_14";
|
|
194
|
+
|
|
195
|
+
//workload summary page event
|
|
196
|
+
WMStats.CustomEvents.WORKLOAD_SUMMARY_READY = "W_1";
|
|
197
|
+
|
|
198
|
+
//view model (need to move to proper location)
|
|
199
|
+
WMStats.namespace("ViewModel");
|
|
200
|
+
WMStats.ViewModel.Resubmission = {};
|
|
201
|
+
WMStats.namespace("Utils");
|
|
202
|
+
|
|
203
|
+
/* simple function to clone obj only works with no prototype */
|
|
204
|
+
WMStats.Utils.cloneObj = function(sourceObj) {
|
|
205
|
+
if (typeof sourceObj === "object"){
|
|
206
|
+
var newObj = sourceObj.constructor();
|
|
207
|
+
for (var prop in sourceObj) {
|
|
208
|
+
newObj[prop] = WMStats.Utils.cloneObj(sourceObj[prop]);
|
|
209
|
+
}
|
|
210
|
+
return newObj;
|
|
211
|
+
} else {
|
|
212
|
+
return sourceObj;
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
WMStats.Utils.updateObj = function (baseObj, additionObj, createFlag, updateFunc) {
|
|
217
|
+
/*
|
|
218
|
+
* update baseObj using additonObj.
|
|
219
|
+
* baseObj will be updated but additonObj will the same.
|
|
220
|
+
* updateFuct is the function pointer defines how the object wiil be updated
|
|
221
|
+
* updateFunction takes 3 parameters, baseObj, additonObj, field
|
|
222
|
+
* if udateFunc is not define use addition.
|
|
223
|
+
* createFlag is set to true by default
|
|
224
|
+
*/
|
|
225
|
+
|
|
226
|
+
for (var field in additionObj) {
|
|
227
|
+
if (!baseObj[field]) {
|
|
228
|
+
if (createFlag === undefined || createFlag) {
|
|
229
|
+
baseObj[field] = WMStats.Utils.cloneObj(additionObj[field]);
|
|
230
|
+
}
|
|
231
|
+
} else {
|
|
232
|
+
if (typeof(baseObj[field]) == "object"){
|
|
233
|
+
WMStats.Utils.updateObj(baseObj[field], additionObj[field], createFlag, updateFunc);
|
|
234
|
+
} else {
|
|
235
|
+
if (updateFunc instanceof Function){
|
|
236
|
+
updateFunc(baseObj, additionObj, field);
|
|
237
|
+
} else {
|
|
238
|
+
//default is adding
|
|
239
|
+
baseObj[field] += additionObj[field];
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
WMStats.Utils.getOrDefault= function (baseObj, objList, val) {
|
|
247
|
+
|
|
248
|
+
if (baseObj[objList[0]]) {
|
|
249
|
+
if (objList.length == 1) {
|
|
250
|
+
return baseObj[objList[0]];
|
|
251
|
+
} else {
|
|
252
|
+
return WMStats.Utils.getOrDefault(baseObj[objList[0]],
|
|
253
|
+
objList.slice(1), val);
|
|
254
|
+
}
|
|
255
|
+
} else {
|
|
256
|
+
return val;
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
WMStats.Utils.get = function (baseObj, objStr, val) {
|
|
261
|
+
if (baseObj === undefined) {
|
|
262
|
+
return val;
|
|
263
|
+
}
|
|
264
|
+
objList = objStr.split('.');
|
|
265
|
+
return WMStats.Utils.getOrDefault(baseObj, objList, val);
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
WMStats.Utils.formatReqDetailUrl = function (request) {
|
|
269
|
+
urlLink = WMStats.Globals.REQ_DETAIL_URL_PREFIX;
|
|
270
|
+
return '<a href="' + urlLink +
|
|
271
|
+
encodeURIComponent(request) + '" target="requestDetailFrame">' + request + '</a>';
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
WMStats.Utils.formatWorkloadSummarylUrl = function (request, status) {
|
|
275
|
+
if (status === undefined) {
|
|
276
|
+
return '<a href="' + WMStats.Globals.WORKLOAD_SUMMARY_URL_PREFIX +
|
|
277
|
+
encodeURIComponent(request) + '" target="workloadSummaryFrame">' + request + '</a>';
|
|
278
|
+
} else if (status == "completed" || status == "announced" ||
|
|
279
|
+
status == "closed-out" || status.indexOf("archived") !== -1) {
|
|
280
|
+
return '<a href="' + WMStats.Globals.WORKLOAD_SUMMARY_URL_PREFIX +
|
|
281
|
+
encodeURIComponent(request) + '" target="workloadSummaryFrame">' + status + '</a>';
|
|
282
|
+
} else {
|
|
283
|
+
return status;
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
WMStats.Utils.formatDate = function (timestamp) {
|
|
288
|
+
var date = new Date(timestamp * 1000);
|
|
289
|
+
return (date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() +
|
|
290
|
+
" " + date.getHours() + ":" + date.getMinutes());
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
WMStats.Utils.formatDuration = function (timestamp) {
|
|
294
|
+
if (timestamp < 0) return "N/A";
|
|
295
|
+
var totalMin = Math.floor(timestamp / 60);
|
|
296
|
+
var hours = Math.floor(totalMin / 60);
|
|
297
|
+
var min = totalMin % 60;
|
|
298
|
+
return (hours + " h " + min + " m");
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
WMStats.Utils.createInputFilter = function (selector) {
|
|
302
|
+
// collects the data from input tag and
|
|
303
|
+
// create the object which key value
|
|
304
|
+
var a=$(selector).serializeArray(), filter={};
|
|
305
|
+
$.each(a, function(i, obj){
|
|
306
|
+
if (isNaN(obj.value)) {
|
|
307
|
+
filter[obj.name] = obj.value;
|
|
308
|
+
} else{
|
|
309
|
+
filter[obj.name] = parseInt(obj.value);
|
|
310
|
+
}
|
|
311
|
+
filter[obj.name] = obj.value;
|
|
312
|
+
});
|
|
313
|
+
return filter;
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
WMStats.Utils.formatDetailButton = function (name, warning) {
|
|
317
|
+
var cssClass = "detailButtonNormal";
|
|
318
|
+
|
|
319
|
+
if (warning) {
|
|
320
|
+
cssClass = "detailButtonWarning";
|
|
321
|
+
}
|
|
322
|
+
return '<div class="detailButton ' + cssClass + '" name="'+ name + '"></div>';
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
WMStats.Utils.utcClock = function(date) {
|
|
327
|
+
|
|
328
|
+
function appendZero(num) {
|
|
329
|
+
if (num < 10) {
|
|
330
|
+
return "0" + num;
|
|
331
|
+
}
|
|
332
|
+
return num
|
|
333
|
+
}
|
|
334
|
+
var day = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
335
|
+
var now;
|
|
336
|
+
if (date === undefined) {
|
|
337
|
+
now = new Date();
|
|
338
|
+
}else {
|
|
339
|
+
now = date;
|
|
340
|
+
}
|
|
341
|
+
var month = now.getUTCMonth() + 1;
|
|
342
|
+
var utcString = now.getUTCFullYear() + "/" + month + "/" +
|
|
343
|
+
now.getUTCDate() + " (" + day[now.getUTCDay()] + ") " +
|
|
344
|
+
appendZero(now.getUTCHours()) + ":" + appendZero(now.getUTCMinutes()) + ":" +
|
|
345
|
+
appendZero(now.getUTCSeconds()) + " UTC";
|
|
346
|
+
return utcString;
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
WMStats.Utils.expandFormat = function(dataArray, summaryStr, formatFunc) {
|
|
350
|
+
var htmlstr = "";
|
|
351
|
+
if (dataArray == undefined || typeof (dataArray) !== "object" || dataArray.length == 0) {
|
|
352
|
+
htmlstr += "<strong>" + summaryStr + ":</strong>";
|
|
353
|
+
} else {
|
|
354
|
+
htmlstr += "<details> <summary><strong>" + summaryStr +"</strong></summary><ul>";
|
|
355
|
+
if (formatFunc === undefined) {
|
|
356
|
+
formatFunc = function(x) {return x};
|
|
357
|
+
}
|
|
358
|
+
for (var i in dataArray) {
|
|
359
|
+
htmlstr += "<li>" + formatFunc(dataArray[i], i) + "</li>";
|
|
360
|
+
}
|
|
361
|
+
htmlstr += "</ul></details>";
|
|
362
|
+
}
|
|
363
|
+
return htmlstr;
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
WMStats.Utils.largeNumberFormat = function(number) {
|
|
368
|
+
var mega = 1000000;
|
|
369
|
+
var giga = 1000000000;
|
|
370
|
+
if (number < mega) {
|
|
371
|
+
return number;
|
|
372
|
+
} else if (number < giga) {
|
|
373
|
+
return (number/mega).toFixed(1) + " M";
|
|
374
|
+
} else {
|
|
375
|
+
return (number/giga).toFixed(1) + " G";
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
WMStats.Utils.splitCouchServiceURL = function(url) {
|
|
380
|
+
var urlArray = url.split('/');
|
|
381
|
+
return {'couchUrl': urlArray.slice(0, -1).join('/'), 'couchdb': urlArray[urlArray.length - 1]};
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
WMStats.Utils.acdcRequestSting = function(originalRequest, requestor) {
|
|
386
|
+
// also stript strings if it contains '@'
|
|
387
|
+
var stripRequestor = originalRequest.replace(new RegExp('^'+ requestor.split('@')[0]), "ACDC");
|
|
388
|
+
return stripRequestor.replace(/_\d+_\d+_\d+$/, "");
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
WMStats.Utils.contains = function(value, container) {
|
|
392
|
+
//container is object or array
|
|
393
|
+
if (container.constructor.name === "Array") {
|
|
394
|
+
for (var index in container) {
|
|
395
|
+
if (value == container[index]) {
|
|
396
|
+
return index;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
return -1;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
if (container.constructor.name === "Object") {
|
|
403
|
+
for (var index in container) {
|
|
404
|
+
if (value == index) {
|
|
405
|
+
return index;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
return -1;
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
WMStats.Utils.addToSet = function(array, value) {
|
|
413
|
+
if (WMStats.Utils.contains(value, array) === -1) {
|
|
414
|
+
array.push(value);
|
|
415
|
+
return true;
|
|
416
|
+
} else {
|
|
417
|
+
return false;
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
|
|
421
|
+
WMStats.Utils.delay = (function(){
|
|
422
|
+
// only need to be used in one place.
|
|
423
|
+
// since timer is singlton, if it is used multiple places
|
|
424
|
+
// unintented clearTimeout could happen.
|
|
425
|
+
// currently only used only used in filter function.
|
|
426
|
+
var timer = 0;
|
|
427
|
+
return function(callback, ms){
|
|
428
|
+
var ms = ms || 1000; // default 1 sec delay
|
|
429
|
+
clearTimeout (timer);
|
|
430
|
+
timer = setTimeout(callback, ms);
|
|
431
|
+
};
|
|
432
|
+
})();
|
|
433
|
+
|
|
434
|
+
WMStats.Utils.getInputDatasets = function(reqDoc) {
|
|
435
|
+
if (reqDoc.inputdataset && reqDoc.inputdataset !== "None"){
|
|
436
|
+
return [reqDoc.inputdataset];
|
|
437
|
+
}
|
|
438
|
+
if (reqDoc.TaskChain) {
|
|
439
|
+
var inputDatasets = [];
|
|
440
|
+
for (var i = 0; i < reqDoc.TaskChain; i++) {
|
|
441
|
+
if (reqDoc["Task" + (i+1)].InputDataset && reqDoc["Task" + (i+1)].InputDataset !== "None") {
|
|
442
|
+
inputDatasets.push(reqDoc["Task" + (i+1)].InputDataset);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
return inputDatasets;
|
|
446
|
+
}
|
|
447
|
+
if (reqDoc.StepChain) {
|
|
448
|
+
var inputDatasets = [];
|
|
449
|
+
for (var i = 0; i < reqDoc.StepChain; i++) {
|
|
450
|
+
if (reqDoc["Step" + (i+1)].InputDataset && reqDoc["Step" + (i+1)].InputDataset !== "None") {
|
|
451
|
+
inputDatasets.push(reqDoc["Step" + (i+1)].InputDataset);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
return inputDatasets;
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
|
|
458
|
+
WMStats.Utils.formatStateTransition = function(stateTransition) {
|
|
459
|
+
|
|
460
|
+
var transFunc = function(item, i) {
|
|
461
|
+
return "<b>" + item.status + "</b>: " + WMStats.Utils.utcClock(new Date(item.update_time * 1000));
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
return WMStats.Utils.expandFormat(stateTransition, "detail", transFunc);
|
|
465
|
+
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
WMStats.Utils.entityMap = {
|
|
469
|
+
'&': '&',
|
|
470
|
+
'<': '<',
|
|
471
|
+
'>': '>',
|
|
472
|
+
'"': '"',
|
|
473
|
+
"'": ''',
|
|
474
|
+
'/': '/',
|
|
475
|
+
'`': '`',
|
|
476
|
+
'=': '='
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
WMStats.Utils.escapeHtml = function(string) {
|
|
480
|
+
return String(string).replace(/[&<>"'`=\/]/g, function (s) {
|
|
481
|
+
return WMStats.Utils.entityMap[s];
|
|
482
|
+
});
|
|
483
|
+
};
|
|
484
|
+
/*
|
|
485
|
+
* Define Global values for couch db and couch db function
|
|
486
|
+
* this has dependency on jquery.js and jquery.couch.js
|
|
487
|
+
*/
|
|
488
|
+
WMStats.namespace("CouchBase");
|
|
489
|
+
WMStats.namespace("Couch");
|
|
490
|
+
WMStats.namespace("WorkloadSummaryCouch");
|
|
491
|
+
WMStats.namespace("ReqMgrCouch");
|
|
492
|
+
|
|
493
|
+
WMStats.CouchBase = function(dbName, designName){
|
|
494
|
+
// couchapp name
|
|
495
|
+
var _Design = designName;
|
|
496
|
+
var _couchDB = $.couch.db(dbName);
|
|
497
|
+
var _config;
|
|
498
|
+
|
|
499
|
+
function _combineOption(options, callback, ajaxOptions) {
|
|
500
|
+
//combine options and callbacks for jquery.couch.js
|
|
501
|
+
// ajaxOptions are object which contains jquery ajax options
|
|
502
|
+
// {'beforeSend': .., 'complete': ...}
|
|
503
|
+
var options = options || {};
|
|
504
|
+
options.success = callback;
|
|
505
|
+
//var ajaxOptions = ajaxOptions || WMStats.Globals.AJAX_LOADING_STATUS
|
|
506
|
+
//var ajaxOptions = ajaxOptions
|
|
507
|
+
if (ajaxOptions) {
|
|
508
|
+
for (var opt in ajaxOptions) {
|
|
509
|
+
options[opt] = ajaxOptions[opt];
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
return options;
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
function loadConfig(func) {
|
|
516
|
+
function callback(data) {
|
|
517
|
+
//fist set the global config value
|
|
518
|
+
var config;
|
|
519
|
+
if (!data.rows && (data.rows.length != 1)) {
|
|
520
|
+
//use default config
|
|
521
|
+
config = null;
|
|
522
|
+
} else {
|
|
523
|
+
config = data.rows[0].doc;
|
|
524
|
+
}
|
|
525
|
+
WMStats.Globals.CONFIG = config;
|
|
526
|
+
// then call the function
|
|
527
|
+
func();
|
|
528
|
+
}
|
|
529
|
+
_couchDB.view(_Design +"/config",
|
|
530
|
+
_combineOption({"include_docs": true}, callback));
|
|
531
|
+
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
function view(name, options, callback, ajaxOptions){
|
|
535
|
+
//make all the view stale options update_after
|
|
536
|
+
var options = options || {};
|
|
537
|
+
if (options.stale === undefined) {
|
|
538
|
+
options.stale = "update_after";
|
|
539
|
+
}
|
|
540
|
+
return _couchDB.view(_Design +"/" + name,
|
|
541
|
+
_combineOption(options, callback, ajaxOptions));
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
function allDocs(options, callback, ajaxOptions){
|
|
545
|
+
return _couchDB.allDocs(_combineOption(options, callback, ajaxOptions));
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
function openDoc(docId, callback){
|
|
549
|
+
return _couchDB.openDoc(docId, _combineOption({}, callback));
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
return {'loadConfig': loadConfig, 'view': view, "allDocs": allDocs,
|
|
553
|
+
'openDoc': openDoc};
|
|
554
|
+
};
|
|
555
|
+
|
|
556
|
+
WMStats.Couch = WMStats.CouchBase(WMStats.Globals.COUCHDB_NAME, WMStats.Globals.COUCHAPP_DESIGN);
|
|
557
|
+
WMStats.WorkloadSummaryCouch = WMStats.CouchBase(WMStats.Globals.WORKLOAD_SUMMARY_COUCHDB_NAME,
|
|
558
|
+
WMStats.Globals.WORKLOAD_SUMMARY_COUCHAPP_DESIGN);
|
|
559
|
+
WMStats.ReqMgrCouch = WMStats.CouchBase(WMStats.Globals.REQMGR_COUCHDB_NAME,
|
|
560
|
+
WMStats.Globals.REQMGR_COUCHAPP_DESIGN);
|
|
561
|
+
WMStats.T0Couch = WMStats.CouchBase(WMStats.Globals.T0_COUCHDB_NAME,
|
|
562
|
+
WMStats.Globals.T0_COUCHAPP_DESIGN);
|
|
563
|
+
WMStats.LogDBCouch = WMStats.CouchBase(WMStats.Globals.LOGDB_NAME,
|
|
564
|
+
WMStats.Globals.LOGDB_DESIGN);
|
|
565
|
+
WMStats.T0LogDBCouch = WMStats.CouchBase(WMStats.Globals.T0_LOGDB_NAME,
|
|
566
|
+
WMStats.Globals.LOGDB_DESIGN);// handles ajax call other than couchdb
|
|
567
|
+
WMStats.namespace("Ajax");
|
|
568
|
+
|
|
569
|
+
WMStats.Ajax = (function($){
|
|
570
|
+
var reqMgrFuncs = {
|
|
571
|
+
putRequest: function(requestArgs) {
|
|
572
|
+
var uri = "/reqmgr2/data/request";
|
|
573
|
+
var verb = "POST";
|
|
574
|
+
$.ajax(uri,
|
|
575
|
+
{type: verb,
|
|
576
|
+
//accept: {json: "application/json"},
|
|
577
|
+
//contentType: "application/json",
|
|
578
|
+
headers: {"Accept": "application/json",
|
|
579
|
+
"Content-Type": "application/json"},
|
|
580
|
+
data: JSON.stringify(requestArgs),
|
|
581
|
+
processData: false,
|
|
582
|
+
success: function(data, textStatus, jqXHR) {
|
|
583
|
+
var reqInfo = {};
|
|
584
|
+
reqInfo.name = data.result[0].request;
|
|
585
|
+
reqInfo.reqmgr2Only = true;
|
|
586
|
+
$(WMStats.Globals.Event).triggerHandler(WMStats.CustomEvents.RESUBMISSION_SUCCESS, reqInfo);
|
|
587
|
+
},
|
|
588
|
+
error: function(jqXHR, textStatus, errorThrown){
|
|
589
|
+
console.log("call fails, response: " + jqXHR.responseText);
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
},
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
var phedexFuncs = {
|
|
596
|
+
getPFN: function(location, lfn) {
|
|
597
|
+
$.ajax("/phedex/datasvc/json/prod/lfn2pfn",
|
|
598
|
+
{type: 'GET',
|
|
599
|
+
//accept: {json: "application/json"},
|
|
600
|
+
//contentType: "application/json",
|
|
601
|
+
headers: {"Accept": "application/json"},
|
|
602
|
+
data: {node: location,
|
|
603
|
+
protocol: "srmv2",
|
|
604
|
+
lfn: lfn},
|
|
605
|
+
processData: false,
|
|
606
|
+
success: function(data, textStatus, jqXHR) {
|
|
607
|
+
/*
|
|
608
|
+
* returned data format
|
|
609
|
+
*
|
|
610
|
+
* {"phedex":{"mapping":[{"protocol":"srmv2",
|
|
611
|
+
* "custodial":null,"destination":null,"space_token":null,
|
|
612
|
+
* "node":"T2_US_MIT",
|
|
613
|
+
* "lfn":"/store/unmerged/logs/prod/2013/4/4/jen_a_ACDC234Pro_Winter532012DMETParked_FNALPrio4_537p6_130403_042115_5913/DataProcessing/DataProcessingMergeRECOoutput/skim_2012D_METParked/0001/1/00710a8c-9c5e-11e2-9408-003048f02d38-1-1-logArchive.tar.gz",
|
|
614
|
+
* "pfn":"srm://se01.cmsaf.mit.edu:8443/srm/v2/server?SFN=/mnt/hadoop/cms/store/unmerged/logs/prod/2013/4/4/jen_a_ACDC234Pro_Winter532012DMETParked_FNALPrio4_537p6_130403_042115_5913/DataProcessing/DataProcessingMergeRECOoutput/skim_2012D_METParked/0001/1/00710a8c-9c5e-11e2-9408-003048f02d38-1-1-logArchive.tar.gz"
|
|
615
|
+
* }],
|
|
616
|
+
* "request_timestamp":1366230636.06684,"instance":"prod",
|
|
617
|
+
* "request_url":"http://cmsweb.cern.ch:7001/phedex/datasvc/json/prod/lfn2pfn",
|
|
618
|
+
* "request_version":"2.3.15-comp","request_call":"lfn2pfn","call_time":0.02142,
|
|
619
|
+
* "request_date":"2013-04-17 20:30:36 UTC"}}
|
|
620
|
+
*/
|
|
621
|
+
var mappedData = data.phedex.mapping;
|
|
622
|
+
var pfns = [];
|
|
623
|
+
for (var i in mappedData) {
|
|
624
|
+
pfns.push(mappedData[i].pfn);
|
|
625
|
+
}
|
|
626
|
+
$(WMStats.Globals.Event).triggerHandler(WMStats.CustomEvents.PHEDEX_PFN_SUCCESS, pfns);
|
|
627
|
+
},
|
|
628
|
+
error: function(jqXHR, textStatus, errorThrown){
|
|
629
|
+
console.log("call fails, response: " + jqXHR.responseText);
|
|
630
|
+
}
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
};
|
|
634
|
+
|
|
635
|
+
return {
|
|
636
|
+
requestMgr: reqMgrFuncs,
|
|
637
|
+
phedex: phedexFuncs
|
|
638
|
+
};
|
|
639
|
+
})(jQuery);
|