aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-04-19 14:06:07 +0200
committerGrégoire Aubert <gregaubert@users.noreply.github.com>2017-04-27 09:08:29 +0200
commit81b3cf750f8bd0bfc5603601d0ad8ab976953b0e (patch)
treefc05a232f1f2dca6e3abe13cefb08d40aa3dd68f /server/sonar-web/src/main
parent73416c40dcdd5d199df5a1e4741167095650fd8b (diff)
downloadsonarqube-81b3cf750f8bd0bfc5603601d0ad8ab976953b0e.tar.gz
sonarqube-81b3cf750f8bd0bfc5603601d0ad8ab976953b0e.zip
Billing plugin integration
Diffstat (limited to 'server/sonar-web/src/main')
-rw-r--r--server/sonar-web/src/main/js/app/components/extensions/Extension.js4
-rw-r--r--server/sonar-web/src/main/js/app/components/extensions/OrganizationPageExtension.js7
-rw-r--r--server/sonar-web/src/main/js/app/utils/exposeLibraries.js8
-rw-r--r--server/sonar-web/src/main/less/init/tables.less9
4 files changed, 24 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/app/components/extensions/Extension.js b/server/sonar-web/src/main/js/app/components/extensions/Extension.js
index f5d145918b1..5f5116b5eb8 100644
--- a/server/sonar-web/src/main/js/app/components/extensions/Extension.js
+++ b/server/sonar-web/src/main/js/app/components/extensions/Extension.js
@@ -33,6 +33,7 @@ type Props = {
key: string,
title: string
},
+ location: {},
onFail: string => void,
options?: {},
router: Object
@@ -51,6 +52,8 @@ class Extension extends React.PureComponent {
if (prevProps.extension !== this.props.extension) {
this.stopExtension();
this.startExtension();
+ } else if (prevProps.location !== this.props.location) {
+ this.startExtension();
}
}
@@ -64,6 +67,7 @@ class Extension extends React.PureComponent {
store,
el: this.container,
currentUser: this.props.currentUser,
+ location: this.props.location,
router: this.props.router,
...this.props.options
});
diff --git a/server/sonar-web/src/main/js/app/components/extensions/OrganizationPageExtension.js b/server/sonar-web/src/main/js/app/components/extensions/OrganizationPageExtension.js
index 6f37a031437..1dbc52d85a9 100644
--- a/server/sonar-web/src/main/js/app/components/extensions/OrganizationPageExtension.js
+++ b/server/sonar-web/src/main/js/app/components/extensions/OrganizationPageExtension.js
@@ -27,6 +27,7 @@ import type { Organization } from '../../../store/organizations/duck';
type Props = {
organization: Organization,
+ location: {},
params: {
extensionKey: string,
organizationKey: string,
@@ -48,7 +49,11 @@ class OrganizationPageExtension extends React.PureComponent {
const extension = pages.find(p => p.key === `${pluginKey}/${extensionKey}`);
return extension
- ? <Extension extension={extension} options={{ organization }} />
+ ? <Extension
+ extension={extension}
+ options={{ organization }}
+ location={this.props.location}
+ />
: <ExtensionNotFound />;
}
}
diff --git a/server/sonar-web/src/main/js/app/utils/exposeLibraries.js b/server/sonar-web/src/main/js/app/utils/exposeLibraries.js
index 843319f2341..8102c75f7bf 100644
--- a/server/sonar-web/src/main/js/app/utils/exposeLibraries.js
+++ b/server/sonar-web/src/main/js/app/utils/exposeLibraries.js
@@ -19,10 +19,13 @@
*/
import moment from 'moment';
import * as ReactRedux from 'react-redux';
+import Select from 'react-select';
+import Modal from 'react-modal';
import * as measures from '../../helpers/measures';
import * as request from '../../helpers/request';
import FavoriteContainer from '../../components/controls/FavoriteContainer';
import ListFooter from '../../components/controls/ListFooter';
+import Tooltip from '../../components/controls/Tooltip';
const exposeLibraries = () => {
window.moment = moment;
@@ -31,7 +34,10 @@ const exposeLibraries = () => {
window.SonarRequest = request;
window.SonarComponents = {
FavoriteContainer,
- ListFooter
+ ListFooter,
+ Modal,
+ Tooltip,
+ Select
};
};
diff --git a/server/sonar-web/src/main/less/init/tables.less b/server/sonar-web/src/main/less/init/tables.less
index 17e230ce168..acd590724c5 100644
--- a/server/sonar-web/src/main/less/init/tables.less
+++ b/server/sonar-web/src/main/less/init/tables.less
@@ -113,8 +113,13 @@ table.data td.small, table.data th.small {
white-space: nowrap;
}
-table.data.zebra > tbody > tr:nth-child(even) {
- background-color: #f5f5f5;
+table.data.zebra {
+ &:not(.zebra-inversed) > tbody > tr:nth-child(even) {
+ background-color: #f5f5f5;
+ }
+ &.zebra-inversed > tbody > tr:nth-child(odd) {
+ background-color: #f5f5f5;
+ }
}
table.data.zebra-hover > tbody > tr:hover {