Skip to content
This repository has been archived by the owner on Apr 5, 2018. It is now read-only.

Commit

Permalink
Merge pull request #41 from ga4gh/feature/new_layout
Browse files Browse the repository at this point in the history
Feature/new layout
  • Loading branch information
Andrew Duncan committed Apr 22, 2016
2 parents 29ef182 + 5dec9fd commit 64485eb
Show file tree
Hide file tree
Showing 26 changed files with 452 additions and 121 deletions.
Binary file added app/images/dockstore-documentation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/dockstore-tools-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/dockstore-tools-purple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/dockstore-workflows-green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/dockstore-workflows-purple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@
<div id="footer">
<div class="container">
<div class="footer">
<span class="about">
<a class="white-link" href="/docs/about">About Dockstore</a>
</span>
<span class="contact">
Can't find what you're looking for?
<a href="https://gitter.im/common-workflow-language/common-workflow-language">Chat With Us on Gitter&raquo;</a>
<a class="white-link" href="https://gitter.im/common-workflow-language/common-workflow-language">Chat With Us on Gitter&raquo;</a>
</span>
<span class="social">
<img src="images/github.png"><a href="https://github.com/ga4gh/dockstore">Github Repository</a>
Expand Down
61 changes: 60 additions & 1 deletion app/scripts/controllers/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,56 @@
angular.module('dockstore.ui')
.controller('HomeCtrl', [
'$scope',
'$rootScope',
'$q',
'$location',
'ContainerService',
'WorkflowService',
'UserService',
'NotificationService',
function ($scope, $q, ContainerService, UserService, NtfnService) {
function ($scope, $rootScope, $q, $location, ContainerService, WorkflowService, UserService, NtfnService) {

$scope.userObj = UserService.getUserObj();
$scope.searchMode = 'Tool';
$scope.tabMode = 'Tool';

$scope.selectWorkflow = function() {
$scope.searchMode = 'Workflow';
}

$scope.selectTool = function() {
$scope.searchMode = 'Tool';
}

$scope.selectWorkflowTab = function() {
$scope.tabMode = 'Workflow';
}

$scope.selectToolTab = function() {
$scope.tabMode = 'Tool';
}



$scope.$watch('searchQueryContainer', function(newValue, oldValue) {
$rootScope.searchQueryContainer = newValue;
});

$scope.$watch('searchQueryWorkflow', function(newValue, oldValue) {
$rootScope.searchQueryWorkflow = newValue;
});

$scope.$on('$routeChangeStart', function(event, next, current) {
if ($location.url().indexOf('/search-containers') === -1) {
$scope.searchQueryContainer = '';
}
});

$scope.$on('$routeChangeStart', function(event, next, current) {
if ($location.url().indexOf('/search-workflows') === -1) {
$scope.searchQueryWorkflow = '';
}
});

$scope.listPublishedContainers = function() {
return ContainerService.getPublishedContainerList()
Expand All @@ -33,6 +76,22 @@ angular.module('dockstore.ui')
);
};

$scope.listPublishedWorkflows = function() {
return WorkflowService.getPublishedWorkflowList()
.then(
function(workflows) {
$scope.workflows = workflows;
},
function(response) {
var message = '[HTTP ' + response.status + '] ' +
response.statusText + ': ' + response.data;
NtfnService.popError('List Published Workflows', message);
return $q.reject(response);
}
);
};

$scope.listPublishedContainers();
$scope.listPublishedWorkflows();

}]);
22 changes: 0 additions & 22 deletions app/scripts/controllers/navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ angular.module('dockstore.ui')
UserService, NtfnService) {

$scope.userObj = UserService.getUserObj();
$scope.searchMode = 'Tool';

$scope.isAuthenticated = function() {
return $auth.isAuthenticated();
Expand All @@ -41,27 +40,6 @@ angular.module('dockstore.ui')
}
};


$scope.$watch('searchQueryContainer', function(newValue, oldValue) {
$rootScope.searchQueryContainer = newValue;
});

$scope.$watch('searchQueryWorkflow', function(newValue, oldValue) {
$rootScope.searchQueryWorkflow = newValue;
});

$scope.$on('$routeChangeStart', function(event, next, current) {
if ($location.url().indexOf('/search-containers') === -1) {
$scope.searchQueryContainer = '';
}
});

