Merge pull request #10777 from nixocio/ui_issue_10775

Update usage of useBrandName
This commit is contained in:
Jake McDermott
2021-07-28 16:46:18 -04:00
committed by GitHub
4 changed files with 17 additions and 9 deletions

View File

@@ -22,7 +22,9 @@ const TooltipWrapper = styled.div`
`; `;
function AdHocDetailsStep({ verbosityOptions, moduleOptions }) { function AdHocDetailsStep({ verbosityOptions, moduleOptions }) {
const brandName = useBrandName(); const {
current: { brandName },
} = useBrandName();
const [moduleNameField, moduleNameMeta, moduleNameHelpers] = useField({ const [moduleNameField, moduleNameMeta, moduleNameHelpers] = useField({
name: 'module_name', name: 'module_name',
validate: required(null), validate: required(null),
@@ -65,7 +67,7 @@ function AdHocDetailsStep({ verbosityOptions, moduleOptions }) {
} }
labelIcon={ labelIcon={
<Popover <Popover
content={t`These are the modules that ${brandName.current} supports running commands against.`} content={t`These are the modules that ${brandName} supports running commands against.`}
/> />
} }
> >

View File

@@ -14,7 +14,9 @@ const ManualSubForm = ({
project_base_dir, project_base_dir,
project_local_paths, project_local_paths,
}) => { }) => {
const brandName = useBrandName(); const {
current: { brandName },
} = useBrandName();
const localPaths = [...new Set([...project_local_paths, localPath])]; const localPaths = [...new Set([...project_local_paths, localPath])];
const options = [ const options = [
{ {
@@ -49,7 +51,7 @@ const ManualSubForm = ({
Either that directory is empty, or all of the contents are already Either that directory is empty, or all of the contents are already
assigned to other projects. Create a new directory there and make assigned to other projects. Create a new directory there and make
sure the playbook files can be read by the "awx" system user, sure the playbook files can be read by the "awx" system user,
or have ${brandName.current} directly retrieve your playbooks from or have ${brandName} directly retrieve your playbooks from
source control using the Source Control Type option above.`} source control using the Source Control Type option above.`}
</Alert> </Alert>
)} )}

View File

@@ -45,11 +45,13 @@ const CardDescription = styled.div`
function SettingList() { function SettingList() {
const config = useConfig(); const config = useConfig();
const brandName = useBrandName(); const {
current: { brandName },
} = useBrandName();
const settingRoutes = [ const settingRoutes = [
{ {
header: t`Authentication`, header: t`Authentication`,
description: t`Enable simplified login for your ${brandName.current} applications`, description: t`Enable simplified login for your ${brandName} applications`,
id: 'authentication', id: 'authentication',
routes: [ routes: [
{ {
@@ -84,7 +86,7 @@ function SettingList() {
}, },
{ {
header: t`Jobs`, header: t`Jobs`,
description: t`Update settings pertaining to Jobs within ${brandName.current}`, description: t`Update settings pertaining to Jobs within ${brandName}`,
id: 'jobs', id: 'jobs',
routes: [ routes: [
{ {

View File

@@ -66,7 +66,9 @@ function JobTemplateForm({
Boolean(template.webhook_service) Boolean(template.webhook_service)
); );
const isMounted = useIsMounted(); const isMounted = useIsMounted();
const brandName = useBrandName(); const {
current: { brandName },
} = useBrandName();
const [askInventoryOnLaunchField] = useField('ask_inventory_on_launch'); const [askInventoryOnLaunchField] = useField('ask_inventory_on_launch');
const [jobTypeField, jobTypeMeta, jobTypeHelpers] = useField({ const [jobTypeField, jobTypeMeta, jobTypeHelpers] = useField({
@@ -566,7 +568,7 @@ function JobTemplateForm({
&nbsp; &nbsp;
<Popover <Popover
content={t`Enables creation of a provisioning content={t`Enables creation of a provisioning
callback URL. Using the URL a host can contact ${brandName.current} callback URL. Using the URL a host can contact ${brandName}
and request a configuration update using this job and request a configuration update using this job
template.`} template.`}
/> />