[Trunk|Admin]: Add material toggle slider for activation of an entity.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@56108 d315682c-612b-4755-9ff5-7f18f6832af3
master
k.triantafyllou 5 years ago
parent 285cce6767
commit 4bdb91d142

@ -22,6 +22,7 @@
],
"styles": [
"src/styles.css",
"src/material.scss",
"node_modules/datatables.net-dt/css/jquery.dataTables.css",
"node_modules/interactiveminingv3/assets/css/interactive-mining.css",
"node_modules/interactiveminingv3/assets/css/animations.css"
@ -145,4 +146,4 @@
"prefix": "app"
}
}
}
}

@ -58,7 +58,6 @@ export class AppComponent implements OnInit{
localStorage.setItem('isCommunityManager', Session.isCommunityCurator() + '');
this.isPortalAdministrator = Session.isPortalAdministrator();
/*this.isPortalAdministrator = true;*/
}
this._communitiesService.updateCommunities(this.properties, this.properties.communityAPI + 'communities');

@ -30,6 +30,7 @@ import {CommunityService} from './openaireLibrary/connect/community/community.se
import {SubscribeService} from './openaireLibrary/utils/subscribe/subscribe.service';
import {ConnectRIGuard} from './openaireLibrary/connect/communityGuard/connectRIGuard.guard';
import {SideBarModule} from "./openaireLibrary/sharedComponents/sidebar/sideBar.module";
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
@NgModule({
imports: [
@ -42,7 +43,8 @@ import {SideBarModule} from "./openaireLibrary/sharedComponents/sidebar/sideBar.
ErrorModule,
AlertModalModule, SafeHtmlPipeModule, FABModule,
InteractiveMiningModule,
SideBarModule
SideBarModule,
BrowserAnimationsModule
],
declarations: [
AppComponent,

@ -121,12 +121,8 @@
<div class="content" [innerHTML]="check.divHelpContent.content | safeHtml"></div>
</td>
<td>
<div *ngIf="check.divHelpContent.isActive" class="activated" >
<input (click)="toggleDivHelpContents(false,[check.divHelpContent._id])" class="deactivate" src="assets/imgs/check-icon.png" title="Deactivate" width="20" type="image" height="20">
</div>
<div *ngIf="!check.divHelpContent.isActive" class="deactivated" >
<input (click)="toggleDivHelpContents(true,[check.divHelpContent._id])" class="activate" src="assets/imgs/x-icon.png" title="Activate" width="20" type="image" height="20">
</div>
<mat-slide-toggle [checked]="check.divHelpContent.isActive"
(change)="($event.source.checked = check.divHelpContent.isActive);toggleDivHelpContents(!check.divHelpContent.isActive,[check.divHelpContent._id])"></mat-slide-toggle>
</td>
<td>
<div class="actions" href="#">

@ -238,7 +238,6 @@ export class DivHelpContentsComponent implements OnInit {
if(!Session.isLoggedIn()){
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this.showLoading = true;
this.updateErrorMessage = "";
this._helpService.toggleDivHelpContents(ids,status, this.properties.adminToolsAPIURL).subscribe(
@ -249,8 +248,6 @@ export class DivHelpContentsComponent implements OnInit {
}
this.countDivHelpContents();
this.applyCheck(false);
this.showLoading = false;
},
error => this.handleUpdateError('System error changing the status of the selected page content(s)', error)
);

@ -9,12 +9,13 @@ import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.mod
import {DivHelpContentsRoutingModule} from './div-help-contents-routing.module';
import {SafeHtmlPipeModule} from '../../openaireLibrary/utils/pipes/safeHTMLPipe.module';
import {DivHelpContentsComponent} from './div-help-contents.component';
import {MatSlideToggleModule} from '@angular/material';
@NgModule({
imports: [
CommonModule, RouterModule, FormsModule, FABModule, SafeHtmlPipeModule,
AlertModalModule, ReactiveFormsModule, DivHelpContentsRoutingModule
],
imports: [
CommonModule, RouterModule, FormsModule, FABModule, SafeHtmlPipeModule,
AlertModalModule, ReactiveFormsModule, DivHelpContentsRoutingModule, MatSlideToggleModule
],
declarations: [
DivHelpContentsComponent
],

@ -72,12 +72,8 @@
<div class="name" href="#">{{check.entity.name}}</div>
</td>
<td>
<div *ngIf="check.entity.isEnabled" class="activated" >
<input (click)="toggleEntities(false,[check.entity._id])" class="deactivate" src="assets/imgs/check-icon.png" title="Disable" width="20" type="image" height="20" value="Deactivate">
</div>
<div *ngIf="!check.entity.isEnabled" class="deactivated" >
<input (click)="toggleEntities(true,[check.entity._id])" class="deactivate" src="assets/imgs/x-icon.png" title="Enable" width="20" type="image" height="20" value="Activate">
</div>
<mat-slide-toggle [checked]="check.entity.isEnabled"
(change)="($event.source.checked = check.entity.isEnabled);toggleEntities(!check.entity.isEnabled,[check.entity._id])"></mat-slide-toggle>
</td>
<td *ngIf="isPortalAdministrator">
<div class="actions" href="#">

@ -307,7 +307,6 @@ export class EntitiesComponent implements OnInit {
this._router.navigate(['/user-info'],
{ queryParams: { 'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url} });
} else {
this.showLoading = true;
this.updateErrorMessage = '';
this._helpContentService.toggleEntities(
this.selectedCommunityPid, this.toggleIds, this.toggleStatus, this.properties.adminToolsAPIURL).subscribe(
@ -317,7 +316,6 @@ export class EntitiesComponent implements OnInit {
this.checkboxes[i].entity.isEnabled = this.toggleStatus;
}
this.applyCheck(false);
this.showLoading = false;
},
error => this.handleUpdateError('System error changing the status of the selected entity(-ies)', error)
);

@ -9,12 +9,13 @@ import {FABModule} from '../../utils/fabModule.module';
import {EntityFormComponent} from './entity-form.component';
import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module';
import {EntitiesRoutingModule} from './entities-routing.module';
import {MatSlideToggleModule} from '@angular/material';
@NgModule({
imports: [
CommonModule, RouterModule, FormsModule, FABModule,
AlertModalModule, ReactiveFormsModule, EntitiesRoutingModule
],
imports: [
CommonModule, RouterModule, FormsModule, FABModule,
AlertModalModule, ReactiveFormsModule, EntitiesRoutingModule, MatSlideToggleModule
],
declarations: [EntitiesComponent, EntityFormComponent],
providers: [IsCommunity, ConnectAdminLoginGuard],
exports: [EntitiesComponent]

@ -120,12 +120,8 @@
</div>
</td>
<td>
<div *ngIf="check.pageHelpContent.isActive" class="activated" >
<input (click)="togglePageHelpContents(false,[check.pageHelpContent._id])" class="deactivate" src="assets/imgs/check-icon.png" title="Deactivate" width="20" type="image" height="20">
</div>
<div *ngIf="!check.pageHelpContent.isActive" class="deactivated" >
<input (click)="togglePageHelpContents(true,[check.pageHelpContent._id])" class="activate" src="assets/imgs/x-icon.png" title="Activate" width="20" type="image" height="20">
</div>
<mat-slide-toggle [checked]="check.pageHelpContent.isActive"
(change)="($event.source.checked = check.pageHelpContent.isActive);togglePageHelpContents(!check.pageHelpContent.isActive,[check.pageHelpContent._id])"></mat-slide-toggle>
</td>
<td>
<div class="actions" href="#">

@ -252,7 +252,6 @@ export class PageHelpContentsComponent implements OnInit {
if(!Session.isLoggedIn()){
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this.showLoading = true;
this.updateErrorMessage = "";
this._helpService.togglePageHelpContents(ids,status, this.properties.adminToolsAPIURL).subscribe(
@ -263,8 +262,6 @@ export class PageHelpContentsComponent implements OnInit {
}
this.countPageHelpContents();
this.applyCheck(false);
this.showLoading = false;
},
error => this.handleUpdateError('System error changing the status of the selected page content(s)', error)
);

@ -9,12 +9,13 @@ import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.mod
import {PageHelpContentsRoutingModule} from './page-help-contents-routing.module';
import {PageHelpContentsComponent} from './page-help-contents.component';
import {SafeHtmlPipeModule} from '../../openaireLibrary/utils/pipes/safeHTMLPipe.module';
import {MatSlideToggleModule} from '@angular/material';
@NgModule({
imports: [
CommonModule, RouterModule, FormsModule, FABModule, SafeHtmlPipeModule,
AlertModalModule, ReactiveFormsModule, PageHelpContentsRoutingModule
],
imports: [
CommonModule, RouterModule, FormsModule, FABModule, SafeHtmlPipeModule,
AlertModalModule, ReactiveFormsModule, PageHelpContentsRoutingModule, MatSlideToggleModule
],
declarations: [
PageHelpContentsComponent
],

@ -86,12 +86,8 @@
<div class="name" href="#">{{check.page.name}}</div>
</td>
<td>
<div *ngIf="check.page.isEnabled" class="activated" >
<input (click)="togglePages(false,[check.page._id])" class="deactivate" src="assets/imgs/check-icon.png" title="Disable" width="20" type="image" height="20">
</div>
<div *ngIf="!check.page.isEnabled" class="deactivated" >
<input (click)="togglePages(true,[check.page._id])" class="deactivate" src="assets/imgs/x-icon.png" title="Enable" width="20" type="image" height="20">
</div>
<mat-slide-toggle [checked]="check.page.isEnabled"
(change)="($event.source.checked = check.page.isEnabled);togglePages(!check.page.isEnabled,[check.page._id])"></mat-slide-toggle>
</td>
<td *ngIf="!pagesType">
<div class="type" href="#">{{check.page.type}}</div>

@ -336,7 +336,6 @@ export class PagesComponent implements OnInit {
if(!Session.isLoggedIn()){
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
this.updateErrorMessage = "";
this._helpContentService.togglePages(this.selectedCommunityPid,ids,status, this.properties.adminToolsAPIURL).subscribe(
@ -346,7 +345,6 @@ export class PagesComponent implements OnInit {
this.checkboxes[i].page.isEnabled=status;
}
this.applyCheck(false);
this.showLoading = false;
},
error => this.handleUpdateError('System error changing the status of the selected page(s)', error)
);

@ -9,12 +9,13 @@ import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.mod
import {PagesComponent} from './pages.component';
import {PageFormComponent} from './page-form.component';
import {PagesRoutingModule} from './pages-routing.module';
import {MatSlideToggleModule} from '@angular/material';
@NgModule({
imports: [
CommonModule, RouterModule, FormsModule, FABModule,
AlertModalModule, ReactiveFormsModule, PagesRoutingModule
],
imports: [
CommonModule, RouterModule, FormsModule, FABModule,
AlertModalModule, ReactiveFormsModule, PagesRoutingModule, MatSlideToggleModule
],
declarations: [PagesComponent, PageFormComponent],
providers: [IsCommunity, ConnectAdminLoginGuard],
exports: [PagesComponent]

@ -53,8 +53,224 @@
<div class="uk-heading-divider">
<h3>{{ entitiesMap.get(entity) }} <small *ngIf="deactivatedEntity" class="uk-text-danger uk-text-small">(this entity has been deactivated)</small></h3>
<div class="uk-text-bold uk-text-uppercase uk-margin-top">
<span>
<div uk-grid>
<div class="uk-width-1-3">
<div class="uk-flex uk-flex-middle uk-padding uk-padding-remove-top" uk-grid>
<div class="uk-card portal-card uk-text-right uk-padding-small uk-width-1-2">
<div
class="uk-text-large">{{statisticsSum[entity].total|number}}</div>
<div>Total
{{ entity == 'dataset' ? 'Research Data' : entitiesMap.get(entity) }}</div>
</div>
<div class="uk-width-expand">
<table class="uk-table uk-table-striped uk-width-expand@m uk-width-1-1@l">
<thead>
<tr>
<th>Show</th>
<th class="uk-text-center">#</th>
</tr>
</thead>
<tbody>
<tr>
<th>In Graph Analysis</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['total'].showInMonitor"
(change)="toggleShowInMonitor(entity,'numbers','total')"></mat-slide-toggle>
</th>
</tr>
<tr>
<th>In Overview</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['total'].showInDashboard"
(change)="toggleShowInDashboard(entity,'numbers','total')"></mat-slide-toggle>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="uk-width-1-3">
<div class="uk-flex uk-flex-middle uk-padding uk-padding-remove-top" uk-grid>
<div class="uk-card portal-card uk-text-right uk-padding-small uk-width-1-2">
<div
class="uk-text-large">{{statisticsSum[entity].projects|number}}</div>
<div>Projects</div>
</div>
<div class="uk-width-expand">
<table class="uk-table uk-table-striped uk-width-expand@m uk-width-1-1@l">
<thead>
<tr>
<th>Show</th>
<th class="uk-text-center">#</th>
</tr>
</thead>
<tbody>
<tr>
<th>In Graph Analysis</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['project'].showInMonitor"
(change)="toggleShowInMonitor(entity,'numbers','project')"></mat-slide-toggle>
</th>
</tr>
<tr>
<th>In Overview</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['project'].showInDashboard"
(change)="toggleShowInDashboard(entity,'numbers','project')"></mat-slide-toggle>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="uk-width-1-3">
<div class="uk-flex uk-flex-middle uk-padding uk-padding-remove-top" uk-grid>
<div class="uk-card portal-card uk-text-right uk-padding-small uk-width-1-2">
<div
class="uk-text-large">{{statisticsSum[entity].open_access|number}}</div>
<div>Open
{{ entity == 'dataset' ? 'Research Data' : entitiesMap.get(entity) }}</div>
</div>
<div class="uk-width-expand">
<table class="uk-table uk-table-striped uk-width-expand@m uk-width-1-1@l">
<thead>
<tr>
<th>Show</th>
<th class="uk-text-center">#</th>
</tr>
</thead>
<tbody>
<tr>
<th>In Graph Analysis</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['open'].showInMonitor"
(change)="toggleShowInMonitor(entity,'numbers','open')"></mat-slide-toggle>
</th>
</tr>
<tr>
<th>In Overview</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['open'].showInDashboard"
(change)="toggleShowInDashboard(entity,'numbers','open')"></mat-slide-toggle>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="uk-width-1-3">
<div class="uk-flex uk-flex-middle uk-padding uk-padding-remove-top" uk-grid>
<div class="uk-card portal-card uk-text-right uk-padding-small uk-width-1-2">
<div
class="uk-text-large">{{statisticsSum[entity].closed_access|number}}</div>
<div>Closed
{{ entity == 'dataset' ? 'Research Data' : entitiesMap.get(entity) }}</div>
</div>
<div class="uk-width-expand">
<table class="uk-table uk-table-striped uk-width-expand@m uk-width-1-1@l">
<thead>
<tr>
<th>Show</th>
<th class="uk-text-center">#</th>
</tr>
</thead>
<tbody>
<tr>
<th>In Graph Analysis</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['closed'].showInMonitor"
(change)="toggleShowInMonitor(entity,'numbers','closed')"></mat-slide-toggle>
</th>
</tr>
<tr>
<th>In Overview</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['closed'].showInDashboard"
(change)="toggleShowInDashboard(entity,'numbers','closed')"></mat-slide-toggle>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="uk-width-1-3">
<div class="uk-flex uk-flex-middle uk-padding uk-padding-remove-top" uk-grid>
<div class="uk-card portal-card uk-text-right uk-padding-small uk-width-1-2">
<div
class="uk-text-large">{{statisticsSum[entity].restricted|number}}</div>
<div>Restricted
{{ entity == 'dataset' ? 'Research Data' : entitiesMap.get(entity) }}</div>
</div>
<div class="uk-width-expand">
<table class="uk-table uk-table-striped uk-width-expand@m uk-width-1-1@l">
<thead>
<tr>
<th>Show</th>
<th class="uk-text-center">#</th>
</tr>
</thead>
<tbody>
<tr>
<th>In Graph Analysis</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['restricted'].showInMonitor"
(change)="toggleShowInMonitor(entity,'numbers','restricted')"></mat-slide-toggle>
</th>
</tr>
<tr>
<th>In Overview</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['restricted'].showInDashboard"
(change)="toggleShowInDashboard(entity,'numbers','restricted')"></mat-slide-toggle>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="uk-width-1-3">
<div class="uk-flex uk-flex-middle uk-padding uk-padding-remove-top" uk-grid>
<div class="uk-card portal-card uk-text-right uk-padding-small uk-width-1-2">
<div
class="uk-text-large">{{statisticsSum[entity].embargo|number}}</div>
<div>Embargo
{{ entity == 'dataset' ? 'Research Data' : entitiesMap.get(entity) }}</div>
</div>
<div class="uk-width-expand">
<table class="uk-table uk-table-striped uk-width-expand@m uk-width-1-1@l">
<thead>
<tr>
<th>Show</th>
<th class="uk-text-center">#</th>
</tr>
</thead>
<tbody>
<tr>
<th>In Graph Analysis</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['embargo'].showInMonitor"
(change)="toggleShowInMonitor(entity,'numbers','embargo')"></mat-slide-toggle>
</th>
</tr>
<tr>
<th>In Overview</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['embargo'].showInDashboard"
(change)="toggleShowInDashboard(entity,'numbers','embargo')"></mat-slide-toggle>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!--<span>
<a (click)="toggleShowInMonitor(entity,'numbers','total')"
data-uk-tooltip
[title]="statisticsDisplay.entities[entity].numbers.map['total'].showInMonitor ? 'Hide in monitor' : 'Show in monitor'"
@ -116,7 +332,7 @@
{{statisticsSum[entity].embargo | number}}
</a>
{{statisticsSum[entity].embargo == 1 ? 'is' : 'are'}} still in embargo.
</span>
</span>-->
</div>
</div>
<div *ngIf="statisticsSum[entity].total==0"
@ -130,7 +346,9 @@
chartsUrlMap[entity + 'Timeline']"
class="uk-grid">
<div class="uk-width-expand@m uk-width-3-4@l">
<iframe [src]="chartsUrlMap[displayedTimeline]" width="1000" height="450"></iframe>
<div class=" iframeContainer uk-height-large uk-margin-top">
<iframe [src]=chartsUrlMap[displayedTimeline] scrolling="no" class=""></iframe>
</div>
</div>
<div class="uk-margin-top">
<h6>Display options</h6>
@ -143,22 +361,18 @@
</thead>
<tbody>
<tr>
<th>In Monitor</th>
<td class="uk-text-center">
<a (click)="toggleShowInMonitor(entity,'charts','timeline')">
<img [src]="statisticsDisplay.entities[entity].charts.map['timeline'].showInMonitor ? '/assets/imgs/check-icon.png' : '/assets/imgs/x-icon.png'"
width="20">
</a>
</td>
<th>In Graph Analysis</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['timeline'].showInMonitor"
(change)="toggleShowInMonitor(entity,'charts','timeline')"></mat-slide-toggle>
</th>
</tr>
<tr>
<th>In Dashboard</th>
<td class="uk-text-center">
<a (click)="toggleShowInDashboard(entity,'charts','timeline')">
<img [src]="statisticsDisplay.entities[entity].charts.map['timeline'].showInDashboard ? '/assets/imgs/check-icon.png' : '/assets/imgs/x-icon.png'"
width="20">
</a>
</td>
<th>In Overview</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['timeline'].showInDashboard"
(change)="toggleShowInDashboard(entity,'charts','timeline')"></mat-slide-toggle>
</th>
</tr>
</tbody>
</table>
@ -186,11 +400,13 @@
chartsUrlMap[entity + 'Graph']"
class="uk-grid">
<div class="uk-width-expand@m uk-width-3-4@l">
<iframe [src]="chartsUrlMap[displayedGraph]" width="1000" height="450"></iframe>
<div class=" iframeContainer uk-height-large uk-margin-top">
<iframe [src]=chartsUrlMap[displayedGraph] scrolling="no" class=""></iframe>
</div>
</div>
<div class="uk-margin-top">
<h6>Display options</h6>
<table class="uk-table uk-table-striped uk-width-expand@m uk-width-1-1@l">
<table class="uk-table uk-table-striped uk-width-expand@m uk-width-1-1@l">
<thead>
<tr>
<th>Show</th>
@ -199,22 +415,18 @@
</thead>
<tbody>
<tr>
<th>In Monitor</th>
<td class="uk-text-center">
<a (click)="toggleShowInMonitor(entity,'charts','graph')">
<img [src]="statisticsDisplay.entities[entity].charts.map['graph'].showInMonitor ? '/assets/imgs/check-icon.png' : '/assets/imgs/x-icon.png'"
width="20">
</a>
</td>
<th>In Graph Analysis</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['graph'].showInMonitor"
(change)="toggleShowInMonitor(entity,'charts','graph')"></mat-slide-toggle>
</th>
</tr>
<tr>
<th>In Dashboard</th>
<td class="uk-text-center">
<a (click)="toggleShowInDashboard(entity,'charts','graph')">
<img [src]="statisticsDisplay.entities[entity].charts.map['graph'].showInDashboard ? '/assets/imgs/check-icon.png' : '/assets/imgs/x-icon.png'"
width="20">
</a>
</td>
<th>In Overview</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['graph'].showInDashboard"
(change)="toggleShowInDashboard(entity,'charts','graph')"></mat-slide-toggle>
</th>
</tr>
</tbody>
</table>
@ -247,17 +459,25 @@
<ul id="projectChartTabs" class="uk-switcher uk-margin">
<li>
<div *ngIf="displayedProjectChart == (entity + 'Projectcolumn')">
<iframe [src]="chartsUrlMap[displayedProjectChart]" width="1000" height="450"></iframe>
<div class=" iframeContainer uk-height-large uk-margin-top">
<iframe [src]=chartsUrlMap[displayedProjectChart] scrolling="no" class=""></iframe>
</div>
</div>
</li>
<li>
<div *ngIf="displayedProjectChart == (entity + 'Projectpie')">
<iframe [src]="chartsUrlMap[displayedProjectChart]" width="1000" height="450"></iframe>
<div class=" iframeContainer uk-height-large uk-margin-top">
<iframe [src]=chartsUrlMap[displayedProjectChart] scrolling="no" class=""></iframe>
</div>
</div>
</li>
<li>
<div *ngIf="displayedProjectChart == (entity + 'Projecttable')">
<iframe [src]="chartsUrlMap[displayedProjectChart]" width="1000" height="450"></iframe>
<div class=" iframeContainer uk-height-large uk-margin-top">
<iframe [src]=chartsUrlMap[displayedProjectChart] scrolling="no" class=""></iframe>
</div>
</div>
</li>
</ul>
@ -276,58 +496,44 @@
</thead>
<tbody>
<tr>
<th>In Monitor</th>
<td class="uk-text-center">
<a (click)="toggleShowInMonitor(entity,'charts','projectColumn')">
<img [src]="statisticsDisplay.entities[entity].charts.map['projectColumn'].showInMonitor ? '/assets/imgs/check-icon.png' : '/assets/imgs/x-icon.png'"
width="20">
</a>
</td>
<td class="uk-text-center">
<a (click)="toggleShowInMonitor(entity,'charts','projectPie')">
<img [src]="statisticsDisplay.entities[entity].charts.map['projectPie'].showInMonitor ? '/assets/imgs/check-icon.png' : '/assets/imgs/x-icon.png'"
width="20">
</a>
</td>
<td class="uk-text-center">
<a (click)="toggleShowInMonitor(entity,'charts','projectTable')">
<img [src]="statisticsDisplay.entities[entity].charts.map['projectTable'].showInMonitor ? '/assets/imgs/check-icon.png' : '/assets/imgs/x-icon.png'"
width="20">
</a>
</td>
<td class="uk-text-center">
<a (click)="toggleShowAllInMonitor(entity)">
<img [src]="showAllInMonitor ? '/assets/imgs/check-icon.png' : '/assets/imgs/x-icon.png'"
width="20">
</a>
</td>
<th>In Graph Analysis</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['projectColumn'].showInMonitor"
(change)="toggleShowInMonitor(entity,'charts','projectColumn')"></mat-slide-toggle>
</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['projectPie'].showInMonitor"
(change)="toggleShowInMonitor(entity,'charts','projectPie')"></mat-slide-toggle>
</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['projectTable'].showInMonitor"
(change)="toggleShowInMonitor(entity,'charts','projectTable')"></mat-slide-toggle>
</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="showAllInMonitor"
(change)="toggleShowAllInMonitor(entity)"></mat-slide-toggle>
</th>
</tr>
<tr>
<th>In Dashboard</th>
<td class="uk-text-center">
<a (click)="toggleShowInDashboard(entity,'charts','projectColumn')">
<img [src]="statisticsDisplay.entities[entity].charts.map['projectColumn'].showInDashboard ? '/assets/imgs/check-icon.png' : '/assets/imgs/x-icon.png'"
width="20">
</a>
</td>
<td class="uk-text-center">
<a (click)="toggleShowInDashboard(entity,'charts','projectPie')">
<img [src]="statisticsDisplay.entities[entity].charts.map['projectPie'].showInDashboard ? '/assets/imgs/check-icon.png' : '/assets/imgs/x-icon.png'"
width="20">
</a>
</td>
<td class="uk-text-center">
<a (click)="toggleShowInDashboard(entity,'charts','projectTable')">
<img [src]="statisticsDisplay.entities[entity].charts.map['projectTable'].showInDashboard ? '/assets/imgs/check-icon.png' : '/assets/imgs/x-icon.png'"
width="20">
</a>
</td>
<td class="uk-text-center">
<a (click)="toggleShowAllInDashboard(entity)">
<img [src]="showAllInDashboard ? '/assets/imgs/check-icon.png' : '/assets/imgs/x-icon.png'"
width="20">
</a>
</td>
<th>In Overview</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['projectColumn'].showInDashboard"
(change)="toggleShowInDashboard(entity,'charts','projectColumn')"></mat-slide-toggle>
</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['projectPie'].showInDashboard"
(change)="toggleShowInDashboard(entity,'charts','projectPie')"></mat-slide-toggle>
</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['projectTable'].showInDashboard"
(change)="toggleShowInDashboard(entity,'charts','projectTable')"></mat-slide-toggle>
</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="showAllInDashboard"
(change)="toggleShowAllInDashboard(entity)"></mat-slide-toggle>
</th>
</tr>
</tbody>
</table>

@ -404,7 +404,6 @@ export class StatsComponent implements OnInit {
if(!Session.isLoggedIn()){
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
this.updateErrorMessage = "";
this.contentService.postCommunityAdminStatisticsChoices(
@ -419,7 +418,6 @@ export class StatsComponent implements OnInit {
error => this.handleUpdateError('The changes could not be saved', error),//console.log(error),
() => {
this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInMonitor = !this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInMonitor;
this.showLoading = false;
}
);
}
@ -429,7 +427,6 @@ export class StatsComponent implements OnInit {
if(!Session.isLoggedIn()){
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
this.updateErrorMessage = "";
this.contentService.postCommunityAdminStatisticsChoices(
@ -444,7 +441,6 @@ export class StatsComponent implements OnInit {
error => this.handleUpdateError('The changes could not be saved', error),//console.log(error),
() => {
this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInDashboard = !this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInDashboard;
this.showLoading = false;
}
);
}

@ -5,10 +5,11 @@ import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommun
import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard';
import {StatsComponent} from './stats.component';
import {StatsRoutingModule} from './stats-routing.module';
import {MatSlideToggleModule} from '@angular/material';
@NgModule({
imports: [
CommonModule, StatsRoutingModule, RouterModule
CommonModule, StatsRoutingModule, RouterModule, MatSlideToggleModule
],
declarations: [StatsComponent],
providers: [IsCommunity, ConnectAdminLoginGuard],

@ -104,4 +104,16 @@
.communitiesImageBox{
width:284px; height:109px;
/*width:107px; height:57px;*/
}
}
.iframeContainer{
overflow:hidden;
}
.iframeContainer iframe{
width:100%;
height:100%;
border:0;
}

@ -0,0 +1,9 @@
@import '~@angular/material/theming';
@include mat-core();
$my-app-primary: mat-palette($mat-blue-grey);
$my-app-accent: mat-palette($mat-green);
$my-app-warn: mat-palette($mat-deep-orange);
$my-app-theme: mat-light-theme($my-app-primary, $my-app-accent, $my-app-warn);
@include angular-material-theme($my-app-theme);

@ -1 +1,3 @@
/* You can add global styles to this file, and also import other style files */

Loading…
Cancel
Save