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) {
|
||||
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-layout row wrap>
|
||||
<v-flex md12>
|
||||
<v-flex md12 v-if="app != null">
|
||||
<h1>App {{ app.name }}</h1>
|
||||
<v-card class="mx-auto" flat style="margin-top: 10px;">
|
||||
<v-tabs
|
||||
|
@ -15,7 +15,8 @@
|
|||
<v-tab>Overview</v-tab>
|
||||
<v-tab>API Access</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-container style="padding-right: 0px; padding-left:0px;">
|
||||
|
@ -78,20 +79,20 @@
|
|||
<v-flex md8>
|
||||
<v-text-field
|
||||
label="App Name"
|
||||
:value="app.name"
|
||||
v-model="app.name"
|
||||
></v-text-field>
|
||||
<v-text-field
|
||||
label="URL"
|
||||
:value="app.url"
|
||||
v-model="app.url"
|
||||
></v-text-field>
|
||||
<v-textarea
|
||||
label="Description"
|
||||
:value="app.description"
|
||||
v-model="app.description"
|
||||
|
||||
></v-textarea>
|
||||
<v-text-field
|
||||
label="Direct Login URL"
|
||||
:value="app.directUrl"
|
||||
v-model="app.directUrl"
|
||||
hint="URL to login with this oAuth Provider"
|
||||
></v-text-field>
|
||||
<v-checkbox
|
||||
|
@ -131,17 +132,32 @@
|
|||
></v-checkbox>
|
||||
|
||||
|
||||
|
||||
<v-btn color="success" @click="updateSettings()" >Speichern</v-btn>
|
||||
</v-flex>
|
||||
<v-flex md4>
|
||||
IMAGE
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-tab-item>
|
||||
<v-tab-item :key="4" :transition="false" :reverse-transition="false">
|
||||
<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-tab-item>
|
||||
|
||||
|
@ -169,19 +185,35 @@
|
|||
data () {
|
||||
return {
|
||||
app: null,
|
||||
imageUrl: ''
|
||||
imageUrl: '',
|
||||
appUser: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"Login": LoginComponent
|
||||
},
|
||||
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() {
|
||||
AppService.getApp(this.$route.params.id).then((res) => {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue