-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create preliminary DSA configuration on tenant settings
adds a new option under Admin > Configure > Advanced
- Loading branch information
Showing
8 changed files
with
96 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
client/src/core/client/admin/routes/Configure/sections/Advanced/DSAConfigContainer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Localized } from "@fluent/react/compat"; | ||
import React, { FunctionComponent } from "react"; | ||
import { graphql } from "react-relay"; | ||
|
||
import Header from "../../Header"; | ||
import ConfigBoxWithToggleField from "../Auth/ConfigBoxWithToggleField"; | ||
|
||
// eslint-disable-next-line no-unused-expressions | ||
graphql` | ||
fragment DSAConfigContainer_formValues on Settings { | ||
dsa { | ||
enabled | ||
} | ||
} | ||
`; | ||
|
||
interface Props { | ||
disabled: boolean; | ||
} | ||
|
||
export const DSAConfigContainer: FunctionComponent<Props> = ({ disabled }) => { | ||
return ( | ||
<ConfigBoxWithToggleField | ||
data-testid="configure-advanced-dsaConfig" | ||
title={ | ||
<Localized id="configure-advanced-dsaConfig-title"> | ||
<Header container="h2">DSA Features</Header> | ||
</Localized> | ||
} | ||
name="dsa.enabled" | ||
disabled={disabled} | ||
> | ||
{(disabledInside) => <>TODO</>} | ||
</ConfigBoxWithToggleField> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import * as settings from "coral-server/models/settings"; | ||
|
||
import { GQLDSAConfigurationTypeResolver } from "coral-server/graph/schema/__generated__/types"; | ||
|
||
export const DSAConfiguration: GQLDSAConfigurationTypeResolver<settings.RTEConfiguration> = | ||
{ | ||
enabled: (config, args, { tenant }) => | ||
tenant.dsa && tenant.dsa.enabled ? tenant.dsa.enabled : false, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters