diff options
author | Wouter Admiraal <wouter.admiraal@sonarsource.com> | 2022-10-07 11:37:41 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-10-11 20:03:59 +0000 |
commit | f8605f7076aff74aefc10fa3b3a93d6f603eb2cd (patch) | |
tree | 4f04a3f1467bbde2a252b78a399288b146723fae /server/sonar-web/src/main/js | |
parent | decfde9ccb7eaa2698e660d50fbe30a7777adf91 (diff) | |
download | sonarqube-f8605f7076aff74aefc10fa3b3a93d6f603eb2cd.tar.gz sonarqube-f8605f7076aff74aefc10fa3b3a93d6f603eb2cd.zip |
SONAR-16993 [893826] Form elements must have labels
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r-- | server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx index 318f96634e2..6f8559169b4 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx @@ -65,24 +65,32 @@ export default class GraphsHeader extends React.PureComponent<Props> { return ( <div className={classNames(className, 'position-relative')}> - <Select - className="pull-left input-medium" - isSearchable={false} - onChange={this.handleGraphChange} - options={selectOptions} - value={selectOptions.find(option => option.value === graph)} - /> - {isCustomGraph(graph) && - addCustomMetric !== undefined && - removeCustomMetric !== undefined && ( - <AddGraphMetric - addMetric={addCustomMetric} - metrics={metrics} - metricsTypeFilter={metricsTypeFilter} - removeMetric={removeCustomMetric} - selectedMetrics={selectedMetrics} + <div className="display-flex-end"> + <div className="display-flex-column"> + <label className="text-bold little-spacer-bottom" htmlFor="graph-select"> + {translate('project_activity.graphs.choose_type')} + </label> + <Select + id="graph-select" + className="input-medium" + isSearchable={false} + onChange={this.handleGraphChange} + options={selectOptions} + value={selectOptions.find(option => option.value === graph)} /> - )} + </div> + {isCustomGraph(graph) && + addCustomMetric !== undefined && + removeCustomMetric !== undefined && ( + <AddGraphMetric + addMetric={addCustomMetric} + metrics={metrics} + metricsTypeFilter={metricsTypeFilter} + removeMetric={removeCustomMetric} + selectedMetrics={selectedMetrics} + /> + )} + </div> </div> ); } |