Changed dead site alert threshold to weeks.
This commit is contained in:
parent
50d280a3c9
commit
87a800edc9
|
@ -8,7 +8,7 @@
|
||||||
type="number"
|
type="number"
|
||||||
placeholder="Alert threshold"
|
placeholder="Alert threshold"
|
||||||
class="input"
|
class="input"
|
||||||
> months
|
> weeks
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
|
@ -77,7 +77,7 @@ import {
|
||||||
inject,
|
inject,
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
|
||||||
import { format, subMonths } from 'date-fns';
|
import { format, subMonths, subWeeks } from 'date-fns';
|
||||||
|
|
||||||
import navigate from '#/src/navigate.js';
|
import navigate from '#/src/navigate.js';
|
||||||
|
|
||||||
|
@ -91,11 +91,11 @@ const {
|
||||||
|
|
||||||
const { entities } = pageProps;
|
const { entities } = pageProps;
|
||||||
|
|
||||||
const alertThreshold = ref(Number(urlParsed.search.alert) || 3);
|
const alertThreshold = ref(Number(urlParsed.search.alert) || 12);
|
||||||
const deadThreshold = ref(Number(urlParsed.search.dead) || 36);
|
const deadThreshold = ref(Number(urlParsed.search.dead) || 36);
|
||||||
const order = urlParsed.search.order || 'desc';
|
const order = urlParsed.search.order || 'desc';
|
||||||
|
|
||||||
const alertDate = computed(() => subMonths(meta.now, alertThreshold.value));
|
const alertDate = computed(() => subWeeks(meta.now, alertThreshold.value));
|
||||||
const deadDate = computed(() => subMonths(meta.now, deadThreshold.value));
|
const deadDate = computed(() => subMonths(meta.now, deadThreshold.value));
|
||||||
|
|
||||||
const alertEntities = computed(() => entities.filter((entity) => entity.latestReleaseDate > deadDate.value && entity.latestReleaseDate < alertDate.value));
|
const alertEntities = computed(() => entities.filter((entity) => entity.latestReleaseDate > deadDate.value && entity.latestReleaseDate < alertDate.value));
|
||||||
|
|
Loading…
Reference in New Issue