aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/quality-profiles/details
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-07-13 14:50:52 +0200
committerStas Vilchik <vilchiks@gmail.com>2016-07-13 15:32:13 +0200
commit42e1a5230d542f96219dfc0752e221aa1685bbf1 (patch)
tree4779ad8988668aa5769e0ec8ac0029851eb4d05c /server/sonar-web/src/main/js/apps/quality-profiles/details
parentfbfad853493a2652b84083b6fd74597b965434f8 (diff)
downloadsonarqube-42e1a5230d542f96219dfc0752e221aa1685bbf1.tar.gz
sonarqube-42e1a5230d542f96219dfc0752e221aa1685bbf1.zip
highlight current profile in inheritance card
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-profiles/details')
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.js b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.js
index 5751a3d3239..73decce4627 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.js
@@ -18,6 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React from 'react';
+import classNames from 'classnames';
import ProfileInheritanceBox from './ProfileInheritanceBox';
import ChangeParentView from '../views/ChangeParentView';
import { ProfileType } from '../propTypes';
@@ -78,6 +79,12 @@ export default class ProfileInheritance extends React.Component {
}
render () {
+ const highlightCurrent = !this.state.loading &&
+ (this.state.ancestors.length > 0 || this.state.children.length > 0);
+ const currentClassName = classNames('js-inheritance-current', {
+ selected: highlightCurrent
+ });
+
return (
<div className="quality-profile-inheritance">
<header className="big-spacer-bottom clearfix">
@@ -108,7 +115,7 @@ export default class ProfileInheritance extends React.Component {
profile={this.state.profile}
depth={this.state.ancestors.length}
displayLink={false}
- className="js-inheritance-current"/>
+ className={currentClassName}/>
{this.state.children.map(child => (
<ProfileInheritanceBox