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
reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/ViewModels/WMStats.ViewModel.js
ADDED
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
/** abstract environment of the web page */
|
|
2
|
+
WMStats.namespace("_ViewModelBase");
|
|
3
|
+
|
|
4
|
+
WMStats._ViewModelBase = function (observableObj) {
|
|
5
|
+
this._eventObj = {};
|
|
6
|
+
this._eventObjName = "_eventObj";
|
|
7
|
+
// special observable property holding represented data
|
|
8
|
+
this.data = this.observable('data', null);
|
|
9
|
+
if (observableObj !== undefined) {
|
|
10
|
+
this._createObservableProperty(observableObj);
|
|
11
|
+
};
|
|
12
|
+
this._selector = null;
|
|
13
|
+
this._data = null;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
WMStats._ViewModelBase.prototype = {
|
|
17
|
+
|
|
18
|
+
observable: function(property, defaultValue) {
|
|
19
|
+
|
|
20
|
+
var _previousValue = defaultValue;
|
|
21
|
+
var _property = property;
|
|
22
|
+
|
|
23
|
+
function publish(value, noTrigger) {
|
|
24
|
+
if (value !== undefined) {
|
|
25
|
+
_previousValue = value;
|
|
26
|
+
//TODO: check the equality
|
|
27
|
+
/* trigger parent object changed */
|
|
28
|
+
if (!noTrigger) {
|
|
29
|
+
$(this._eventObj).triggerHandler(this._eventObjName, this);
|
|
30
|
+
/* trigger property changed */
|
|
31
|
+
$(this._eventObj).triggerHandler(_property, value);
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
return this;
|
|
35
|
+
} else {
|
|
36
|
+
return _previousValue;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return publish;
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
subscribe: function() {
|
|
43
|
+
/*
|
|
44
|
+
* takes 1 or 2 arguments
|
|
45
|
+
* if 1, it is callback function when this object changes
|
|
46
|
+
* if 2. 1st is property name and 2nd is callback function
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
var callback;
|
|
50
|
+
var eventName;
|
|
51
|
+
if (arguments.length == 2) {
|
|
52
|
+
callback = arguments[1];
|
|
53
|
+
eventName = arguments[0];
|
|
54
|
+
} else if (arguments.length == 1) {
|
|
55
|
+
callback = arguments[0];
|
|
56
|
+
eventName = this._eventObjName;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
$(this._eventObj).on(eventName, callback);
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
id: function(selector) {
|
|
63
|
+
// link the selector with the ViewModel
|
|
64
|
+
// may need to connect multiple selector
|
|
65
|
+
if (selector) {
|
|
66
|
+
this._selector = selector;
|
|
67
|
+
WMStats.ViewModel.Registry[selector] = this;
|
|
68
|
+
return this;
|
|
69
|
+
} else {
|
|
70
|
+
return this._selector;
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
_createObservableProperty: function(observableObj) {
|
|
75
|
+
for (var prop in observableObj) {
|
|
76
|
+
this[prop] = this.observable(prop, observableObj[prop]);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
WMStats.namespace("ViewModel");
|
|
82
|
+
|
|
83
|
+
WMStats.ViewModel = (function (){
|
|
84
|
+
var properties = {page: null};
|
|
85
|
+
var vm = new WMStats._ViewModelBase(properties);
|
|
86
|
+
vm.propagateUpdate = function() {
|
|
87
|
+
if (vm.page().propagateUpdate) {
|
|
88
|
+
vm.page().propagateUpdate();
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
return vm;
|
|
92
|
+
})();
|
|
93
|
+
|
|
94
|
+
// create WMStats.ViewModel properties
|
|
95
|
+
(function(vm) {
|
|
96
|
+
|
|
97
|
+
vm.Registry ={};
|
|
98
|
+
|
|
99
|
+
vm.ActiveRequestPage = (function (){
|
|
100
|
+
var properties = {view: null,
|
|
101
|
+
filter: {},
|
|
102
|
+
filteredStats: null,
|
|
103
|
+
refreshCount: 0};
|
|
104
|
+
var requestPage = new WMStats._ViewModelBase(properties);
|
|
105
|
+
|
|
106
|
+
requestPage.propagateUpdate = function() {
|
|
107
|
+
var requestData = WMStats.ActiveRequestModel.getData();
|
|
108
|
+
if (requestData === null) {
|
|
109
|
+
return false;
|
|
110
|
+
} else {
|
|
111
|
+
var filter = vm.ActiveRequestPage.filter();
|
|
112
|
+
vm.ActiveRequestPage.data(requestData.filterRequests(filter));
|
|
113
|
+
if (requestPage.view().propagateUpdate) {
|
|
114
|
+
requestPage.view().propagateUpdate();
|
|
115
|
+
}
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
return requestPage;
|
|
121
|
+
})();
|
|
122
|
+
|
|
123
|
+
vm.RequestAlertPage = (function (){
|
|
124
|
+
var alertPage = new WMStats._ViewModelBase();
|
|
125
|
+
|
|
126
|
+
alertPage.propagateUpdate = function() {
|
|
127
|
+
var requestData = WMStats.ActiveRequestModel.getData();
|
|
128
|
+
if (requestData === null) {
|
|
129
|
+
return false;
|
|
130
|
+
} else {
|
|
131
|
+
vm.RequestAlertPage.data(requestData);
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
return alertPage;
|
|
137
|
+
})();
|
|
138
|
+
|
|
139
|
+
vm.AgentPage = (function (){
|
|
140
|
+
var agentPage =new WMStats._ViewModelBase();
|
|
141
|
+
|
|
142
|
+
agentPage.propagateUpdate = function() {
|
|
143
|
+
var agentData = WMStats.AgentModel.getData();
|
|
144
|
+
if (agentData === null) {
|
|
145
|
+
return false;
|
|
146
|
+
} else {
|
|
147
|
+
vm.AgentPage.data(agentData);
|
|
148
|
+
return true;
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
return agentPage;
|
|
152
|
+
})();
|
|
153
|
+
|
|
154
|
+
vm.LogDBPage = (function (){
|
|
155
|
+
var logDBPage =new WMStats._ViewModelBase();
|
|
156
|
+
|
|
157
|
+
logDBPage.propagateUpdate = function() {
|
|
158
|
+
|
|
159
|
+
var logDBData = WMStats.RequestLogModel.getData();
|
|
160
|
+
if (logDBData === null) {
|
|
161
|
+
return false;
|
|
162
|
+
} else {
|
|
163
|
+
vm.LogDBPage.data(logDBData);
|
|
164
|
+
return true;
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
return logDBPage;
|
|
168
|
+
})();
|
|
169
|
+
|
|
170
|
+
vm.SearchPage = (function (){
|
|
171
|
+
/*
|
|
172
|
+
* keys contain {searchCategory: blah, searchValue: blah}
|
|
173
|
+
*/
|
|
174
|
+
var properties = {keys: null};
|
|
175
|
+
searchPage = new WMStats._ViewModelBase(properties);
|
|
176
|
+
|
|
177
|
+
searchPage.retrieveData = function(keys) {
|
|
178
|
+
var selectedSearch = keys.searchCategory;
|
|
179
|
+
var searchStr = keys.searchValue;
|
|
180
|
+
var view;
|
|
181
|
+
var options = {'include_docs': true, 'reduce': false};
|
|
182
|
+
if (selectedSearch === 'request') {
|
|
183
|
+
view = "allDocs";
|
|
184
|
+
options.key = searchStr;
|
|
185
|
+
} else if (selectedSearch === 'outputdataset') {
|
|
186
|
+
view = "byoutputdataset";
|
|
187
|
+
options.key = searchStr;
|
|
188
|
+
} else if (selectedSearch === 'inputdataset') {
|
|
189
|
+
view = "byinputdataset";
|
|
190
|
+
options.key = searchStr;
|
|
191
|
+
} else if (selectedSearch === 'prep_id') {
|
|
192
|
+
view = "byprepid";
|
|
193
|
+
options.key = searchStr;
|
|
194
|
+
} else if (selectedSearch === 'data_pileup') {
|
|
195
|
+
view = "bydatapileup";
|
|
196
|
+
options.key = searchStr;
|
|
197
|
+
} else if (selectedSearch === 'mc_pileup') {
|
|
198
|
+
view = "bymcpileup";
|
|
199
|
+
options.key = searchStr;
|
|
200
|
+
} else if (selectedSearch === 'request_date') {
|
|
201
|
+
view = "bydate";
|
|
202
|
+
var beginDate = $('input[name="dateRange1"]').val().split("/");
|
|
203
|
+
var endDate = $('input[name="dateRange2"]').val().split("/");
|
|
204
|
+
options.startkey = [Number(beginDate[0]), Number(beginDate[1]), Number(beginDate[2])];
|
|
205
|
+
options.endkey = [Number(endDate[0]), Number(endDate[1]), Number(endDate[2]), {}];
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
WMStats.RequestSearchModel.retrieveData(view, options);
|
|
209
|
+
};
|
|
210
|
+
return searchPage;
|
|
211
|
+
})();
|
|
212
|
+
|
|
213
|
+
vm.CategoryView = (function (){
|
|
214
|
+
|
|
215
|
+
var properties = {category: null,
|
|
216
|
+
detailView: null};
|
|
217
|
+
|
|
218
|
+
var categoryView = new WMStats._ViewModelBase(properties);
|
|
219
|
+
|
|
220
|
+
categoryView.convertToCategoryData = function (requestData) {
|
|
221
|
+
if (requestData === undefined) {
|
|
222
|
+
requestData = vm.ActiveRequestPage.data();
|
|
223
|
+
}
|
|
224
|
+
var category = this.category().name();
|
|
225
|
+
var summaryStruct = WMStats.CategorySummaryMap.get(this.category().name());
|
|
226
|
+
var categoryData = WMStats.RequestsByKey(category, summaryStruct);
|
|
227
|
+
categoryData.categorize(requestData);
|
|
228
|
+
return categoryData;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
categoryView.propagateUpdate = function() {
|
|
232
|
+
if (vm.ActiveRequestPage.data() === null) {
|
|
233
|
+
return false;
|
|
234
|
+
};
|
|
235
|
+
categoryView.data(categoryView.convertToCategoryData());
|
|
236
|
+
return true;
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
return categoryView;
|
|
240
|
+
})();
|
|
241
|
+
|
|
242
|
+
vm.RequestView = (function (){
|
|
243
|
+
/*
|
|
244
|
+
* format is progress or numJobs - this is tied to name of the button
|
|
245
|
+
* un tie.
|
|
246
|
+
*/
|
|
247
|
+
|
|
248
|
+
var properties = {categoryKey: "all",
|
|
249
|
+
format: null,
|
|
250
|
+
detailView: null};
|
|
251
|
+
|
|
252
|
+
var requestView = new WMStats._ViewModelBase(properties);
|
|
253
|
+
|
|
254
|
+
requestView.propagateUpdate = function() {
|
|
255
|
+
if (vm.ActiveRequestPage.data() === null) {
|
|
256
|
+
return false;
|
|
257
|
+
};
|
|
258
|
+
if (requestView.categoryKey() == "all") {
|
|
259
|
+
requestView.data(vm.ActiveRequestPage.data());
|
|
260
|
+
} else {
|
|
261
|
+
var categoryData = vm.CategoryView.convertToCategoryData();
|
|
262
|
+
var data = categoryData.getRequestData(requestView.categoryKey());
|
|
263
|
+
requestView.data(data);
|
|
264
|
+
};
|
|
265
|
+
return true;
|
|
266
|
+
};
|
|
267
|
+
//TODO: hack for assigning for category map
|
|
268
|
+
requestView.categoryName = "requests";
|
|
269
|
+
return requestView;
|
|
270
|
+
})();
|
|
271
|
+
|
|
272
|
+
vm.TaskView = (function (){
|
|
273
|
+
/*
|
|
274
|
+
* TODO: not done need to replace in TaskSummary Table.
|
|
275
|
+
*/
|
|
276
|
+
|
|
277
|
+
var properties = {requestName: null};
|
|
278
|
+
|
|
279
|
+
var taskView = new WMStats._ViewModelBase(properties);
|
|
280
|
+
|
|
281
|
+
taskView.propagateUpdate = function() {
|
|
282
|
+
if (taskView.requestName()) {
|
|
283
|
+
taskView.data(WMStats.ActiveRequestModel.getData().getTasks(taskView.requestName()));
|
|
284
|
+
return false;
|
|
285
|
+
} else {
|
|
286
|
+
return false;
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
return taskView;
|
|
290
|
+
})();
|
|
291
|
+
|
|
292
|
+
function createJobSummaryView(){
|
|
293
|
+
var properties = {requestName: null, detail: null};
|
|
294
|
+
var jobView = new WMStats._ViewModelBase(properties);
|
|
295
|
+
|
|
296
|
+
jobView.retrieveData = function(requestName) {
|
|
297
|
+
WMStats.JobSummaryModel.setRequest(requestName);
|
|
298
|
+
WMStats.JobSummaryModel.retrieveData();
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
jobView.propagateUpdate = function() {
|
|
302
|
+
|
|
303
|
+
/* this part is needed if you want to refresh the job view when data is updated */
|
|
304
|
+
if (jobView.requestName()) {
|
|
305
|
+
jobView.retrieveData(jobView.requestName());
|
|
306
|
+
return false;
|
|
307
|
+
} else {
|
|
308
|
+
return false;
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
jobView.updateDataAndChild = function(data) {
|
|
313
|
+
if (data) {jobView.data(data);}
|
|
314
|
+
if (jobView.detail().propagateUpdate) {
|
|
315
|
+
jobView.detail().propagateUpdate();
|
|
316
|
+
return true;
|
|
317
|
+
}
|
|
318
|
+
return false;
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
return jobView;
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
vm.JobView = createJobSummaryView();
|
|
325
|
+
vm.AlertJobView = createJobSummaryView();
|
|
326
|
+
|
|
327
|
+
vm.CampaignCategory = (function (){
|
|
328
|
+
return new WMStats._ViewModelBase({name: "campaign"});
|
|
329
|
+
})();
|
|
330
|
+
|
|
331
|
+
vm.SiteCategory = (function (){
|
|
332
|
+
return new WMStats._ViewModelBase({name: "sites"});
|
|
333
|
+
})();
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
vm.CMSSWCategory = (function (){
|
|
337
|
+
return new WMStats._ViewModelBase({name: "cmssw"});
|
|
338
|
+
})();
|
|
339
|
+
|
|
340
|
+
vm.AgentCategory = (function (){
|
|
341
|
+
return new WMStats._ViewModelBase({name: "agent"});
|
|
342
|
+
})();
|
|
343
|
+
|
|
344
|
+
vm.RunCategory = (function (){
|
|
345
|
+
return new WMStats._ViewModelBase({name: "run"});
|
|
346
|
+
})();
|
|
347
|
+
|
|
348
|
+
/* request view summary format */
|
|
349
|
+
vm.RequestProgress = (function (){
|
|
350
|
+
return new WMStats._ViewModelBase({name: "progress"});
|
|
351
|
+
})();
|
|
352
|
+
|
|
353
|
+
vm.RequestJobs = (function (){
|
|
354
|
+
return new WMStats._ViewModelBase({name: "numJobs"});
|
|
355
|
+
})();
|
|
356
|
+
|
|
357
|
+
/* request view job detail */
|
|
358
|
+
vm.CategoryDetail = (function (){
|
|
359
|
+
var properties = {categoryKey: null};
|
|
360
|
+
var categoryDetail = new WMStats._ViewModelBase(properties);
|
|
361
|
+
|
|
362
|
+
categoryDetail.propagateUpdate = function() {
|
|
363
|
+
if (categoryDetail.categoryKey()) {
|
|
364
|
+
var allData = vm.CategoryView.data();
|
|
365
|
+
categoryDetail.data(allData.getData(categoryDetail.categoryKey()));
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
return categoryDetail;
|
|
369
|
+
})();
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
vm.RequestDetail = (function (){
|
|
373
|
+
var properties = {requestName: null};
|
|
374
|
+
var requestDetail = new WMStats._ViewModelBase(properties);
|
|
375
|
+
requestDetail.open = false;
|
|
376
|
+
return requestDetail;
|
|
377
|
+
})();
|
|
378
|
+
|
|
379
|
+
function createJobDetailView(){
|
|
380
|
+
var properties = {keys: null, indexID: null};
|
|
381
|
+
var jobDetail = new WMStats._ViewModelBase(properties);
|
|
382
|
+
|
|
383
|
+
jobDetail.retrieveData = function(keys) {
|
|
384
|
+
WMStats.JobDetailModel.setOptions(keys);
|
|
385
|
+
WMStats.JobDetailModel.retrieveData();
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
jobDetail.propagateUpdate = function() {
|
|
389
|
+
/* this part is needed if you want to refresh the job view when data is updated */
|
|
390
|
+
if (jobDetail.keys() !== null) {
|
|
391
|
+
jobDetail.retrieveData(jobDetail.keys());
|
|
392
|
+
return true;
|
|
393
|
+
} else {
|
|
394
|
+
return false;
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
return jobDetail;
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
vm.JobDetail = createJobDetailView();
|
|
402
|
+
vm.AlertJobDetail = createJobDetailView();
|
|
403
|
+
|
|
404
|
+
vm.Resubmission = (function (){
|
|
405
|
+
/* resubmission keys contains
|
|
406
|
+
* requestName and taskName and acdc url
|
|
407
|
+
* {requestName: blah, task: blah, acdcURL: blah}
|
|
408
|
+
* */
|
|
409
|
+
|
|
410
|
+
var properties = {keys: null};
|
|
411
|
+
var resubmission = new WMStats._ViewModelBase(properties);
|
|
412
|
+
|
|
413
|
+
resubmission.retrieveData = function(keys) {
|
|
414
|
+
WMStats.ReqMgrRequestModel.retrieveDoc(keys.requestName);
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
resubmission.formatResubmissionData = function(reqMgrRequest) {
|
|
418
|
+
var summary = {};
|
|
419
|
+
// from resubmission keys
|
|
420
|
+
summary.RequestType = "Resubmission";
|
|
421
|
+
summary.OriginalRequestName = resubmission.keys().requestName;
|
|
422
|
+
summary.InitialTaskPath = resubmission.keys().task;
|
|
423
|
+
if (resubmission.keys().acdcURL) {
|
|
424
|
+
//TODO: if there is not acdc_url don't create the button'
|
|
425
|
+
var acdcServiceUrl = WMStats.Utils.splitCouchServiceURL(resubmission.keys().acdcURL);
|
|
426
|
+
summary.ACDCServer = acdcServiceUrl.couchUrl;
|
|
427
|
+
summary.ACDCDatabase = acdcServiceUrl.couchdb;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
var requestInfo = reqMgrRequest.getData();
|
|
431
|
+
// passed to wmstats view
|
|
432
|
+
summary.RequestString = WMStats.Utils.acdcRequestSting(summary.OriginalRequestName, requestInfo.Requestor);
|
|
433
|
+
summary.Campaign = requestInfo.Campaign;
|
|
434
|
+
summary.RequestPriority = requestInfo.RequestPriority;
|
|
435
|
+
|
|
436
|
+
//TODO get the site white list from acdc db. (site might be overflowed)
|
|
437
|
+
// assign more value for acdc assignment
|
|
438
|
+
summary.Team = requestInfo.Team;
|
|
439
|
+
summary.TrustPUSitelists = false;
|
|
440
|
+
summary.TrustSitelists = false;
|
|
441
|
+
|
|
442
|
+
return summary;
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
resubmission.propagateUpdate = function() {
|
|
446
|
+
if (resubmission.keys() !== null) {
|
|
447
|
+
resubmission.retrieveData(resubmission.keys());
|
|
448
|
+
return true;
|
|
449
|
+
} else {
|
|
450
|
+
return false;
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
return resubmission;
|
|
455
|
+
})();
|
|
456
|
+
|
|
457
|
+
vm.initialize = (function (){
|
|
458
|
+
//default setting
|
|
459
|
+
vm.page(vm.ActiveRequestPage, true);
|
|
460
|
+
vm.ActiveRequestPage.view(vm.CategoryView, true);
|
|
461
|
+
vm.CategoryView.category(vm.CampaignCategory, true);
|
|
462
|
+
vm.RequestView.format(vm.RequestProgress, true);
|
|
463
|
+
vm.JobView.detail(vm.JobDetail, true);
|
|
464
|
+
})();
|
|
465
|
+
|
|
466
|
+
})(WMStats.ViewModel);
|
|
467
|
+
|
|
468
|
+
// control inside the view model
|
|
469
|
+
(function(vm){
|
|
470
|
+
// filter control
|
|
471
|
+
vm.ActiveRequestPage.subscribe("filter", function() {
|
|
472
|
+
vm.ActiveRequestPage.propagateUpdate();
|
|
473
|
+
});
|
|
474
|
+
|
|
475
|
+
vm.SearchPage.subscribe("keys", function(){
|
|
476
|
+
vm.SearchPage.retrieveData(vm.SearchPage.keys());
|
|
477
|
+
});
|
|
478
|
+
|
|
479
|
+
vm.CategoryView.subscribe("category", function() {
|
|
480
|
+
vm.CategoryView.propagateUpdate();
|
|
481
|
+
});
|
|
482
|
+
|
|
483
|
+
vm.RequestView.subscribe("categoryKey", function() {
|
|
484
|
+
vm.ActiveRequestPage.view(vm.RequestView);
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
vm.JobView.subscribe("requestName", function() {
|
|
488
|
+
vm.ActiveRequestPage.view(vm.JobView);
|
|
489
|
+
});
|
|
490
|
+
|
|
491
|
+
vm.AlertJobView.subscribe("requestName", function() {
|
|
492
|
+
vm.AlertJobView.retrieveData(vm.AlertJobView.requestName());
|
|
493
|
+
});
|
|
494
|
+
|
|
495
|
+
vm.CategoryDetail.subscribe("categoryKey", function() {
|
|
496
|
+
vm.CategoryDetail.propagateUpdate();
|
|
497
|
+
});
|
|
498
|
+
|
|
499
|
+
vm.JobDetail.subscribe("keys", function() {
|
|
500
|
+
vm.JobDetail.retrieveData(vm.JobDetail.keys());
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
vm.AlertJobDetail.subscribe("keys", function() {
|
|
504
|
+
vm.AlertJobDetail.retrieveData(vm.AlertJobDetail.keys());
|
|
505
|
+
});
|
|
506
|
+
|
|
507
|
+
vm.Resubmission.subscribe("keys", function() {
|
|
508
|
+
vm.Resubmission.retrieveData(vm.Resubmission.keys());
|
|
509
|
+
});
|
|
510
|
+
|
|
511
|
+
})(WMStats.ViewModel);
|
reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/T0/WMStats.Controls.js
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
WMStats.namespace("Controls");
|
|
2
|
+
WMStats.Controls = function($){
|
|
3
|
+
var _filterSelector;
|
|
4
|
+
var _categorySelector;
|
|
5
|
+
var vm = WMStats.ViewModel;
|
|
6
|
+
var vmRegistry = WMStats.ViewModel.Registry;
|
|
7
|
+
|
|
8
|
+
function setFilter(selector) {
|
|
9
|
+
var inputFilter = '<div name="filter">\
|
|
10
|
+
workflow: <input name="workflow" value=""></input>\
|
|
11
|
+
status: <input name="request_status" value=""></input>\
|
|
12
|
+
run: <input name="run" value=""></input>\
|
|
13
|
+
</div>';
|
|
14
|
+
$(selector).append(inputFilter);
|
|
15
|
+
_filterSelector = selector + ' div[name="filter"] input';
|
|
16
|
+
|
|
17
|
+
$(document).on('keyup', selector + " input",
|
|
18
|
+
function() { WMStats.Utils.delay(function() {
|
|
19
|
+
//change the view model filter value
|
|
20
|
+
WMStats.ViewModel.ActiveRequestPage.filter(WMStats.Utils.createInputFilter(_filterSelector));
|
|
21
|
+
|
|
22
|
+
}, 300)});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function setCategoryButton(selector) {
|
|
26
|
+
|
|
27
|
+
vm.CategoryView.category(vm.RunCategory);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
function setViewSwitchButton(selector) {
|
|
31
|
+
var viewSwitchBottons =
|
|
32
|
+
'<nav id="view_switch_button" class="button-group">\
|
|
33
|
+
<ul><li><a href="#progress" class="nav-button nav-button-selected"> progress </a></li>\
|
|
34
|
+
</nav>';
|
|
35
|
+
|
|
36
|
+
$(selector).append(viewSwitchBottons);
|
|
37
|
+
|
|
38
|
+
$(document).on('click', "#view_switch_button li a", function(event){
|
|
39
|
+
// format is either progress or numJobs need to decouple the name
|
|
40
|
+
var buttonName = this.hash.substring(1);
|
|
41
|
+
var requestFormat;
|
|
42
|
+
if (buttonName === "progress") {
|
|
43
|
+
requestFormat = vm.RequestProgress;
|
|
44
|
+
}
|
|
45
|
+
vm.RequestView.format(requestFormat);
|
|
46
|
+
// this might not be the efficient way. or directly update the table.
|
|
47
|
+
vm.RequestView.propagateUpdate();
|
|
48
|
+
$("#view_switch_button li a").removeClass("nav-button-selected").addClass("button-unselected");
|
|
49
|
+
$(this).addClass("nav-button-selected");
|
|
50
|
+
event.preventDefault();
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
function setAllRequestButton(selector) {
|
|
55
|
+
var requestButtons =
|
|
56
|
+
'<nav id="all_requests" class="button-group">\
|
|
57
|
+
<ul><li><a href="#" class="nav-button"> all requests </a></li></ul>\
|
|
58
|
+
</nav>';
|
|
59
|
+
|
|
60
|
+
$(selector).append(requestButtons).addClass("button-group");
|
|
61
|
+
|
|
62
|
+
$(document).on('click', "#all_requests li a", function(event){
|
|
63
|
+
vm.RequestView.categoryKey("all");
|
|
64
|
+
event.preventDefault();
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
vm.RequestView.subscribe("categoryKey", function(){
|
|
68
|
+
var buttonSelector = "#all_requests li a";
|
|
69
|
+
if (vm.RequestView.categoryKey() === "all") {
|
|
70
|
+
$(buttonSelector).removeClass("button-unselected").addClass("nav-button-selected");
|
|
71
|
+
} else {
|
|
72
|
+
$(buttonSelector).removeClass("nav-button-selected").addClass("button-unselected");
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
function getFilter() {
|
|
78
|
+
return WMStats.Utils.createInputFilter(_filterSelector);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
function setTabs(selector) {
|
|
83
|
+
var tabs = '<ul><li class="first"><a href="#category_view">Run</a></li>\
|
|
84
|
+
<li><a href="#request_view">» Requests</a></li>\
|
|
85
|
+
<li><a href="#job_view">» Jobs</a></li></ul>';
|
|
86
|
+
|
|
87
|
+
$(selector).append(tabs).addClass("tabs");
|
|
88
|
+
$(selector + " ul").addClass("tabs-nav");
|
|
89
|
+
|
|
90
|
+
// add controller for this view
|
|
91
|
+
function changeTab(event, data) {
|
|
92
|
+
$(selector + ' li').removeClass("tabs-selected");
|
|
93
|
+
$(selector + ' a[href="' + data.id() +'"]').parent().addClass("tabs-selected");
|
|
94
|
+
}
|
|
95
|
+
// viewModel -> view control
|
|
96
|
+
vm.ActiveRequestPage.subscribe("view", changeTab);
|
|
97
|
+
|
|
98
|
+
// view -> viewModel control
|
|
99
|
+
$(document).on('click', selector + " li a", function(event){
|
|
100
|
+
vm.ActiveRequestPage.view(vmRegistry[this.hash]);
|
|
101
|
+
//vm.CategoryView.category(vm.RunCategory);
|
|
102
|
+
event.preventDefault();
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
setFilter: setFilter,
|
|
108
|
+
setTabs: setTabs,
|
|
109
|
+
setCategoryButton: setCategoryButton,
|
|
110
|
+
setAllRequestButton: setAllRequestButton,
|
|
111
|
+
setViewSwitchButton: setViewSwitchButton,
|
|
112
|
+
getFilter: getFilter,
|
|
113
|
+
requests: "requests",
|
|
114
|
+
sites: "sites",
|
|
115
|
+
run: "run"
|
|
116
|
+
};
|
|
117
|
+
}(jQuery);
|