Skip to content

Commit

Permalink
Jkmarx/dataset2 launch analysis (#1385)
Browse files Browse the repository at this point in the history
* Remove tab buttons.

* Remove other orange button references.

* Refactor, remove style.

* Remove style tag.

* Remove unused states.

* Remove hanging div.

* Add conditional for dataset 2.

* Move analysis tab to it's own partial.

* Move details tab to own partial.

* Move files to own partial.

* Tab views.

* Fix unit test.

* Move display into own component.

* Set default to files.

* Add unit test.

* Remove unused code.

* Render pivotMatrixView call from within directive.

* Unwrap provenance-view-tab watcher.

* Add watchers to directive.

* Remove console.log.

* Correct description.

* Update label.

* New launch analysis component.

* Add disable button conditionals.

* Add unit test.
  • Loading branch information
jkmarx committed Sep 1, 2016
1 parent 6cb10d1 commit e469982
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use strict';

function rpAnalysisLaunch () {
return {
restrict: 'E',
templateUrl: '/static/partials/analysis-launch/partials/analysis-launch.html'
};
}

angular
.module('refineryAnalysisLaunch')
.directive('rpAnalysisLaunch', [rpAnalysisLaunch]
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Unit test for analysis launch directive
'use strict';

describe('rpAnalysisLaunch directive unit test', function () {
beforeEach(module('refineryApp'));
beforeEach(module('refineryAnalysisLaunch'));

var compile;
var rootScope;
var scope;
var template;
var directiveElement;

beforeEach(inject(function (
_$compile_,
_$rootScope_,
$templateCache
) {
$templateCache.put(
'/static/partials/analysis-launch/partials/analysis-launch.html',
'<button id="rp-analysis-launch-modal"></button>'
);
compile = _$compile_;
rootScope = _$rootScope_;
scope = rootScope.$new();
template = '<rp-analysis-launch></rp-analysis-launch>';
directiveElement = compile(template)(scope);
scope.$digest();
}));

it('generates the appropriate HTML', function () {
expect(directiveElement.html()).toContain('rp-analysis-launch-modal');
expect(directiveElement.html()).toContain('</button>');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div ng-controller="WorkflowListApiCtrl">
<button
class="btn btn-primary"
rp-analysis-launch-modal
ng-click="open()"
ng-disabled="isLaunchNodesSelectionEmpty() || !currentWorkflow.isAvailable()">
Run Analysis
</button>
</div>
33 changes: 17 additions & 16 deletions refinery/ui/source/js/data-set-nav/partials/files-tab.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
<div class="dataSetTabContent" id="files">
<div class="row">
<div class="col-md-2">
<div class="row">
<div class="col-md-12">
<rp-file-browser-node-group>
</rp-file-browser-node-group>
<rp-file-browser-node-group-buttons>
</rp-file-browser-node-group-buttons>
</div>
</div>

<div class="row y-scrollable">
<div class="col-md-12">
<rp-file-browser-assay-filters>
</rp-file-browser-assay-filters>
</div>
</div>
<div class="col-md-offset-2 col-md-3">
<rp-file-browser-node-group>
</rp-file-browser-node-group>
<rp-file-browser-node-group-buttons>
</rp-file-browser-node-group-buttons>
</div>
<div class="col-md-offset-3 col-md-2">
<rp-select-workflow></rp-select-workflow>
</div>
<div class="col-md-1">
<rp-analysis-launch></rp-analysis-launch>
</div>
</div>

<div class="row y-scrollable">
<div class="col-md-2">
<rp-file-browser-assay-filters>
</rp-file-browser-assay-filters>
</div>
<div class="col-md-10" id="main-area">
<rp-file-display></rp-file-display>
</div>
Expand Down

0 comments on commit e469982

Please sign in to comment.