Revert "Bug 1163064 - Collapse test group chunks down to counts by result and state"

This reverts commit 87efb1dea1.
This commit is contained in:
Cameron Dawson 2015-08-05 15:44:49 -07:00
Родитель 0f31f21ee9
Коммит 2e6b7b56c6
9 изменённых файлов: 120 добавлений и 440 удалений

Просмотреть файл

@ -594,11 +594,6 @@ th-watched-repo {
display: block;
}
.group-state-nav-icon {
width: 7px;
display: inline-block;
}
.job-group {
margin: 0 -3px 0 3px;
}
@ -611,43 +606,6 @@ th-watched-repo {
display: none;
}
.group-btn {
background: transparent;
padding: 0 2px 0 2px;
vertical-align: 0;
line-height: 1.32;
cursor: pointer;
}
.group-btn::before {
content: "+";
}
.group-symbol:hover {
background-color: rgba(208, 228, 250, 0.51);
cursor: pointer;
}
.group-content {
margin-left: -3px;
cursor: pointer;
}
.group-content::before {
content: "("
}
.group-content::after {
content: ")"
}
.group-count-list:hover {
background-color: rgba(208, 228, 250, 0.51);
}
.group-job-list {
margin-left: -3px;
}
.selected-job {
border: 4px solid;
background-color: #fff;
@ -1284,14 +1242,7 @@ ul.failure-summary-list li .btn-xs {
.job-btn.btn-ltgray,
.job-btn.btn-green,
.job-btn.btn-dkblue,
.job-btn.btn-yellow,
.job-btn.btn-pink,
.group-btn.btn-dkgray-count,
.group-btn.btn-ltgray-count,
.group-btn.btn-green-count,
.group-btn.btn-dkblue-count,
.group-btn.btn-yellow-count,
.group-btn.btn-pink-count {
.job-btn.btn-pink {
margin: 0 -5px 0 -1px;
}
@ -1301,29 +1252,6 @@ ul.failure-summary-list li .btn-xs {
margin: 0 -3px 1px 0;
}
.btn-orange-classified::after,
.btn-orange-classified-count::after,
.btn-red-classified::after,
.btn-red-classified-count::after,
.btn-black-classified::after,
.btn-black-classified-count::after,
.btn-green-classified::after,
.btn-green-classified-count::after,
.btn-dkblue-classified::after,
.btn-dkblue-classified-count::after,
.btn-dkgray-classified::after,
.btn-dkgray-classified-count::after,
.btn-ltgray-classified::after,
.btn-ltgray-classified-count::after,
.btn-yellow-classified::after,
.btn-yellow-classified-count::after,
.btn-pink-classified::after,
.btn-pink-classified-count::after,
.btn-purple-classified::after,
.btn-purple-classified-count::after {
content: "*";
}
.btn-view-nav {
background-color: transparent;
border-color: #373d40;
@ -1461,8 +1389,7 @@ fieldset[disabled] .btn-orange.active {
border-color: #dd6602;
}
.btn-orange-classified,
.btn-orange-classified-count {
.btn-orange-classified {
color: #dd6602;
}
.btn-orange-classified:hover,
@ -1519,8 +1446,7 @@ fieldset[disabled] .btn-red.active {
border-color: #c2020e;
}
.btn-red-classified,
.btn-red-classified-count {
.btn-red-classified {
color: #90010a;
}
.btn-red-classified:hover,
@ -1548,10 +1474,7 @@ fieldset[disabled] .btn-red-classified.active {
color: white;
}
.btn-dkblue,
.btn-dkblue-count,
.btn-dkblue-classified,
.btn-dkblue-classified-count {
.btn-dkblue {
color: #283aa2;
font-weight: bold;
}
@ -1580,10 +1503,7 @@ fieldset[disabled] .btn-dkblue.active {
border-color: #2d48d6;
}
.btn-green,
.btn-green-count,
.btn-green-classified,
.btn-green-classified-count {
.btn-green {
color: rgba(2, 130, 51, 0.75);
font-weight: bold;
}
@ -1610,8 +1530,7 @@ fieldset[disabled] .btn-green.active {
border-color: #02c238;
}
.btn-purple
.btn-purple-count {
.btn-purple {
background-color: #9a7da6;
border-color: #6f0296;
color: white;
@ -1641,8 +1560,7 @@ fieldset[disabled] .btn-purple.active {
color: white;
}
.btn-purple-classified,
.btn-purple-classified-count {
.btn-purple-classified {
color: #6f0296;
}
.btn-purple-classified:hover,
@ -1670,10 +1588,7 @@ fieldset[disabled] .btn-purple-classified.active {
color: white;
}
.btn-yellow,
.btn-yellow-count,
.btn-yellow-classified,
.btn-yellow-classified-count {
.btn-yellow {
color: #cdce1d;
font-weight: bold;
}
@ -1699,10 +1614,7 @@ fieldset[disabled] .btn-yellow.active {
border-color: #cdce1d;
}
.btn-ltgray,
.btn-ltgray-count,
.btn-ltgray-classified,
.btn-ltgray-classified-count {
.btn-ltgray {
color: #e0e0e0;
}
.btn-ltgray:hover,
@ -1728,11 +1640,7 @@ fieldset[disabled] .btn-ltgray.active {
border-color: #e0e0e0;
}
.btn-mdgray,
.btn-mdgray-count,
.btn-mdgray-classified,
.btn-mdgray-classified-count
{
.btn-mdgray {
background-color: #bfbfbf;
border-color: #bfbfbf;
}
@ -1779,10 +1687,7 @@ fieldset[disabled] .btn-resultset:hover {
color: white;
}
.btn-dkgray,
.btn-dkgray-count,
.btn-dkgray-classified,
.btn-dkgray-classified-count {
.btn-dkgray {
color: #7c7a7d;
}
.btn-dkgray:hover,
@ -1810,10 +1715,7 @@ fieldset[disabled] .btn-dkgray.active {
color: white;
}
.btn-black
.btn-black-count,
.btn-black-classified,
.btn-black-classified-count {
.btn-black {
background-color: #4a4a4a;
border-color: #000000;
color: white;
@ -1866,10 +1768,7 @@ fieldset[disabled] .btn-black.active {
border-color: #000000;
}
.btn-pink
.btn-pink-count,
.btn-pink-classified,
.btn-pink-classified-count {
.btn-pink {
color: #ff40d9;
font-weight: bold;
}

Просмотреть файл

@ -171,26 +171,13 @@
</script>
<!-- Start span for job groups -->
<script type="'text/ng-template'" id="jobGroupClone.html">
<script type="'text/ng-template'" id="jobGroupBeginClone.html">
<span class="platform-group">
<span class="disabled job-group" title="{{ name }}"
data-grkey="{{ grkey }}">
<span class="group-symbol">{{ symbol }}</span>
<span class="group-content">
<span class="group-job-list"></span>
<span class="group-count-list"></span>
</span>
</span>
<span class="disabled job-group" title="{{ name }}">{{ symbol }}(</span>
<span class="job-group-list"></span>)
</span>
</script>
<!-- Job group count span for each count item -->
<script type="'text/ng-template'" id="jobGroupCountClone.html">
<button class="btn group-btn btn-xs job-group-count {{ btnClass }}"
ignore-job-clear-on-click
title="{{ title }}">{{ value }}</button>
</script>
<!-- Job Btn span -->
<script type="'text/ng-template'" id="jobBtnClone.html">
<button class="btn job-btn btn-xs {{ btnClass }} {{ key }}"

Просмотреть файл

@ -319,17 +319,6 @@ treeherderApp.controller('MainCtrl', [
};
$scope.getGroupState = function() {
return $location.search().group_state || "collapsed";
};
$scope.groupState = $scope.getGroupState();
$scope.toggleGroupState = function() {
var newGroupState = $scope.groupState === "collapsed" ? "expanded" : null;
$location.search("group_state", newGroupState);
};
var getNewReloadTriggerParams = function() {
return _.pick(
$location.search(),
@ -375,13 +364,6 @@ treeherderApp.controller('MainCtrl', [
}
$rootScope.skipNextPageReload = false;
// handle a change in the groupState whether it was by the button
// or directly in the url.
var newGroupState = $scope.getGroupState();
if (newGroupState !== $scope.groupState) {
$scope.groupState = newGroupState;
$rootScope.$emit(thEvents.groupStateChanged);
}
});
$scope.changeRepo = function(repo_name) {

Просмотреть файл

@ -10,13 +10,13 @@ treeherder.directive('thCloneJobs', [
'thServiceDomain', 'thResultStatusInfo', 'thEvents', 'thAggregateIds',
'thJobFilters', 'thResultStatusObject', 'ThResultSetStore',
'ThJobModel', 'linkifyBugsFilter', 'thResultStatus', 'thPlatformName',
'thJobSearchStr', 'thNotify', '$timeout', '$location',
'thJobSearchStr', 'thNotify', '$timeout',
function(
$rootScope, $http, ThLog, thUrl, thCloneHtml,
thServiceDomain, thResultStatusInfo, thEvents, thAggregateIds,
thJobFilters, thResultStatusObject, ThResultSetStore,
ThJobModel, linkifyBugsFilter, thResultStatus, thPlatformName,
thJobSearchStr, thNotify, $timeout, $location){
thJobSearchStr, thNotify, $timeout){
var $log = new ThLog("thCloneJobs");
@ -31,11 +31,8 @@ treeherder.directive('thCloneJobs', [
var jobListNoPadCls = 'job-list-nopad';
var jobListPadCls = 'job-list-pad';
var failResults = ["testfailed", "busted", "exception"];
// Custom Attributes
var jobKeyAttr = 'data-jmkey';
var groupKeyAttr = 'data-grkey';
var tableInterpolator = thCloneHtml.get('resultsetClone').interpolator;
@ -43,10 +40,7 @@ treeherder.directive('thCloneJobs', [
var platformInterpolator = thCloneHtml.get('platformClone').interpolator;
//Instantiate job group interpolator
var jobGroupInterpolator = thCloneHtml.get('jobGroupClone').interpolator;
//Instantiate job group count interpolator
var jobGroupCountInterpolator = thCloneHtml.get('jobGroupCountClone').interpolator;
var jobGroupInterpolator = thCloneHtml.get('jobGroupBeginClone').interpolator;
//Instantiate job btn interpolator
var jobBtnInterpolator = thCloneHtml.get('jobBtnClone').interpolator;
@ -172,170 +166,87 @@ treeherder.directive('thCloneJobs', [
}, 200);
};
/**
* Clicking a group will expand or collapse it. Expanded shows all
* jobs. Collapsed shows counts and failed jobs.
*/
var clickGroupCb = function(el) {
var groupMap = ThResultSetStore.getGroupMap($rootScope.repoName);
var gi = getGroupInfo(el, groupMap);
if (gi) {
if (isGroupExpanded(gi.jgObj)) {
gi.jgObj.groupState = "collapsed";
addGroupJobsAndCounts(gi.jgObj, gi.platformGroupEl);
} else {
gi.grpCountList.empty();
gi.jgObj.groupState = "expanded";
addJobBtnEls(gi.jgObj, gi.grpJobList);
}
}
};
var togglePinJobCb = function(ev, el, job){
$rootScope.$emit(thEvents.jobPin, job);
};
var addJobBtnEls = function(jgObj, jobList) {
var lastJobSelected = ThResultSetStore.getSelectedJob($rootScope.repoName);
var job, l;
var addJobBtnEls = function(
jgObj, jobBtnInterpolator, jobTdEl){
var jobsShown = 0;
var lastJobSelected = ThResultSetStore.getSelectedJob(
$rootScope.repoName
);
var hText, key, resultState, job, jobStatus, jobBtn, l;
var jobBtnArray = [];
jobList.empty();
for(l=0; l<jgObj.jobs.length; l++){
job = jgObj.jobs[l];
job.searchStr = thJobSearchStr(job) + ' ' + job.ref_data_name + ' ' +
job.signature;
//Keep track of visibility with this property. This
//way down stream job consumers don't need to repeatedly
//call showJob
job.visible = thJobFilters.showJob(job);
addJobBtnToArray(job, lastJobSelected, jobBtnArray);
}
jobList.append(jobBtnArray);
};
var addJobBtnToArray = function(job, lastJobSelected, jobBtnArray) {
var hText, key, resultState, jobStatus, jobBtn, l;
hText = getHoverText(job);
key = getJobMapKey(job);
//Set the resultState
resultState = thResultStatus(job);
jobStatus = thResultStatusInfo(resultState, job.failure_classification_id);
jobStatus.key = key;
jobStatus.value = job.job_type_symbol;
jobStatus.title = hText;
jobBtn = $(jobBtnInterpolator(jobStatus));
//If the job is currently selected make sure to re-apply
//the job selection styles
if( !_.isEmpty(lastJobSelected.job) &&
(lastJobSelected.job.id === job.id)){
setSelectJobStyles(jobBtn);
//Update the selected job element to the current one
ThResultSetStore.setSelectedJob(
$rootScope.repoName, jobBtn, job);
}
showHideElement(jobBtn, job.visible);
jobBtnArray.push(jobBtn);
// add a zero-width space between spans so they can wrap
jobBtnArray.push(' ');
};
var getGroupInfo = function(el, groupMap) {
var gi = {};
try {
gi.platformGroupEl = $(el).closest(".platform-group");
gi.grpJobList = gi.platformGroupEl.find(".group-job-list");
gi.grpCountList = gi.platformGroupEl.find(".group-count-list");
gi.key = gi.platformGroupEl.find(".job-group").attr(groupKeyAttr);
gi.jgObj = groupMap[gi.key].grp_obj;
return gi;
} catch(TypeError) {
return null;
}
};
/**
* Group most resultStates as just counts. Keep "failed" as job-btns
*/
var addGroupJobsAndCounts = function(jgObj, platformGroup) {
var ct, job, jobCountBtn, l;
var countAdded = false;
var jobCountBtnArray = [];
var jobBtnArray = [];
var stateCounts = {};
var lastJobSelected = ThResultSetStore.getSelectedJob($rootScope.repoName);
var jobList = platformGroup.find(".group-job-list");
var countList = platformGroup.find(".group-count-list");
jobList.empty();
countList.empty();
for (l = 0; l < jgObj.jobs.length; l++) {
job = jgObj.jobs[l];
job.searchStr = thJobSearchStr(job) + ' ' + job.ref_data_name + ' ' +
job.signature;
//Set the resultState
var resultStatus = thResultStatus(job);
var countInfo = thResultStatusInfo(resultStatus,
job.failure_classification_id);
resultState = thResultStatus(job);
job.searchStr = thJobSearchStr(job) + ' ' + job.ref_data_name + ' ' +
job.signature;
//Make sure that filtering doesn't effect the resultset counts
//displayed
if (thJobFilters.showJob(job)) {
job.visible = true;
if (_.contains(failResults, resultStatus) && job.failure_classification_id === 1) {
// render the job itself, not a count
addJobBtnToArray(job, lastJobSelected, jobBtnArray);
} else {
ct = _.get(_.get(stateCounts, countInfo.btnClass, countInfo),
"count", 0);
countInfo.count = ct+1;
// keep a reference to the job. If there ends up being
// only one for this status, then just add the job itself
// rather than a count.
countInfo.lastJob = job;
stateCounts[countInfo.btnClass] = countInfo;
}
}
}
_.forEach(stateCounts, function(countInfo) {
if (countInfo.count === 1) {
// if there is only 1 job for this status, then just add
// the job, rather than the count
addJobBtnToArray(countInfo.lastJob, lastJobSelected, jobBtnArray);
if(thJobFilters.showJob(job) === false){
//Keep track of visibility with this property. This
//way down stream job consumers don't need to repeatedly
//call showJob
job.visible = false;
} else {
// with more than 1 job for the status, add it as a count
countAdded = true;
countInfo.value = countInfo.count;
countInfo.title = countInfo.count + " " + countInfo.countText + " jobs in group";
countInfo.btnClass = countInfo.btnClass + "-count";
jobCountBtn = $(jobGroupCountInterpolator(countInfo));
jobCountBtnArray.push(jobCountBtn);
jobCountBtnArray.push(' ');
showHideElement(jobCountBtn, true);
jobsShown++;
job.visible = true;
}
});
jobList.append(jobBtnArray);
hText = getHoverText(job);
key = getJobMapKey(job);
if (countAdded) {
countList.append(jobCountBtnArray);
jobStatus = thResultStatusInfo(resultState);
//Add a visual indicator for a failure classification
jobStatus.key = key;
if(parseInt(job.failure_classification_id, 10) > 1){
jobStatus.value = job.job_type_symbol + '*';
if (jobStatus.btnClassClassified) {
// For result types that are displayed more prominently
// when unclassified, switch to the more subtle classified
// style.
jobStatus.btnClass = jobStatus.btnClassClassified;
}
} else {
jobStatus.value = job.job_type_symbol;
}
jobStatus.title = hText;
jobBtn = $( jobBtnInterpolator(jobStatus));
jobBtnArray.push(jobBtn);
// add a zero-width space between spans so they can wrap
jobBtnArray.push(' ');
showHideJob(jobBtn, job.visible);
//If the job is currently selected make sure to re-apply
//the job selection styles
if( !_.isEmpty(lastJobSelected.job) &&
(lastJobSelected.job.id === job.id)){
setSelectJobStyles(jobBtn);
//Update the selected job element to the current one
ThResultSetStore.setSelectedJob(
$rootScope.repoName, jobBtn, job);
}
}
jobTdEl.append(jobBtnArray);
return jobsShown;
};
var jobMouseDown = function(ev){
@ -381,8 +292,6 @@ treeherder.directive('thCloneJobs', [
ThResultSetStore.setSelectedJob($rootScope.repoName, el, job);
} else {
_.bind(clickGroupCb, this, el)();
}
};
@ -491,26 +400,29 @@ treeherder.directive('thCloneJobs', [
//Empty the job column before populating it
jobTdEl.empty();
var jgObj, jobGroup, i;
for(i=0; i<jobGroups.length; i++) {
var jgObj, jobGroup, jobsShown, i;
for(i=0; i<jobGroups.length; i++){
jgObj = jobGroups[i];
if (jgObj.symbol !== '?') {
jobsShown = 0;
if(jgObj.symbol !== '?'){
// Job group detected, add job group symbols
jobGroups[i].grkey = jgObj.mapKey;
jobGroups[i].collapsed = true;
jobGroup = $(jobGroupInterpolator(jobGroups[i]));
jobGroup = $( jobGroupInterpolator(jobGroups[i]) );
jobTdEl.append(jobGroup);
if (isGroupExpanded(jgObj)) {
addJobBtnEls(jgObj, jobGroup.find(".group-job-list"));
} else {
addGroupJobsAndCounts(jgObj, jobGroup);
}
} else {
// Add the job btn spans
addJobBtnEls(jgObj, jobTdEl);
jobsShown = addJobBtnEls(
jgObj, jobBtnInterpolator, jobGroup.find(".job-group-list"));
jobGroup.css("display", jobsShown? "inline": "none");
}else{
// Add the job btn spans
jobsShown = addJobBtnEls(
jgObj, jobBtnInterpolator, jobTdEl);
}
}
row.append(jobTdEl);
@ -534,10 +446,9 @@ treeherder.directive('thCloneJobs', [
job = jobMap[jmKey].job_obj;
show = thJobFilters.showJob(job);
job.visible = show;
showHideElement($(this), show);
});
renderGroups(element, false);
showHideJob($(this), show);
});
// hide platforms and groups where all jobs are hidden
element.find(".platform").each(function internalFilterPlatform() {
@ -546,52 +457,7 @@ treeherder.directive('thCloneJobs', [
});
};
var isGroupExpanded = function(group) {
var singleGroupState = group.groupState || $scope.groupState;
return singleGroupState === "expanded";
};
/**
* Render all the job groups for a resultset. Make decisions on whether
* to render all the jobs in the group, or to collapse them as counts.
*
* If ``resetGroupState`` is set to true, then clear the ``groupState``
* for each group that may have been set when a user clicked on it.
* If false, then honor the choice to expand or collapse an individual
* group and ignore the global setting.
*
* @param element The resultset for which to render the groups.
* @param resetGroupState Whether to reset groups individual expanded
* or collapsed states.
*/
var renderGroups = function(element, resetGroupState) {
var groupMap = ThResultSetStore.getGroupMap($rootScope.repoName);
// with items in the group, it's not as simple as just hiding or
// showing a job or count. Since there can be lots of criteria for whether to show
// or hide a job, and any job hidden or shown will change the counts,
// the counts must be re-created each time.
element.find(".group-job-list").each(function internalFilterGroup(idx, el) {
var gi = getGroupInfo(el, groupMap);
gi.grpJobList.empty();
gi.grpCountList.empty();
if (resetGroupState) {
delete gi.jgObj.groupState;
}
if (isGroupExpanded(gi.jgObj)) {
addJobBtnEls(gi.jgObj, gi.platformGroupEl.find(".group-job-list"));
} else {
addGroupJobsAndCounts(gi.jgObj, gi.platformGroupEl);
}
});
};
/**
* Can be used to show/hide a job or a count of jobs
*/
var showHideElement = function(el, show) {
var showHideJob = function(job, show) {
// Note: I was using
// jobEl.style.display = "inline";
// jobEl.className += " filter-shown";
@ -602,9 +468,9 @@ treeherder.directive('thCloneJobs', [
//
// It would be great to be able to do this without adding/removing a class
if (show) {
el[0].classList.add("filter-shown");
job[0].classList.add("filter-shown");
} else {
el[0].classList.remove("filter-shown");
job[0].classList.remove("filter-shown");
}
};
@ -616,7 +482,7 @@ treeherder.directive('thCloneJobs', [
platform[0].style.display ="table-row";
platform.find(".platform-group").each(function internalFilterGroup() {
var grp = $(this);
showGrp = grp.find('.group-job-list .filter-shown, .group-count-list .filter-shown').length !== 0;
showGrp = grp.find('.job-group-list .filter-shown').length !== 0;
grp[0].style.display = showGrp ? "inline" : "none";
});
@ -752,11 +618,6 @@ treeherder.directive('thCloneJobs', [
_.bind(filterJobs, scope, element)();
});
$rootScope.$on(
thEvents.groupStateChanged, function(ev, filterData){
_.bind(renderGroups, scope, element, true)();
});
$rootScope.$on(
thEvents.searchPage, function(ev, searchData){
_.bind(filterJobs, scope, element)();
@ -873,11 +734,8 @@ treeherder.directive('thCloneJobs', [
}
};
var $scope = null;
var linker = function(scope, element, attrs){
$scope = scope;
//Remove any jquery on() bindings
element.off();

Просмотреть файл

@ -217,7 +217,6 @@ treeherder.factory('ThResultSetStore', [
// maps to help finding objects to update/add
rsMap:{},
jobMap:{},
grpMap:{},
unclassifiedFailureMap: {},
//used as the offset in paging
rsMapOldestTimestamp:null,
@ -256,6 +255,11 @@ treeherder.factory('ThResultSetStore', [
return shownJobs;
};
var getJobMapKey = function(job) {
//Build string key for jobMap entires
return 'key' + job.id;
};
var getSelectedJob = function(repoName){
return { el:repositories[repoName].lastJobElSelected,
job:repositories[repoName].lastJobObjSelected };
@ -326,7 +330,6 @@ treeherder.factory('ThResultSetStore', [
// groups
for (var gp_i = 0; gp_i < pl_obj.groups.length; gp_i++) {
var gr_obj = pl_obj.groups[gp_i];
gr_obj.mapKey = thAggregateIds.getGroupMapKey(rs_obj.id, gr_obj.name, pl_obj.name, pl_obj.option);
var grMapElement = {
grp_obj: gr_obj,
@ -335,21 +338,10 @@ treeherder.factory('ThResultSetStore', [
};
plMapElement.groups[gr_obj.name] = grMapElement;
// check if we need to copy groupState from an existing group
// object. This would be set if a user explicitly clicked
// a group to toggle it expanded/collapsed.
// This value will have been overwritten by the _.extend
// in mapResultSetJobs.
var oldGroup = repositories[repoName].grpMap[gr_obj.mapKey];
if (oldGroup) {
gr_obj.groupState = oldGroup.grp_obj.groupState;
}
repositories[repoName].grpMap[gr_obj.mapKey] = grMapElement;
// jobs
for (var j_i = 0; j_i < gr_obj.jobs.length; j_i++) {
var job_obj = gr_obj.jobs[j_i];
var key = thAggregateIds.getJobMapKey(job_obj);
var key = getJobMapKey(job_obj);
var jobMapElement = {
job_obj: job_obj,
@ -450,7 +442,6 @@ treeherder.factory('ThResultSetStore', [
var grp_obj = {
symbol: groupInfo.symbol,
name: groupInfo.name,
mapKey: groupInfo.mapKey,
jobs: []
};
@ -629,7 +620,7 @@ treeherder.factory('ThResultSetStore', [
*/
var updateJob = function(repoName, newJob) {
var key = thAggregateIds.getJobMapKey(newJob);
var key = getJobMapKey(newJob);
var loadedJobMap = repositories[repoName].jobMap[key];
var loadedJob = loadedJobMap? loadedJobMap.job_obj: null;
var rsMapElement = repositories[repoName].rsMap[newJob.result_set_id];
@ -794,9 +785,6 @@ treeherder.factory('ThResultSetStore', [
// this is a "watchable" for jobs
return repositories[repoName].jobMap;
};
var getGroupMap = function(repoName){
return repositories[repoName].grpMap;
};
var getLoadingStatus = function(repoName){
return repositories[repoName].loadingStatus;
};
@ -908,8 +896,6 @@ treeherder.factory('ThResultSetStore', [
var name = job.job_group_name;
var symbol = job.job_group_symbol;
var mapKey = thAggregateIds.getGroupMapKey(job.result_set_id, name, job.platform, job.platform_option);
if (job.tier && job.tier !== 1) {
if (symbol === "?") {
symbol = "";
@ -919,7 +905,7 @@ treeherder.factory('ThResultSetStore', [
symbol = tierLabel;
}
return {name: name, symbol: symbol, mapKey: mapKey};
return {name: name, symbol: symbol};
};
/*
@ -1048,7 +1034,6 @@ treeherder.factory('ThResultSetStore', [
fetchResultSets: fetchResultSets,
getAllShownJobs: getAllShownJobs,
getJobMap: getJobMap,
getGroupMap: getGroupMap,
getLoadingStatus: getLoadingStatus,
getPlatformKey: getPlatformKey,
getResultSet: getResultSet,

Просмотреть файл

@ -64,7 +64,7 @@ treeherder.provider('thResultStatusObject', function() {
treeherder.provider('thResultStatusInfo', function() {
this.$get = function() {
return function(resultState, failure_classification_id) {
return function(resultState) {
// default if there is no match, used for pending
var resultStatusInfo = {
severity: 100,
@ -77,6 +77,7 @@ treeherder.provider('thResultStatusInfo', function() {
resultStatusInfo = {
severity: 1,
btnClass: "btn-red",
btnClassClassified: "btn-red-classified",
jobButtonIcon: "glyphicon glyphicon-fire",
countText: "busted"
};
@ -85,6 +86,7 @@ treeherder.provider('thResultStatusInfo', function() {
resultStatusInfo = {
severity: 2,
btnClass: "btn-purple",
btnClassClassified: "btn-purple-classified",
jobButtonIcon: "glyphicon glyphicon-fire",
countText: "exception"
};
@ -93,6 +95,7 @@ treeherder.provider('thResultStatusInfo', function() {
resultStatusInfo = {
severity: 3,
btnClass: "btn-orange",
btnClassClassified: "btn-orange-classified",
jobButtonIcon: "glyphicon glyphicon-warning-sign",
countText: "failed"
};
@ -101,6 +104,7 @@ treeherder.provider('thResultStatusInfo', function() {
resultStatusInfo = {
severity: 4,
btnClass: "btn-black",
btnClassClassified: "btn-black-classified",
jobButtonIcon: "",
countText: "unknown"
};
@ -155,11 +159,6 @@ treeherder.provider('thResultStatusInfo', function() {
break;
}
// handle if a job is classified
if(parseInt(failure_classification_id, 10) > 1){
resultStatusInfo.btnClass = resultStatusInfo.btnClass + "-classified";
resultStatusInfo.countText = "classified " + resultStatusInfo.countText;
}
return resultStatusInfo;
};
@ -208,8 +207,6 @@ treeherder.provider('thEvents', function() {
// fired when a global filter has changed
globalFilterChanged: "status-filter-changed-EVT",
groupStateChanged: "group-state-changed-EVT",
toggleRevisions: "toggle-revisions-EVT",
toggleAllRevisions: "toggle-all-revisions-EVT",
@ -260,23 +257,10 @@ treeherder.provider('thAggregateIds', function() {
return escape(repoName + resultsetId + revision);
};
var getGroupMapKey = function(result_set_id, grName, plName, plOpt) {
//Build string key for groupMap entires
return escape(result_set_id + grName + plName + plOpt);
};
var getJobMapKey = function(job) {
//Build string key for jobMap entires
return 'key' + job.id;
};
this.$get = function() {
return {
getPlatformRowId:getPlatformRowId,
getResultsetTableId:getResultsetTableId,
getJobMapKey: getJobMapKey,
getGroupMapKey: getGroupMapKey,
escape: escape
getResultsetTableId:getResultsetTableId
};
};
});

Просмотреть файл

@ -36,8 +36,7 @@ treeherder.factory('thCloneHtml', [
'resultsetClone.html',
'platformClone.html',
'jobTdClone.html',
'jobGroupClone.html',
'jobGroupCountClone.html',
'jobGroupBeginClone.html',
'jobBtnClone.html',
'revisionUrlClone.html',
'pushlogRevisionsClone.html'

Просмотреть файл

@ -36,7 +36,7 @@
<span class="btn btn-sm btn-resultset"
tabindex="0" role="button"
title="Pin all available jobs in this resultset"
title="Pin all visible jobs in this resultset"
ignore-job-clear-on-click
ng-click="pinAllShownJobs()">
<span class="glyphicon glyphicon-pushpin"

Просмотреть файл

@ -38,21 +38,7 @@
</span>
</span>
<!--Toggle Group State Button-->
<span class="btn-group">
<span class="btn btn-view-nav btn-sm btn-toggle-group-state"
tabindex="0" role="button"
ng-click="toggleGroupState()">(
<span ng-if="groupState==='collapsed'"
class="group-state-nav-icon"
title="Expand job groups">+</span>
<span ng-if="groupState!=='collapsed'"
class="group-state-nav-icon"
title="Collapse job groups">-</span>
)</span>
</span>
<!--Search Field-->
<!--Quick Filter Field-->
<span ng-controller="SearchCtrl" class="form-group form-inline" id="quick-filter-parent">
<input id="quick-filter"
title="Click to enter filter values"