Skip to content

Commit

Permalink
Merge pull request #96 from grycap/master
Browse files Browse the repository at this point in the history
Several change
  • Loading branch information
catttam committed Feb 5, 2024
2 parents fa89d6f + 2a6d183 commit 02be362
Show file tree
Hide file tree
Showing 8 changed files with 336 additions and 113 deletions.
1 change: 1 addition & 0 deletions public/callback.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
localStorage.setItem("authenticated", true);
localStorage.setItem("yunikorn_enable",response.data.yunikorn_enable);
localStorage.setItem("gpu_available",response.data.gpu_available);
localStorage.setItem("interLink_available",response.data.interLink_available);
var url_redirect = window.location.origin + "/#/services"
window.location.href = url_redirect
}).catch(function (error) {
Expand Down
24 changes: 13 additions & 11 deletions src/components/AppDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -252,18 +252,20 @@ export default {
},
getBucketListCallBack(response){
try{
this.buckets = response.map((bucket) => {
return {
title: bucket.name,
to: `/buckets/${bucket.name}`,
active: false
if(response.status ==200){
this.buckets = response.map((bucket) => {
return {
title: bucket.name,
to: `/buckets/${bucket.name}`,
active: false
}
})
this.menus.find((obj) => {
if (obj.title === 'Storage') {
obj.items = this.buckets
}
})
}
})
this.menus.find((obj) => {
if (obj.title === 'Storage') {
obj.items = this.buckets
}
})
}catch(err) {
console.error("ERROR with list buckets "+err);
}
Expand Down
27 changes: 19 additions & 8 deletions src/components/forms/FDLForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,26 @@ export default {
}
var params=this.prepareFunction()
const response = await fetch(this.api+'/system/services',options);
const json = await response.json();
let result = json.map(service => service.name);
let result =""
try{
const json = await response.json();
result = json.map(service => service.name);
}catch(err) {
console.error("ERROR with list services "+err);
result = null
options.method="POST"
var typecall="created"
}
console.log(result)
for (let index = 0; index < params.length; index++) {
if(result.includes(params[index].name)){
options.method="PUT"
var typecall="created"
}else{
options.method="POST"
var typecall="edited"
if(result != null){
if(result.includes(params[index].name)){
options.method="PUT"
var typecall="edited"
}else{
options.method="POST"
var typecall="created"
}
}
options.body= JSON.stringify(params[index])
const response = await fetch(this.api+'/system/services',options);
Expand Down
Loading

0 comments on commit 02be362

Please sign in to comment.