Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions apps/settings/src/components/BasicSettings/BackgroundJob.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,26 @@
:description="t('settings', 'For the server to work properly, it\'s important to configure background jobs correctly. Cron is the recommended setting. Please see the documentation for more information.')"
:doc-url="backgroundJobsDocUrl">
<template v-if="lastCron !== 0">
<span v-if="oldExecution" class="error">
<NcNoteCard v-if="oldExecution" type="error">
{{ t('settings', 'Last job execution ran {time}. Something seems wrong.', {time: relativeTime}) }}
</span>
</NcNoteCard>

<span v-else-if="longExecutionNotCron" class="warning">
<NcNoteCard v-else-if="longExecutionNotCron" type="warning">
{{ t('settings', "Some jobs have not been executed since {maxAgeRelativeTime}. Please consider increasing the execution frequency.", {maxAgeRelativeTime}) }}
</span>
</NcNoteCard>

<span v-else-if="longExecutionCron" class="warning">
<NcNoteCard v-else-if="longExecutionCron" type="warning">
{{ t('settings', "Some jobs have not been executed since {maxAgeRelativeTime}. Please consider switching to system cron.", {maxAgeRelativeTime}) }}
</span>
</NcNoteCard>

<span v-else>
<NcNoteCard v-else type="success">
{{ t('settings', 'Last job ran {relativeTime}.', {relativeTime}) }}
</span>
</NcNoteCard>
</template>

<span v-else class="error">
<NcNoteCard v-else type="error">
{{ t('settings', 'Background job did not run yet!') }}
</span>
</NcNoteCard>

<NcCheckboxRadioSwitch type="radio"
:checked.sync="backgroundJobsMode"
Expand Down Expand Up @@ -86,8 +86,9 @@
<script>
import { loadState } from '@nextcloud/initial-state'
import { showError } from '@nextcloud/dialogs'
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch'
import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection'
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'
import NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js'
import moment from '@nextcloud/moment'
import axios from '@nextcloud/axios'
import { generateOcsUrl } from '@nextcloud/router'
Expand All @@ -106,6 +107,7 @@ export default {
components: {
NcCheckboxRadioSwitch,
NcSettingsSection,
NcNoteCard,
},

data() {
Expand Down
Loading