Stuff
This commit is contained in:
parent
50ef516ed6
commit
01c3ea3d32
2 changed files with 48 additions and 10 deletions
|
@ -18,5 +18,11 @@ export default {
|
||||||
},
|
},
|
||||||
allowAccess(id, redirect_uri, scope) {
|
allowAccess(id, redirect_uri, scope) {
|
||||||
return Api().post('/v1/app/'+id+'/access/allow', {redirect_uri: redirect_uri, scope:scope});
|
return Api().post('/v1/app/'+id+'/access/allow', {redirect_uri: redirect_uri, scope:scope});
|
||||||
|
},
|
||||||
|
updateApp(app) {
|
||||||
|
return Api().put("/v1/app/"+app.id, app);
|
||||||
|
},
|
||||||
|
getUser(id) {
|
||||||
|
return Api().get('/v1/app/'+id+'/user')
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<v-container grid-list-md>
|
<v-container grid-list-md>
|
||||||
<v-layout row wrap>
|
<v-layout row wrap>
|
||||||
<v-flex md12>
|
<v-flex md12 v-if="app != null">
|
||||||
<h1>App {{ app.name }}</h1>
|
<h1>App {{ app.name }}</h1>
|
||||||
<v-card class="mx-auto" flat style="margin-top: 10px;">
|
<v-card class="mx-auto" flat style="margin-top: 10px;">
|
||||||
<v-tabs
|
<v-tabs
|
||||||
|
@ -15,7 +15,8 @@
|
||||||
<v-tab>Overview</v-tab>
|
<v-tab>Overview</v-tab>
|
||||||
<v-tab>API Access</v-tab>
|
<v-tab>API Access</v-tab>
|
||||||
<v-tab>Settings</v-tab>
|
<v-tab>Settings</v-tab>
|
||||||
<v-tab disabled>Users</v-tab>
|
<v-tab>Permissions</v-tab>
|
||||||
|
<v-tab>Users</v-tab>
|
||||||
|
|
||||||
<v-tab-item :key="1" :transition="false" :reverse-transition="false" >
|
<v-tab-item :key="1" :transition="false" :reverse-transition="false" >
|
||||||
<v-container style="padding-right: 0px; padding-left:0px;">
|
<v-container style="padding-right: 0px; padding-left:0px;">
|
||||||
|
@ -78,20 +79,20 @@
|
||||||
<v-flex md8>
|
<v-flex md8>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
label="App Name"
|
label="App Name"
|
||||||
:value="app.name"
|
v-model="app.name"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
label="URL"
|
label="URL"
|
||||||
:value="app.url"
|
v-model="app.url"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
<v-textarea
|
<v-textarea
|
||||||
label="Description"
|
label="Description"
|
||||||
:value="app.description"
|
v-model="app.description"
|
||||||
|
|
||||||
></v-textarea>
|
></v-textarea>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
label="Direct Login URL"
|
label="Direct Login URL"
|
||||||
:value="app.directUrl"
|
v-model="app.directUrl"
|
||||||
hint="URL to login with this oAuth Provider"
|
hint="URL to login with this oAuth Provider"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
<v-checkbox
|
<v-checkbox
|
||||||
|
@ -131,17 +132,32 @@
|
||||||
></v-checkbox>
|
></v-checkbox>
|
||||||
|
|
||||||
|
|
||||||
|
<v-btn color="success" @click="updateSettings()" >Speichern</v-btn>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
<v-flex md4>
|
<v-flex md4>
|
||||||
IMAGE
|
IMAGE
|
||||||
</v-flex>
|
</v-flex>
|
||||||
|
|
||||||
</v-layout>
|
</v-layout>
|
||||||
</v-container>
|
</v-container>
|
||||||
</v-tab-item>
|
</v-tab-item>
|
||||||
<v-tab-item :key="4" :transition="false" :reverse-transition="false">
|
<v-tab-item :key="4" :transition="false" :reverse-transition="false">
|
||||||
<v-container style="padding-right: 0px; padding-left:0px;">
|
<v-container style="padding-right: 0px; padding-left:0px;">
|
||||||
|
<p>
|
||||||
|
Beim ändern der Permissions müssen alle User den Zugriff erneut bestätigen.
|
||||||
|
</p>
|
||||||
|
</v-container>
|
||||||
|
</v-tab-item>
|
||||||
|
<v-tab-item :key="4" :transition="false" :reverse-transition="false">
|
||||||
|
<v-container style="padding-right: 0px; padding-left:0px;">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Username</th>
|
||||||
|
</tr>
|
||||||
|
<tr v-for="user in appUser">
|
||||||
|
<td>{{ user.username }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</v-container>
|
</v-container>
|
||||||
</v-tab-item>
|
</v-tab-item>
|
||||||
|
|
||||||
|
@ -169,19 +185,35 @@
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
app: null,
|
app: null,
|
||||||
imageUrl: ''
|
imageUrl: '',
|
||||||
|
appUser: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
"Login": LoginComponent
|
"Login": LoginComponent
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
'updateSettings': function () {
|
||||||
|
AppService.updateApp(this.app).then((res) => {
|
||||||
|
if(res.data.success) {
|
||||||
|
alert("Änderung erfolgreich gespeichert");
|
||||||
|
} else {
|
||||||
|
alert("FEHLER: "+res.data.msg);
|
||||||
|
}
|
||||||
|
this.app = res.data.data;
|
||||||
|
}, (res) => {
|
||||||
|
alert("FEHLER: "+res.response.data.msg);
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
AppService.getApp(this.$route.params.id).then((res) => {
|
AppService.getApp(this.$route.params.id).then((res) => {
|
||||||
this.app = res.data.data;
|
this.app = res.data.data;
|
||||||
})
|
})
|
||||||
|
AppService.getUser(this.$route.params.id).then((res) => {
|
||||||
|
console.log("Users", res.data.data)
|
||||||
|
this.appUser = res.data.data;
|
||||||
|
})
|
||||||
this.imageUrl = AppService.getAppImage(this.$route.params.id);
|
this.imageUrl = AppService.getAppImage(this.$route.params.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue