Config.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <a-card :title="$gettext('Configurations')">
  3. <std-table
  4. :api="api"
  5. :columns="columns"
  6. :deletable="false"
  7. :disable_search="true"
  8. data_key="configs"
  9. row-key="name"
  10. @clickEdit="r => {
  11. $router.push({
  12. path: '/config/' + r
  13. })
  14. }"
  15. />
  16. </a-card>
  17. </template>
  18. <script>
  19. import StdTable from '@/components/StdDataDisplay/StdTable'
  20. import $gettext from '@/lib/translate/gettext'
  21. const columns = [{
  22. title: $gettext('Name'),
  23. dataIndex: 'name',
  24. scopedSlots: {customRender: 'name'},
  25. sorter: true,
  26. pithy: true
  27. }, {
  28. title: $gettext('Updated at'),
  29. dataIndex: 'modify',
  30. datetime: true,
  31. scopedSlots: {customRender: 'modify'},
  32. sorter: true,
  33. pithy: true
  34. }, {
  35. title: $gettext('Action'),
  36. dataIndex: 'action',
  37. scopedSlots: {customRender: 'action'}
  38. }]
  39. export default {
  40. name: 'Config',
  41. components: {StdTable},
  42. data() {
  43. return {
  44. api: this.$api.config,
  45. columns
  46. }
  47. }
  48. }
  49. </script>
  50. <style scoped>
  51. </style>