Changes as per the code review.

feature/appm-store/pbac
Menaka Jayawardena 7 years ago
parent 60310d3ca1
commit a64a32f0c3

@ -107,12 +107,6 @@ class BaseLayout extends Component {
{this.props.children} {this.props.children}
</div> </div>
<ApplicationCreate open={this.state.openModal}/> <ApplicationCreate open={this.state.openModal}/>
{/*<Popover style={{right: '20px'}} target="btn" isOpen={true} placement="bottom">*/}
{/*<PopoverTitle>Dismiss All</PopoverTitle>*/}
{/*<PopoverContent>*/}
{/*<NotificationItem/>*/}
{/*</PopoverContent>*/}
{/*</Popover>*/}
</div> </div>
); );
} }

@ -142,14 +142,6 @@ class ApplicationListing extends Component {
}); });
} }
componentWillUnmount() {
// this.setState({data: this.data});
}
componentDidMount() {
}
/** /**
* Extract application from application list and update the state. * Extract application from application list and update the state.
* */ * */
@ -219,16 +211,6 @@ class ApplicationListing extends Component {
}; };
this.setState({drawer: style, appListStyle: appListStyle}); this.setState({drawer: style, appListStyle: appListStyle});
//TODO: Remove console logs.
// ApplicationMgtApi.getApplication(id).then(response => {
// console.log(response);
// this.setState({open: true, application:response.data})
// }).catch(err => {
// console.log(err)
// });
// this.props.history.push("apps/" + id);
} }
handleButtonClick() { handleButtonClick() {

@ -18,8 +18,6 @@
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React, {Component} from 'react'; import React, {Component} from 'react';
import MenuItem from 'material-ui/MenuItem';
import SelectField from 'material-ui/SelectField';
import {Badge, FormGroup, Input, Label} from 'reactstrap'; import {Badge, FormGroup, Input, Label} from 'reactstrap';
/** /**
@ -116,20 +114,6 @@ class Step2 extends Component {
this.setState({tags: this.chipData}); this.setState({tags: this.chipData});
}; };
onVisibilitySelect(event, index, value) {
console.log(value);
let comp = <SelectField> <MenuItem value={0} primaryText="Public"/>
<MenuItem value={1} primaryText="Roles"/>
<MenuItem value={2} primaryText="Devices"/> </SelectField>;
if (value === 1) {
this.setState({visibilityComponent: comp});
} else if (value === 2) {
} else {
}
};
/** /**
* Validate the form. * Validate the form.
* */ * */
@ -215,12 +199,7 @@ class Step2 extends Component {
* Creates an object with the current step data and persist in the parent. * Creates an object with the current step data and persist in the parent.
* */ * */
setStepData() { setStepData() {
let stepData = { let stepData = {};
// name: this.state.name,
// tags: this.state.tags,
// category: this.categories[this.state.category],
// description: this.state.description
};
this.props.setData("step2", {step: stepData}); this.props.setData("step2", {step: stepData});
}; };

@ -87,8 +87,6 @@ class GeneralInfo extends Component {
value={this.state.defValue} value={this.state.defValue}
name="app-tags" name="app-tags"
id="app-tags" id="app-tags"
// onChange={this.handleTagChange.bind(this)}
// onKeyPress={this.addTags.bind(this)}
/> />
<div id="batch-content"> <div id="batch-content">
{this.state.tags.map(tag => { {this.state.tags.map(tag => {
@ -96,7 +94,6 @@ class GeneralInfo extends Component {
<Badge <Badge
style={{margin: '0 2px 0 2px'}} style={{margin: '0 2px 0 2px'}}
value={tag.value} value={tag.value}
// onClick={this.handleRequestDelete.bind(this)}
> >
{tag.value} {tag.value}
</Badge> </Badge>

@ -39,8 +39,7 @@ class ApplicationView extends Component {
} }
componentDidMount() { componentDidMount() {
//Download image artifacts. //TODO: Download image artifacts.
// this.setState({application: this.props.application});
} }
handleEdit() { handleEdit() {

@ -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 React, {Component} from 'react';
import './input.css';
class Input2 extends Component {
render() {
return (
<div className="custom-input">
<input type="text" required/>
<span className="highlight"></span>
<span className="under-line"></span>
<label>Name</label>
</div>
)
}
}
export default Input2;

@ -1,118 +0,0 @@
/** {*/
/*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;*/
/*}*/
/*}*/

@ -132,7 +132,7 @@ class Login extends Component {
if (!this.state.isLoggedIn) { if (!this.state.isLoggedIn) {
return ( return (
<div style={{width: '50%', margin: '0 auto'}}> <div id="login-container">
{/*TODO: Style the components.*/} {/*TODO: Style the components.*/}
<Card id="login-card"> <Card id="login-card">
<CardBlock> <CardBlock>

@ -36,6 +36,11 @@ body {
cursor: pointer; cursor: pointer;
} }
#login-container {
width: 50%;
margin: 0 auto
}
#login-card { #login-card {
border-radius: 0; border-radius: 0;
background-color: #BaBaBa; background-color: #BaBaBa;
@ -231,6 +236,3 @@ body {
font-size: 12px; font-size: 12px;
color: #818181; color: #818181;
} }

Loading…
Cancel
Save