Cleanup UI linting, tests, and import

Cleans up UI linting errors

Fix broken UI unit tests

Adds missing LabelsMixin import
This commit is contained in:
mabashian 2022-09-02 13:23:56 -04:00 committed by Alan Rominger
parent 809df74050
commit 42a7866da9
No known key found for this signature in database
GPG Key ID: C2D7EAAA12B63559
2 changed files with 26 additions and 25 deletions

View File

@ -1,9 +1,7 @@
import React, { useState, useCallback, useEffect } from 'react';
import { useHistory } from 'react-router-dom';
import { Card, PageSection } from '@patternfly/react-core';
import { CardBody } from 'components/Card';
import { WorkflowJobTemplatesAPI, OrganizationsAPI, UsersAPI } from 'api';
import { useConfig } from 'contexts/Config';
import useRequest from 'hooks/useRequest';

View File

@ -186,11 +186,14 @@ function WorkflowJobTemplateForm({
aria-label={t`source control branch`}
/>
</FieldWithPrompt>
</FormColumnLayout>
<FormFullWidthLayout>
<FieldWithPrompt
label={t`Labels`}
fieldId="template-labels"
label={t`Labels`}
promptId="template-ask-labels-on-launch"
promptName="ask_labels_on_launch"
tooltip={helpText.labels}
>
<LabelSelect
value={labelsField.value}
@ -199,29 +202,29 @@ function WorkflowJobTemplateForm({
createText={t`Create`}
/>
</FieldWithPrompt>
<FormFullWidthLayout>
<VariablesField
id="wfjt-variables"
name="extra_vars"
label={t`Variables`}
promptId="template-ask-variables-on-launch"
tooltip={helpText.variables}
</FormFullWidthLayout>
<FormFullWidthLayout>
<VariablesField
id="wfjt-variables"
name="extra_vars"
label={t`Variables`}
promptId="template-ask-variables-on-launch"
tooltip={helpText.variables}
/>
</FormFullWidthLayout>
<FormColumnLayout>
<FieldWithPrompt
fieldId="template-tags"
label={t`Job Tags`}
promptId="template-ask-tags-on-launch"
promptName="ask_tags_on_launch"
tooltip={helpText.jobTags}
>
<TagMultiSelect
value={jobTagsField.value}
onChange={(value) => jobTagsHelpers.setValue(value)}
/>
</FormFullWidthLayout>
<FormColumnLayout>
<FieldWithPrompt
fieldId="template-tags"
label={t`Job Tags`}
promptId="template-ask-tags-on-launch"
promptName="ask_tags_on_launch"
tooltip={helpText.jobTags}
>
<TagMultiSelect
value={jobTagsField.value}
onChange={(value) => jobTagsHelpers.setValue(value)}
/>
</FieldWithPrompt>
</FormColumnLayout>
</FieldWithPrompt>
<FieldWithPrompt
fieldId="template-skip-tags"
label={t`Skip Tags`}