diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/permission-templates')
-rw-r--r-- | server/sonar-web/src/main/js/apps/permission-templates/app.js | 8 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/permission-templates/app.jsx | 23 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/permission-templates/create-view.js (renamed from server/sonar-web/src/main/js/apps/permission-templates/create-view.jsx) | 0 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/permission-templates/delete-view.js (renamed from server/sonar-web/src/main/js/apps/permission-templates/delete-view.jsx) | 4 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/permission-templates/form-view.js | 4 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/permission-templates/groups-view.js | 4 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/permission-templates/header.js (renamed from server/sonar-web/src/main/js/apps/permission-templates/header.jsx) | 0 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/permission-templates/main.js (renamed from server/sonar-web/src/main/js/apps/permission-templates/main.jsx) | 0 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/permission-templates/permission-template-defaults.js (renamed from server/sonar-web/src/main/js/apps/permission-templates/permission-template-defaults.jsx) | 0 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/permission-templates/permission-template-set-defaults.js (renamed from server/sonar-web/src/main/js/apps/permission-templates/permission-template-set-defaults.jsx) | 0 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/permission-templates/permission-template.js (renamed from server/sonar-web/src/main/js/apps/permission-templates/permission-template.jsx) | 0 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/permission-templates/permission-templates.js (renamed from server/sonar-web/src/main/js/apps/permission-templates/permission-templates.jsx) | 0 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/permission-templates/permissions-header.js (renamed from server/sonar-web/src/main/js/apps/permission-templates/permissions-header.jsx) | 0 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/permission-templates/update-view.js (renamed from server/sonar-web/src/main/js/apps/permission-templates/update-view.jsx) | 0 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/permission-templates/users-view.js | 4 |
15 files changed, 16 insertions, 31 deletions
diff --git a/server/sonar-web/src/main/js/apps/permission-templates/app.js b/server/sonar-web/src/main/js/apps/permission-templates/app.js new file mode 100644 index 00000000000..aec705a28d6 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/permission-templates/app.js @@ -0,0 +1,8 @@ +import React from 'react'; +import Main from './main'; +import '../../helpers/handlebars-helpers'; + +window.sonarqube.appStarted.then(options => { + var el = document.querySelector(options.el); + React.render(<Main topQualifiers={options.rootQualifiers}/>, el); +}); diff --git a/server/sonar-web/src/main/js/apps/permission-templates/app.jsx b/server/sonar-web/src/main/js/apps/permission-templates/app.jsx deleted file mode 100644 index 44ff6954266..00000000000 --- a/server/sonar-web/src/main/js/apps/permission-templates/app.jsx +++ /dev/null @@ -1,23 +0,0 @@ -import $ from 'jquery'; -import React from 'react'; -import Main from './main'; - -let topQualifiers = []; - -export default { - start(options) { - $.when( - window.requestMessages(), - this.requestTopQualifiers() - ).then(() => { - var el = document.querySelector(options.el); - React.render(<Main topQualifiers={topQualifiers}/>, el); - }); - }, - - requestTopQualifiers() { - return $.get(baseUrl + '/api/navigation/global').done(r => { - topQualifiers = r.qualifiers; - }); - } -}; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/create-view.jsx b/server/sonar-web/src/main/js/apps/permission-templates/create-view.js index 733e970069f..733e970069f 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/create-view.jsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/create-view.js diff --git a/server/sonar-web/src/main/js/apps/permission-templates/delete-view.jsx b/server/sonar-web/src/main/js/apps/permission-templates/delete-view.js index 60b81fb701c..8f86bb0759d 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/delete-view.jsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/delete-view.js @@ -1,9 +1,9 @@ import ModalForm from '../../components/common/modal-form'; import {deletePermissionTemplate} from '../../api/permissions'; -import './templates'; +import Template from './templates/permission-templates-delete.hbs'; export default ModalForm.extend({ - template: Templates['permission-templates-delete'], + template: Template, onFormSubmit: function () { ModalForm.prototype.onFormSubmit.apply(this, arguments); diff --git a/server/sonar-web/src/main/js/apps/permission-templates/form-view.js b/server/sonar-web/src/main/js/apps/permission-templates/form-view.js index 71d0802a790..f2cbf834af9 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/form-view.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/form-view.js @@ -1,8 +1,8 @@ import ModalForm from '../../components/common/modal-form'; -import './templates'; +import Template from './templates/permission-templates-form.hbs'; export default ModalForm.extend({ - template: Templates['permission-templates-form'], + template: Template, onRender: function () { this._super(); diff --git a/server/sonar-web/src/main/js/apps/permission-templates/groups-view.js b/server/sonar-web/src/main/js/apps/permission-templates/groups-view.js index c13d978d9d3..fc43c68c24c 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/groups-view.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/groups-view.js @@ -1,7 +1,7 @@ import _ from 'underscore'; import Modal from '../../components/common/modals'; import '../../components/common/select-list'; -import './templates'; +import Template from './templates/permission-templates-groups.hbs'; function getSearchUrl (permission, permissionTemplate) { return baseUrl + '/api/permissions/template_groups?ps=100&permission=' + permission.key + @@ -9,7 +9,7 @@ function getSearchUrl (permission, permissionTemplate) { } export default Modal.extend({ - template: Templates['permission-templates-groups'], + template: Template, onRender: function () { this._super(); diff --git a/server/sonar-web/src/main/js/apps/permission-templates/header.jsx b/server/sonar-web/src/main/js/apps/permission-templates/header.js index 0325d4bf6cb..0325d4bf6cb 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/header.jsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/header.js diff --git a/server/sonar-web/src/main/js/apps/permission-templates/main.jsx b/server/sonar-web/src/main/js/apps/permission-templates/main.js index 1a0abfc8ead..1a0abfc8ead 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/main.jsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/main.js diff --git a/server/sonar-web/src/main/js/apps/permission-templates/permission-template-defaults.jsx b/server/sonar-web/src/main/js/apps/permission-templates/permission-template-defaults.js index 39b9ec52021..39b9ec52021 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/permission-template-defaults.jsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/permission-template-defaults.js diff --git a/server/sonar-web/src/main/js/apps/permission-templates/permission-template-set-defaults.jsx b/server/sonar-web/src/main/js/apps/permission-templates/permission-template-set-defaults.js index 87a75de168b..87a75de168b 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/permission-template-set-defaults.jsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/permission-template-set-defaults.js diff --git a/server/sonar-web/src/main/js/apps/permission-templates/permission-template.jsx b/server/sonar-web/src/main/js/apps/permission-templates/permission-template.js index ced79afd895..ced79afd895 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/permission-template.jsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/permission-template.js diff --git a/server/sonar-web/src/main/js/apps/permission-templates/permission-templates.jsx b/server/sonar-web/src/main/js/apps/permission-templates/permission-templates.js index a86379e256d..a86379e256d 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/permission-templates.jsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/permission-templates.js diff --git a/server/sonar-web/src/main/js/apps/permission-templates/permissions-header.jsx b/server/sonar-web/src/main/js/apps/permission-templates/permissions-header.js index 7768f9ec414..7768f9ec414 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/permissions-header.jsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/permissions-header.js diff --git a/server/sonar-web/src/main/js/apps/permission-templates/update-view.jsx b/server/sonar-web/src/main/js/apps/permission-templates/update-view.js index 38e546b820d..38e546b820d 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/update-view.jsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/update-view.js diff --git a/server/sonar-web/src/main/js/apps/permission-templates/users-view.js b/server/sonar-web/src/main/js/apps/permission-templates/users-view.js index 6c6fa5f90e4..83b474ddb70 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/users-view.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/users-view.js @@ -1,10 +1,10 @@ import _ from 'underscore'; import Modal from '../../components/common/modals'; import '../../components/common/select-list'; -import './templates'; +import Template from './templates/permission-templates-users.hbs'; export default Modal.extend({ - template: Templates['permission-templates-users'], + template: Template, onRender: function () { this._super(); |