Skip to content

Commit

Permalink
Fixing problem that if you were in Card View and you were using Advan…
Browse files Browse the repository at this point in the history
…ced Search (which pushes the card view grid down a bit to make room) and then went into a Running experiment dialog, and then exited the dialog, the grid would be overlapping the advanced search widgets. Not sure why the code to adjust that wasn't working, but changing the position change to use Angular conditional classes works.
  • Loading branch information
longdogz committed Oct 13, 2016
1 parent 4f61c9d commit 0c9f9f5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
8 changes: 4 additions & 4 deletions modules/ui/app/scripts/controllers/ExperimentsCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,14 +514,14 @@ angular.module('wasabi.controllers').
if (tmpSearchSettings) {
$scope.data = JSON.parse(tmpSearchSettings);
}
if (!$scope.data.lastSearchWasSimple) {
$scope.showMoreLessSearch(true);
}

if ($scope.data.enableCardView && $scope.data.showGrid) {
$scope.loadCardViewExperiments();
}

if (!$scope.data.lastSearchWasSimple) {
$scope.showMoreLessSearch(true);
}

UtilitiesFactory.hideHeading(false);
UtilitiesFactory.selectTopLevelTab('Experiments');

Expand Down
2 changes: 0 additions & 2 deletions modules/ui/app/scripts/directives/SwitchSearchDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@ angular.module('wasabi.directives').directive('switchSearch', ['$compile',
var showAdvanced = function(doShowAdvanced) {
if (doShowAdvanced) {
$('#experimentsList').css('marginTop', 40);
$('#gridView').css('marginTop', 40);
$('#btnNewExperiment').css('top', 33);
$('#checkToggleListSpan').css('top', 33);

$('#searchMoreLess').attr('title', 'Fewer Search Options').removeClass('spinLeft').addClass('open spinRight');
}
else {
$('#experimentsList').css('marginTop', '');
$('#gridView').css('marginTop', '');
$('#btnNewExperiment').css('top', 0);
$('#checkToggleListSpan').css('top', 0);

Expand Down
6 changes: 5 additions & 1 deletion modules/ui/app/styles/wasabi.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4321,4 +4321,8 @@ form input.ng-dirty.ng-invalid:not(.ng-focused) {

.notAllowed {
cursor: no-drop !important;
}
}

.gridWithAdvanced {
margin-top: 40px;
}
2 changes: 1 addition & 1 deletion modules/ui/app/views/ExperimentTable.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
</div>
</div>

<div ng-if="data.enableCardView" id="gridView" class="leftCol" ng-show="data.showGrid">
<div ng-if="data.enableCardView" id="gridView" ng-class="{gridWithAdvanced: data.showAdvancedSearch}" class="leftCol" ng-show="data.showGrid">
<div ng-if="experiments.length === 0" id="emptyHomeList">You have no running experiments.</div>
<div>
<ul ng-if="experiments.length > 0" id="exprSummary">
Expand Down
3 changes: 2 additions & 1 deletion modules/ui/bin/allow-card-view-exp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ export WASABI_SERVER=http://localhost:8080/api/v1
# CHANGE THIS TO BE YOUR LOGIN
export WASABI_LOGIN=admin:admin
export APP_NAME=WasabiUI
export user=${1:-'admin'}

echo Assigning user to null bucket for experiment CardViewTest
curl -u ${WASABI_LOGIN} -H "Content-Type: application/json" -X PUT -d '{"assignment":null, "overwrite": true }' ${WASABI_SERVER}/assignments/applications/${APP_NAME}/experiments/CardViewTest/users/admin
curl -u ${WASABI_LOGIN} -H "Content-Type: application/json" -X PUT -d '{"assignment":null, "overwrite": true }' ${WASABI_SERVER}/assignments/applications/${APP_NAME}/experiments/CardViewTest/users/$user
echo Assigned user

0 comments on commit 0c9f9f5

Please sign in to comment.