Skip to content

Commit

Permalink
fix: ui and default value of the graph pruning config (#1208)
Browse files Browse the repository at this point in the history
  • Loading branch information
JivusAyrus authored Sep 23, 2024
1 parent 18b1ef0 commit 912d80a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions studio/src/components/lint-policy/graph-pruning-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -330,13 +330,17 @@ export const GraphPruningLintConfig = ({
)}
onCheckedChange={(checked) => {
if (checked) {
const config = new GraphPruningConfig({
ruleName: rule.name,
severityLevel: LintSeverity.warn,
gracePeriodInDays: 7,
});
if (plan === "enterprise") {
config.schemaUsageCheckPeriodInDays = 7;
}
setSelectedPruneRules([
...selectedPruneRules,
{
ruleName: rule.name,
severityLevel: LintSeverity.warn,
gracePeriodInDays: 7,
} as GraphPruningConfig,
config,
]);
} else {
setSelectedPruneRules(
Expand All @@ -362,7 +366,7 @@ export const GraphPruningLintConfig = ({
<div></div>

<div className="ml-8 flex gap-x-3 md:ml-0">
{rule.name !== "FORCE_DEPRECATION_BEFORE_DELETION" && (
{rule.name !== "REQUIRE_DEPRECATION_BEFORE_DELETION" && (
<>
<SchemaUsageCheckPeriodDropdown
onChange={(value) => {
Expand Down

0 comments on commit 912d80a

Please sign in to comment.