Skip to content

Commit

Permalink
Investigating snapshot diff updates (#393)
Browse files Browse the repository at this point in the history
* small cleanup after looking at queriesCtrl

* small cleans

* one more remnant!

Co-authored-by: epugh@opensourceconnections.com <>
  • Loading branch information
epugh committed Aug 6, 2021
1 parent 2c5d745 commit 77b272c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 20 deletions.
Expand Up @@ -6,11 +6,9 @@ angular.module('QuepidApp')
.controller('QueryExplainCtrl', [
'$uibModal',
'$scope',
'$log',
function (
$uibModal,
$scope,
$log
$scope
) {
var ctrl = this;
ctrl.query = $scope.query;
Expand All @@ -29,12 +27,8 @@ angular.module('QuepidApp')
});

modalInstance.result.then(
function() {

},
function() {
$log.info('INFO: Modal dismissed');
}
function() { },
function() { }
);
}
}
Expand Down
19 changes: 11 additions & 8 deletions app/assets/javascripts/controllers/queriesCtrl.js
Expand Up @@ -2,7 +2,7 @@
/*jslint latedef:false*/

angular.module('QuepidApp')
.controller('queriesCtrl', [
.controller('QueriesCtrl', [
'$scope',
'$rootScope',
'$q',
Expand Down Expand Up @@ -206,27 +206,30 @@ angular.module('QuepidApp')
};

$scope.queries.selectedDiffName = function() {
var diffName = '';
if (queryViewSvc.diffSetting === null) {
return 'disabled';
diffName = 'disabled';
}
else if (queryViewSvc.diffSetting === 'best') {
return 'target';
diffName = 'target';
} else {
return 'snapshot';
diffName = 'snapshot';
}
return 'meow';
return diffName;
};

$scope.queries.fullDiffName = function() {
var fullDiffName = '';
if (queryViewSvc.diffSetting === null) {
return 'disabled';
fullDiffName = 'disabled';
}
else if (queryViewSvc.diffSetting === 'best') {
return 'Highest ratest results for each query';
fullDiffName = 'Highest ratest results for each query';
} else {
var snapshot = querySnapshotSvc.snapshots[queryViewSvc.diffSetting];
return snapshot.name();
fullDiffName = snapshot.name();
}
return fullDiffName;
};

function saveScoring() {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/directives/queries.js
Expand Up @@ -6,7 +6,7 @@ angular.module('QuepidApp')
return {
restrict: 'E',
transclude: true,
controller: 'queriesCtrl',
controller: 'QueriesCtrl',
templateUrl: 'views/queries.html',
replace: true
};
Expand Down
2 changes: 1 addition & 1 deletion app/assets/templates/views/queriesLayout.html
Expand Up @@ -3,7 +3,7 @@
<div class="pane_main results-control">
<div id="case-header" class="row">
<div class="col-sm-12">
<div ng-controller="queriesCtrl" style="display: inline-block">
<div ng-controller="QueriesCtrl" style="display: inline-block">
<qscore
class="case-score"
diff-label="queries.selectedDiffName()"
Expand Down
1 change: 0 additions & 1 deletion app/assets/templates/views/searchResults.html
Expand Up @@ -8,7 +8,6 @@
diff-label="''"
full-diff-name="''"
max-score="maxScore || 100";
ng-click="pickUnitTestScorer()"
scorable="query"
score-label="''"
score-type="'query'"
Expand Down

0 comments on commit 77b272c

Please sign in to comment.