aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/overview/components/issues-assignees.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/overview/components/issues-assignees.js')
-rw-r--r--server/sonar-web/src/main/js/apps/overview/components/issues-assignees.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/components/issues-assignees.js b/server/sonar-web/src/main/js/apps/overview/components/issues-assignees.js
new file mode 100644
index 00000000000..126830c9eb8
--- /dev/null
+++ b/server/sonar-web/src/main/js/apps/overview/components/issues-assignees.js
@@ -0,0 +1,31 @@
+import React from 'react';
+import Assignee from '../../../components/shared/assignee-helper';
+import { getComponentIssuesUrl } from '../../../helpers/urls';
+import { formatMeasure } from '../../../helpers/measures';
+
+
+export default class extends React.Component {
+ render () {
+ let rows = this.props.assignees.map(s => {
+ let params = { statuses: 'OPEN,REOPENED' };
+ if (s.val) {
+ params.assignees = s.val;
+ } else {
+ params.assigned = 'false';
+ }
+ let href = getComponentIssuesUrl(this.props.component.key, params);
+ return <tr key={s.val}>
+ <td>
+ <Assignee user={s.user}/>
+ </td>
+ <td className="thin text-right">
+ <a href={href}>{formatMeasure(s.count, 'SHORT_INT')}</a>
+ </td>
+ </tr>;
+ });
+
+ return <table className="data zebra">
+ <tbody>{rows}</tbody>
+ </table>;
+ }
+}