$scope.$on('$routeChangeStart', function(event, next, current) {
if ($location.url().indexOf('/search-workflows') === -1) {
$scope.searchQueryWorkflow = '';
}
});

}]).filter('shortenString', function() {
return function (string, scope) {
if (string !== null && string.length > 10) {
Expand Down
3 changes: 1 addition & 2 deletions app/scripts/controllers/registerworkflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ angular.module('dockstore.ui')
'$q',
'WorkflowService',
function ($scope, $q, WorkflowService) {

$scope.registerWorkflow = function() {
$scope.setWorkflowEditError(null);
var workflowObj = $scope.getNormalizedWorkflowObj($scope.workflowObj);
Expand All @@ -28,7 +27,7 @@ angular.module('dockstore.ui')
$scope.createWorkflow = function(workflowObj) {
if ($scope.savingActive) return;
$scope.savingActive = true;
return WorkflowService.createWorkflow($scope.workflowObj.scrProvider, workflowObj.gitUrl, workflowObj.default_workflow_path, workflowObj.workflowName)
return WorkflowService.createWorkflow($scope.workflowObj.scrProvider, workflowObj.gitUrl, workflowObj.default_workflow_path, workflowObj.workflowName, $scope.workflowObj.descriptorType)
.then(
function(workflowObj) {
return workflowObj;
Expand Down
22 changes: 22 additions & 0 deletions app/scripts/controllers/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,28 @@ angular.module('dockstore.ui')
$rootScope.searchQueryContainer = $routeParams.searchQueryContainer;
}

$scope.$watch('searchQueryContainer', function(newValue, oldValue) {
$rootScope.searchQueryContainer = newValue;
});

$scope.$watch('searchQueryWorkflow', function(newValue, oldValue) {
$rootScope.searchQueryWorkflow = newValue;
});

$scope.$on('$routeChangeStart', function(event, next, current) {
if ($location.url().indexOf('/search-containers') === -1) {
$scope.searchQueryContainer = '';
}
});

$scope.$on('$routeChangeStart', function(event, next, current) {
if ($location.url().indexOf('/search-workflows') === -1) {
$scope.searchQueryWorkflow = '';
}
});

$scope.listPublishedContainers();

$("#toolSearch").focus();

}]);
22 changes: 22 additions & 0 deletions app/scripts/controllers/searchworkflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,28 @@ angular.module('dockstore.ui')
$rootScope.searchQueryWorkflow = $routeParams.searchQueryWorkflow;
}

$scope.$watch('searchQueryContainer', function(newValue, oldValue) {
$rootScope.searchQueryContainer = newValue;
});

$scope.$watch('searchQueryWorkflow', function(newValue, oldValue) {
$rootScope.searchQueryWorkflow = newValue;
});

$scope.$on('$routeChangeStart', function(event, next, current) {
if ($location.url().indexOf('/search-containers') === -1) {
$scope.searchQueryContainer = '';
}
});

$scope.$on('$routeChangeStart', function(event, next, current) {
if ($location.url().indexOf('/search-workflows') === -1) {
$scope.searchQueryWorkflow = '';
}
});

$scope.listPublishedWorkflows();

$("#workflowSearch").focus();

}]);
1 change: 1 addition & 0 deletions app/scripts/controllers/workfloweditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ angular.module('dockstore.ui')
default_workflow_path: '/Dockstore.cwl',
is_published: false,
scrProvider: 'GitHub',
descriptorType: 'cwl'
};
};

Expand Down
10 changes: 0 additions & 10 deletions app/scripts/controllers/workflowsgrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,6 @@ angular.module('dockstore.ui')
return start + ' to ' + end + ' of ' + $scope.filteredWorkflows.length;
};

$scope.getDescriptorType = function(workflowObj) {
var workflowVersions = workflowObj.workflowVersions;
for (var i = 0; i < workflowVersions.length; i++) {
if (workflowVersions[i].sourceFiles.length > 0) {
return $scope.getHumanReadableDescriptor(workflowVersions[i].sourceFiles[0].type);
}
}
return 'n/a';
};

$scope.getHumanReadableDescriptor = function(descriptor) {
switch(descriptor) {
case 'DOCKSTORE_CWL':
Expand Down
5 changes: 3 additions & 2 deletions app/scripts/services/workflowservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ angular.module('dockstore.ui')
});
};

this.createWorkflow = function(workflowRegistry, workflowPath, workflowDescriptorPath, workflowName) {
this.createWorkflow = function(workflowRegistry, workflowPath, workflowDescriptorPath, workflowName, descriptorType) {
return $q(function(resolve, reject) {
$http({
method: 'POST',
Expand All @@ -157,7 +157,8 @@ angular.module('dockstore.ui')
workflowRegistry : workflowRegistry,
workflowPath : workflowPath,
defaultWorkflowPath : workflowDescriptorPath,
workflowName : workflowName
workflowName : workflowName,
descriptorType : descriptorType
}
}).then(function(response) {
resolve(response.data);
Expand Down
7 changes: 6 additions & 1 deletion app/styles/ds-style-fix.scss
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ div.details-container {
}
div.ds-tabs > div {
border: solid 1px #cfd1d7;
max-width: 802px;
max-width: 870px;
}

ul.nav-tabs {
Expand Down Expand Up @@ -267,6 +267,11 @@ div.footer > span.contact {
float: left;
}

div.footer > span.about {
float: left;
padding-right:25px;
}

div.form-error-messages p {
color: #ff0000;
}
Expand Down
Loading

0 comments on commit 64485eb

Please sign in to comment.