Skip to content

Commit

Permalink
added an ai4eosc landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioLangaritaBenitez committed Jul 12, 2023
1 parent a364eca commit 56ab181
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
"url_user_info": "https://aai.egi.eu/auth/realms/egi/protocol/openid-connect/userinfo",
"token_endpoint": "https://aai.egi.eu/auth/realms/egi/protocol/openid-connect/token",
"api" : "",
"deploy_container" : "false",
"deploy_container" : "true",
"minio_local_endpoint" :"localhost",
"minio_local_port": "30300",
"minio_local_ssl": false ,
Expand Down
9 changes: 5 additions & 4 deletions src/views/Foot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
<v-layout row wrap align-center>
<v-flex xs10>
<div class="white--text ml-4">
<h5>© 2022, <a style="color:#ff9966;font-size:1rem" href="https://www.grycap.upv.es">GRyCAP-I3M-UPV</a>, Universitat Politècnica de València, Spain.</h5>
<h5>Powered by <a target="_blank" href="https://oscar.grycap.net/" style="color:#ff9966;font-size:1rem">OSCAR</a> © 2023,
<a style="color:#ff9966;font-size:1rem" href="https://www.grycap.upv.es" target="_blank">GRyCAP-I3M-UPV</a>, Universitat Politècnica de València, Spain.</h5>
</div>
</v-flex>
<v-flex xs2 v-show="env.deploy_container === 'false'">
<v-flex xs2 >
<h5 style="display: inline">
<a style="color:#ff9966;font-size:1rem;" @click="termofuse()">
Terms of Use
Expand Down Expand Up @@ -40,9 +41,9 @@ export default {
},
getClass(){
console.log(this.$route.name)
if(env.deploy_container=='true' && env.ai4eosc_servers.includes(env.api) && this.$route.name==="Login"){
if(env.deploy_container=='true' && env.ai4eosc_servers.includes(window.location.origin) && this.$route.name==="Login"){
return "ai4eosc"
}else return "teal darken-1"
}else return "teal darken-1"
},
privacy(){
let routeData = this.$router.resolve({name: 'Privacy', });
Expand Down
25 changes: 17 additions & 8 deletions src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<img src="@/assets/logo.png" alt="Vue Material Admin" width="120" height="120">

<img v-if="env.deploy_container=='true' && env.ai4eosc_servers.includes(env.api)" src="https://ai4eosc.eu/wp-content/uploads/sites/10/2022/09/horizontal-transparent.png" alt="Vue Material Admin" width="50%" height="50%">
<img v-if="ai4eoscServer()" src="https://ai4eosc.eu/wp-content/uploads/sites/10/2022/09/horizontal-transparent.png" alt="Vue Material Admin" width="50%" height="50%">

<h1 class="flex my-4 teal--text">OSCAR UI</h1>
</div>
Expand Down Expand Up @@ -61,7 +61,6 @@
<script>
import Services from '../components/services.js';
import env from '../env';
import loginEGI from '../loginEGI.js';
import Foot from '@/views/Foot'
export default {
components: {
Expand All @@ -86,7 +85,7 @@ export default {
if(env.deploy_container == 'true'){
this.endpoint = env.api
}
this.autoLogin();
this.autoLogin();
if(env.deploy_container == "true"){
this.model.endpoint = env.api
}
Expand All @@ -95,22 +94,32 @@ export default {
methods: {
login() {
if(env.deploy_container == "true"){
this.model.endpoint = env.api
}
this.loading = true
var params = {
'user': this.model.username,
'password': this.model.password,
'api': this.model.endpoint
}
this.model.endpoint = this.model.endpoint.endsWith('/') ? this.model.endpoint.slice(0, -1) : this.model.endpoint;
localStorage.setItem("api", this.model.endpoint);
if(env.deploy_container == "true"){
localStorage.setItem("api", window.location.origin);
}else{
localStorage.setItem("api", this.model.endpoint);
}
this.checkLoginCall(params,this.checkLoginCallback);
},
ai4eoscServer(){
if(env.deploy_container=='true' && env.ai4eosc_servers.includes(window.location.origin)) return true
else return false
},
getClass(){
if(env.deploy_container=='true' && env.ai4eosc_servers.includes(env.api)){
return "ai4eosc"
}else return "teal darken-1"
if(this.ai4eoscServer()){
return "ai4eosc"
}else return "teal darken-1"
},
oscar_ui_egi(){
if(env.deploy_container == "true"){
Expand Down

0 comments on commit 56ab181

Please sign in to comment.