font-style: italic; | font-style: italic; | ||||
} | } | ||||
label[for] { | |||||
cursor: pointer; | |||||
} | |||||
.form-field { | .form-field { | ||||
clear: both; | clear: both; | ||||
display: block; | display: block; |
'is-invalid': isInvalid, | 'is-invalid': isInvalid, | ||||
'is-valid': isValid | 'is-valid': isValid | ||||
})} | })} | ||||
id="organization-display-name" | |||||
id="organization-avatar" | |||||
onBlur={this.handleBlur} | onBlur={this.handleBlur} | ||||
onChange={this.handleChange} | onChange={this.handleChange} | ||||
onFocus={this.handleFocus} | onFocus={this.handleFocus} |
return ( | return ( | ||||
<ValidationInput | <ValidationInput | ||||
error={this.state.error} | error={this.state.error} | ||||
id="organization-display-name" | |||||
id="organization-description" | |||||
isInvalid={isInvalid} | isInvalid={isInvalid} | ||||
isValid={isValid} | isValid={isValid} | ||||
label={translate('onboarding.create_organization.description')}> | label={translate('onboarding.create_organization.description')}> |
/> | /> | ||||
<input | <input | ||||
className="input-super-large text-middle" | className="input-super-large text-middle" | ||||
id="organization-display-name" | |||||
id="organization-avatar" | |||||
onBlur={[Function]} | onBlur={[Function]} | ||||
onChange={[Function]} | onChange={[Function]} | ||||
onFocus={[Function]} | onFocus={[Function]} | ||||
/> | /> | ||||
<input | <input | ||||
className="input-super-large text-middle" | className="input-super-large text-middle" | ||||
id="organization-display-name" | |||||
id="organization-avatar" | |||||
onBlur={[Function]} | onBlur={[Function]} | ||||
onChange={[Function]} | onChange={[Function]} | ||||
onFocus={[Function]} | onFocus={[Function]} |
exports[`should render correctly 1`] = ` | exports[`should render correctly 1`] = ` | ||||
<ValidationInput | <ValidationInput | ||||
id="organization-display-name" | |||||
id="organization-description" | |||||
isInvalid={false} | isInvalid={false} | ||||
isValid={false} | isValid={false} | ||||
label="onboarding.create_organization.description" | label="onboarding.create_organization.description" |
return ( | return ( | ||||
<div className="form-field spacer-bottom"> | <div className="form-field spacer-bottom"> | ||||
<label htmlFor="select-organization"> | <label htmlFor="select-organization"> | ||||
{translate('onboarding.create_project.organization')} | |||||
<em className="mandatory">*</em> | |||||
<span className="text-middle"> | |||||
<strong>{translate('onboarding.create_project.organization')}</strong> | |||||
<em className="mandatory">*</em> | |||||
</span> | |||||
</label> | </label> | ||||
<OrganizationSelect | <OrganizationSelect | ||||
hideIcons={!autoImport} | hideIcons={!autoImport} |
<label | <label | ||||
htmlFor="select-organization" | htmlFor="select-organization" | ||||
> | > | ||||
onboarding.create_project.organization | |||||
<em | |||||
className="mandatory" | |||||
<span | |||||
className="text-middle" | |||||
> | > | ||||
* | |||||
</em> | |||||
<strong> | |||||
onboarding.create_project.organization | |||||
</strong> | |||||
<em | |||||
className="mandatory" | |||||
> | |||||
* | |||||
</em> | |||||
</span> | |||||
</label> | </label> | ||||
<OrganizationSelect | <OrganizationSelect | ||||
hideIcons={true} | hideIcons={true} |
<Select | <Select | ||||
autoFocus={true} | autoFocus={true} | ||||
clearable={false} | clearable={false} | ||||
id="create-custom-measure-metric" | |||||
onChange={this.handleMetricSelect} | onChange={this.handleMetricSelect} | ||||
options={options} | options={options} | ||||
value={this.state.metricKey} | value={this.state.metricKey} |
<Select | <Select | ||||
autoFocus={true} | autoFocus={true} | ||||
clearable={false} | clearable={false} | ||||
id="create-custom-measure-metric" | |||||
onChange={[Function]} | onChange={[Function]} | ||||
options={ | options={ | ||||
Array [ | Array [ |
<div className="modal-field"> | <div className="modal-field"> | ||||
<label htmlFor="create-metric-domain">{translate('custom_metrics.domain')}</label> | <label htmlFor="create-metric-domain">{translate('custom_metrics.domain')}</label> | ||||
<Creatable | <Creatable | ||||
id="create-metric-domain" | |||||
onChange={this.handleDomainChange} | onChange={this.handleDomainChange} | ||||
options={domains.map(domain => ({ label: domain, value: domain }))} | options={domains.map(domain => ({ label: domain, value: domain }))} | ||||
value={this.state.domain} | value={this.state.domain} | ||||
</label> | </label> | ||||
<Select | <Select | ||||
clearable={false} | clearable={false} | ||||
id="create-metric-type" | |||||
onChange={this.handleTypeChange} | onChange={this.handleTypeChange} | ||||
options={this.props.types.map(type => ({ | options={this.props.types.map(type => ({ | ||||
label: translate('metric.type', type), | label: translate('metric.type', type), |
custom_metrics.domain | custom_metrics.domain | ||||
</label> | </label> | ||||
<Creatable | <Creatable | ||||
id="create-metric-domain" | |||||
onChange={[Function]} | onChange={[Function]} | ||||
options={ | options={ | ||||
Array [ | Array [ | ||||
</label> | </label> | ||||
<Select | <Select | ||||
clearable={false} | clearable={false} | ||||
id="create-metric-type" | |||||
onChange={[Function]} | onChange={[Function]} | ||||
options={ | options={ | ||||
Array [ | Array [ |
</div> | </div> | ||||
); | ); | ||||
renderCheckbox = (field: keyof FormFields) => ( | |||||
<Checkbox checked={this.state[field] !== undefined} onCheck={this.handleFieldCheck(field)} /> | |||||
renderCheckbox = (field: keyof FormFields, id?: string) => ( | |||||
<Checkbox | |||||
checked={this.state[field] !== undefined} | |||||
id={id} | |||||
onCheck={this.handleFieldCheck(field)} | |||||
/> | |||||
); | ); | ||||
renderAffected = (affected: number) => ( | renderAffected = (affected: number) => ( | ||||
renderNotificationsField = () => ( | renderNotificationsField = () => ( | ||||
<div className="modal-field"> | <div className="modal-field"> | ||||
<label htmlFor="send-notifications">{translate('issue.send_notifications')}</label> | <label htmlFor="send-notifications">{translate('issue.send_notifications')}</label> | ||||
{this.renderCheckbox('notifications')} | |||||
{this.renderCheckbox('notifications', 'send-notifications')} | |||||
</div> | </div> | ||||
); | ); | ||||
</label> | </label> | ||||
<Checkbox | <Checkbox | ||||
checked={false} | checked={false} | ||||
id="send-notifications" | |||||
onCheck={[Function]} | onCheck={[Function]} | ||||
thirdState={false} | thirdState={false} | ||||
/> | /> |
{this.state.permissionTemplates && ( | {this.state.permissionTemplates && ( | ||||
<Select | <Select | ||||
clearable={false} | clearable={false} | ||||
id="project-permissions-template" | |||||
onChange={this.handlePermissionTemplateChange} | onChange={this.handlePermissionTemplateChange} | ||||
options={this.state.permissionTemplates.map(permissionTemplate => ({ | options={this.state.permissionTemplates.map(permissionTemplate => ({ | ||||
label: permissionTemplate.name, | label: permissionTemplate.name, |
onConfirm={this.handleFormSubmit}> | onConfirm={this.handleFormSubmit}> | ||||
{this.state.errorMessage && <Alert variant="error">{this.state.errorMessage}</Alert>} | {this.state.errorMessage && <Alert variant="error">{this.state.errorMessage}</Alert>} | ||||
<div className="modal-field"> | <div className="modal-field"> | ||||
<label htmlFor="create-user-login">{translate('quality_gates.conditions.metric')}</label> | |||||
<label htmlFor="condition-metric">{translate('quality_gates.conditions.metric')}</label> | |||||
{metrics && <MetricSelect metrics={metrics} onMetricChange={this.handleMetricChange} />} | {metrics && <MetricSelect metrics={metrics} onMetricChange={this.handleMetricChange} />} | ||||
{this.props.metric && ( | {this.props.metric && ( | ||||
<span className="note">{getLocalizedMetricName(this.props.metric)}</span> | <span className="note">{getLocalizedMetricName(this.props.metric)}</span> | ||||
{metric && ( | {metric && ( | ||||
<> | <> | ||||
<div className="modal-field"> | <div className="modal-field"> | ||||
<label>{translate('quality_gates.conditions.operator')}</label> | |||||
<label htmlFor="condition-operator"> | |||||
{translate('quality_gates.conditions.operator')} | |||||
</label> | |||||
<ConditionOperator | <ConditionOperator | ||||
metric={metric} | metric={metric} | ||||
onOperatorChange={this.handleOperatorChange} | onOperatorChange={this.handleOperatorChange} | ||||
/> | /> | ||||
</div> | </div> | ||||
<div className="modal-field"> | <div className="modal-field"> | ||||
<label>{translate('quality_gates.conditions.error')}</label> | |||||
<label htmlFor="condition-threshold"> | |||||
{translate('quality_gates.conditions.error')} | |||||
</label> | |||||
<ThresholdInput | <ThresholdInput | ||||
metric={metric} | metric={metric} | ||||
name="error" | name="error" |
autoFocus={true} | autoFocus={true} | ||||
className="input-medium" | className="input-medium" | ||||
clearable={false} | clearable={false} | ||||
id="condition-operator" | |||||
name="operator" | name="operator" | ||||
onChange={this.handleChange} | onChange={this.handleChange} | ||||
options={operatorOptions} | options={operatorOptions} |
return ( | return ( | ||||
<Select | <Select | ||||
className="text-middle input-large" | className="text-middle input-large" | ||||
id="condition-metric" | |||||
onChange={this.handleChange} | onChange={this.handleChange} | ||||
options={optionsWithDomains} | options={optionsWithDomains} | ||||
placeholder={translate('search.search_for_metrics')} | placeholder={translate('search.search_for_metrics')} |
<Select | <Select | ||||
className="input-tiny text-middle" | className="input-tiny text-middle" | ||||
clearable={true} | clearable={true} | ||||
id="condition-threshold" | |||||
name={name} | name={name} | ||||
onChange={this.handleSelectChange} | onChange={this.handleSelectChange} | ||||
options={options} | options={options} | ||||
<input | <input | ||||
className="input-tiny text-middle" | className="input-tiny text-middle" | ||||
data-type={metric.type} | data-type={metric.type} | ||||
id="condition-threshold" | |||||
name={name} | name={name} | ||||
onChange={this.handleChange} | onChange={this.handleChange} | ||||
type="text" | type="text" |
</label> | </label> | ||||
<Select | <Select | ||||
clearable={false} | clearable={false} | ||||
id="change-profile-parent" | |||||
name="parentKey" | name="parentKey" | ||||
onChange={this.handleSelectChange} | onChange={this.handleSelectChange} | ||||
options={options} | options={options} |
</label> | </label> | ||||
<Select | <Select | ||||
clearable={false} | clearable={false} | ||||
id="create-profile-language" | |||||
name="language" | name="language" | ||||
onChange={this.handleLanguageChange} | onChange={this.handleLanguageChange} | ||||
options={languages.map(language => ({ | options={languages.map(language => ({ |
<textarea | <textarea | ||||
className="settings-large-input" | className="settings-large-input" | ||||
disabled={this.state.loading} | disabled={this.state.loading} | ||||
id="test-email-title" | |||||
id="test-email-message" | |||||
onChange={this.onMessageChange} | onChange={this.onMessageChange} | ||||
required={true} | required={true} | ||||
rows={5} | rows={5} |