diff --git a/dcc-portal-ui/app/scripts/advanced/views/advanced.facets.genes.html b/dcc-portal-ui/app/scripts/advanced/views/advanced.facets.genes.html index c27db5f95..e718bba65 100644 --- a/dcc-portal-ui/app/scripts/advanced/views/advanced.facets.genes.html +++ b/dcc-portal-ui/app/scripts/advanced/views/advanced.facets.genes.html @@ -48,5 +48,5 @@

  • + data-placeholder="{{'e.g. chr12:43566-3457633' | translate}}"> diff --git a/dcc-portal-ui/app/scripts/advanced/views/advanced.facets.mutations.html b/dcc-portal-ui/app/scripts/advanced/views/advanced.facets.mutations.html index 7dcf4689b..191a564b8 100644 --- a/dcc-portal-ui/app/scripts/advanced/views/advanced.facets.mutations.html +++ b/dcc-portal-ui/app/scripts/advanced/views/advanced.facets.mutations.html @@ -34,6 +34,6 @@ data-facet="AdvancedCtrl.Mutation.mutations.facets.verificationStatus">
  • + data-placeholder="{{'e.g. chr12:43566-3457633' | translate}}" > diff --git a/dcc-portal-ui/app/scripts/app/js/app.js b/dcc-portal-ui/app/scripts/app/js/app.js index 8528697df..e80156943 100644 --- a/dcc-portal-ui/app/scripts/app/js/app.js +++ b/dcc-portal-ui/app/scripts/app/js/app.js @@ -603,9 +603,9 @@ if (response.status !== 401 && response.status !== -1) { console.error('Response Error: ', toJson (response)); } - + if (response.status === 500) { - Notify.setMessage ('' + response.data.message || response.statusText); + Notify.setParams(response); Notify.showErrors(); } else if (response.status === 404) { console.error(response.data.message); diff --git a/dcc-portal-ui/app/scripts/common/js/external.js b/dcc-portal-ui/app/scripts/common/js/external.js index c30255aaf..d31e39e11 100644 --- a/dcc-portal-ui/app/scripts/common/js/external.js +++ b/dcc-portal-ui/app/scripts/common/js/external.js @@ -86,20 +86,14 @@ this.projectSNP = function() { return 'http://www.ncbi.nlm.nih.gov/SNP/'; }; - this.projectTCGA = function() { - return 'http://cancergenome.nih.gov/'; - }; + this.projectGDCLegacy = () => 'https://gdc-portal.nci.nih.gov/legacy-archive'; this.projectGEO = function() { return 'http://www.ncbi.nlm.nih.gov/geo/'; }; this.projectEGA = function() { return 'https://ega-archive.org/'; }; - this.projectCGHub = function(diseasesCode) { - return 'https://browser.cghub.ucsc.edu/search/?disease_abbr=' + diseasesCode; - }; - - + this.projectGDCActive = () => 'https://gdc-portal.nci.nih.gov'; }); diff --git a/dcc-portal-ui/app/scripts/common/js/notify.js b/dcc-portal-ui/app/scripts/common/js/notify.js index 11daee57e..668d36653 100644 --- a/dcc-portal-ui/app/scripts/common/js/notify.js +++ b/dcc-portal-ui/app/scripts/common/js/notify.js @@ -26,6 +26,8 @@ error = false, message = '', theme = ''; + + let params = {}; function isVisible() { return !!visible; @@ -71,6 +73,16 @@ message = m; } + const setParams = (response) => { + if(!_.isEmpty(response)){ + params.headers = response.headers(); + params.source = response.config.url; + params.message = response.data.message || response.statusText; + } + }; + + const getParams = () => params; + function getMessage() { return message; } @@ -95,22 +107,26 @@ } return { - isVisible: isVisible, - show: show, - showErrors: showErrors, - hide: hide, - redirectHome: redirectHome, - setMessage: setMessage, - getMessage: getMessage, - setRemovable: setRemovable, - isRemovable: isRemovable, - setTheme: setTheme, - getTheme: getTheme + isVisible, + show, + showErrors, + hide, + redirectHome, + setParams, + getParams, + setMessage, + getMessage, + setRemovable, + isRemovable, + setTheme, + getTheme }; }); module.controller('NotifyCtrl', function ($scope, Page, Notify) { $scope.notify = Notify; + $scope.responseParams = $scope.notify.getParams(); + $scope.$on('$locationChangeSuccess', function() { if (Notify.isVisible() && Page.page() !== 'error') { Notify.hide(); @@ -124,17 +140,41 @@ replace: true, controller: 'NotifyCtrl', scope: true, - template: '
    ' + - '
    ' + - '
    ' + - ''+ - 'Home' + - '  ' + - '' + - 'Close' + - '
    ' + - '
    ' + - '
    ' + template: `
    +
    +
    + + An error occured while performing the requested operation. + See details + for more information. + +
    +
    + + We have created an error report that you can send to help us improve ICGC Portal. + Email error report. + +
    +
    + +
    +
    ` }; }); })(); diff --git a/dcc-portal-ui/app/scripts/downloader/js/request.js b/dcc-portal-ui/app/scripts/downloader/js/request.js index 7955a3386..1b4a55e46 100644 --- a/dcc-portal-ui/app/scripts/downloader/js/request.js +++ b/dcc-portal-ui/app/scripts/downloader/js/request.js @@ -118,7 +118,7 @@ $scope.dlTotal = 0; // Compute the total number of donors - Donors.handler.get('count', {filters: filters}).then(function (data) { + Donors.handler.get('count', {filters: filters}).then( (data) => { $scope.totalDonor = data; }); @@ -133,13 +133,12 @@ // Re-order it based on importance $scope.params.dataTypes = $filter('orderBy')($scope.params.dataTypes, sortFunc); - - $scope.params.processing = false; - },function (error) { + }, (error) => { if(error.status === 503){ - $scope.params.processing = false; $scope.params.downloadEnabled = false; - } + } + }).finally(() => { + $scope.params.processing = false; }); }; diff --git a/dcc-portal-ui/app/scripts/facets/js/terms.js b/dcc-portal-ui/app/scripts/facets/js/terms.js index ae7471df8..2fc38b2e4 100644 --- a/dcc-portal-ui/app/scripts/facets/js/terms.js +++ b/dcc-portal-ui/app/scripts/facets/js/terms.js @@ -24,6 +24,7 @@ function ($scope, $filter, Facets, HighchartsService, ProjectCache, ValueTranslator, LocationService) { $scope.resetPaginationOnChange = _.isUndefined($scope.resetPaginationOnChange) ? true : $scope.resetPaginationOnChange; + $scope.search = {}; // Translation on UI is slow, do in here function addTranslations (terms, facetName, missingText) { @@ -180,7 +181,10 @@ iconGetter: '&iconGetter', showWhenEmpty: '<', - resetPaginationOnChange: '<' + resetPaginationOnChange: '<', + + //Search Config + searchIconShowLimit : '@' }, transclude: true, templateUrl: '/scripts/facets/views/terms.html', diff --git a/dcc-portal-ui/app/scripts/facets/styles/_facets.scss b/dcc-portal-ui/app/scripts/facets/styles/_facets.scss index c6d6c5ccd..a5122b453 100644 --- a/dcc-portal-ui/app/scripts/facets/styles/_facets.scss +++ b/dcc-portal-ui/app/scripts/facets/styles/_facets.scss @@ -21,10 +21,25 @@ $foregroundRed: #ff654b; size: 1.1rem; weight: 300; } + + .t_facets_facet_search_icon{ + i{ + font-size: 1.5rem; + } + } + + .t_facets__facet__search{ + input{ + font-size: 1rem; + } + } } .t_facets__facet__title_active { border-left-color: $orangeLight; + .t_facets_facet_search_icon{ + margin-right: -.5rem; + } } .t_facets__facet__title__label { @@ -317,5 +332,5 @@ $togglerFontSize: 10px; } .t_facet_location_search{ - margin: 0px 0px 10px 0px; + margin: 10px 0px 10px 0px; } \ No newline at end of file diff --git a/dcc-portal-ui/app/scripts/facets/views/terms.html b/dcc-portal-ui/app/scripts/facets/views/terms.html index da7c673fa..f252e77fa 100644 --- a/dcc-portal-ui/app/scripts/facets/views/terms.html +++ b/dcc-portal-ui/app/scripts/facets/views/terms.html @@ -7,6 +7,19 @@ + + + + + +