LogrotateSettings.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <script setup lang="ts">
  2. import { inject } from 'vue'
  3. import type { Settings } from '@/views/preference/typedef'
  4. const data: Settings = inject('data')!
  5. </script>
  6. <template>
  7. <AForm layout="vertical">
  8. <AAlert
  9. class="mb-4"
  10. :message="$gettext('Tips')"
  11. :description="$gettext('Logrotate, by default, is enabled in most mainstream '
  12. + 'Linux distributions for users who install Nginx UI on the host machine, '
  13. + 'so you don\'t need to modify the parameters on this page. '
  14. + 'For users who install Nginx UI using Docker containers, you can manually enable this option. '
  15. + 'The crontab task scheduler of Nginx UI will execute the logrotate command at the interval you set in minutes.')"
  16. type="info"
  17. />
  18. <AFormItem :label="$gettext('Enabled')">
  19. <ASwitch v-model:checked="data.logrotate.enabled" />
  20. </AFormItem>
  21. <AFormItem :label="$gettext('Command')">
  22. {{ data.logrotate.cmd }}
  23. </AFormItem>
  24. <AFormItem :label="$gettext('Interval')">
  25. <AInputNumber
  26. v-model:value="data.logrotate.interval"
  27. :min="1"
  28. :addon-after="$gettext('Minutes')"
  29. />
  30. </AFormItem>
  31. </AForm>
  32. </template>
  33. <style lang="less" scoped>
  34. </style>