Skip to content

Commit

Permalink
Merge pull request dmwm#4577 from ticoann/wmstats_refactor
Browse files Browse the repository at this point in the history
refactor wmstats
  • Loading branch information
ericvaandering committed Apr 26, 2013
2 parents 489f9cd + ea1ce7c commit cdacd34
Show file tree
Hide file tree
Showing 62 changed files with 1,434 additions and 1,048 deletions.
56 changes: 16 additions & 40 deletions bin/combineMinifyWMStats.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,39 @@
t1_dataStruct = ["DataStruct/T1/WMStats.RequestSummary.js",
"DataStruct/T1/WMStats.CampaignSummary.js",
"DataStruct/T1/WMStats.CMSSWSummary.js",
"DataStruct/T1/WMStats.AgentRequestSummary.js",
"DataStruct/T1/WMStats.ReqMgrRequest.js"]


# tier0 specific library
t0_dataStruct = ["DataStruct/T0/WMStats.RequestSummary.js",
"DataStruct/T0/WMStats.RunSummary.js"]

# analysis specific library
an_dataStruct = ["DataStruct/T1/WMStats.RequestSummary.js",
"DataStruct/T1/WMStats.CampaignSummary.js",
"DataStruct/Analysis/WMStats.UserSummary.js"]
viewModel = ["ViewModels/WMStats.ViewModel.js"]

views = ["Views/Controls/WMStats.CommonControls.js",
views = ["Views/WMStats.CategoryMap.js",
"Views/WMStats.View.IndexHTML.js",
"Views/Controls/WMStats.CommonControls.js",
"Views/Tables/WMStats.Table.js",
"Views/Tables/WMStats.JobSummaryTable.js",
"Views/Tables/WMStats.SiteSummaryTable.js",
"Views/Tables/WMStats.WorkloadSummaryTable.js",
"Views/Tables/WMStats.TableController.js",
"Views/HTMLList/WMStats.JobDetailList.js",
"Views/HTMLList/WMStats.AgentStatusGUI.js",
"Views/HTMLList/WMStats.AgentDetailList.js",
"Views/HTMLList/WMStats.CategoryTitle.js",
"Views/HTMLList/WMStats.RequestTitle.js",
"Views/Graphs/WMStats.SiteHistoryGraph.js"]
"Views/Graphs/WMStats.SiteHistoryGraph.js"
]

