From 70acf2df7da9343657348e701585ecb9c7254d5c Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Fri, 7 Dec 2018 14:09:23 +0000 Subject: [PATCH] Properties: update files with latest properties Sidebar: Remove "manage" word in sidebar add link to invite & notifications settings Dashboard: Remove "manage" word Stats: enable/disable all fix issue Zenodo communities: add loading add remove button for newly aded communities git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@54208 d315682c-612b-4755-9ff5-7f18f6832af3 --- connect-admin-beta-properties.json | 16 ++++-- connect-admin-production-properties.json | 16 ++++-- src/app/app.component.html | 53 ++++++++++--------- src/app/app.component.ts | 7 ++- src/app/dashboard.component.html | 30 ++++++----- src/app/pages/stats/stats.component.ts | 7 ++- .../add-zenodo-communities.component.html | 14 +++-- .../add-zenodo-communities.component.ts | 27 ++++++---- src/assets/env-properties.json | 11 ---- 9 files changed, 108 insertions(+), 73 deletions(-) diff --git a/connect-admin-beta-properties.json b/connect-admin-beta-properties.json index 8cd3c5e..bc2e78a 100644 --- a/connect-admin-beta-properties.json +++ b/connect-admin-beta-properties.json @@ -4,9 +4,9 @@ "useCache" : true, "metricsAPIURL" : "https://beta.services.openaire.eu/usagestats/", "framesAPIURL" : "https://beta.openaire.eu/stats3/", + "claimsAPIURL" : "https://beta.services.openaire.eu/claims/rest/claimsService/", "statisticsAPIURL" : "https://beta.services.openaire.eu/stats-api/", "statisticsFrameAPIURL":"https://beta.openaire.eu/stats/", - "claimsAPIURL" : "https://beta.services.openaire.eu/claims/rest/claimsService/", "searchAPIURLLAst" : "https://beta.services.openaire.eu/search/v2/api/", "searchResourcesAPIURL" : "https://beta.services.openaire.eu/search/v2/api/resources", "csvAPIURL" : "https://beta.services.openaire.eu/search/v2/api/reports", @@ -19,6 +19,7 @@ "pmcURL" : "http://europepmc.org/articles/", "handleURL" : "http://hdl.handle.net/", "zenodo" : "https://zenodo.org/", + "zenodoCommunities" : "https://zenodo.org/api/communities/", "openAccess" : "https://www.openaire.eu/support/faq#article-id-234", "openAccessRepo" : "https://www.openaire.eu/support/faq#article-id-310", "fp7Guidlines" : "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme", @@ -48,7 +49,6 @@ "adminToolsAPIURL" :"https://beta.services.openaire.eu/uoa-admin-tools/", "adminToolsCommunity" :"openaire", - "communityAPI": "https://beta.services.openaire.eu/openaire/community/", "miningBackendURL": "https://beta.services.openaire.eu/interactive-mining", @@ -85,5 +85,15 @@ "searchLinkToAdvancedSoftware" : "/search/advanced/software", "searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders", "searchLinkToAdvancedOrganizations" : "/search/advanced/organizations", - "searchLinkToAdvancedPeople" : "/search/advanced/people" + "searchLinkToAdvancedPeople" : "/search/advanced/people", + + "sendMailUrl": "https://beta.services.openaire.eu/uoa-admin-tools/sendMail", + "notifyForNewManagers": "https://beta.services.openaire.eu/uoa-admin-tools/notifyForNewManagers/", + "notifyForNewSubscribers": "https://beta.services.openaire.eu/uoa-admin-tools/notifyForNewSubscribers/", + + "lastIndexInformationLink" : "https://beta.openaire.eu/aggregation-and-content-provision-workflows", + "showLastIndexInformationLink" : true, + + "widgetLink" : "https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=", + "claimsInformationLink": "https://beta.openaire.eu/linking" } diff --git a/connect-admin-production-properties.json b/connect-admin-production-properties.json index 4ec0dfa..1e6b37d 100644 --- a/connect-admin-production-properties.json +++ b/connect-admin-production-properties.json @@ -4,9 +4,9 @@ "useCache" : true, "metricsAPIURL" : "https://services.openaire.eu/usagestats/", "framesAPIURL" : "https://www.openaire.eu/stats3/", + "claimsAPIURL" : "https://services.openaire.eu/claims/rest/claimsService/", "statisticsAPIURL" : "https://beta.services.openaire.eu/stats-api/", "statisticsFrameAPIURL":"https://www.openaire.eu/stats/", - "claimsAPIURL" : "https://services.openaire.eu/claims/rest/claimsService/", "searchAPIURLLAst" : "https://services.openaire.eu/search/v2/api/", "searchResourcesAPIURL" : "https://services.openaire.eu/search/v2/api/resources", "csvAPIURL" : "https://services.openaire.eu/search/v2/api/reports", @@ -19,6 +19,7 @@ "pmcURL" : "http://europepmc.org/articles/", "handleURL" : "http://hdl.handle.net/", "zenodo" : "https://zenodo.org/", + "zenodoCommunities" : "https://zenodo.org/api/communities/", "openAccess" : "https://www.openaire.eu/support/faq#article-id-234", "openAccessRepo" : "https://www.openaire.eu/support/faq#article-id-310", "fp7Guidlines" : "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme", @@ -48,7 +49,6 @@ "adminToolsAPIURL" :"https://services.openaire.eu/uoa-admin-tools/", "adminToolsCommunity" :"openaire", - "communityAPI": "https://services.openaire.eu/openaire/community/", "miningBackendURL": "https://beta.services.openaire.eu/interactive-mining", @@ -85,5 +85,15 @@ "searchLinkToAdvancedSoftware" : "/search/advanced/software", "searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders", "searchLinkToAdvancedOrganizations" : "/search/advanced/organizations", - "searchLinkToAdvancedPeople" : "/search/advanced/people" + "searchLinkToAdvancedPeople" : "/search/advanced/people", + + "sendMailUrl": "https://services.openaire.eu/uoa-admin-tools/sendMail", + "notifyForNewManagers": "https://services.openaire.eu/uoa-admin-tools/notifyForNewManagers/", + "notifyForNewSubscribers": "https://services.openaire.eu/uoa-admin-tools/notifyForNewSubscribers/", + + "lastIndexInformationLink" : "https://www.openaire.eu/aggregation-and-content-provision-workflows", + "showLastIndexInformationLink" : true, + + "widgetLink" : "https://www.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=", + "claimsInformationLink": "https://www.openaire.eu/linking" } diff --git a/src/app/app.component.html b/src/app/app.component.html index a3e1490..f2bb46c 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,4 +1,4 @@ - +
@@ -9,13 +9,13 @@ - Dashboard + Overview
  • - Manage community + Community
  • - Manage community content + Community content
  • - Manage classes for help text + Classes for help text
    • @@ -74,7 +74,7 @@
    • - Manage entities & pages + Entities & pages @@ -127,7 +127,7 @@
    • - Manage help texts + Help texts
      • @@ -148,7 +148,7 @@ - Manage statistics & charts + Statistics & charts
      • @@ -156,7 +156,7 @@ - Manage claims + Links @@ -164,23 +164,28 @@ - Manage text mining rules + Text mining rules
      • - Manage users + Users
        • - Manage subscribers + Subscribers + +
        • +
        • + + Invite to subscribe
        • - Manage notification settings + Notification settings
        • diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 93c9820..e209323 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -81,7 +81,7 @@ constructor( private route: ActivatedRoute, private propertiesService:Environm this.community = {id: com.communityId, name: (com.shortTitle)?com.shortTitle:com.title, logoUrl:com.logoUrl}; this.communityType = com.type; this.menuItems= [ - {rootItem: new MenuItem("dashboard","Administration Dashboard","/dashboard","/dashboard",false,[],[],{communityId:com.communityId}), + {rootItem: new MenuItem("dashboard","Overview","/dashboard","/dashboard",false,[],[],{communityId:com.communityId}), items: [] } ]; @@ -94,7 +94,10 @@ constructor( private route: ActivatedRoute, private propertiesService:Environm ]; } } - this.userMenuItems.push(new MenuItem("manage-user-notifications","Manage notification settings","","/manage-user-notifications",false,[],[],{communityId: com.communityId})); + if(this.communityId){ + this.userMenuItems.push(new MenuItem("manage-user-notifications","Manage notification settings","","/manage-user-notifications",false,[],[],{communityId: this.communityId})); + } + }, error => { diff --git a/src/app/dashboard.component.html b/src/app/dashboard.component.html index 0d1fe8a..e1a0267 100644 --- a/src/app/dashboard.component.html +++ b/src/app/dashboard.component.html @@ -6,7 +6,7 @@

          - Community Profile + Profile

          Edit community information, change logo url, add community managers or subjects related to community.

          Edit Community Profile

          @@ -14,13 +14,14 @@

          - Manage community content + Content

          - Manage projects and content providers that are related to the research community. + Manage projects, content providers{{(communityType && communityType != 'ri')?', subjects':''}} and zenodo communities that are related to the research community.

          - Manage projects
          - Manage content providers
          - Manage subjects
          + Projects
          + Content providers
          + Zenodo communities
          + Subjects

          @@ -31,7 +32,7 @@

          Manage statistical numbers & charts that will be displayed in the dashboard and monitor pages. - Manage statistics & charts + Statistics & charts

          @@ -39,11 +40,11 @@

          - Claims + Links

          Manage user claims related to the research community.

          - Manage claims + Links

          @@ -53,8 +54,8 @@ Add or edit help text in research community pages.

          - Add help texts in pages
          - Add help texts in classes + Help texts in pages
          + Help texts in classes

          @@ -64,7 +65,7 @@ Manage text mining rules, test the rules and see the results, save and load mining profiles.

          - Manage text mining rules + Text mining rules

          @@ -72,9 +73,10 @@ Users + Manage subscibers, invite more users to subscibe, manage your notification settings.

          - Manage subscribers + Subscribers
          @@ -82,7 +84,7 @@
          - Manage notification settings + Notification settings

          diff --git a/src/app/pages/stats/stats.component.ts b/src/app/pages/stats/stats.component.ts index 54893c1..3c30181 100644 --- a/src/app/pages/stats/stats.component.ts +++ b/src/app/pages/stats/stats.component.ts @@ -223,7 +223,6 @@ export class StatsComponent implements OnInit { } else { this.showLoading = true; this.updateErrorMessage = ""; - //this.loadingMessage = 'Saving changes'; this.showAllInMonitor = !this.showAllInMonitor; @@ -233,7 +232,7 @@ export class StatsComponent implements OnInit { entity, 'charts', 'projectColumn', - !this.showAllInMonitor, + this.showAllInMonitor, true).subscribe( response => console.log(JSON.stringify(response)), error => { @@ -251,7 +250,7 @@ export class StatsComponent implements OnInit { entity, 'charts', 'projectPie', - !this.showAllInMonitor, + this.showAllInMonitor, true).subscribe( response => console.log(JSON.stringify(response)), error => { @@ -269,7 +268,7 @@ export class StatsComponent implements OnInit { entity, 'charts', 'projectTable', - !this.showAllInMonitor, + this.showAllInMonitor, true).subscribe( response => console.log(JSON.stringify(response)), error => { diff --git a/src/app/pages/zenodo-communities/add-zenodo-communities.component.html b/src/app/pages/zenodo-communities/add-zenodo-communities.component.html index ee364c7..e3fc6d8 100644 --- a/src/app/pages/zenodo-communities/add-zenodo-communities.component.html +++ b/src/app/pages/zenodo-communities/add-zenodo-communities.component.html @@ -13,6 +13,14 @@ Newly added Zenodo communities will be linked to your community on the next run of our algorithms.
  • + +
    @@ -41,11 +49,11 @@ Master zenodo community - + - Added + Added - +
    diff --git a/src/app/pages/zenodo-communities/add-zenodo-communities.component.ts b/src/app/pages/zenodo-communities/add-zenodo-communities.component.ts index ae38c40..aa98aed 100644 --- a/src/app/pages/zenodo-communities/add-zenodo-communities.component.ts +++ b/src/app/pages/zenodo-communities/add-zenodo-communities.component.ts @@ -32,6 +32,7 @@ export class AddZenodoCommunitiesComponent implements OnInit { public rowsOnPage = 10; @Input() masterCommunity = null; @Input() selectedCommunities = []; + newlySelectedCommunities = []; constructor (private route: ActivatedRoute, private _router: Router, public _fb: FormBuilder, @@ -49,6 +50,8 @@ export class AddZenodoCommunitiesComponent implements OnInit { console.info(this._router.url); this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} }); } else { + this.zenodoCommunitySearchUtils.status = this.errorCodes.LOADING; + this.newlySelectedCommunities = []; if (this.communityId != null && this.communityId != '') { this._zenodoCommunitieService.getZenodoCommunities(this.properties, this.properties.zenodoCommunities+"?page="+this.zenodoCommunitySearchUtils.page+"&size="+this.rowsOnPage).subscribe( result => { @@ -79,6 +82,7 @@ export class AddZenodoCommunitiesComponent implements OnInit { this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} }); } else { this.zenodoCommunitySearchUtils.page=page; + this.zenodoCommunitySearchUtils.status = this.errorCodes.LOADING; this._zenodoCommunitieService.getZenodoCommunities(this.properties, this.properties.zenodoCommunities+"?page="+this.zenodoCommunitySearchUtils.page +"&size="+this.rowsOnPage @@ -124,6 +128,7 @@ export class AddZenodoCommunitiesComponent implements OnInit { // this.undo[project.id] = data.id; community["openaireId"]=data.id; this.selectedCommunities.push(community); + this.newlySelectedCommunities.push(community) }, err => { console.info("error ADD"); @@ -136,7 +141,7 @@ export class AddZenodoCommunitiesComponent implements OnInit { } } - /* public removeCommunity( comm) { + public removeCommunity( comm) { if(!Session.isLoggedIn()){ console.info(this._router.url); this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} }); @@ -144,9 +149,6 @@ export class AddZenodoCommunitiesComponent implements OnInit { var openaireId = this.getOpenaireId(comm); this._manageZenodoCommunitiesService.removeZCommunity(this.properties, this.communityId,openaireId, ).subscribe( data => { - console.log(this.selectedCommunities.length); - console.info("REMOVE: "+ this.communityId + " "+openaireId); - console.log(comm); var pos = -1; for(var i=0; i< this.selectedCommunities.length;i++) { console.info(this.selectedCommunities[i].id+ " "+ this.selectedCommunities[i].openaireId+" "+ comm.id); @@ -155,11 +157,18 @@ export class AddZenodoCommunitiesComponent implements OnInit { break; } } - console.log(pos); if(pos != -1){ this.selectedCommunities.splice(pos, 1); } - console.log(this.selectedCommunities.length); + for(var i=0; i< this.newlySelectedCommunities.length;i++) { + if( this.newlySelectedCommunities[i].id == comm.id) { + pos= i; + break; + } + } + if(pos != -1){ + this.newlySelectedCommunities.splice(pos, 1); + } }, err => { @@ -171,10 +180,10 @@ export class AddZenodoCommunitiesComponent implements OnInit { } ) } - }*/ + } - public inCommunity(community: any): any { - for(let com of this.selectedCommunities) { + public inThelist(community: any, list): any { + for(let com of list) { if(com.id == community.id) { return true; } diff --git a/src/assets/env-properties.json b/src/assets/env-properties.json index 0bf7260..13b5265 100644 --- a/src/assets/env-properties.json +++ b/src/assets/env-properties.json @@ -8,24 +8,16 @@ "statisticsAPIURL" : "https://beta.services.openaire.eu/stats-api/", "statisticsFrameAPIURL":"https://beta.openaire.eu/stats/", "searchAPIURLLAst" : "https://beta.services.openaire.eu/search/v2/api/", - "searchResourcesAPIURL" : "https://beta.services.openaire.eu/search/v2/api/resources", - - - "csvAPIURL" : "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/reports", - "searchCrossrefAPIURL" : "https://api.crossref.org/works", "searchDataciteAPIURL" : "https://api.datacite.org/works", - "searchOrcidURL" : "https://pub.orcid.org/", - "pmidURL" : "http://www.ncbi.nlm.nih.gov/pubmed/", "doiURL" : "https://dx.doi.org/", "cordisURL" : "http://cordis.europa.eu/projects/", "pmcURL" : "http://europepmc.org/articles/", "handleURL" : "http://hdl.handle.net/", - "zenodo" : "https://zenodo.org/", "zenodoCommunities" : "https://zenodo.org/api/communities/", "openAccess" : "https://www.openaire.eu/support/faq#article-id-234", @@ -34,14 +26,11 @@ "h2020Guidlines" : "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020", "ercGuidlines" : "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf", "helpdesk" : "https://www.openaire.eu/support/helpdesk", - "uploadService" : "http://scoobydoo.di.uoa.gr:8000/upload", "vocabulariesAPI" :"https://beta.services.openaire.eu/provision/mvc/vocabularies/", "piwikBaseUrl" :" https://analytics.openaire.eu/piwik.php?idsite=6", - - "loginUrl" :"http://scoobydoo.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/openid_connect_login", "logoutUrl" :"https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=",