mirror of https://github.com/requarks/wiki
parent
9cd8657ce6
commit
604941fe6a
@ -0,0 +1,93 @@
|
|||||||
|
<template lang='pug'>
|
||||||
|
v-card
|
||||||
|
v-toolbar(flat, color='primary', dark, dense)
|
||||||
|
.subheading {{ $t('admin:utilities.authTitle') }}
|
||||||
|
v-card-text
|
||||||
|
v-subheader.pl-0 Generate New Authentication Public / Private Key Certificates
|
||||||
|
.body-1 This will invalidate all current session tokens and cause all users to be logged out.
|
||||||
|
.body-1.red--text You will need to log back in after the operation.
|
||||||
|
v-btn(outline, color='primary', @click='regenCerts', :disabled='loading').ml-0.mt-3
|
||||||
|
v-icon(left) build
|
||||||
|
span Proceed
|
||||||
|
v-divider.my-3
|
||||||
|
v-subheader.pl-0 Reset Guest User
|
||||||
|
.body-1 This will reset the guest user to its default parameters and permissions.
|
||||||
|
v-btn(outline, color='primary', @click='resetGuest', :disabled='loading').ml-0.mt-3
|
||||||
|
v-icon(left) build
|
||||||
|
span Proceed
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import _ from 'lodash'
|
||||||
|
import Cookies from 'js-cookie'
|
||||||
|
import utilityAuthRegencertsMutation from 'gql/admin/utilities/utilities-mutation-auth-regencerts.gql'
|
||||||
|
import utilityAuthResetguestMutation from 'gql/admin/utilities/utilities-mutation-auth-resetguest.gql'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data: () => {
|
||||||
|
return {
|
||||||
|
loading: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async regenCerts() {
|
||||||
|
this.loading = true
|
||||||
|
this.$store.commit(`loadingStart`, 'admin-utilities-auth-regencerts')
|
||||||
|
|
||||||
|
try {
|
||||||
|
const respRaw = await this.$apollo.mutate({
|
||||||
|
mutation: utilityAuthRegencertsMutation
|
||||||
|
})
|
||||||
|
const resp = _.get(respRaw, 'data.authentication.regenerateCertificates.responseResult', {})
|
||||||
|
if (resp.succeeded) {
|
||||||
|
this.$store.commit('showNotification', {
|
||||||
|
message: 'New Certificates generated successfully.',
|
||||||
|
style: 'success',
|
||||||
|
icon: 'check'
|
||||||
|
})
|
||||||
|
Cookies.remove('jwt')
|
||||||
|
_.delay(() => {
|
||||||
|
window.location.assign('/login')
|
||||||
|
}, 1000)
|
||||||
|
} else {
|
||||||
|
throw new Error(resp.message)
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
this.$store.commit('pushGraphError', err)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$store.commit(`loadingStop`, 'admin-utilities-auth-regencerts')
|
||||||
|
this.loading = false
|
||||||
|
},
|
||||||
|
async resetGuest() {
|
||||||
|
this.loading = true
|
||||||
|
this.$store.commit(`loadingStart`, 'admin-utilities-auth-resetguest')
|
||||||
|
|
||||||
|
try {
|
||||||
|
const respRaw = await this.$apollo.mutate({
|
||||||
|
mutation: utilityAuthResetguestMutation
|
||||||
|
})
|
||||||
|
const resp = _.get(respRaw, 'data.authentication.resetGuestUser.responseResult', {})
|
||||||
|
if (resp.succeeded) {
|
||||||
|
this.$store.commit('showNotification', {
|
||||||
|
message: 'Guest user was reset successfully.',
|
||||||
|
style: 'success',
|
||||||
|
icon: 'check'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
throw new Error(resp.message)
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
this.$store.commit('pushGraphError', err)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$store.commit(`loadingStop`, 'admin-utilities-auth-resetguest')
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss'>
|
||||||
|
|
||||||
|
</style>
|
@ -0,0 +1,32 @@
|
|||||||
|
<template lang='pug'>
|
||||||
|
v-card
|
||||||
|
v-toolbar(flat, color='primary', dark, dense)
|
||||||
|
.subheading {{ $t('admin:utilities.cacheTitle') }}
|
||||||
|
v-card-text
|
||||||
|
v-subheader.pl-0 Flush Pages Cache
|
||||||
|
.body-1 Pages are cached to disk for better performance. You can flush the cache to force all content to be fetched from the DB again.
|
||||||
|
v-btn(outline, color='primary').ml-0.mt-3
|
||||||
|
v-icon(left) build
|
||||||
|
span Proceed
|
||||||
|
v-divider.my-3
|
||||||
|
v-subheader.pl-0 Flush Assets Cache
|
||||||
|
.body-1 Assets such as images and other files are cached to disk for better performance. You can flush the cache to force all assets to be fetched from the DB again.
|
||||||
|
v-btn(outline, color='primary').ml-0.mt-3
|
||||||
|
v-icon(left) build
|
||||||
|
span Proceed
|
||||||
|
v-divider.my-3
|
||||||
|
v-subheader.pl-0 Flush Temporary Uploads
|
||||||
|
.body-1 New uploads are temporarily saved to disk while they are being processed. They are automatically deleted after processing, but you can force an immediate cleanup using this tool.
|
||||||
|
v-btn(outline, color='primary').ml-0.mt-3
|
||||||
|
v-icon(left) build
|
||||||
|
span Proceed
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss'>
|
||||||
|
|
||||||
|
</style>
|
@ -0,0 +1,77 @@
|
|||||||
|
<template lang='pug'>
|
||||||
|
v-card.wiki-form
|
||||||
|
v-toolbar(flat, color='primary', dark, dense)
|
||||||
|
.subheading {{ $t('admin:utilities.importv1Title') }}
|
||||||
|
v-card-text
|
||||||
|
.text-xs-center
|
||||||
|
img.animated.fadeInUp.wait-p1s(src='/svg/icon-software.svg')
|
||||||
|
.body-2 Import from Wiki.js 1.x
|
||||||
|
v-divider.my-4
|
||||||
|
.body-1 Data from a Wiki.js 1.x installation can be imported easily using this tool. What do you want to import?
|
||||||
|
v-checkbox(
|
||||||
|
label='Content'
|
||||||
|
value='content'
|
||||||
|
color='deep-orange darken-2'
|
||||||
|
v-model='importFilters'
|
||||||
|
hide-details
|
||||||
|
)
|
||||||
|
v-checkbox(
|
||||||
|
label='Uploads'
|
||||||
|
value='uploads'
|
||||||
|
color='deep-orange darken-2'
|
||||||
|
v-model='importFilters'
|
||||||
|
hide-details
|
||||||
|
)
|
||||||
|
v-checkbox(
|
||||||
|
label='Users'
|
||||||
|
value='users'
|
||||||
|
color='deep-orange darken-2'
|
||||||
|
v-model='importFilters'
|
||||||
|
hide-details
|
||||||
|
)
|
||||||
|
v-divider.my-3
|
||||||
|
v-text-field.mt-3(
|
||||||
|
outline
|
||||||
|
label='MongoDB Connection String'
|
||||||
|
hint='The connection string to connect to the Wiki.js 1.x MongoDB database.'
|
||||||
|
persistent-hint
|
||||||
|
v-model='dbConnStr'
|
||||||
|
v-if='needDB'
|
||||||
|
)
|
||||||
|
v-text-field.mt-3(
|
||||||
|
outline
|
||||||
|
label='Content Repo Path'
|
||||||
|
hint='The full path to where the Wiki.js 1.x content is stored on disk.'
|
||||||
|
persistent-hint
|
||||||
|
v-model='contentPath'
|
||||||
|
v-if='needDisk'
|
||||||
|
)
|
||||||
|
v-card-chin
|
||||||
|
v-btn(depressed, color='deep-orange darken-2', :disabled='!needDB && !needDisk').ml-0
|
||||||
|
v-icon(left, color='white') label_important
|
||||||
|
span.white--text Start Import
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
importFilters: ['content', 'uploads'],
|
||||||
|
dbConnStr: 'mongodb://',
|
||||||
|
contentPath: '/wiki-v1/repo'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
needDB() {
|
||||||
|
return this.importFilters.indexOf('users') >= 0
|
||||||
|
},
|
||||||
|
needDisk() {
|
||||||
|
return this.importFilters.indexOf('content') >= 0 || this.importFilters.indexOf('uploads') >= 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss'>
|
||||||
|
|
||||||
|
</style>
|
@ -0,0 +1,80 @@
|
|||||||
|
<template lang='pug'>
|
||||||
|
v-card
|
||||||
|
v-toolbar(flat, color='primary', dark, dense)
|
||||||
|
.subheading {{ $t('admin:utilities.telemetryTitle') }}
|
||||||
|
v-form
|
||||||
|
v-card-text
|
||||||
|
v-subheader What is telemetry?
|
||||||
|
.body-1.pl-3 Telemetry allows the developers of Wiki.js to improve the software by collecting basic anonymized data about its usage and the host info. #[br] This is entirely optional and #[strong absolutely no] private data (such as content or personal data) is collected.
|
||||||
|
.body-1.pt-3.pl-3 For maximum privacy, a random client ID is generated during setup. This ID is used to group requests together while keeping complete anonymity. You can reset and generate a new one below at any time.
|
||||||
|
v-divider.my-3
|
||||||
|
v-subheader What is collected?
|
||||||
|
.body-1.pl-3 When telemetry is enabled, only the following data is transmitted:
|
||||||
|
v-list
|
||||||
|
v-list-tile
|
||||||
|
v-list-tile-avatar: v-icon info_outline
|
||||||
|
v-list-tile-content
|
||||||
|
v-list-tile-title.body-1 Version of Wiki.js installed
|
||||||
|
v-list-tile-subtitle.caption: em e.g. v2.0.123
|
||||||
|
v-list-tile
|
||||||
|
v-list-tile-avatar: v-icon info_outline
|
||||||
|
v-list-tile-content
|
||||||
|
v-list-tile-title.body-1 Basic OS information
|
||||||
|
v-list-tile-subtitle.caption: em Platform (Linux, macOS or Windows), Total CPU cores and DB type (PostgreSQL, MySQL, MariaDB, SQLite or SQL Server)
|
||||||
|
v-list-tile
|
||||||
|
v-list-tile-avatar: v-icon info_outline
|
||||||
|
v-list-tile-content
|
||||||
|
v-list-tile-title.body-1 Crash debug data
|
||||||
|
v-list-tile-subtitle.caption: em Stack trace of the error
|
||||||
|
v-list-tile
|
||||||
|
v-list-tile-avatar: v-icon info_outline
|
||||||
|
v-list-tile-content
|
||||||
|
v-list-tile-title.body-1 Setup analytics
|
||||||
|
v-list-tile-subtitle.caption: em Installation checkpoint reached
|
||||||
|
.body-1.pl-3 Note that any data collected is stored for a maximum of 180 days, after which it is permanently deleted.
|
||||||
|
v-divider.my-3
|
||||||
|
v-subheader What is it used for?
|
||||||
|
.body-1.pl-3 Telemetry is used by developers to improve Wiki.js, mostly for the following reasons:
|
||||||
|
v-list(dense)
|
||||||
|
v-list-tile
|
||||||
|
v-list-tile-avatar: v-icon info_outline
|
||||||
|
v-list-tile-content: v-list-tile-title.body-1 Identify critical bugs more easily and fix them in a timely manner.
|
||||||
|
v-list-tile
|
||||||
|
v-list-tile-avatar: v-icon info_outline
|
||||||
|
v-list-tile-content: v-list-tile-title.body-1 Understand the upgrade rate of current installations.
|
||||||
|
v-list-tile
|
||||||
|
v-list-tile-avatar: v-icon info_outline
|
||||||
|
v-list-tile-content: v-list-tile-title.body-1 Optimize performance and testing scenarios based on most popular environments.
|
||||||
|
.body-1.pl-3 Only authorized developers have access to the data. It is not shared to any 3rd party nor is it used for any other application than improving Wiki.js.
|
||||||
|
v-divider.my-3
|
||||||
|
v-subheader Settings
|
||||||
|
.pl-3
|
||||||
|
v-switch.mt-0(
|
||||||
|
v-model='telemetry',
|
||||||
|
label='Enable Telemetry',
|
||||||
|
:value='true',
|
||||||
|
color='primary',
|
||||||
|
hint='Allow Wiki.js to transmit telemetry data.',
|
||||||
|
persistent-hint
|
||||||
|
)
|
||||||
|
.subheading.mt-3.grey--text.text--darken-1 Client ID
|
||||||
|
.body-1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||||
|
v-card-chin
|
||||||
|
v-btn(depressed, color='success', @click='updateTelemetry')
|
||||||
|
v-icon(left) chevron_right
|
||||||
|
| Save Changes
|
||||||
|
v-spacer
|
||||||
|
v-btn(outline, color='grey', @click='resetClientId')
|
||||||
|
v-icon(left) autorenew
|
||||||
|
span Reset Client ID
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss'>
|
||||||
|
|
||||||
|
</style>
|
@ -0,0 +1,12 @@
|
|||||||
|
mutation {
|
||||||
|
authentication {
|
||||||
|
regenerateCertificates {
|
||||||
|
responseResult {
|
||||||
|
succeeded
|
||||||
|
errorCode
|
||||||
|
slug
|
||||||
|
message
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
mutation {
|
||||||
|
authentication {
|
||||||
|
resetGuestUser {
|
||||||
|
responseResult {
|
||||||
|
succeeded
|
||||||
|
errorCode
|
||||||
|
slug
|
||||||
|
message
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 1.5 KiB |
Loading…
Reference in new issue