# tier1 specific library
t1_views = ["Views/Controls/T1/WMStats.Controls.js",
"Views/Tables/T1/WMStats.ActiveRequestTable.js",
"Views/Tables/T1/WMStats.ActiveRequestTableWithJob.js",
"Views/Tables/T1/WMStats.CampaignSummaryTable.js",
"Views/Tables/T1/WMStats.CMSSWSummaryTable.js",
"Views/Tables/T1/WMStats.AgentRequestSummaryTable.js",
"Views/Tables/T1/addCategoryMap.js",
"Views/HTMLList/T1/WMStats.RequestDetailList.js",
"Views/HTMLList/T1/WMStats.RequestAlertGUI.js",
"Views/HTMLList/T1/WMStats.CategoryDetailList.js",
Expand All @@ -66,23 +70,13 @@
t0_views = ["Views/Controls/T0/WMStats.Controls.js",
"Views/Tables/T0/WMStats.ActiveRequestTable.js",
"Views/Tables/T0/WMStats.RunSummaryTable.js",
"Views/Tables/T0/addCategoryMap.js",
"Views/HTMLList/T0/WMStats.RequestDetailList.js",
"Views/HTMLList/T0/WMStats.RequestAlertGUI.js",
"Views/HTMLList/T0/WMStats.CategoryDetailList.js",
"Views/HTMLList/T0/WMStats.RequestSummaryList.js",
"Views/HTMLList/T0/WMStats.RequestDataList.js"]

# tier1 specific library
an_views = ["Views/Controls/Analysis/WMStats.Controls.js",
"Views/Tables/T1/WMStats.ActiveRequestTable.js",
"Views/Tables/T1/WMStats.CampaignSummaryTable.js",
"Views/Tables/Analysis/WMStats.UserSummaryTable.js",
"Views/HTMLList/Analysis/WMStats.RequestDetailList.js",
"Views/HTMLList/Analysis/WMStats.CategoryDetailList.js",
"Views/HTMLList/T1/WMStats.RequestAlertGUI.js",
"Views/HTMLList/T1/WMStats.RequestSummaryList.js",
"Views/HTMLList/T1/WMStats.RequestDataList.js"]

models =["Models/WMStats._ModelBase.js",
"Models/WMStats._RequestModelBase.js",
"Models/WMStats.JobSummaryModel.js",
Expand All @@ -97,18 +91,11 @@

t0_models =["Models/T0/WMStats.ActiveRequestModel.js"]

an_models =["Models/T1/WMStats.ActiveRequestModel.js"]

controller = ["Controller/WMStats.Env.js",
"Controller/WMStats.GenericController.js",
controller = ["Controller/WMStats.GenericController.js",
"Controller/WMStats.ActiveRequestController.js",
"Controller/WMStats.CategoryMap.js",
"Controller/WMStats.TableController.js",
"Controller/WMStats.WorkloadSummaryController.js"]

t1_controller = ["Controller/T1/addCategoryMap.js"]
t0_controller = ["Controller/T0/addCategoryMap.js"]
an_controller = ["Controller/Analysis/addCategoryMap.js"]

def concatenateFiles(filelist, fileName):
destPath = os.path.join(MINIFIED_DIR, fileName)
Expand All @@ -129,40 +116,29 @@ def concatenateFiles(filelist, fileName):
initLoadDest = 'global.min.js'
t1Dest = 'import-all-t1.min.js'
t0Dest = 'import-all-t0.min.js'
anDest = 'import-all-analysis.min.js'

concatenateFiles(globalLib, initLoadDest)

t1_lib = []
t1_lib.extend(dataStrunct)
t1_lib.extend(t1_dataStruct)
t1_lib.extend(viewModel)
t1_lib.extend(views)
t1_lib.extend(t1_views)
t1_lib.extend(models)
t1_lib.extend(t1_models)
t1_lib.extend(controller)
t1_lib.extend(t1_controller)
concatenateFiles(t1_lib, t1Dest)

t0_lib = []
t0_lib.extend(dataStrunct)
t0_lib.extend(t0_dataStruct)
t0_lib.extend(viewModel)
t0_lib.extend(views)
t0_lib.extend(t0_views)
t0_lib.extend(models)
t0_lib.extend(t0_models)
t0_lib.extend(controller)
t0_lib.extend(t0_controller)
concatenateFiles(t0_lib, t0Dest)

an_lib = []
an_lib.extend(dataStrunct)
an_lib.extend(an_dataStruct)
an_lib.extend(views)
an_lib.extend(an_views)
an_lib.extend(models)
an_lib.extend(an_models)
an_lib.extend(controller)
an_lib.extend(an_controller)
concatenateFiles(an_lib, anDest)


2 changes: 1 addition & 1 deletion src/couchapps/WMStats/_attachments/css/main_layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ legend {
padding: 5px;
}

.agent_detail_box {
.agent_detail_box, .request_error_box{
padding: 3px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
Expand Down
39 changes: 7 additions & 32 deletions src/couchapps/WMStats/_attachments/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
<div class="detail_data hideDiv draggable"></div>
<div class="summary_data"></div>
</div>
<div class="summary_data"></div>
<div id="job_view">
<div id="request_title"></div>
<div class="summary_data"></div>
Expand All @@ -60,6 +59,11 @@
</div>

</div>
<div id="requestAlertPage">
<div class="summary_data"></div>
<div id="alert_job_summary"></div>
<div id="alert_job_detail"></div>
</div>
<div id="agentInfoPage">
<div id="agent_summary"></div>
<div id="agent_detail"></div>
Expand All @@ -83,43 +87,14 @@
</div>
</div>
</body>

<!-- Brings in all the dependencies needed for this couchapp -->
<script src="js/loader.js" type='text/javascript'> </script>

<!-- Globals is needed to be loaded before other library -->
<script src="js/minified/global.min.js" type='text/javascript'> </script>
<script src="js/import-all.min.js" type='text/javascript'> </script>
<script>

function applyTemplate(){
var viewPane = $('#data_board div.viewPane');
$('div.viewTemplate').children().clone().appendTo(viewPane);
}

function retrieveData() {
WMStats.ActiveRequestModel.retrieveData();
WMStats.AgentModel.retrieveData();
//WMStats.HistoryModel.setOptions();
//WMStats.HistoryModel.retrieveData();
}

$(document).ready(function() {
$('#loading_page').addClass("front").show();
//applyTemplate();
WMStats.CommonControls.setLinkTabs("#link_tabs");
WMStats.Controls.setExternalLink("#external_link");
WMStats.CommonControls.setUTCClock("#clock");
WMStats.GenericController.switchPage('#activeRequestPage');
WMStats.CommonControls.setWorkloadSummarySearch("#search_option_board")
WMStats.Controls.setFilter("#filter_board");
WMStats.Controls.setAllRequestButton("#status_board");
WMStats.Controls.setTabs("#tab_board");
WMStats.Controls.setCategoryButton("#category_bar");
WMStats.Controls.setViewSwitchButton("#view_switch_bar");
retrieveData();
//$("div.draggable").draggable();
// 5 min update
setInterval(retrieveData, 300000);
} );
WMStats.View.IndexHTML();
</script>
</html>
39 changes: 7 additions & 32 deletions src/couchapps/WMStats/_attachments/index.html.min
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
<div class="detail_data hideDiv draggable"></div>
<div class="summary_data"></div>
</div>
<div class="summary_data"></div>
<div id="job_view">
<div id="request_title"></div>
<div class="summary_data"></div>
Expand All @@ -60,6 +59,11 @@
</div>

</div>
<div id="requestAlertPage">
<div class="summary_data"></div>
<div id="alert_job_summary"></div>
<div id="alert_job_detail"></div>
</div>
<div id="agentInfoPage">
<div id="agent_summary"></div>
<div id="agent_detail"></div>
Expand All @@ -83,43 +87,14 @@
</div>
</div>
</body>

<!-- Brings in all the dependencies needed for this couchapp -->
<script src="js/loader.js" type='text/javascript'> </script>

<!-- Globals is needed to be loaded before other library -->
<script src="js/minified/global.min.js" type='text/javascript'> </script>
<script src="js/import-all.min.js" type='text/javascript'> </script>
<script>

function applyTemplate(){
var viewPane = $('#data_board div.viewPane');
$('div.viewTemplate').children().clone().appendTo(viewPane);
}

function retrieveData() {
WMStats.ActiveRequestModel.retrieveData();
WMStats.AgentModel.retrieveData();
//WMStats.HistoryModel.setOptions();
//WMStats.HistoryModel.retrieveData();
}

$(document).ready(function() {
$('#loading_page').addClass("front").show();
//applyTemplate();
WMStats.CommonControls.setLinkTabs("#link_tabs");
WMStats.Controls.setExternalLink("#external_link");
WMStats.CommonControls.setUTCClock("#clock");
WMStats.GenericController.switchPage('#activeRequestPage');
WMStats.CommonControls.setWorkloadSummarySearch("#search_option_board")
WMStats.Controls.setFilter("#filter_board");
WMStats.Controls.setAllRequestButton("#status_board");
WMStats.Controls.setTabs("#tab_board");
WMStats.Controls.setCategoryButton("#category_bar");
WMStats.Controls.setViewSwitchButton("#view_switch_bar");
retrieveData();
//$("div.draggable").draggable();
// 5 min update
setInterval(retrieveData, 300000);
} );
WMStats.View.IndexHTML();
</script>
</html>
45 changes: 12 additions & 33 deletions src/couchapps/WMStats/_attachments/index.html.org
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
<div class="detail_data hideDiv draggable"></div>
<div class="summary_data"></div>
</div>
<div class="summary_data"></div>
<div id="job_view">
<div id="request_title"></div>
<div class="summary_data"></div>
Expand All @@ -60,6 +59,11 @@
</div>

</div>
<div id="requestAlertPage">
<div class="summary_data"></div>
<div id="alert_job_summary"></div>
<div id="alert_job_detail"></div>
</div>
<div id="agentInfoPage">
<div id="agent_summary"></div>
<div id="agent_detail"></div>
Expand Down Expand Up @@ -96,45 +100,20 @@
<!-- data structure -->
<script src="js/DataStruct/import.js" type='text/javascript'> </script>

<!-- table gui -->
<!-- view model --->
<script src="js/ViewModels/WMStats.ViewModel.js" type='text/javascript'> </script>

<!-- view -->
<script src="js/Views/import.js" type='text/javascript'> </script>
<script src="js/Views/Controls/import.js" type='text/javascript'> </script>
<script src="js/Views/Tables/import.js" type='text/javascript'> </script>
<script src="js/Views/HTMLList/import.js" type='text/javascript'> </script>
<script src="js/Views/Graphs/import.js" type='text/javascript'> </script>

<!-- Overview.js will load javascripts corresponding to variant dynamically -->
<script src="js/Models/import.js" type='text/javascript'> </script>
<script src="js/Controller/import.js" type='text/javascript'> </script>
<script>

function applyTemplate(){
var viewPane = $('#data_board div.viewPane');
$('div.viewTemplate').children().clone().appendTo(viewPane);
}

function retrieveData() {
WMStats.ActiveRequestModel.retrieveData();
WMStats.AgentModel.retrieveData();
//WMStats.HistoryModel.setOptions();
//WMStats.HistoryModel.retrieveData();
}

$(document).ready(function() {
$('#loading_page').addClass("front").show();
//applyTemplate();
WMStats.CommonControls.setLinkTabs("#link_tabs");
WMStats.Controls.setExternalLink("#external_link");
WMStats.CommonControls.setUTCClock("#clock");
WMStats.GenericController.switchPage('#activeRequestPage');
WMStats.CommonControls.setWorkloadSummarySearch("#search_option_board")
WMStats.Controls.setFilter("#filter_board");
WMStats.Controls.setAllRequestButton("#status_board");
WMStats.Controls.setTabs("#tab_board");
WMStats.Controls.setCategoryButton("#category_bar");
WMStats.Controls.setViewSwitchButton("#view_switch_bar");
retrieveData();
//$("div.draggable").draggable();
// 5 min update
setInterval(retrieveData, 300000);
} );
WMStats.View.IndexHTML();
</script>
</html>

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit cdacd34

Please sign in to comment.