X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fplugins%2Fproject_management%2Fsrc%2Fdashboard%2Fdashboard.jsx;h=bc67dbf33d2565018055aa5e5a873631b51d73df;hb=83ebeec87b6e614f2b870e37326015a9ed468346;hp=8cda8026990b62fc55051719af3a8d0154984952;hpb=abf00ef39ee93f2a7ff05a4432eb3a50a88a487e;p=osm%2FUI.git
diff --git a/skyquake/plugins/project_management/src/dashboard/dashboard.jsx b/skyquake/plugins/project_management/src/dashboard/dashboard.jsx
index 8cda80269..bc67dbf33 100644
--- a/skyquake/plugins/project_management/src/dashboard/dashboard.jsx
+++ b/skyquake/plugins/project_management/src/dashboard/dashboard.jsx
@@ -7,6 +7,7 @@ import ReactDOM from 'react-dom';
import AppHeader from 'widgets/header/header.jsx';
import ProjectManagementStore from './projectMgmtStore.js';
import SkyquakeComponent from 'widgets/skyquake_container/skyquakeComponent.jsx';
+import SkyquakeRBAC from 'widgets/skyquake_rbac/skyquakeRBAC.jsx';
import 'style/layout.scss';
import './projectMgmt.scss';
import {Panel, PanelWrapper} from 'widgets/panel/panel';
@@ -20,6 +21,10 @@ import 'widgets/form_controls/formControls.scss';
import imgAdd from '../../node_modules/open-iconic/svg/plus.svg'
import imgRemove from '../../node_modules/open-iconic/svg/trash.svg'
+import ROLES from 'utils/roleConstants.js';
+const PROJECT_ROLES = ROLES.PROJECT;
+const PLATFORM = ROLES.PLATFORM;
+
class ProjectManagementDashboard extends React.Component {
constructor(props) {
super(props);
@@ -86,9 +91,11 @@ class ProjectManagementDashboard extends React.Component {
deleteProject = (e) => {
e.preventDefault();
e.stopPropagation();
- this.Store.deleteProject({
+ if (confirm('Are you sure you want to delete this project?')) {
+ this.Store.deleteProject({
'name': this.state['name']
});
+ }
}
createProject = (e) => {
let self = this;
@@ -103,7 +110,6 @@ class ProjectManagementDashboard extends React.Component {
'name': projectName,
'description': self.state.description,
'project-config' : {
- 'name-ref': projectName,
'user': cleanUsers
}
});
@@ -121,7 +127,6 @@ class ProjectManagementDashboard extends React.Component {
'name': projectName,
'description': self.state.description,
'project-config' : {
- 'name-ref': projectName,
'user': cleanUsers
}
}));
@@ -214,9 +219,9 @@ class ProjectManagementDashboard extends React.Component {
let state = this.state;
let passwordSectionHTML = null;
let formButtonsHTML = (
-
-
-
+
+
+
);
let projectUsers = [];
self.state.projectUsers.map((u) => {
@@ -282,9 +287,11 @@ class ProjectManagementDashboard extends React.Component {
)
})}
-
-
-
+
+
+
+
+
@@ -368,8 +375,9 @@ class ProjectManagementDashboard extends React.Component {
+
{formButtonsHTML}
-
+