diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/overview/helpers/issues-link.jsx')
-rw-r--r-- | server/sonar-web/src/main/js/apps/overview/helpers/issues-link.jsx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/helpers/issues-link.jsx b/server/sonar-web/src/main/js/apps/overview/helpers/issues-link.jsx new file mode 100644 index 00000000000..edfaede9b68 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/overview/helpers/issues-link.jsx @@ -0,0 +1,11 @@ +import React from 'react'; + +export default React.createClass({ + render: function () { + var params = Object.keys(this.props.params).map((key) => { + return `${key}=${encodeURIComponent(this.props.params[key])}`; + }).join('|'); + var url = `${baseUrl}/component_issues/index?id=${encodeURIComponent(this.props.component)}#${params}`; + return <a href={url}>{this.props.children}</a>; + } +}); |