Commit 8e486922 authored by Janis Streib's avatar Janis Streib 🦉
Browse files

Cleanup

parent 419c30d5
Pipeline #117241 passed with stages
in 4 minutes and 44 seconds
......@@ -9734,19 +9734,6 @@
"minimist": "^1.2.5"
}
},
"moment": {
"version": "2.27.0",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz",
"integrity": "sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ=="
},
"moment-range": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/moment-range/-/moment-range-4.0.2.tgz",
"integrity": "sha512-n8sceWwSTjmz++nFHzeNEUsYtDqjgXgcOBzsHi+BoXQU2FW+eU92LUaK8gqOiSu5PG57Q9sYj1Fz4LRDj4FtKA==",
"requires": {
"es6-symbol": "^3.1.0"
}
},
"move-concurrently": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
......@@ -16069,11 +16056,6 @@
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz",
"integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg=="
},
"v-click-outside": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/v-click-outside/-/v-click-outside-2.1.5.tgz",
"integrity": "sha512-VPNCOTZK6WZy73lcWc+R7IW1uaBFEO3/Csrs5CzWVOdvE30V8Y1+BE/BtTlcEmeDGx0eqdE7bSCg55Jj37PMJg=="
},
"v-debounce": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/v-debounce/-/v-debounce-0.1.2.tgz",
......@@ -16137,17 +16119,6 @@
"resolved": "https://registry.npmjs.org/vue-axios/-/vue-axios-2.1.5.tgz",
"integrity": "sha512-th5xVbInVoyIoe+qY+9GCflEVezxAvztD4xpFF39SRQYqpoKD2qkmX8yv08jJG9a2SgNOCjirjJGSwg/wTrbmA=="
},
"vue-ctk-date-time-picker": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/vue-ctk-date-time-picker/-/vue-ctk-date-time-picker-2.5.0.tgz",
"integrity": "sha512-s4AO+5xnPlX+LD5UPQcjLBnv8MwcEJKlKUnkTLQeXRV0xqpH9pWRe6aJ8N2+506mEN6b7iwhlFox6uKKdtK+gw==",
"requires": {
"moment": "^2.24.0",
"moment-range": "^4.0.1",
"v-click-outside": "^2.0.2",
"vue": "^2.6.9"
}
},
"vue-eslint-parser": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-7.1.0.tgz",
......
......@@ -31,7 +31,6 @@
"vue": "^2.6.12",
"vue-awesome": "^3.5.4",
"vue-axios": "^2.1.5",
"vue-ctk-date-time-picker": "^2.5.0",
"vue-router": "^3.4.9",
"vue-virtual-scroller": "^1.0.10",
"vue2-leaflet": "^2.6.0",
......
<template>
<b-form-group :label="label" label-for="id" class="mb-0">
<VueCtkDateTimePicker
:inline="!isMobile()"
format="DD-MM-YYYY HH:mm"
locale="de"
noButtonNow
minute-interval="5"
noLabel
no-keyboard
noClearButton
id="id"
color="#007BFF"
button-color="#007BFF"
:v-model="model"/>
</b-form-group>
</template>
<script>
export default {
name: 'DateTimePicker',
props: ['label', 'model'],
data () {
return {
id: null
}
},
mounted () {
this.id = this._uid
}
}
</script>
<style scoped>
</style>
......@@ -8,9 +8,6 @@ import BootstrapVue from 'bootstrap-vue'
import titleMixin from './mixins/title_mixin'
import isMobileMixin from './mixins/is_mobile_mixin'
import VueCtkDateTimePicker from 'vue-ctk-date-time-picker'
import 'vue-ctk-date-time-picker/dist/vue-ctk-date-time-picker.css'
import './icons'
import sharedMutations from 'vuex-shared-mutations'
......@@ -26,8 +23,6 @@ Vue.mixin(isMobileMixin)
Vue.use(BootstrapVue)
Vue.use(vuexUndoRedo, { emptyStateMutation: 'emptyState' })
Vue.component('VueCtkDateTimePicker', VueCtkDateTimePicker)
async function init() {
let session_info = null
let stored_token = null
......
......@@ -163,52 +163,6 @@
</b-button>
</template>
</b-modal>
<b-modal id="modal-create-token" size=lg title="Token erstellen"
@hidden="resetTokenData">
<b-form>
<b-form-group label="Beschreibung:" label-for="input-token-create-description">
<b-form-textarea
id="input-token-create-description"
v-model.trim="new_token.description"
required
placeholder="Beschreibung"
/>
</b-form-group>
<div v-if="new_token.expiration_date != null">
<DateTimePicker label="Ablaufdatum:" :model="new_token.expiration_date"/>
<b-button block variant="outline-secondary" @click="new_token.expiration_date = null">
Ablaufdatum entfernen
</b-button>
</div>
<b-button block variant="outline-secondary" v-else
@click="new_token.expiration_date = formatDate(getDate30DaysAhead())">
Ablaufdatum hinzufügen
</b-button>
</b-form>
<template v-slot:modal-footer="{cancel}">
<b-alert id="alert-create-token" v-model="show_modal_alert"
variant="danger" dismissible fade class="mb-0 flex-grow">
{{ modal_alert_content }}
</b-alert>
<b-button variant="outline-secondary" @click="cancel">
Abbrechen
</b-button>
<b-button type="submit" variant="success" :disabled="waiting" @click="createToken">
Erstellen
</b-button>
</template>
</b-modal>
<b-modal id="modal-token" size=lg title="Token erstellt">
<CopyField class="shadow" :text="token"/>
<b-alert show variant="warning" class="mb-0 mt-3">Bewahren Sie das Token gut auf. Hier werden Sie es nicht
mehr einsehen können!
</b-alert>
<template v-slot:modal-footer="{ok}">
<b-button variant="success" @click="ok">
Ok
</b-button>
</template>
</b-modal>
<Loading :data="[filtered_accounts]">
<template v-for="account in filtered_accounts">
<b-card no-body :key="'card-account-' + account.login_name" class="mb-4 shadow">
......@@ -372,17 +326,14 @@ import AccountService from '@/api-services.gen/cntl.mgr'
import TokenService from '@/api-services.gen/cntl.wapi_auth'
import ApiUtil from '@/util/apiutil'
import '@/util/colorutil'
import DateTimePicker from '../../components/DateTimePicker'
// import Mgr2RoleService from '@/api-services.gen/cntl.mgr2role'
import RoleService from '@/api-services.gen/cntl.role'
import Loading from '../../components/Loading'
import CopyField from '../../components/CopyField'
import DBEditor from '@/components/DBEditor'
import transactionutil from '@/util/transactionutil'
export default {
name: 'tokens',
components: {DBEditor, CopyField, Loading, DateTimePicker},
components: {DBEditor, Loading},
data() {
return {
db_editor_old_data: null,
......@@ -396,19 +347,6 @@ export default {
assignable_system_options: null,
assignable_role_name_options_by_system: null,
accounts: null,
new_account: {
parent_login_name: null,
description: '',
login_name: '',
expiration_date: null,
do_copy_roles: true,
roles: []
},
new_token: {
description: '',
login_name: '',
expiration_date: null
},
filter_text: '',
token_list_fields: [
{
......@@ -618,11 +556,6 @@ export default {
}
return new Date(Date.parse(value)).toLocaleString('de-DE')
},
getDate30DaysAhead() {
const d = new Date()
d.setDate(d.getDate() + 29)
return d
},
formatExpiredTokens(tokens) {
tokens.forEach(token => {
if (token.is_expired) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment