[plugins-functionality | WIP] add graph info

This commit is contained in:
argirok 2024-03-11 13:29:29 +02:00
parent 2a27c1caf7
commit ed512f6f05
6 changed files with 15 additions and 14 deletions

@ -1 +1 @@
Subproject commit a260ed17bd28e0cff2ab1504aea7937ebc211ca8
Subproject commit e2b34b13ee3cf7e360e02fe85f79cea99954e78f

View File

@ -164,11 +164,6 @@ sidebarItems = [{name:"Identity", id : "identity", icon: "desktop_windows" },
return JSON.stringify(object1) != JSON.stringify(object2);
}
saveLayout() {
if (!Session.isLoggedIn()) {
this._router.navigate(['/user-info'], {
queryParams: {'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url}
});
}
this.publishedLayout.layoutOptions = this.copyObject(this.draftCustomizationOptions);
this.publishedCustomizationOptions = this.copyObject(this.publishedLayout.layoutOptions)
this.publishedLayout.date = new Date();

View File

@ -83,7 +83,7 @@ type Tab = 'all' | 'communities' | 'ris';
<div class="uk-card uk-card-default uk-card-body uk-position-relative">
<div class="uk-position-top-right uk-margin-small-right uk-margin-small-top">
<div class="uk-flex uk-flex-middle">
<icon [flex]="true" [name]="community.status == 'all'?'earth':(community.status == 'manager'?'restricted':'incognito')" ratio="0.6"></icon>
<icon [flex]="true" [name]="community.isPublic()?'earth':(community.isRestricted()?'restricted':'incognito')" ratio="0.6"></icon>
</div>
</div>
<a class="uk-display-block uk-text-center uk-link-reset" [routerLink]="community.communityId">

View File

@ -22,6 +22,7 @@
<div *ngIf="searchUtils.status == errorCodes.LOADING" class="uk-position-center">
<loading></loading>
</div>
{{selectedCommunities.length}} {{previewCommunities.length}}
<div *ngIf="searchUtils.status !== errorCodes.LOADING">
<div *ngIf="previewCommunities.length == 0"
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">

View File

@ -5,7 +5,7 @@ import {
Input,
OnDestroy,
OnInit,
Output,
Output, SimpleChanges,
ViewChild,
ViewEncapsulation
} from '@angular/core';
@ -33,8 +33,8 @@ export class ManageZenodoCommunitiesComponent implements OnInit, OnDestroy {
@Input() searchUtils: SearchUtilsClass = null;
errorCodes: ErrorCodes;
public rowsOnPage = 10;
@Input() masterCommunity = null;
@Input() selectedCommunities = [];
@Input() masterCommunity;
@Input() selectedCommunities;
previewCommunities = [];
@ViewChild('AlertModalDeleteCommunity') alertModalDeleteCommunity;
selectedToDelete = null;
@ -53,12 +53,12 @@ export class ManageZenodoCommunitiesComponent implements OnInit, OnDestroy {
private _manageZenodoCommunitiesService: ManageZenodoCommunitiesService) {
this.errorCodes = new ErrorCodes();
}
ngOnInit() {
this.init();
}
ngOnDestroy() {
ngOnDestroy() {
this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscription) {
subscription.unsubscribe();
@ -67,6 +67,7 @@ export class ManageZenodoCommunitiesComponent implements OnInit, OnDestroy {
}
private init() {
console.log(this.selectedCommunities.length)
this.filterForm = this._fb.control('');
this.filterPreviewCommunities("");
this.subscriptions.push(this.filterForm.valueChanges.subscribe(value => {
@ -75,15 +76,18 @@ export class ManageZenodoCommunitiesComponent implements OnInit, OnDestroy {
}));
this.searchUtils.keyword = "";
this.searchUtils.totalResults = this.selectedCommunities.length;
console.log(this.selectedCommunities.length, this.previewCommunities.length)
}
public filterPreviewCommunities(value: string) {
this.previewCommunities = this.selectedCommunities.filter(community => {
return !value || community.title.toLowerCase().indexOf(value.toLowerCase()) != -1
});
console.log("filter", this.previewCommunities.length)
if (this.previewCommunities.slice((this.page - 1) * this.rowsOnPage, this.page * this.rowsOnPage).length == 0) {
this.page = 1;
}
console.log("filter - slice", this.previewCommunities.length)
this.cdr.detectChanges();
}

View File

@ -37,7 +37,7 @@ export class ZenodoCommunitiesComponent implements OnInit, OnDestroy {
masterZenodoCommunity = null;
public properties: EnvProperties = null;
selectedCommunityIds = null;
selectedCommunities = [];
selectedCommunities = null;
zenodocommunitiesloadedCount = 0;
zenodoSearchUtils: SearchUtilsClass = new SearchUtilsClass();
public errorCodes: ErrorCodes = new ErrorCodes();
@ -60,6 +60,7 @@ export class ZenodoCommunitiesComponent implements OnInit, OnDestroy {
this.community = community;
this.title.setTitle(this.community.shortTitle.toUpperCase() + ' | Zenodo Communities');
this.masterZenodoCommunityId = this.community.zenodoCommunity;
this.selectedCommunities = [];
if (this.masterZenodoCommunityId) {
this.subscriptions.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties,
this.masterZenodoCommunityId).subscribe(