Merge remote-tracking branch 'origin/develop' into new-search-json
This commit is contained in:
commit
5f2ee51038
|
|
@ -3,4 +3,3 @@ node_modules/
|
|||
dist/
|
||||
.idea/
|
||||
package-lock.json
|
||||
interactiveminingv3.tgz
|
||||
|
|
|
|||
|
|
@ -45,16 +45,13 @@
|
|||
"src/.htaccess"
|
||||
],
|
||||
"styles": [
|
||||
"src/mining.scss",
|
||||
"src/styles.less",
|
||||
"src/assets/common-assets/library-css/material.scss"
|
||||
],
|
||||
"scripts": [
|
||||
"node_modules/uikit/dist/js/uikit.min.js",
|
||||
"node_modules/uikit/dist/js/uikit-icons.min.js",
|
||||
"node_modules/jquery/dist/jquery.js",
|
||||
"node_modules/interactiveminingv3/assets/js/ResizeSensor.js",
|
||||
"node_modules/interactiveminingv3/assets/js/jquery.sticky-sidebar.js"
|
||||
"node_modules/jquery/dist/jquery.js"
|
||||
],
|
||||
"vendorChunk": true,
|
||||
"extractLicenses": false,
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
rm -f interactiveminingv3.tgz
|
||||
git clone https://code-repo.d4science.org/MaDgIK/interactive-mining.git
|
||||
cd interactive-mining/
|
||||
git checkout angular-16
|
||||
cd interactive-mining-angular-frontend/
|
||||
npm install
|
||||
npm run packagr
|
||||
cp -r ./src/assets/ ./dist
|
||||
cd dist/
|
||||
npm pack
|
||||
mv interactiveminingv3-1.0.0.tgz ../../../interactiveminingv3.tgz
|
||||
cd ../../../
|
||||
rm -rf interactive-mining/
|
||||
npm install --no-save ./interactiveminingv3.tgz
|
||||
|
|
@ -11,8 +11,6 @@
|
|||
"webpack-bundle-analyzer": "ng build --stats-json && webpack-bundle-analyzer dist/monitor-dashboard/browser/stats.json --host 0.0.0.0",
|
||||
"test": "ng test",
|
||||
"e2e": "ng e2e",
|
||||
"mining": "chmod +x interactivemining-install.sh && ./interactivemining-install.sh",
|
||||
"postinstall": "npm run mining",
|
||||
"after-build-clean": "rm -rf dist/connect-admin/assets/common-assets/.git dist/connect-admin/assets/openaire-theme/.git .angular"
|
||||
},
|
||||
"private": true,
|
||||
|
|
|
|||
|
|
@ -3,8 +3,15 @@
|
|||
</div>
|
||||
<div *ngIf="loading == false">
|
||||
<div id="modal-container"></div>
|
||||
<navbar *ngIf="hasHeader" portal="connect-admin" [header]="menuHeader" [communityId]="community ? community.communityId : null"
|
||||
[userMenuItems]=userMenuItems [menuItems]="menuItems" [user]="user"></navbar>
|
||||
<navbar #navbar *ngIf="hasHeader" portal="connect-admin" [header]="menuHeader" [communityId]="community ? community.communityId : null"
|
||||
[userMenuItems]=userMenuItems [menuItems]="menuItems" [user]="user">
|
||||
<div *ngIf="showGetStarted" extra-s class="uk-margin-large-top uk-margin-left">
|
||||
<a class="uk-button uk-button-primary uk-text-uppercase" href="https://connect.openaire.eu" (click)="navbar.closeCanvas()">Get Started</a>
|
||||
</div>
|
||||
<a *ngIf="showGetStarted" extra-m
|
||||
class="uk-button uk-button-small uk-button-primary uk-text-uppercase uk-margin-left"
|
||||
href="https://connect.openaire.eu" >Get Started</a>
|
||||
</navbar>
|
||||
<div class="sidebar_main_swipe uk-flex" [class.sidebar_main_active]="open && (hasSidebar || hasInternalSidebar)" [class.sidebar_mini]="!open && (hasSidebar || hasInternalSidebar)"
|
||||
[class.sidebar_hover]="hover">
|
||||
<dashboard-sidebar *ngIf="hasSidebar && !hasInternalSidebar" [items]="sideBarItems" [backItem]="backItem"></dashboard-sidebar>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import {ConnectHelper} from './openaireLibrary/connect/connectHelper';
|
|||
import {ConfigurationService} from './openaireLibrary/utils/configuration/configuration.service';
|
||||
import {StringUtils} from "./openaireLibrary/utils/string-utils.class";
|
||||
import {OpenaireEntities} from "./openaireLibrary/utils/properties/searchFields";
|
||||
import {mining} from "./openaireLibrary/utils/icons/icons";
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
|
|
@ -35,6 +34,7 @@ export class AppComponent implements OnInit {
|
|||
sideBarItems: MenuItem[] = [];
|
||||
backItem: MenuItem = null;
|
||||
menuItems: MenuItem[] = [];
|
||||
showGetStarted = false;
|
||||
menuHeader: Header = {
|
||||
route: "/",
|
||||
url: null,
|
||||
|
|
@ -137,9 +137,6 @@ export class AppComponent implements OnInit {
|
|||
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
|
||||
if (user) {
|
||||
this.user = user;
|
||||
localStorage.setItem('user_id', this.user.id);
|
||||
localStorage.setItem('mining_backend_address', this.properties.miningBackendURL);
|
||||
localStorage.setItem('isCommunityManager', Session.isCommunityCurator(this.user) + '');
|
||||
this.buildMenu();
|
||||
} else if(this.user) {
|
||||
this.user = user;
|
||||
|
|
@ -209,6 +206,7 @@ export class AppComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
if (this.community) {
|
||||
this.showGetStarted = false;
|
||||
this.headerLogoUrl = StringUtils.getLogoUrl(this.community);
|
||||
this.headerUrl = 'https://' + ((properties.environment !== 'production')?'beta.':'') + this.community.communityId + '.openaire.eu';
|
||||
this.menuHeader = {
|
||||
|
|
@ -240,9 +238,6 @@ export class AppComponent implements OnInit {
|
|||
this.sideBarItems.push(new MenuItem("users", "Users", "", "/" + this.community.communityId + "/users", false, [], [], {}, {name: 'group'}, null, null, "/" + this.community.communityId + "/users"));
|
||||
this.sideBarItems.push(new MenuItem("admin-tools", "Pages & Menus", "", "/" + this.community.communityId + "/admin-tools/pages", false, [], [], {}, {name: 'description'}, null, null, "/" + this.community.communityId + "/admin-tools"));
|
||||
this.sideBarItems.push(new MenuItem("customization", "Customization", "", "/" + this.community.communityId + "/customize-layout", false, [], [], {}, {name: 'brush'}));
|
||||
if (this.community.type === 'ri') {
|
||||
this.sideBarItems.push(new MenuItem("mining", "Mining", "", "/" + this.community.communityId + "/mining/manage-profiles", false, [], [], {}, {svg: mining.data}, null, null, "/" + this.community.communityId + "/mining"));
|
||||
}
|
||||
this.backItem = new MenuItem("back", "Manage Communities", "", "/", false, [], null, {}, {name: 'west'});
|
||||
|
||||
this.menuItems = [];
|
||||
|
|
@ -299,6 +294,7 @@ export class AppComponent implements OnInit {
|
|||
);
|
||||
// }
|
||||
} else {
|
||||
this.showGetStarted = true;
|
||||
this.headerLogoUrl = null;
|
||||
this.headerUrl = 'https://' + ((properties.environment !== 'production')?'beta.':'') + 'connect.openaire.eu';
|
||||
this.menuHeader = {
|
||||
|
|
@ -312,19 +308,10 @@ export class AppComponent implements OnInit {
|
|||
menuPosition: "center"
|
||||
};
|
||||
this.menuItems = [];
|
||||
|
||||
this.menuItems.push(
|
||||
new MenuItem("about", "About", this.headerUrl + "/about/learn-how", "", false, [], [], {}, null, null, null, null, "_self",
|
||||
"internal", false,
|
||||
[
|
||||
new MenuItem("", "Learn the process", this.headerUrl + "/about/learn-how", "", false, [], [], {}, null, null, null, null, "_self"),
|
||||
new MenuItem("", "Publications", this.headerUrl + "/publications", "", false, [], [], {}, null, null, null, null, "_self"),
|
||||
new MenuItem("", "Roadmap", "https://trello.com/b/yfzUz0kp/openaire-connect-dashboard", "", false, [], [], {}),
|
||||
new MenuItem("", "FAQs", this.headerUrl + "/about/faq", "", false, [], [], {}, null, null, null, null, "_self")
|
||||
]
|
||||
)
|
||||
);
|
||||
this.menuItems.push(
|
||||
new MenuItem("communities", "Communities", this.headerUrl + "/search/find/communities", "", false, [], [], {}, null, null, null, null, "_self")
|
||||
new MenuItem("communities", "Communities", 'https://' + ((properties.environment !== 'production')?'beta.':'')
|
||||
+ 'connect.openaire.eu' +((properties.environment == 'production')?'/communities.html':'') , "", false, [], [], {}, null, null, null, null, "_self")
|
||||
);
|
||||
if(this.isCurator()) {
|
||||
this.sideBarItems.push(new MenuItem("communities", "Manage communities", "", "/", false, [], [], {}, {name: 'settings'}));
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import {ErrorInterceptorService} from "./openaireLibrary/error-interceptor.servi
|
|||
import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-interceptor.service";
|
||||
import {AdminLoginGuard} from "./openaireLibrary/login/adminLoginGuard.guard";
|
||||
import {LoginGuard} from "./openaireLibrary/login/loginGuard.guard";
|
||||
import {InteractiveMiningModule} from 'interactiveminingv3';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
|
@ -32,7 +31,6 @@ import {InteractiveMiningModule} from 'interactiveminingv3';
|
|||
BottomModule, NavigationBarModule,
|
||||
ErrorModule,
|
||||
SharedModule,
|
||||
InteractiveMiningModule,
|
||||
BrowserAnimationsModule, LoadingModule, SideBarModule
|
||||
],
|
||||
declarations: [
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 5335e9a247c7718ffe9aa68e0516127d4d3da05a
|
||||
Subproject commit 9c69cdc820745629f27322fab3033d156fdca626
|
||||
|
|
@ -100,6 +100,13 @@ import {ClearCacheService} from "../../../../openaireLibrary/services/clear-cach
|
|||
placeholder="Who can join"
|
||||
[options]="membershipOptions" type="select"></div>
|
||||
</div>
|
||||
<div class="uk-width-1-3@m" *ngIf="isAdmin">
|
||||
<span class="uk-text-bold uk-margin-small-right">Is featured Community? (Yes / No)</span>
|
||||
<mat-slide-toggle [checked]="communityFb.get('featured').value"
|
||||
(change)="changeFeatured()"
|
||||
uk-tooltip="title:<div><div class='uk-text-bold'> Select community as a featured community for Joomla </div></div>"
|
||||
></mat-slide-toggle>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
`,
|
||||
|
|
@ -169,7 +176,8 @@ export class EditCommunityComponent {
|
|||
membership: this.fb.control(this.community.membership),
|
||||
managers: this.fb.control(this.community.managers),
|
||||
isUpload: this.fb.control(this.community.isUpload),
|
||||
logoUrl: this.fb.control(this.community.logoUrl)
|
||||
logoUrl: this.fb.control(this.community.logoUrl),
|
||||
featured: this.fb.control(this.community.featured)
|
||||
});
|
||||
if (this.community.isUpload) {
|
||||
this.communityFb.get('logoUrl').clearValidators();
|
||||
|
|
@ -330,4 +338,8 @@ export class EditCommunityComponent {
|
|||
encodeURIComponent(this.community.communityId) + '/' + this.community.logoUrl).subscribe());
|
||||
}
|
||||
}
|
||||
changeFeatured() {
|
||||
this.communityFb.get('featured').setValue(!this.communityFb.get('featured').value);
|
||||
this.communityFb.get('featured').markAsDirty();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@ import {ReactiveFormsModule} from "@angular/forms";
|
|||
import {CKEditorModule} from 'ng2-ckeditor';
|
||||
import {InputModule} from "../../../../openaireLibrary/sharedComponents/input/input.module";
|
||||
import {IconsModule} from "../../../../openaireLibrary/utils/icons/icons.module";
|
||||
import {MatSlideToggleModule} from "@angular/material/slide-toggle";
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, ReactiveFormsModule, InputModule, IconsModule
|
||||
, CKEditorModule
|
||||
, CKEditorModule, MatSlideToggleModule,
|
||||
],
|
||||
declarations: [EditCommunityComponent],
|
||||
exports: [EditCommunityComponent]
|
||||
|
|
|
|||
|
|
@ -16,11 +16,6 @@ import {ConnectRIGuard} from "../openaireLibrary/connect/communityGuard/connectR
|
|||
path: 'users',
|
||||
loadChildren: () => import('./users/users-routing.module').then(m => m.UsersRoutingModule)
|
||||
},
|
||||
{
|
||||
path: 'mining',
|
||||
loadChildren: () => import('./mining/mining.module').then(m => m.MiningModule),
|
||||
canActivateChild: [ConnectRIGuard]
|
||||
},
|
||||
{
|
||||
path: 'admin-tools',
|
||||
loadChildren: () => import('./admin-tools/admin-tools-routing.module').then(m => m.AdminToolsRoutingModule),
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
import {NgModule} from "@angular/core";
|
||||
import {InteractiveMiningModule, InteractiveMiningRoutingModule} from "interactiveminingv3";
|
||||
|
||||
@NgModule({
|
||||
imports: [InteractiveMiningRoutingModule, InteractiveMiningModule]
|
||||
})
|
||||
export class MiningRoutingModule {
|
||||
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
import {Component, OnDestroy, OnInit} from "@angular/core";
|
||||
import {ActivatedRoute} from "@angular/router";
|
||||
import {Title} from "@angular/platform-browser";
|
||||
import {Subscription} from "rxjs";
|
||||
|
||||
@Component({
|
||||
selector: 'mining',
|
||||
template: `
|
||||
<div page-content>
|
||||
<div inner>
|
||||
<div class="mining uk-section">
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export class MiningComponent implements OnInit, OnDestroy{
|
||||
private subs: any[] = [];
|
||||
|
||||
constructor(private title: Title,
|
||||
private route: ActivatedRoute) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.subs.push(this.route.params.subscribe(params => {
|
||||
this.title.setTitle(params['community'].toUpperCase() + ' | Mining');
|
||||
}));
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.subs.forEach(subscription => {
|
||||
if(subscription instanceof Subscription) {
|
||||
subscription.unsubscribe();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {MiningComponent} from "./mining.component";
|
||||
import {PageContentModule} from "../../openaireLibrary/dashboard/sharedComponents/page-content/page-content.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: '', component: MiningComponent, children: [
|
||||
{path: '', loadChildren: () => import('./mining-routing.module').then(m => m.MiningRoutingModule)}
|
||||
]
|
||||
}
|
||||
]),
|
||||
PageContentModule,
|
||||
],
|
||||
declarations: [MiningComponent],
|
||||
exports: [MiningComponent]
|
||||
})
|
||||
export class MiningModule {
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
@use "sass:meta";
|
||||
@import "node_modules/interactiveminingv3/assets/css/variables.css";
|
||||
|
||||
.mining {
|
||||
|
||||
@include meta.load-css("node_modules/interactiveminingv3/assets/css/interactive-mining.css");
|
||||
@include meta.load-css("node_modules/interactiveminingv3/assets/css/animations.css");
|
||||
}
|
||||
Loading…
Reference in New Issue