aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/projects/app.js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-10-01 12:06:21 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-10-02 10:06:00 +0200
commit3aa4e0789f603f3c579a5f0184fa024afd3792fa (patch)
tree56f90d9d920db588cbd7c486901b08363df8dca4 /server/sonar-web/src/main/js/apps/projects/app.js
parentbcb4b7ae52e9cda07ea97c3bea08ac50a779e1d7 (diff)
downloadsonarqube-3aa4e0789f603f3c579a5f0184fa024afd3792fa.tar.gz
sonarqube-3aa4e0789f603f3c579a5f0184fa024afd3792fa.zip
SONAR-6848 Merge the "Bulk Deletion" and "Provisioning" pages
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projects/app.js')
-rw-r--r--server/sonar-web/src/main/js/apps/projects/app.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/projects/app.js b/server/sonar-web/src/main/js/apps/projects/app.js
new file mode 100644
index 00000000000..8e98bb1686b
--- /dev/null
+++ b/server/sonar-web/src/main/js/apps/projects/app.js
@@ -0,0 +1,21 @@
+import $ from 'jquery';
+import React from 'react';
+import Main from './main';
+import {getCurrentUser} from '../../api/users';
+import {getGlobalNavigation} from '../../api/nav';
+
+export default {
+ start(options) {
+ $.when(
+ getCurrentUser(),
+ getGlobalNavigation(),
+ window.requestMessages()
+ ).then((user, nav) => {
+ let el = document.querySelector(options.el),
+ hasProvisionPermission = user[0].permissions.global.indexOf('provisioning') !== -1,
+ topLevelQualifiers = nav[0].qualifiers;
+ React.render(<Main hasProvisionPermission={hasProvisionPermission}
+ topLevelQualifiers={topLevelQualifiers}/>, el);
+ });
+ }
+};