From: Laurence Maultsby Date: Thu, 16 Mar 2017 00:52:07 +0000 (-0400) Subject: project-management -> project_management, user-management->user_management X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=41f386a117ec725ad1eb49a9c571107a0c7d1c11;p=osm%2FUI.git project-management -> project_management, user-management->user_management Signed-off-by: Laurence Maultsby --- diff --git a/skyquake/plugins/CMakeLists.txt b/skyquake/plugins/CMakeLists.txt index acfe8637f..60a8102c9 100644 --- a/skyquake/plugins/CMakeLists.txt +++ b/skyquake/plugins/CMakeLists.txt @@ -1,4 +1,4 @@ -# +# # Copyright 2016 RIFT.IO Inc # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,7 +15,7 @@ # # Author(s): Kiran Kashalkar # Creation Date: 08/18/2015 -# +# ## # DEPENDENCY ALERT @@ -44,6 +44,8 @@ set( composer config debug + project_management + user_management # goodbyworld # helloworld launchpad diff --git a/skyquake/plugins/project-management/CMakeLists.txt b/skyquake/plugins/project-management/CMakeLists.txt deleted file mode 100644 index e12d4fd2f..000000000 --- a/skyquake/plugins/project-management/CMakeLists.txt +++ /dev/null @@ -1,38 +0,0 @@ -# RIFT_IO_STANDARD_CMAKE_COPYRIGHT_HEADER(BEGIN) -# Author(s): Kiran Kashalkar -# Creation Date: 08/18/2015 -# RIFT_IO_STANDARD_CMAKE_COPYRIGHT_HEADER(END) - -## -# DEPENDENCY ALERT -# The submodule dependencies must be specified in the -# .gitmodules.dep file at the top level (supermodule) directory -# If this submodule depends other submodules remember to update -# the .gitmodules.dep -## - -cmake_minimum_required(VERSION 2.8) - -## -# Submodule specific includes will go here, -# These are specified here, since these variables are accessed -# from multiple sub directories. If the variable is subdirectory -# specific it must be declared in the subdirectory. -## - -rift_externalproject_add( - config - DEPENDS skyquake - SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} - CONFIGURE_COMMAND echo - BUILD_COMMAND - ${CMAKE_CURRENT_BINARY_DIR}/config/config-build/scripts/build.sh - INSTALL_COMMAND - ${CMAKE_CURRENT_SOURCE_DIR}/scripts/install.sh - ${CMAKE_CURRENT_BINARY_DIR}/config/config-build - ${CMAKE_INSTALL_PREFIX}/usr/share/rw.ui/skyquake - ${RIFT_SUBMODULE_INSTALL_PREFIX}/skyquake/${CMAKE_INSTALL_PREFIX}/usr/share/rw.ui/skyquake - - BCACHE_COMMAND echo -) - diff --git a/skyquake/plugins/project-management/config.json b/skyquake/plugins/project-management/config.json deleted file mode 100644 index b78e3b2bb..000000000 --- a/skyquake/plugins/project-management/config.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "root": "public", - "name": "Project Management", - "dashboard": "./dashboard/dashboard.jsx", - "order": 1, - "priority":1, - "routes": [ - { - "label": "Project Management Dashboard", - "route": "project-management", - "component": "./dashboard/dashboard.jsx", - "type": "internal" - }] -} diff --git a/skyquake/plugins/project-management/package.json b/skyquake/plugins/project-management/package.json deleted file mode 100644 index 1d57bf37a..000000000 --- a/skyquake/plugins/project-management/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "config", - "version": "1.0.0", - "description": "", - "main": "routes.js", - "scripts": { - "start": "rm -rf public/ && mkdir public && cd public && mkdir build && cp ../src/index.html ./ && node ../server.js" - }, - "author": "RIFT.io", - "license": "Apache-2.0", - "dependencies": { - "alt": "^0.18.3", - "bluebird": "^3.4.1", - "express": "^4.13.3", - "history": "^1.17.0", - "jquery": "^2.2.1", - "json-loader": "^0.5.4", - "lodash": "^4.10.0", - "normalizr": "^2.1.0", - "open-iconic": "^1.1.1", - "prismjs": "^1.4.1", - "react": "^0.14.8", - "react-breadcrumbs": "^1.3.9", - "react-crouton": "^0.2.7", - "react-dom": "^0.14.6", - "react-router": "^2.0.1", - "react-slick": "^0.11.1", - "react-tabs": "^0.5.3", - "react-treeview": "^0.4.2", - "request-promise": "^3.0.0", - "underscore": "^1.8.3" - }, - "devDependencies": { - "babel-core": "^6.4.5", - "babel-loader": "^6.2.1", - "babel-polyfill": "^6.9.1", - "babel-preset-es2015": "^6.6.0", - "babel-preset-react": "^6.5.0", - "babel-preset-stage-0": "^6.3.13", - "babel-runtime": "^6.3.19", - "cors": "^2.7.1", - "css-loader": "^0.23.1", - "file-loader": "^0.8.5", - "html-webpack-plugin": "^2.9.0", - "http-proxy": "^1.12.0", - "loaders.css": "^0.1.2", - "node-sass": "^3.4.2", - "react-addons-css-transition-group": "^0.14.7", - "sass-loader": "^3.1.2", - "style-loader": "^0.13.0", - "webpack": "^1.3.0", - "webpack-dev-server": "^1.16.3" - } -} diff --git a/skyquake/plugins/project-management/routes.js b/skyquake/plugins/project-management/routes.js deleted file mode 100644 index 8640a9903..000000000 --- a/skyquake/plugins/project-management/routes.js +++ /dev/null @@ -1,12 +0,0 @@ -/* - * STANDARD_RIFT_IO_COPYRIGHT - */ - -var app = require('express').Router(); -var cors = require('cors'); -var utils = require('../../framework/core/api_utils/utils.js') - // Begin Accounts API - - utils.passThroughConstructor(app); - -module.exports = app; diff --git a/skyquake/plugins/project-management/scripts/build.sh b/skyquake/plugins/project-management/scripts/build.sh deleted file mode 100755 index c4389c731..000000000 --- a/skyquake/plugins/project-management/scripts/build.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# STANDARD_RIFT_IO_COPYRIGHT - -PLUGIN_NAME=project-management -# change to the directory of this script -THIS_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -cd $THIS_DIR -cd .. - -echo 'Building plugin '$PLUGIN_NAME -echo 'Fetching third-party node_modules for '$PLUGIN_NAME -npm install -echo 'Fetching third-party node_modules for '$PLUGIN_NAME'...done' -echo 'Packaging '$PLUGIN_NAME' using webpack' -ui_plugin_cmake_build=true ./node_modules/.bin/webpack --progress --config webpack.production.config.js -echo 'Packaging '$PLUGIN_NAME' using webpack... done' -echo 'Building plugin '$PLUGIN_NAME'... done' diff --git a/skyquake/plugins/project-management/scripts/install.sh b/skyquake/plugins/project-management/scripts/install.sh deleted file mode 100755 index af71fc557..000000000 --- a/skyquake/plugins/project-management/scripts/install.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# STANDARD_RIFT_IO_COPYRIGHT - -plugin=project-management -source_dir=$1 -dest_dir=$2 -bcache_dir=$3 - -# Create destination and build cache directories -mkdir -p $dest_dir -mkdir -p $bcache_dir - -# Create necessary directories under dest and cache dirs -mkdir -p $dest_dir/framework -mkdir -p $dest_dir/plugins -mkdir -p $bcache_dir/framework -mkdir -p $bcache_dir/plugins - -# Copy over built plugin's public folder, config.json, routes.js and api folder as per installed_plugins.txt -mkdir -p $dest_dir/plugins/$plugin -cp -Lrf $source_dir/public $dest_dir/plugins/$plugin/. -cp -Lrf $source_dir/config.json $dest_dir/plugins/$plugin/. -cp -Lrf $source_dir/routes.js $dest_dir/plugins/$plugin/. -cp -Lrp $source_dir/api $dest_dir/plugins/$plugin/. -tar -cf $dest_dir/plugins/$plugin/node_modules.tar node_modules package.json -C $source_dir -#cp -Lrp $source_dir/node_modules $dest_dir/plugins/$plugin/. -mkdir -p $bcache_dir/plugins/$plugin -cp -Lrf $source_dir/public $bcache_dir/plugins/$plugin/. -cp -Lrf $source_dir/config.json $bcache_dir/plugins/$plugin/. -cp -Lrf $source_dir/routes.js $bcache_dir/plugins/$plugin/. -cp -Lrp $source_dir/api $bcache_dir/plugins/$plugin/. -tar -cf $bcache_dir/plugins/$plugin/node_modules.tar $source_dir/node_modules $source_dir/package.json -#cp -Lrp $source_dir/node_modules $bcache_dir/plugins/$plugin/. diff --git a/skyquake/plugins/project-management/server.js b/skyquake/plugins/project-management/server.js deleted file mode 100644 index eb140b74e..000000000 --- a/skyquake/plugins/project-management/server.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * STANDARD_RIFT_IO_COPYRIGHT - */ - -var express = require('express'); -var path = require('path'); -var httpProxy = require('http-proxy'); -var bodyParser = require('body-parser'); -var cors = require('cors'); -var session = require('express-session'); -var proxy = httpProxy.createProxyServer(); -var app = express(); - -var isProduction = process.env.NODE_ENV === 'production'; -var port = isProduction ? 8080 : 8888; -var publicPath = path.resolve(__dirname, 'public'); - -if (!isProduction) { - - //Routes for local development - var lpRoutes = require('./routes.js'); - - app.use(express.static(publicPath)); - app.use(session({ - secret: 'ritio rocks', - })); - app.use(bodyParser.urlencoded({ - extended: true - })); - app.use(bodyParser.json()); - app.use(cors()); - app.use('/', lpRoutes); - var bundle = require('./server/bundle.js'); - bundle(); - - app.all('/build/*', function (req, res) { - proxy.web(req, res, { - target: 'http://localhost:8080' - }); - }); - -} -proxy.on('error', function(e) { - console.log('Could not connect to proxy, please try again...'); -}); - -app.listen(port, function () { - console.log('Server running on port ' + port); -}); - -app.get('/*') diff --git a/skyquake/plugins/project-management/src/dashboard/dashboard.jsx b/skyquake/plugins/project-management/src/dashboard/dashboard.jsx deleted file mode 100644 index 37fa13174..000000000 --- a/skyquake/plugins/project-management/src/dashboard/dashboard.jsx +++ /dev/null @@ -1,420 +0,0 @@ -/* - * STANDARD_RIFT_IO_COPYRIGHT - */ - -import React from 'react'; -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 'style/layout.scss'; -import './projectMgmt.scss'; -import {Panel, PanelWrapper} from 'widgets/panel/panel'; -import {InputCollection, FormSection} from 'widgets/form_controls/formControls.jsx'; - -import TextInput from 'widgets/form_controls/textInput.jsx'; -import Input from 'widgets/form_controls/input.jsx'; -import Button, {ButtonGroup} from 'widgets/button/sq-button.jsx'; -import SelectOption from 'widgets/form_controls/selectOption.jsx'; -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' - -class ProjectManagementDashboard extends React.Component { - constructor(props) { - super(props); - this.Store = this.props.flux.stores.hasOwnProperty('ProjectManagementStore') ? this.props.flux.stores.ProjectManagementStore : this.props.flux.createStore(ProjectManagementStore); - this.Store.getProjects(); - this.Store.getUsers(); - this.state = this.Store.getState(); - this.actions = this.state.actions; - } - componentDidUpdate() { - let self = this; - ReactDOM.findDOMNode(this.projectList).addEventListener('transitionend', this.onTransitionEnd, false); - setTimeout(function() { - let element = self[`project-ref-${self.state.activeIndex}`] - element && !isElementInView(element) && element.scrollIntoView({block: 'end', behavior: 'smooth'}); - }) - } - componentWillMount() { - this.Store.listen(this.updateState); - } - componentWillUnmount() { - this.Store.unlisten(this.updateState); - } - updateState = (state) => { - this.setState(state); - } - updateInput = (key, e) => { - let property = key; - this.actions.handleUpdateInput({ - [property]:e.target.value - }) - } - disabledChange = (e) => { - this.actions.handleDisabledChange(e.target.checked); - } - platformChange = (platformRole, e) => { - this.actions.handlePlatformRoleUpdate(platformRole, e.currentTarget.checked); - } - addProjectRole = (e) => { - this.actions.handleAddProjectItem(); - } - removeProjectRole = (i, e) => { - this.actions.handleRemoveProjectItem(i); - } - updateProjectRole = (i, e) => { - this.actions.handleUpdateProjectRole(i, e) - } - addProject = () => { - this.actions.handleAddProject(); - } - viewProject = (un, index) => { - this.actions.viewProject(un, index); - } - editProject = () => { - this.actions.editProject(false); - } - cancelEditProject = () => { - this.actions.editProject(true) - } - closePanel = () => { - this.actions.handleCloseProjectPanel(); - } - - deleteProject = (e) => { - e.preventDefault(); - e.stopPropagation(); - this.Store.deleteProject({ - 'name': this.state['name'] - }); - } - createProject = (e) => { - let self = this; - e.preventDefault(); - e.stopPropagation(); - let projectUsers = self.state.projectUsers; - - //Remove null values from role - projectUsers.map((u) => { - u.role && u.role.map((r,i) => { - let role = {}; - //you may add a user without a role or a keys, but if one is present then the other must be as well. - if(!r || ((r.role || r['keys']) && (!r.role || !r['keys']))) { - projectUsers.splice(i, 1); - } else { - return u; - } - }) - }) - this.Store.createProject({ - 'name': self.state['name'], - 'description': self.state.description, - 'project-config' : { - 'user': projectUsers - } - }); - } - updateProject = (e) => { - let self = this; - e.preventDefault(); - e.stopPropagation(); - let projectUsers = self.state.projectUsers; - - //Remove null values from role - projectUsers.map((u) => { - u.role && u.role.map((r,i) => { - let role = {}; - //you may add a user without a role or a keys, but if one is present then the other must be as well. - if(!r || ((r.role || r['keys']) && (!r.role || !r['keys']))) { - projectUsers.splice(i, 1); - } else { - return u; - } - }) - }) - - this.Store.updateProject(_.merge({ - 'name': self.state['name'], - 'description': self.state.description, - 'project-config' : { - 'user': projectUsers - } - })); - } - evaluateSubmit = (e) => { - if (e.keyCode == 13) { - if (this.props.isEdit) { - this.updateProject(e); - } else { - this.createProject(e); - } - e.preventDefault(); - e.stopPropagation(); - } - } - updateSelectedUser = (e) => { - this.setState({ - selected - }) - } - addUserToProject = (e) => { - this.actions.handleAddUser(); - } - removeUserFromProject = (userIndex, e) => { - this.actions.handleRemoveUserFromProject(userIndex); - } - updateUserRoleInProject = (userIndex, roleIndex, e) => { - this.actions.handleUpdateUserRoleInProject({ - userIndex, - roleIndex, - value: JSON.parse(e.target.value) - }) - } - removeRoleFromUserInProject = (userIndex, roleIndex, e) => { - this.actions.handleRemoveRoleFromUserInProject({ - userIndex, - roleIndex - }) - } - addRoleToUserInProject = (userIndex, e) => { - this.actions.addRoleToUserInProject(userIndex); - } - onTransitionEnd = (e) => { - this.actions.handleHideColumns(e); - console.log('transition end') - } - disableChange = (e) => { - let value = e.target.value; - value = value.toUpperCase(); - if (value=="TRUE") { - value = true; - } else { - value = false; - } - console.log(value) - } - render() { - let self = this; - let html; - let props = this.props; - let state = this.state; - let passwordSectionHTML = null; - let formButtonsHTML = ( - -