LogrotateSettings.vue 1.2 KB

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