aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorssjenka <ssjenka@ops-slave-centos7-1.internal.sonarsource.com>2016-07-27 08:01:51 +0200
committerssjenka <ssjenka@ops-slave-centos7-1.internal.sonarsource.com>2016-07-27 08:01:51 +0200
commite4ba85fe304aaad519e574b8f4e172b733389752 (patch)
treeeec8e39c67b4b5ea9dcaa749ac044dff61e1e336 /server
parent536ef50c354725e0f742026863162a0d90e9d2fd (diff)
parent8ff6ccecd8edb2b0e7f84058bb6a2ec7d01178a3 (diff)
downloadsonarqube-e4ba85fe304aaad519e574b8f4e172b733389752.tar.gz
sonarqube-e4ba85fe304aaad519e574b8f4e172b733389752.zip
Automatic merge from branch-6.0
* origin/branch-6.0: add nice message when no results on permission pages
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.js13
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>