Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
Konstantinos Triantafyllou | 9ab73ea995 | |
Konstantinos Triantafyllou | 2b55289bab | |
Konstantinos Triantafyllou | cc32a2ffad | |
Konstantinos Triantafyllou | 2314b8ba86 | |
Konstantinos Triantafyllou | 85b867a138 |
|
@ -10,7 +10,6 @@ import {FullScreenModalComponent} from "../openaireLibrary/utils/modal/full-scre
|
|||
import {EmailService} from "../openaireLibrary/utils/email/email.service";
|
||||
import {Email} from "../openaireLibrary/utils/email/email";
|
||||
import {properties} from "../../environments/environment";
|
||||
import {error} from "@angular/compiler-cli/src/transformers/util";
|
||||
|
||||
@Component({
|
||||
selector: 'admin',
|
||||
|
@ -357,7 +356,6 @@ export class AdminComponent implements OnInit, OnDestroy{
|
|||
}
|
||||
|
||||
sendEmail() {
|
||||
this.loading = true;
|
||||
let email = new Email();
|
||||
email.body = this.emailForm.get('body').value;
|
||||
email.subject = this.emailForm.get('subject').value;
|
||||
|
@ -368,10 +366,6 @@ export class AdminComponent implements OnInit, OnDestroy{
|
|||
} else {
|
||||
NotificationHandler.rise('An error has occurred. Please try again later!', 'danger');
|
||||
}
|
||||
this.loading = false;
|
||||
}, error => {
|
||||
NotificationHandler.rise('An error has occurred. Please try again later!', 'danger');
|
||||
this.loading = false;
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,8 @@ declare var copy;
|
|||
<div class="uk-alert-primary uk-alert uk-margin-top-remove uk-flex uk-flex-middle">
|
||||
<icon name="info" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">You can register up to 5 services.
|
||||
For more information please read the <a href="https://graph.openaire.eu/docs/apis/authentication/#registered-services" target="_blank">OpenAIRE API Authentication documentation</a>.</span>
|
||||
For more information please read the <a
|
||||
href="https://graph.openaire.eu/develop/authentication.html" target="_blank">OpenAIRE API Authentication documentation</a>.</span>
|
||||
</div>
|
||||
<div *ngIf="apis.length === 0"
|
||||
class="uk-margin-large-top uk-card uk-card-default uk-height-small uk-position-relative">
|
||||
|
@ -99,8 +100,8 @@ declare var copy;
|
|||
<div class="uk-width-1-1">
|
||||
<label class="uk-text-bold">Security Level</label>
|
||||
<div id="security-hint" class="uk-margin">Register your service to get a client id and a client
|
||||
secret. Use the client id and secret to make your requests.
|
||||
<a href="https://graph.openaire.eu/docs/apis/authentication/#basic-service-authentication-and-registration" target="_blank">Read more...</a>
|
||||
secret. Use the client id and secret to make your requests. <a
|
||||
href="https://graph.openaire.eu/develop/basic.html" target="_blank">Read more...</a>
|
||||
</div>
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<div class="uk-margin-small-right">
|
||||
|
|
|
@ -8,7 +8,7 @@ import {Component, OnInit} from "@angular/core";
|
|||
<div class="uk-margin-large-top">The OpenAIRE APIs can be accessed over HTTPS both by authenticated and unauthenticated requests. To achieve <span class="uk-text-bold">better rate limits</span> you need to make <span class="uk-text-bold">authenticated requests.</span></div>
|
||||
<div class="uk-alert uk-alert-primary uk-flex uk-flex-middle uk-margin-medium-top">
|
||||
<icon name="info" [type]="'outlined'" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">For more information please read the <a href="https://graph.openaire.eu/docs/apis/authentication" target="_blank">OpenAIRE API Authentication documentation</a>.</span>
|
||||
<span class="uk-margin-small-left">For more information please read the <a href="https://graph.openaire.eu/develop/authentication.html" target="_blank">OpenAIRE API Authentication documentation</a>.</span>
|
||||
</div>
|
||||
<div class="uk-grid uk-grid-large uk-child-width-1-2@m uk-child-width-1-1 uk-margin-large-top" uk-grid>
|
||||
<div>
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit b054a823daf43cfdbcbf2bdd727a3a7d3704b3ac
|
||||
Subproject commit 1a7624eed148c35659891198c403580dd48e3619
|
|
@ -6,10 +6,6 @@ import {User} from "../openaireLibrary/login/utils/helper.class";
|
|||
import {PersonalInfo, PersonalService} from "../services/personal.service";
|
||||
import {NotificationHandler} from "../openaireLibrary/utils/notification-handler";
|
||||
import {NavigationEnd, Router} from "@angular/router";
|
||||
import {EmailService} from "../openaireLibrary/utils/email/email.service";
|
||||
import {Email} from "../openaireLibrary/utils/email/email";
|
||||
import {properties} from "../../environments/environment";
|
||||
import {Composer} from "../openaireLibrary/utils/email/composer";
|
||||
|
||||
@Component({
|
||||
selector: `personal-form`,
|
||||
|
@ -39,9 +35,6 @@ import {Composer} from "../openaireLibrary/utils/email/composer";
|
|||
<div class="uk-width-1-2@m uk-width-1-1" input [formInput]="form.get('position')"
|
||||
[placeholder]="'Position'"></div>
|
||||
</div>
|
||||
<div class="uk-margin-top uk-text-small uk-text-italic">
|
||||
Please note that by submitting your information in this form, you agree to be added to the Graph client mailing list. This will ensure you stay updated with relevant news. If you wish to opt-out, you can do so at any time by contacting the list admins at <a href="mailto:gbikas@openaire.eu">gbikas@openaire.eu</a> and <a href="mailto:stefania.amodeo@openaire.eu">stefania.amodeo@openaire.eu</a>.
|
||||
</div>
|
||||
<div class="uk-flex uk-flex-right@l uk-flex-center uk-margin-medium-top">
|
||||
<a class="uk-button uk-button-default uk-margin-small-right" routerLink="/">Cancel</a>
|
||||
<button class="uk-button uk-button-primary" [disabled]="form.pristine || form.invalid || form.disabled"
|
||||
|
@ -66,7 +59,6 @@ export class PersonalInfoComponent implements OnInit, OnDestroy {
|
|||
constructor(private fb: FormBuilder,
|
||||
private personalService: PersonalService,
|
||||
private userManagementService: UserManagementService,
|
||||
private emailService: EmailService,
|
||||
private router: Router) {
|
||||
this.subscriptions.push(this.router.events.subscribe(event => {
|
||||
if(event instanceof NavigationEnd) {
|
||||
|
@ -121,20 +113,13 @@ export class PersonalInfoComponent implements OnInit, OnDestroy {
|
|||
save() {
|
||||
this.loading = true;
|
||||
this.subscriptions.push(this.personalService.savePersonalInfo(this.form.getRawValue()).subscribe(info => {
|
||||
let callback = (info: PersonalInfo) => {
|
||||
this.info = info;
|
||||
NotificationHandler.rise('Your personal info has been saved successfully.');
|
||||
this.initForm();
|
||||
this.loading = false;
|
||||
this.message = false;
|
||||
if (this.redirect) {
|
||||
this.router.navigate([this.redirect]);
|
||||
}
|
||||
}
|
||||
if(!this.info) {
|
||||
this.sendEmail(callback, info);
|
||||
} else {
|
||||
callback(info);
|
||||
this.info = info;
|
||||
NotificationHandler.rise('Your personal info has been saved successfully.');
|
||||
this.initForm();
|
||||
this.loading = false;
|
||||
this.message = false;
|
||||
if(this.redirect) {
|
||||
this.router.navigate([this.redirect]);
|
||||
}
|
||||
}, error => {
|
||||
console.error(error);
|
||||
|
@ -151,15 +136,4 @@ export class PersonalInfoComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
sendEmail(callback: (info: PersonalInfo) => void, info: PersonalInfo) {
|
||||
let email = Composer.composeEmailForDevelopPersonalInfo(this.user);
|
||||
this.emailService.sendEmail(properties, email).subscribe( (res) => {
|
||||
callback(info);
|
||||
this.loading = false;
|
||||
}, error => {
|
||||
NotificationHandler.rise('An error has occurred. Please try again later!', 'danger');
|
||||
this.loading = false;
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ declare var copy;
|
|||
<icon name="info" [type]="'outlined'" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">
|
||||
For further information on how to use the tokens please visit the
|
||||
<a href="https://graph.openaire.eu/docs/apis/authentication/#personal-access-token" target="_blank">OpenAIRE API Authentication documentation</a>.
|
||||
<a href="https://graph.openaire.eu/develop/personalToken.html" target="_blank">OpenAIRE API Authentication documentation</a>.
|
||||
</span>
|
||||
</div>
|
||||
<div class="uk-margin-large-bottom">
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit e48bf941bcdc567a3d09826b5686e70d43fafd46
|
||||
Subproject commit e77e591bbb8264895adb9934210844e70f01e219
|
|
@ -1 +1 @@
|
|||
Subproject commit fe10d2e9195fdebf3d906f28abbb072f3617c4ee
|
||||
Subproject commit 5b2ec5ad3c5d43fcd69f82ddfa3a841a0d34ba0c
|
|
@ -5,8 +5,10 @@ export let properties: EnvProperties = {
|
|||
dashboard: 'developers',
|
||||
useCache: false,
|
||||
adminToolsAPIURL: "https://beta.services.openaire.eu/uoa-admin-tools/",
|
||||
loginServiceURL: "https://beta.services.openaire.eu/developers-api/",
|
||||
loginUrl: "https://beta.services.openaire.eu/developers-api/openid_connect_login",
|
||||
userInfoUrl: "https://beta.services.openaire.eu/developers-api/userInfo",
|
||||
developersApiUrl: "https://beta.services.openaire.eu/developers-api",
|
||||
logoutUrl: "https://beta.services.openaire.eu/developers-api/openid_logout",
|
||||
domain: 'https://beta.develop.openaire.eu',
|
||||
errorLink: '/error',
|
||||
baseLink: '',
|
||||
|
|
|
@ -5,8 +5,10 @@ export let properties: EnvProperties = {
|
|||
dashboard: 'developers',
|
||||
useCache: false,
|
||||
adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/",
|
||||
loginServiceURL: "https://services.openaire.eu/developers-api/",
|
||||
loginUrl: "https://services.openaire.eu/developers-api/openid_connect_login",
|
||||
userInfoUrl: "https://services.openaire.eu/developers-api/userInfo",
|
||||
developersApiUrl: "https://services.openaire.eu/developers-api",
|
||||
logoutUrl: "https://services.openaire.eu/developers-api/openid_logout",
|
||||
domain: 'https://develop.openaire.eu',
|
||||
errorLink: '/error',
|
||||
baseLink: '',
|
||||
|
|
|
@ -10,8 +10,10 @@ export let properties: EnvProperties = {
|
|||
dashboard: 'developers',
|
||||
useCache: false,
|
||||
adminToolsAPIURL: "http://duffy.di.uoa.gr:19280/uoa-admin-tools/",
|
||||
loginServiceURL: "http://mpagasas.di.uoa.gr:19580/developers-api/",
|
||||
loginUrl: "http://mpagasas.di.uoa.gr:19580/developers-api/openid_connect_login",
|
||||
userInfoUrl: "http://mpagasas.di.uoa.gr:19580/developers-api/userInfo",
|
||||
developersApiUrl: "http://mpagasas.di.uoa.gr:19580/developers-api",
|
||||
logoutUrl: "http://mpagasas.di.uoa.gr:19580/developers-api/openid_logout",
|
||||
domain: 'http://mpagasas.di.uoa.gr:5001',
|
||||
errorLink: '/error',
|
||||
baseLink: '',
|
||||
|
|
|
@ -19,8 +19,5 @@
|
|||
"dom"
|
||||
],
|
||||
"useDefineForClassFields": false
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"allowSyntheticDefaultImports": true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue