-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Jkmarx/dataset2 launch analysis (#1385)
* 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
Showing
4 changed files
with
74 additions
and
16 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
refinery/ui/source/js/analysis-launch/directives/analysis-launch.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | ||
); |
35 changes: 35 additions & 0 deletions
35
refinery/ui/source/js/analysis-launch/directives/analysis-launch.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>'); | ||
}); | ||
}); |
9 changes: 9 additions & 0 deletions
9
refinery/ui/source/js/analysis-launch/partials/analysis-launch.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
33
refinery/ui/source/js/data-set-nav/partials/files-tab.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters