2019-06-20 16:04:08 +00:00
|
|
|
<template>
|
2019-08-17 18:21:55 +00:00
|
|
|
<div style="margin-top: 50px;">
|
2019-06-20 16:04:08 +00:00
|
|
|
|
2019-08-11 18:48:02 +00:00
|
|
|
<v-container grid-list-md pa-10>
|
2019-06-20 16:04:08 +00:00
|
|
|
<v-layout row wrap>
|
2019-06-20 17:07:08 +00:00
|
|
|
<v-flex md12 v-if="app != null">
|
2019-06-20 16:04:08 +00:00
|
|
|
<h1>App {{ app.name }}</h1>
|
|
|
|
<v-card class="mx-auto" flat style="margin-top: 10px;">
|
|
|
|
<v-tabs
|
|
|
|
background-color="white"
|
|
|
|
color="fff"
|
|
|
|
left
|
|
|
|
|
|
|
|
>
|
|
|
|
<v-tab>Overview</v-tab>
|
|
|
|
<v-tab>API Access</v-tab>
|
|
|
|
<v-tab>Settings</v-tab>
|
2019-06-20 17:07:08 +00:00
|
|
|
<v-tab>Permissions</v-tab>
|
|
|
|
<v-tab>Users</v-tab>
|
2019-06-20 16:04:08 +00:00
|
|
|
|
|
|
|
<v-tab-item :key="1" :transition="false" :reverse-transition="false" >
|
|
|
|
<v-container style="padding-right: 0px; padding-left:0px;">
|
2019-09-24 14:21:00 +00:00
|
|
|
<img :src="imageUrl" style="float: right;max-width: 300px;">
|
2019-06-20 16:04:08 +00:00
|
|
|
<b>Description</b><br>
|
|
|
|
{{ app.description }}<br><br>
|
|
|
|
<a :href="app.url">{{ app.url }}</a>
|
|
|
|
</v-container>
|
|
|
|
|
|
|
|
</v-tab-item>
|
|
|
|
<v-tab-item :key="2" :transition="false" :reverse-transition="false">
|
|
|
|
<v-container style="padding-right: 0px; padding-left:0px;">
|
|
|
|
<h2>oAuth Token</h2>
|
|
|
|
<p>
|
|
|
|
Here are the oAuth API-Keys. You use this Keys to start the oAuth authorization work flow.
|
|
|
|
</p>
|
|
|
|
<v-text-field
|
|
|
|
label="API Key"
|
|
|
|
:value="app.apiKey"
|
|
|
|
hint="You can't edit this"
|
|
|
|
></v-text-field>
|
|
|
|
<v-text-field
|
|
|
|
label="API Secret"
|
|
|
|
:value="app.apiSecret"
|
|
|
|
hint="You can't edit this"
|
|
|
|
></v-text-field>
|
|
|
|
<br>
|
2019-07-17 12:44:05 +00:00
|
|
|
<!--<h2>API Access</h2>
|
2019-06-20 16:04:08 +00:00
|
|
|
<p>
|
|
|
|
You can access the API to get informations about this APP with the following API Credentials:
|
|
|
|
<v-text-field
|
|
|
|
label="API Token"
|
|
|
|
value=""
|
|
|
|
disabled
|
|
|
|
></v-text-field>
|
|
|
|
<v-text-field
|
|
|
|
label="Refresh Token"
|
|
|
|
value=""
|
|
|
|
disabled
|
|
|
|
></v-text-field>
|
|
|
|
<h2>Development Access</h2>
|
|
|
|
<p>
|
|
|
|
To test the App you can use the following Developer Access and Refresh token, they are connected to your user.
|
|
|
|
<v-text-field
|
|
|
|
label="Access Token"
|
|
|
|
value=""
|
|
|
|
disabled
|
|
|
|
></v-text-field>
|
|
|
|
<v-text-field
|
|
|
|
label="Refresh Token"
|
|
|
|
value=""
|
|
|
|
disabled
|
|
|
|
></v-text-field>
|
2019-07-17 12:44:05 +00:00
|
|
|
</p>!-->
|
2019-06-20 16:04:08 +00:00
|
|
|
</v-container>
|
|
|
|
</v-tab-item>
|
|
|
|
<v-tab-item :key="3" :transition="false" :reverse-transition="false">
|
|
|
|
<v-container style="padding-right: 0px; padding-left:0px;">
|
|
|
|
<v-layout>
|
|
|
|
<v-flex md8>
|
|
|
|
<v-text-field
|
|
|
|
label="App Name"
|
2019-06-20 17:07:08 +00:00
|
|
|
v-model="app.name"
|
2019-06-20 16:04:08 +00:00
|
|
|
></v-text-field>
|
|
|
|
<v-text-field
|
|
|
|
label="URL"
|
2019-06-20 17:07:08 +00:00
|
|
|
v-model="app.url"
|
2019-06-20 16:04:08 +00:00
|
|
|
></v-text-field>
|
|
|
|
<v-textarea
|
|
|
|
label="Description"
|
2019-06-20 17:07:08 +00:00
|
|
|
v-model="app.description"
|
2019-06-20 16:04:08 +00:00
|
|
|
|
|
|
|
></v-textarea>
|
|
|
|
<v-text-field
|
|
|
|
label="Direct Login URL"
|
2019-06-20 17:07:08 +00:00
|
|
|
v-model="app.directUrl"
|
2019-06-20 16:04:08 +00:00
|
|
|
hint="URL to login with this oAuth Provider"
|
|
|
|
></v-text-field>
|
|
|
|
<v-checkbox
|
|
|
|
v-model="app.properties.testingWarning"
|
|
|
|
label="Testing Warning"
|
|
|
|
disabled
|
|
|
|
></v-checkbox>
|
|
|
|
<v-checkbox
|
|
|
|
v-model="app.properties.untrustedWarning"
|
|
|
|
label="Untrusted Warning"
|
|
|
|
disabled
|
|
|
|
></v-checkbox>
|
|
|
|
<v-checkbox
|
|
|
|
v-model="app.properties.autoAccept"
|
|
|
|
label="Auto Accept"
|
|
|
|
disabled
|
|
|
|
></v-checkbox>
|
|
|
|
<v-checkbox
|
|
|
|
v-model="app.properties.showOnWebpage"
|
|
|
|
label="Show on Webpage"
|
|
|
|
disabled
|
|
|
|
></v-checkbox>
|
|
|
|
<v-checkbox
|
|
|
|
v-model="app.properties.stopAutoRedirect"
|
|
|
|
label="Stop Auto Redirect"
|
|
|
|
disabled
|
|
|
|
></v-checkbox>
|
|
|
|
<v-checkbox
|
|
|
|
v-model="app.properties.hideInAppList"
|
|
|
|
label="Hide in App List"
|
|
|
|
disabled
|
|
|
|
></v-checkbox>
|
|
|
|
<v-checkbox
|
|
|
|
v-model="app.properties.userCantRemoveApp"
|
|
|
|
label="Disabled user possible to remove App-Access"
|
|
|
|
disabled
|
|
|
|
></v-checkbox>
|
|
|
|
|
|
|
|
|
2019-06-20 17:07:08 +00:00
|
|
|
<v-btn color="success" @click="updateSettings()" >Speichern</v-btn>
|
2019-06-20 16:04:08 +00:00
|
|
|
</v-flex>
|
|
|
|
<v-flex md4>
|
2019-09-24 14:21:00 +00:00
|
|
|
<UploadAppImage :appId="app.id"></UploadAppImage>
|
2019-06-20 16:04:08 +00:00
|
|
|
</v-flex>
|
2019-06-20 17:07:08 +00:00
|
|
|
|
2019-06-20 16:04:08 +00:00
|
|
|
</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;">
|
2019-06-20 17:07:08 +00:00
|
|
|
<p>
|
2019-09-24 14:21:00 +00:00
|
|
|
<v-alert type="warning">
|
|
|
|
This feature coming soon.
|
|
|
|
</v-alert>
|
2019-06-20 17:07:08 +00:00
|
|
|
Beim ändern der Permissions müssen alle User den Zugriff erneut bestätigen.
|
2019-07-17 12:44:05 +00:00
|
|
|
|
|
|
|
<v-checkbox
|
|
|
|
v-model="app.access.oAuth"
|
|
|
|
label="Use oAuth"
|
|
|
|
disabled
|
|
|
|
></v-checkbox>
|
|
|
|
<v-checkbox
|
|
|
|
v-model="app.access.api"
|
|
|
|
label="Make API-Requests"
|
|
|
|
disabled
|
|
|
|
></v-checkbox>
|
|
|
|
<v-checkbox
|
|
|
|
v-model="app.access.update_apps"
|
|
|
|
label="Update the Users App"
|
|
|
|
disabled
|
|
|
|
></v-checkbox>
|
|
|
|
<v-checkbox
|
|
|
|
v-model="app.access.update_profile"
|
|
|
|
label="Update the User Profile"
|
|
|
|
disabled
|
|
|
|
></v-checkbox>
|
|
|
|
<v-checkbox
|
|
|
|
v-model="app.access.update_access"
|
|
|
|
label="Update the User Access list (revoke Access)""
|
|
|
|
disabled
|
|
|
|
></v-checkbox>
|
|
|
|
<v-checkbox
|
|
|
|
v-model="app.access.read_access"
|
|
|
|
label="Read all Access from the User"
|
|
|
|
disabled
|
|
|
|
></v-checkbox>
|
|
|
|
<v-checkbox
|
|
|
|
v-model="app.access.read_apps"
|
|
|
|
label="Read all Apps from the User"
|
|
|
|
disabled
|
|
|
|
></v-checkbox>
|
|
|
|
<v-checkbox
|
|
|
|
v-model="app.access.read_profile"
|
|
|
|
label="Read the User-Profil Information"
|
|
|
|
disabled
|
|
|
|
></v-checkbox>
|
2019-06-20 17:07:08 +00:00
|
|
|
</p>
|
|
|
|
</v-container>
|
|
|
|
</v-tab-item>
|
|
|
|
<v-tab-item :key="4" :transition="false" :reverse-transition="false">
|
2019-09-24 14:21:00 +00:00
|
|
|
|
|
|
|
<v-simple-table>
|
|
|
|
<template v-slot:default>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="text-left">Username</th>
|
|
|
|
<th class="text-right">Actions</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr v-for="user in appUser">
|
|
|
|
<td>{{ user.username }}</td>
|
|
|
|
<td class="text-right"><i>None</i></td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</template>
|
|
|
|
</v-simple-table>
|
2019-06-20 16:04:08 +00:00
|
|
|
</v-tab-item>
|
|
|
|
|
|
|
|
</v-tabs>
|
|
|
|
</v-card>
|
|
|
|
</v-flex>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</v-layout>
|
|
|
|
</v-container>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import ServerService from '../services/Server'
|
|
|
|
import UserService from '../services/User'
|
|
|
|
import LoginComponent from '../components/Login'
|
|
|
|
import AppService from '../services/Apps'
|
2019-09-24 14:21:00 +00:00
|
|
|
import UploadAppImageComponent from '../components/UploadAppImage'
|
2019-06-20 16:04:08 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
app: null,
|
2019-06-20 17:07:08 +00:00
|
|
|
imageUrl: '',
|
|
|
|
appUser: []
|
2019-06-20 16:04:08 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
components: {
|
2019-09-24 14:21:00 +00:00
|
|
|
"Login": LoginComponent,
|
|
|
|
"UploadAppImage": UploadAppImageComponent
|
2019-06-20 16:04:08 +00:00
|
|
|
},
|
|
|
|
methods: {
|
2019-06-20 17:07:08 +00:00
|
|
|
'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);
|
|
|
|
})
|
|
|
|
}
|
2019-06-20 16:04:08 +00:00
|
|
|
},
|
|
|
|
mounted: function() {
|
|
|
|
AppService.getApp(this.$route.params.id).then((res) => {
|
|
|
|
this.app = res.data.data;
|
|
|
|
})
|
2019-06-20 17:07:08 +00:00
|
|
|
AppService.getUser(this.$route.params.id).then((res) => {
|
|
|
|
console.log("Users", res.data.data)
|
|
|
|
this.appUser = res.data.data;
|
|
|
|
})
|
2019-06-20 16:04:08 +00:00
|
|
|
this.imageUrl = AppService.getAppImage(this.$route.params.id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
</style>
|