From: Stas Vilchik Date: Wed, 13 Jan 2016 10:04:01 +0000 (+0100) Subject: SONAR-7167 Display function key on project overview page X-Git-Tag: 5.4-M5~26 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5f2fbeb4996f0b5b95bb718be9364a63caff4cbb;p=sonarqube.git SONAR-7167 Display function key on project overview page --- diff --git a/server/sonar-web/src/main/js/apps/overview/meta.js b/server/sonar-web/src/main/js/apps/overview/meta.js index 3506f29c1ad..bb2f6fa5510 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta.js +++ b/server/sonar-web/src/main/js/apps/overview/meta.js @@ -84,26 +84,35 @@ export default React.createClass({ }); let descriptionCard = this.props.component.description ? ( -
-
{this.props.component.description}
+
+ {this.props.component.description}
) : null; let linksCard = _.size(this.props.component.links) > 0 ? ( -
-
    {links}
-
+ ) : null; + let keyCard = ( +
+

{translate('key')}

+
+ {this.props.component.key} +
+
+ ); + let profilesCard = !this.isView() && !this.isDeveloper() && _.size(this.props.component.profiles) > 0 ? ( -
+

{translate('overview.quality_profiles')}

    {profiles}
) : null; let gateCard = !this.isView() && !this.isDeveloper() && this.props.component.gate ? ( -
+

{translate('overview.quality_gate')}

  • @@ -119,10 +128,17 @@ export default React.createClass({ return (
    - {descriptionCard} - {linksCard} - {gateCard} - {profilesCard} +
    + {descriptionCard} + {linksCard} + {keyCard} +
    + {(!!gateCard || !!profilesCard) && ( +
    + {gateCard} + {profilesCard} +
    + )} {this.renderEvents()}
    ); diff --git a/server/sonar-web/src/main/less/pages/overview.less b/server/sonar-web/src/main/less/pages/overview.less index cf27bd92e62..c0851c59e3c 100644 --- a/server/sonar-web/src/main/less/pages/overview.less +++ b/server/sonar-web/src/main/less/pages/overview.less @@ -605,7 +605,7 @@ } .overview-meta .overview-meta-card { - max-width: 25%; + width: calc(100% / 3); } }