update for new api
This commit is contained in:
parent
604a0a2a1f
commit
b9fb3d6860
|
@ -39,16 +39,14 @@ export default {
|
|||
}
|
||||
},
|
||||
fetchProjects(ownertype, ownername) {
|
||||
let path = "/" + ownertype;
|
||||
if (ownername) {
|
||||
path += "/" + ownername;
|
||||
}
|
||||
let path =
|
||||
"/projectgroups/" + encodeURIComponent(ownertype + "/" + ownername);
|
||||
path += "/projects";
|
||||
fetch(apiurl(path))
|
||||
.then(res => res.json())
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
let projects = res.projects.map(function(project) {
|
||||
let projects = res.map(function(project) {
|
||||
return project;
|
||||
});
|
||||
this.projects = projects;
|
||||
|
|
|
@ -100,16 +100,12 @@ export default {
|
|||
return "unknown";
|
||||
},
|
||||
fetchProjectRuns() {
|
||||
fetch(
|
||||
apiurl(
|
||||
let path =
|
||||
"/projects/" +
|
||||
this.ownertype +
|
||||
"/" +
|
||||
this.ownername +
|
||||
"/" +
|
||||
this.projectname
|
||||
)
|
||||
)
|
||||
encodeURIComponent(
|
||||
this.ownertype + "/" + this.ownername + "/" + this.projectname
|
||||
);
|
||||
fetch(apiurl(path))
|
||||
.then(res => res.json())
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
|
@ -144,7 +140,7 @@ export default {
|
|||
.then(res => res.json())
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
let runs = res.runs.map(function(run) {
|
||||
let runs = res.map(function(run) {
|
||||
return run;
|
||||
});
|
||||
this.runs = runs;
|
||||
|
|
|
@ -37,7 +37,7 @@ export default {
|
|||
.then(res => res.json())
|
||||
.then(res => {
|
||||
console.log("remote sources result", res);
|
||||
this.remotesources = res.remote_sources;
|
||||
this.remotesources = res;
|
||||
});
|
||||
},
|
||||
doLogin(rsName, username, password) {
|
||||
|
|
Loading…
Reference in New Issue