Use new licensing feature flag to gate off the filtering behaviour.
This commit is contained in:
parent
e033af8e87
commit
21c330f4fb
|
@ -8,6 +8,7 @@
|
||||||
import { onMount } from "svelte"
|
import { onMount } from "svelte"
|
||||||
import dayjs from "dayjs"
|
import dayjs from "dayjs"
|
||||||
import { auth, admin } from "stores/portal"
|
import { auth, admin } from "stores/portal"
|
||||||
|
import { TENANT_FEATURE_FLAGS, isEnabled } from "helpers/featureFlags"
|
||||||
|
|
||||||
const ERROR = "error",
|
const ERROR = "error",
|
||||||
SUCCESS = "success",
|
SUCCESS = "success",
|
||||||
|
@ -28,7 +29,6 @@
|
||||||
|
|
||||||
$: page = $pageInfo.page
|
$: page = $pageInfo.page
|
||||||
$: fetchLogs(automationId, status, page, timeRange)
|
$: fetchLogs(automationId, status, page, timeRange)
|
||||||
$: cloudHosted = $admin.cloud
|
|
||||||
|
|
||||||
const timeOptions = [
|
const timeOptions = [
|
||||||
{ value: "1-w", label: "Past week" },
|
{ value: "1-w", label: "Past week" },
|
||||||
|
@ -141,8 +141,11 @@
|
||||||
bind:value={timeRange}
|
bind:value={timeRange}
|
||||||
options={timeOptions}
|
options={timeOptions}
|
||||||
isOptionEnabled={x => {
|
isOptionEnabled={x => {
|
||||||
if (cloudHosted) {
|
if (
|
||||||
return licensePlan?.type === "free" && "1-w" !== x.value
|
isEnabled(TENANT_FEATURE_FLAGS.LICENSING) &&
|
||||||
|
licensePlan?.type === "free"
|
||||||
|
) {
|
||||||
|
return "1-w" !== x.value
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}}
|
}}
|
||||||
|
@ -156,7 +159,7 @@
|
||||||
options={statusOptions}
|
options={statusOptions}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{#if cloudHosted && licensePlan?.type === "free"}
|
{#if isEnabled(TENANT_FEATURE_FLAGS.LICENSING) && licensePlan?.type === "free"}
|
||||||
<div class="pro-upgrade">
|
<div class="pro-upgrade">
|
||||||
<div class="pro-copy">Store up to 30 days of automations</div>
|
<div class="pro-copy">Store up to 30 days of automations</div>
|
||||||
<Button
|
<Button
|
||||||
|
|
Loading…
Reference in New Issue