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.

90 lines
2.7 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)
  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. v-snackbar(
  46. color='success'
  47. top
  48. v-model='refreshCompleted'
  49. )
  50. v-icon.mr-3(dark) cached
  51. | List of logging services has been refreshed.
  52. </template>
  53. <script>
  54. import _ from 'lodash'
  55. export default {
  56. data() {
  57. return {
  58. services: [],
  59. selectedServices: ['console'],
  60. refreshCompleted: false
  61. }
  62. },
  63. computed: {
  64. activeServices() {
  65. return _.filter(this.services, 'isEnabled')
  66. }
  67. },
  68. // apollo: {
  69. // services: {
  70. // query: CONSTANTS.GRAPH.AUTHENTICATION.QUERY_PROVIDERS,
  71. // update: (data) => data.authentication.providers
  72. // }
  73. // },
  74. methods: {
  75. async refresh() {
  76. await this.$apollo.queries.services.refetch()
  77. this.refreshCompleted = true
  78. }
  79. }
  80. }
  81. </script>
  82. <style lang='scss'>
  83. </style>