You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.8 KiB

  1. <template lang='pug'>
  2. v-card(flat)
  3. v-card(flat, :color='$vuetify.dark ? "grey darken-4" : "grey lighten-5"').pa-3.pt-4
  4. .headline.primary--text Logging
  5. .subheading.grey--text Configure the system logger(s)
  6. v-tabs(:color='$vuetify.dark ? "primary" : "grey lighten-4"', fixed-tabs, :slider-color='$vuetify.dark ? "white" : "primary"', show-arrows)
  7. v-tab(key='settings'): v-icon settings
  8. v-tab(v-for='svc in activeServices', :key='svc.key') {{ svc.title }}
  9. v-tab-item(key='settings', :transition='false', :reverse-transition='false')
  10. v-card.pa-3
  11. .body-2.pb-2 Select which logging service to enable:
  12. v-form
  13. v-checkbox(
  14. v-for='(svc, n) in services',
  15. v-model='selectedServices',
  16. :key='svc.key',
  17. :label='svc.title',
  18. :value='svc.key',
  19. color='primary',
  20. :disabled='svc.key === `console`'
  21. hide-details
  22. )
  23. v-divider
  24. v-btn(color='primary')
  25. v-icon(left) chevron_right
  26. | Set Services
  27. v-btn(color='black', dark, @click='toggleConsole')
  28. v-icon(left) keyboard
  29. | View Console
  30. v-btn(color='black', dark)
  31. v-icon(left) layers_clear
  32. | Purge Logs
  33. v-btn(icon, @click='refresh')
  34. v-icon.grey--text refresh
  35. v-tab-item(v-for='(svc, n) in activeServices', :key='svc.key', :transition='false', :reverse-transition='false')
  36. v-card.pa-3
  37. v-form
  38. v-subheader Service Configuration
  39. .body-1(v-if='!svc.props || svc.props.length < 1') This logging service has no configuration options you can modify.
  40. v-text-field(v-else, v-for='prop in svc.props', :key='prop', :label='prop', prepend-icon='mode_edit')
  41. v-divider
  42. v-btn(color='primary')
  43. v-icon(left) chevron_right
  44. | Save Configuration
  45. logging-console(v-model='showConsole')
  46. </template>
  47. <script>
  48. import _ from 'lodash'
  49. import LoggingConsole from './admin-logging-console.vue'
  50. export default {
  51. components: {
  52. LoggingConsole
  53. },
  54. data() {
  55. return {
  56. showConsole: false,
  57. services: [],
  58. selectedServices: ['console'],
  59. refreshCompleted: false
  60. }
  61. },
  62. computed: {
  63. activeServices() {
  64. return _.filter(this.services, 'isEnabled')
  65. }
  66. },
  67. // apollo: {
  68. // services: {
  69. // query: CONSTANTS.GRAPH.AUTHENTICATION.QUERY_PROVIDERS,
  70. // update: (data) => data.authentication.providers
  71. // }
  72. // },
  73. methods: {
  74. async refresh() {
  75. await this.$apollo.queries.services.refetch()
  76. this.refreshCompleted = true
  77. },
  78. toggleConsole () {
  79. this.showConsole = !this.showConsole
  80. }
  81. }
  82. }
  83. </script>
  84. <style lang='scss'>
  85. </style>