From 828bb316f68fc953c8fa0a6da6dd1f0b7b5c395b Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Thu, 21 Sep 2017 12:44:18 +0530 Subject: [PATCH] Package refactoring and adding release app component. --- .../{Base => AppPublisherBase}/BaseLayout.jsx | 2 +- .../Application/ApplicationListing.jsx | 79 ++++---- .../{ => Create}/ApplicationCreate.jsx | 23 ++- .../{ => Create}/CreateSteps/Step1.jsx | 16 +- .../{ => Create}/CreateSteps/Step2.jsx | 12 -- .../{ => Create}/CreateSteps/Step3.jsx | 11 -- .../{ => Create}/CreateSteps/Step4.jsx | 22 +-- .../{ => Create}/CreateSteps/index.js | 0 .../Edit/ApplicationEditBaseLayout.jsx | 37 ---- .../Edit/Base/ApplicationEditBaseLayout.jsx | 169 ++++++++++++++++++ .../Application/Edit/Base/baseLayout.css | 94 ++++++++++ .../Application/Edit/PackageManager.jsx | 2 +- .../ReleaseContent.jsx} | 16 +- .../Release/ReleaseMgtBase/ReleaseManager.jsx | 96 ++++++++++ .../Release/ReleaseMgtBase/release-mgt.css | 32 ++++ .../components/Platform/PlatformListing.jsx | 2 +- .../{ => DataTable}/DataTable.jsx | 2 +- .../{ => DataTable}/DataTableHeader.jsx | 2 +- .../{ => DataTable}/DataTableRow.jsx | 2 +- .../components/UIComponents/Input/Input.js | 19 ++ .../components/UIComponents/Input/input.css | 118 ++++++++++++ .../publisher/src/components/index.js | 6 +- .../main/resources/publisher/src/index.css | 5 +- 23 files changed, 602 insertions(+), 165 deletions(-) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/{Base => AppPublisherBase}/BaseLayout.jsx (98%) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/{ => Create}/ApplicationCreate.jsx (89%) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/{ => Create}/CreateSteps/Step1.jsx (92%) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/{ => Create}/CreateSteps/Step2.jsx (97%) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/{ => Create}/CreateSteps/Step3.jsx (98%) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/{ => Create}/CreateSteps/Step4.jsx (87%) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/{ => Create}/CreateSteps/index.js (100%) delete mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/ApplicationEditBaseLayout.jsx create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/Base/ApplicationEditBaseLayout.jsx create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/Base/baseLayout.css rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/{Edit/ReleaseManager.jsx => Release/ReleaseContent.jsx} (75%) create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Release/ReleaseMgtBase/ReleaseManager.jsx create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Release/ReleaseMgtBase/release-mgt.css rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/{ => DataTable}/DataTable.jsx (99%) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/{ => DataTable}/DataTableHeader.jsx (98%) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/{ => DataTable}/DataTableRow.jsx (98%) create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/Input/Input.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/Input/input.css diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Base/BaseLayout.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/AppPublisherBase/BaseLayout.jsx similarity index 98% rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Base/BaseLayout.jsx rename to components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/AppPublisherBase/BaseLayout.jsx index 9eff918bda..203f9aafac 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Base/BaseLayout.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/AppPublisherBase/BaseLayout.jsx @@ -23,7 +23,7 @@ import AuthHandler from "../../api/authHandler"; import '../../css/font-wso2.css'; import NotificationsIcon from 'material-ui/svg-icons/social/notifications'; import ActionAccountCircle from 'material-ui/svg-icons/action/account-circle'; -import ApplicationCreate from '../Application/ApplicationCreate'; +import ApplicationCreate from '../Application/Create/ApplicationCreate'; import {Button, Input, InputGroup,} from 'reactstrap'; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.jsx index 53dfab2a7a..90516bcee7 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.jsx @@ -22,7 +22,8 @@ import {withRouter} from 'react-router-dom'; import AuthHandler from "../../api/authHandler"; import ApplicationMgtApi from '../../api/applicationMgtApi'; import {Table} from 'reactstrap'; -import Drawer from '../UIComponents/Drawer/Drawer' +import Drawer from '../UIComponents/Drawer/Drawer'; +import ApplicationEdit from './Edit/Base/ApplicationEditBaseLayout'; /** * The App Create Component. @@ -236,42 +237,46 @@ class ApplicationListing extends Component { return (
- - - - - {/* TODO: Remove console.log and add sort method. */} - - - - - - - - - {this.applications.map( - (application) => { - return ( - - - - - - - - - ) - } - )} - -
{console.log("sort")}}>Application NameCategoryPlatformStatus
- {/* TODO: Move this styles to css. */} - {application.applicationName}{application.category}{application.platform}{application.status}Edit
+ {/**/} + {/**/} + {/**/} + {/**/} + {/*/!* TODO: Remove console.log and add sort method. *!/*/} + {/**/} + {/**/} + {/**/} + {/**/} + {/**/} + {/**/} + {/**/} + {/**/} + {/*{this.applications.map(*/} + {/*(application) => {*/} + {/*return (*/} + {/**/} + {/**/} + {/**/} + {/**/} + {/**/} + {/**/} + {/**/} + {/**/} + {/*)*/} + {/*}*/} + {/*)}*/} + {/**/} + {/*
{console.log("sort")}}>Application NameCategoryPlatformStatus
*/} + {/*/!* TODO: Move this styles to css. *!/*/} + {/*{application.applicationName}{application.category}{application.platform}{application.status}Edit
*/} + + + +
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create/ApplicationCreate.jsx similarity index 89% rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx rename to components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create/ApplicationCreate.jsx index e2e55206ca..835e3ab399 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create/ApplicationCreate.jsx @@ -16,18 +16,12 @@ * under the License. */ -import Theme from '../../theme'; import React, {Component} from 'react'; -import Dialog from 'material-ui/Dialog'; import {withRouter} from 'react-router-dom'; -import FlatButton from 'material-ui/FlatButton'; -import AuthHandler from "../../api/authHandler"; -import {Step1, Step2, Step3, Step4} from './CreateSteps'; -import RaisedButton from 'material-ui/RaisedButton'; -import ApplicationMgtApi from '../../api/applicationMgtApi'; -import {Card, CardActions, CardTitle} from 'material-ui/Card'; -import {Step, StepLabel, Stepper,} from 'material-ui/Stepper'; -import {Button, Modal, InputGroup, ModalHeader, ModalBody, ModalFooter, Input, Label, Form, FormGroup} from 'reactstrap'; +import AuthHandler from "../../../api/authHandler"; +import {Step1, Step2, Step3, Step4} from './CreateSteps/index'; +import ApplicationMgtApi from '../../../api/applicationMgtApi'; +import {Button, Modal, ModalBody, ModalFooter, ModalHeader} from 'reactstrap'; /** * The App Create Component. @@ -221,13 +215,18 @@ class ApplicationCreate extends Component {
- {'< '}Create Application + Create Application {this.getStepContent(this.state.stepIndex)} + {this.state.stepIndex === 0? +
: } - {' '} + {this.state.finished? + + : } +
); diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step1.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create/CreateSteps/Step1.jsx similarity index 92% rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step1.jsx rename to components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create/CreateSteps/Step1.jsx index fab948d4da..4997bc0ac7 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step1.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create/CreateSteps/Step1.jsx @@ -16,11 +16,10 @@ * under the License. */ -import Theme from '../../../theme'; import PropTypes from 'prop-types'; import React, {Component} from 'react'; -import AuthHandler from "../../../api/authHandler"; -import PlatformMgtApi from "../../../api/platformMgtApi"; +import AuthHandler from "../../../../api/authHandler"; +import PlatformMgtApi from "../../../../api/platformMgtApi"; import {FormGroup, Input, Label} from 'reactstrap'; /** @@ -57,17 +56,6 @@ class Step1 extends Component { this.scriptId = "application-create-step1"; } - componentWillMount() { - /** - *Loading the theme files based on the the user-preference. - */ - Theme.insertThemingScripts(this.scriptId); - } - - componentWillUnmount() { - Theme.removeThemingScripts(this.scriptId); - } - componentDidMount() { //Get the list of available platforms and set to the state. PlatformMgtApi.getPlatforms().then(response => { diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step2.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create/CreateSteps/Step2.jsx similarity index 97% rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step2.jsx rename to components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create/CreateSteps/Step2.jsx index 910db0ddec..6238e38256 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step2.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create/CreateSteps/Step2.jsx @@ -17,7 +17,6 @@ */ import PropTypes from 'prop-types'; -import Theme from '../../../theme'; import React, {Component} from 'react'; import MenuItem from 'material-ui/MenuItem'; import SelectField from 'material-ui/SelectField'; @@ -61,17 +60,6 @@ class Step2 extends Component { this.scriptId = "application-create-step2"; } - componentWillMount() { - /** - *Loading the theme files based on the the user-preference. - */ - Theme.insertThemingScripts(this.scriptId); - } - - componentWillUnmount() { - Theme.removeThemingScripts(this.scriptId); - } - /** * Create a tag on Enter key press and set it to the state. * Clears the tags text field. diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step3.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create/CreateSteps/Step3.jsx similarity index 98% rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step3.jsx rename to components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create/CreateSteps/Step3.jsx index 76304f8ba6..f6b51894c6 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step3.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create/CreateSteps/Step3.jsx @@ -17,7 +17,6 @@ */ import PropTypes from 'prop-types'; -import Theme from '../../../theme'; import Chip from 'material-ui/Chip'; import Dropzone from 'react-dropzone'; import React, {Component} from 'react'; @@ -60,16 +59,6 @@ class Step3 extends Component { this.scriptId = "application-create-step2"; } - componentWillMount() { - /** - *Loading the theme files based on the the user-preference. - */ - Theme.insertThemingScripts(this.scriptId); - } - - componentWillUnmount() { - Theme.removeThemingScripts(this.scriptId); - } /** * Create a tag on Enter key press and set it to the state. diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step4.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create/CreateSteps/Step4.jsx similarity index 87% rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step4.jsx rename to components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create/CreateSteps/Step4.jsx index 47e2415c72..7b75a108f4 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step4.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create/CreateSteps/Step4.jsx @@ -18,15 +18,8 @@ import PropTypes from 'prop-types'; import React, {Component} from 'react'; -import Toggle from 'material-ui/Toggle'; -import MenuItem from 'material-ui/MenuItem'; -import TextField from 'material-ui/TextField'; -import FlatButton from 'material-ui/FlatButton'; -import SelectField from 'material-ui/SelectField'; -import RaisedButton from 'material-ui/RaisedButton'; -import Theme from '../../../theme'; -import {Button, Form, FormGroup, Label, Input, FormText, Badge, Collapse} from 'reactstrap'; -import Switch from '../../UIComponents/Switch/Switch' +import {Collapse, FormGroup, Input, Label} from 'reactstrap'; +import Switch from '../../../UIComponents/Switch/Switch' /** * The Third step of application create wizard. {Application Release Step} @@ -65,17 +58,6 @@ class Step4 extends Component { this.scriptId = "application-create-step3"; } - componentWillMount() { - /** - *Loading the theme files based on the the user-preference. - */ - Theme.insertThemingScripts(this.scriptId); - } - - componentWillUnmount() { - Theme.removeThemingScripts(this.scriptId); - } - /** * Handles finish button click. * This invokes handleNext function in parent component. diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create/CreateSteps/index.js similarity index 100% rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/index.js rename to components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create/CreateSteps/index.js diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/ApplicationEditBaseLayout.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/ApplicationEditBaseLayout.jsx deleted file mode 100644 index 1d40e4a2e5..0000000000 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/ApplicationEditBaseLayout.jsx +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import PropTypes from 'prop-types'; -import React, {Component} from 'react'; - -class ApplicationEdit extends Component { - - constructor() { - super(); - } - - render() { - return( -
- -
- ) - } -} - -export default ApplicationEdit; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/Base/ApplicationEditBaseLayout.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/Base/ApplicationEditBaseLayout.jsx new file mode 100644 index 0000000000..f96a9c8274 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/Base/ApplicationEditBaseLayout.jsx @@ -0,0 +1,169 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import React, {Component} from 'react'; +import './baseLayout.css'; +import ReleaseManager from '../../Release/ReleaseMgtBase/ReleaseManager'; +import {Button, Col, Row} from "reactstrap"; + +class ApplicationEdit extends Component { + + constructor() { + super(); + this.getTabContent = this.getTabContent.bind(this); + this.state = { + general: "active", + release: "", + pkgmgt: "", + activeTab: 1 + } + } + + handleClick(event) { + event.stopPropagation(); + console.log(typeof event.target.value); + const key = event.target.value; + + switch (key) { + case "1": { + console.log("Step1"); + this.setState({activeTab: 1, general: "active", release: "", pkgmgt: ""}); + break; + } + case "2": { + this.setState({activeTab: 2, general: "", release: "active", pkgmgt: ""}); + break; + } + case "3": { + this.setState({activeTab: 3, general: "", release: "", pkgmgt: "active"}); + break; + } + default: { + return "No Content"; + } + } + + } + + getTabContent(tab) { + + switch (tab) { + case 1: { + return ("Step 1") + } + case 2: { + return + } + case 3: { + return ("Step3") + } + } + + } + + render() { + console.log(this.state); + return ( +
+ + + Application Name + + + +
+ + + +
+ + +
+ + +
+ {/* Application edit content */} +
+ {this.getTabContent(this.state.activeTab)} +
+
+ +
+ + + + + +
+ +
+ + {/**/} + {/*/!* Contains the application Name and Save button*!/*/} + {/*
*/} + {/**/} + {/**/} + {/*Header*/} + {/**/} + {/**/} + {/**/} + {/**/} + {/**/} + {/*
*/} + {/*
*/} + {/*
*/} + {/**/} + {/**/} + + {/*/!* Contains side bar items, General, App Release, Package Manager *!/*/} + {/*
*/} + {/**/} + {/**/} + {/**/} + {/*
*/} + {/**/} + {/**/} + {/*
*/} + {/*/!* Application edit content *!/*/} + {/*
*/} + {/*{this.getTabContent(this.state.activeTab)}*/} + {/*
*/} + {/*
*/} + {/**/} + {/*
*/} + {/*
*/} +
+ ) + } +} + +export default ApplicationEdit; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/Base/baseLayout.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/Base/baseLayout.css new file mode 100644 index 0000000000..5e6c1e9af3 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/Base/baseLayout.css @@ -0,0 +1,94 @@ + +#application-edit-base { + width: 70%; + margin: 0 auto; + height: 100%; + background-color: #f6f6f6; + border: solid 1px #828282; +} + +#application-edit-header { + height: 50px; + width: 100%; + margin: 0; + background-color: #9a9a9a; + border: solid 1px #a2a2a2; + font-size: 20px; +} + +.application-header-text { + margin: 10px 0px 0px 10px; +} + +#save-btn-content { + float: right; + +} + +#app-save-btn { + border-radius: 0%; +} + +.save-btn { + margin: 5px 5px 5px 0px; + height: 70%; + width: 50%; + float: right; +} + +.save-btn:hover { + cursor: pointer; +} + +/*Tab styling*/ +div.tab { + float: left; + border: 1px solid #ccc; + background-color: #f1f1f1; + height: 100%; +} + +/* Style the tab buttons */ +div.tab button { + display: block; + background-color: inherit; + color: black; + padding: 15px 16px; + width: 100%; + border: none; + outline: none; + text-align: left; + cursor: pointer; + transition: 0.3s; +} + +/* Change background color of buttons on hover */ +div.tab button:hover { + background-color: #ddd; + cursor: pointer; +} + +/* Create an active/current "tab button" class */ +div.tab button.active { + background-color: #ccc; +} + + +#application-edit-main-container { + display: flex; +} + +#application-edit-outer-content { + height: auto; + width: 100%; +} + +#application-edit-content { + margin: 5px 10px 5px 10px; + width: 90%; +} + +#app-edit-content { + height: 100%; + position: relative; +} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/PackageManager.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/PackageManager.jsx index c9c6a47804..a08431332e 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/PackageManager.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/PackageManager.jsx @@ -27,7 +27,7 @@ class PackageManager extends Component { render() { return( -
+
) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/ReleaseManager.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Release/ReleaseContent.jsx similarity index 75% rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/ReleaseManager.jsx rename to components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Release/ReleaseContent.jsx index a3b0ac76fe..1d22a37445 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Edit/ReleaseManager.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Release/ReleaseContent.jsx @@ -16,22 +16,14 @@ * under the License. */ -import PropTypes from 'prop-types'; import React, {Component} from 'react'; -class ReleaseManager extends Component { +class ReleaseContent extends Component { + - constructor() { - super(); - } - render() { - return( -
-
- ) - } } -export default ReleaseManager; + +export default ReleaseContent; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Release/ReleaseMgtBase/ReleaseManager.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Release/ReleaseMgtBase/ReleaseManager.jsx new file mode 100644 index 0000000000..a580d75edb --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Release/ReleaseMgtBase/ReleaseManager.jsx @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import React, {Component} from 'react'; +import './release-mgt.css'; +import {Button, Col, Row} from "reactstrap"; + +class ReleaseManager extends Component { + + constructor() { + super(); + this.getNoReleaseContent = this.getNoReleaseContent.bind(this); + } + + /** + * Holds a generic message saying there are no current release in the specified release channel. + * */ + getNoReleaseContent(release) { + return ( +
+ + +

You have no on-going {release} Releases!

+ +
+ + + + + +
+ ); + } + + render() { + return ( +
+ + +
+ Production Releases +
+
+ + {this.getNoReleaseContent("Production")} + +
+
+
+ +
+ + +
+ Beta Releases +
+
+ {this.getNoReleaseContent("Beta")} +
+
+
+ +
+ + +
+ Alpha Releases +
+
+ {this.getNoReleaseContent("Alpha")} +
+
+
+ +
+
+ ) + } +} + +export default ReleaseManager; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Release/ReleaseMgtBase/release-mgt.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Release/ReleaseMgtBase/release-mgt.css new file mode 100644 index 0000000000..d72a8ea81c --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Release/ReleaseMgtBase/release-mgt.css @@ -0,0 +1,32 @@ +.release-content { + height: 180px; + width: 95%; + border: dashed 1px #626262; + border-radius: 2%; + position: relative; + background-color: #e8e8e8; +} + +.release-content:after { + content: ""; + letter-spacing: 4px; +} + +.release { + margin: 30px 10px 20px 30px; +} + +.no-release-content { + position: absolute; + margin-top: 10px; + left: 40%; +} + +.button-add:hover { + cursor: pointer; +} + +.release-inner { + margin-top: 5%; +} + diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.jsx index 2f7b445b37..34bf03bec7 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.jsx @@ -21,7 +21,7 @@ import React, {Component} from 'react'; import {withRouter} from 'react-router-dom'; import TextField from 'material-ui/TextField'; import AuthHandler from "../../api/authHandler"; -import DataTable from '../UIComponents/DataTable'; +import DataTable from '../UIComponents/DataTable/DataTable'; import PlatformMgtApi from "../../api/platformMgtApi"; import {Card, CardActions, CardTitle} from 'material-ui/Card'; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable/DataTable.jsx similarity index 99% rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.jsx rename to components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable/DataTable.jsx index 34cda1c6c7..2f27a42a51 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable/DataTable.jsx @@ -16,7 +16,7 @@ * under the License. */ -import Theme from '../../theme'; +import Theme from '../../../theme'; import PropTypes from 'prop-types'; import React, {Component} from 'react'; import DataTableRow from './DataTableRow'; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableHeader.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable/DataTableHeader.jsx similarity index 98% rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableHeader.jsx rename to components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable/DataTableHeader.jsx index 5d078ba59a..52fb8bb771 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableHeader.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable/DataTableHeader.jsx @@ -16,7 +16,7 @@ * under the License. */ -import Theme from '../../theme'; +import Theme from '../../../theme'; import PropTypes from 'prop-types'; import React, {Component} from 'react'; import FlatButton from 'material-ui/FlatButton'; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableRow.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable/DataTableRow.jsx similarity index 98% rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableRow.jsx rename to components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable/DataTableRow.jsx index 48c0dd7a6d..efbb827c52 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableRow.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable/DataTableRow.jsx @@ -16,7 +16,7 @@ * under the License. */ -import Theme from '../../theme'; +import Theme from '../../../theme'; import PropTypes from 'prop-types'; import React, {Component} from 'react'; import IconButton from 'material-ui/IconButton'; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/Input/Input.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/Input/Input.js new file mode 100644 index 0000000000..127a39cf96 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/Input/Input.js @@ -0,0 +1,19 @@ +import React, {Component} from 'react'; +import './input.css'; + +class Input2 extends Component { + + render() { + return ( +
+ + + + +
+ ) + } + +} + +export default Input2; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/Input/input.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/Input/input.css new file mode 100644 index 0000000000..ae43789157 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/Input/input.css @@ -0,0 +1,118 @@ +/** {*/ + /*box-sizing: border-box;*/ +/*}*/ + +/*.custom-input {*/ + /*position: relative;*/ + /*margin-bottom: 45px;*/ +/*}*/ + +/*input {*/ + /*font-size: 18px;*/ + /*padding: 10px 10px 10px 5px;*/ + /*display: block;*/ + /*width: 300px;*/ + /*border: none;*/ + /*border-bottom: 1px solid #757575;*/ +/*}*/ + +/*input:focus {*/ + /*outline: none;*/ +/*}*/ + +/*label {*/ + /*color: #999;*/ + /*font-size: 18px;*/ + /*font-weight: normal;*/ + /*position: absolute;*/ + /*pointer-events: none;*/ + /*left: 5px;*/ + /*top: 10px;*/ + /*transition: 0.2s ease all;*/ + /*-moz-transition: 0.2s ease all;*/ + /*-webkit-transition: 0.2s ease all;*/ +/*}*/ + +/*!* active state *!*/ +/*input:focus ~ label, input:valid ~ label {*/ + /*top: -20px;*/ + /*font-size: 14px;*/ + /*color: #5264AE;*/ +/*}*/ + +/*.under-line {*/ + /*position: relative;*/ + /*display: block;*/ + /*width: 300px;*/ +/*}*/ + +/*.under-line:before, .under-line:after {*/ + /*content: '';*/ + /*height: 2px;*/ + /*width: 0;*/ + /*bottom: 1px;*/ + /*position: absolute;*/ + /*background: #5264AE;*/ + /*transition: 0.2s ease all;*/ + /*-moz-transition: 0.2s ease all;*/ + /*-webkit-transition: 0.2s ease all;*/ +/*}*/ + +/*.under-line:before {*/ + /*left: 50%;*/ +/*}*/ + +/*.under-line:after {*/ + /*right: 50%;*/ +/*}*/ + +/*!* active state *!*/ +/*input:focus ~ .under-line:before, input:focus ~ .under-line:after {*/ + /*width: 50%;*/ +/*}*/ + +/*.highlight {*/ + /*position: absolute;*/ + /*height: 60%;*/ + /*width: 100px;*/ + /*top: 25%;*/ + /*left: 0;*/ + /*pointer-events: none;*/ + /*opacity: 0.5;*/ +/*}*/ + +/*input:focus ~ .highlight {*/ + /*-webkit-animation: inputHighlighter 0.3s ease;*/ + /*-moz-animation: inputHighlighter 0.3s ease;*/ + /*animation: inputHighlighter 0.3s ease;*/ +/*}*/ + +/*@-webkit-keyframes inputHighlighter {*/ + /*from {*/ + /*background: #5264AE;*/ + /*}*/ + /*to {*/ + /*width: 0;*/ + /*background: transparent;*/ + /*}*/ +/*}*/ + +/*@-moz-keyframes inputHighlighter {*/ + /*from {*/ + /*background: #5264AE;*/ + /*}*/ + /*to {*/ + /*width: 0;*/ + /*background: transparent;*/ + /*}*/ +/*}*/ + +/*@keyframes inputHighlighter {*/ + /*from {*/ + /*background: #5264AE;*/ + /*}*/ + /*to {*/ + /*width: 0;*/ + /*background: transparent;*/ + /*}*/ +/*}*/ \ No newline at end of file diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/index.js index 2681e38dd9..d4731483f4 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/index.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/index.js @@ -18,12 +18,12 @@ import Login from './User/Login/Login'; import NotFound from './Error/NotFound'; -import BaseLayout from './Base/BaseLayout'; +import BaseLayout from './AppPublisherBase/BaseLayout'; import PlatformCreate from './Platform/PlatformCreate'; import PlatformListing from './Platform/PlatformListing'; -import ApplicationCreate from './Application/ApplicationCreate'; +import ApplicationCreate from './Application/Create/ApplicationCreate'; import ApplicationListing from './Application/ApplicationListing'; -import ApplicationEdit from './Application/Edit/ApplicationEditBaseLayout'; +import ApplicationEdit from './Application/Edit/Base/ApplicationEditBaseLayout'; /** * Contains all UI components related to Application, Login and Platform diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.css index 61a3071fa7..c5776f7318 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.css +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.css @@ -80,7 +80,10 @@ body { left: 110px; top: 20px; height: 25px; - border: hidden; + outline: none; + border: none; + border-bottom: solid 1px black; + border-radius: 0%; } #application-list {