diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-07-26 09:59:03 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-07-26 09:59:11 +0200 |
commit | 8ff6ccecd8edb2b0e7f84058bb6a2ec7d01178a3 (patch) | |
tree | 2dd51371c9fcc4b46b05fdc3ec24abdacc483941 /server/sonar-web/src | |
parent | 97fae6de6b4edb242575ee19e099597d44a79541 (diff) | |
download | sonarqube-8ff6ccecd8edb2b0e7f84058bb6a2ec7d01178a3.tar.gz sonarqube-8ff6ccecd8edb2b0e7f84058bb6a2ec7d01178a3.zip |
add nice message when no results on permission pages
Diffstat (limited to 'server/sonar-web/src')
-rw-r--r-- | server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.js b/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.js index 63fb560ea89..ea5a6f1c4bb 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.js +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.js @@ -21,6 +21,7 @@ import React from 'react'; import UserHolder from './UserHolder'; import GroupHolder from './GroupHolder'; import { TooltipsContainer } from '../../../../components/mixins/tooltips-mixin'; +import { translate } from '../../../../helpers/l10n'; export default class HoldersList extends React.Component { static propTypes = { @@ -73,6 +74,17 @@ export default class HoldersList extends React.Component { ); } + renderEmpty () { + const columns = this.props.permissions.length + 1; + return ( + <tr> + <td colSpan={columns}> + {translate('no_results_search')} + </td> + </tr> + ); + } + render () { const users = this.props.users.map(user => ( <UserHolder @@ -99,6 +111,7 @@ export default class HoldersList extends React.Component { <table className="data zebra permissions-table"> {this.renderTableHeader()} <tbody> + {users.length === 0 && groups.length === 0 && this.renderEmpty()} {users} {groups} </tbody> |