Merge pull request #1081 from menakaj/application-mgt

Fixing code formatting issues
feature/appm-store/pbac
Ruwan 7 years ago committed by GitHub
commit e99f6ba481
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -22,7 +22,6 @@ import {FormattedMessage} from "react-intl";
import Switch from "../../../UIComponents/Switch/Switch"; import Switch from "../../../UIComponents/Switch/Switch";
import Chip from "../../../UIComponents/Chip/Chip"; import Chip from "../../../UIComponents/Chip/Chip";
/** /**
* Enable : switch * Enable : switch
* Share between tenants: switch * Share between tenants: switch
@ -44,7 +43,6 @@ class Configure extends Component {
} }
} }
/** /**
* Create a tag on Enter key press and set it to the state. * Create a tag on Enter key press and set it to the state.
* Clears the tags text field. * Clears the tags text field.
@ -192,7 +190,6 @@ class Configure extends Component {
</div> </div>
) )
} }
} }
export default Configure; export default Configure;

@ -47,8 +47,6 @@ class General extends Component {
onNextClick() { onNextClick() {
const {name, description, identifier, icon} = this.state; const {name, description, identifier, icon} = this.state;
console.log("Next")
let general = { let general = {
name: name, name: name,
description: description, description: description,
@ -74,8 +72,6 @@ class General extends Component {
let field = event.target.name; let field = event.target.name;
let value = event.target.value; let value = event.target.value;
console.log(field, value)
switch (field) { switch (field) {
case("platformName") : { case("platformName") : {
this.setState({name: value}); this.setState({name: value});
@ -93,7 +89,6 @@ class General extends Component {
} }
validate() { validate() {
const {name, identifier, description} = this.state; const {name, identifier, description} = this.state;
let errorCount = 0; let errorCount = 0;
let errors = {}; let errors = {};
@ -112,7 +107,6 @@ class General extends Component {
errorCount++; errorCount++;
errors.description = "Platform Desciption is Required!" errors.description = "Platform Desciption is Required!"
} }
return {errorCount, errors}; return {errorCount, errors};
} }

@ -21,7 +21,7 @@ import {Button, Col, FormGroup, Input, Label, ModalBody, ModalFooter, Row} from
import {FormattedMessage} from "react-intl"; import {FormattedMessage} from "react-intl";
/** /**
* key : value + * key : value
* */ * */
class Properties extends Component { class Properties extends Component {
constructor() { constructor() {
@ -163,7 +163,6 @@ class Properties extends Component {
</div> </div>
) )
} }
} }
export default Properties; export default Properties;

@ -46,7 +46,6 @@ class PlatformCreate extends Component {
} }
} }
componentWillReceiveProps(props, nextprops) { componentWillReceiveProps(props, nextprops) {
this.setState({open: props.open}) this.setState({open: props.open})
} }
@ -67,7 +66,6 @@ class PlatformCreate extends Component {
const {stepIndex} = this.state; const {stepIndex} = this.state;
if (stepIndex + 1 > 2) { if (stepIndex + 1 > 2) {
console.log(this.state);
this.onSubmit(); this.onSubmit();
} else { } else {
this.setState({ this.setState({
@ -75,8 +73,6 @@ class PlatformCreate extends Component {
finished: stepIndex + 1 > 1 finished: stepIndex + 1 > 1
}); });
} }
}; };
/** /**
@ -96,9 +92,6 @@ class PlatformCreate extends Component {
* */ * */
onSubmit(platformProps) { onSubmit(platformProps) {
let {general, configure} = this.state; let {general, configure} = this.state;
console.log(general);
let platformCreatePromise = PlatformMgtApi.createPlatform(general, configure, platformProps); let platformCreatePromise = PlatformMgtApi.createPlatform(general, configure, platformProps);
platformCreatePromise.then(response => { platformCreatePromise.then(response => {
console.log(response.data) console.log(response.data)
@ -116,7 +109,6 @@ class PlatformCreate extends Component {
* @param data: The form data of the step. * @param data: The form data of the step.
* */ * */
setStepData(step, data) { setStepData(step, data) {
console.log(data); //TODO: Remove this
switch (step) { switch (step) {
case "general": { case "general": {
this.setState({general: data}, this.onNextClick()); this.setState({general: data}, this.onNextClick());
@ -138,14 +130,12 @@ class PlatformCreate extends Component {
* This clears the data in the current step and returns to the previous step. * This clears the data in the current step and returns to the previous step.
* */ * */
onPrevClick() { onPrevClick() {
console.log(this.state.stepIndex);
const {stepIndex} = this.state; const {stepIndex} = this.state;
if (stepIndex > 0) { if (stepIndex > 0) {
this.setState({stepIndex: stepIndex - 1, finished: false}); this.setState({stepIndex: stepIndex - 1, finished: false});
} }
}; };
/** /**
* Defines all the Steps in the stepper. (Wizard) * Defines all the Steps in the stepper. (Wizard)
* *
@ -188,7 +178,6 @@ class PlatformCreate extends Component {
} }
} }
getStepperHeaders() { getStepperHeaders() {
return ( return (
[{index: 1, text: "General"}, [{index: 1, text: "General"},

@ -38,7 +38,6 @@ class PlatformListing extends Component {
componentWillMount() { componentWillMount() {
PlatformMgtApi.getPlatforms().then(response => { PlatformMgtApi.getPlatforms().then(response => {
console.log(response);
this.setState({platforms: response.data}); this.setState({platforms: response.data});
}).catch(err => { }).catch(err => {
AuthHandler.unauthorizedErrorHandler(err); AuthHandler.unauthorizedErrorHandler(err);

@ -54,18 +54,12 @@ class DataTable extends Component {
this.scriptId = "data-table" this.scriptId = "data-table"
}; };
/**
* Triggers when user click on table row.
* This method invokes the parent method handleRowClick, which is passed via props.
* */
render() { render() {
return ( return (
<div className="data-table"> <div className="data-table">
{this.props.children} {this.props.children}
</div> </div>
) )
} }
} }

@ -56,10 +56,6 @@ class DataTableHeader extends Component {
} }
render() { render() {
/*margin-top: 30px
* margin-bottom: 10px
* */
return ( return (
<Row className="data-table-header"> <Row className="data-table-header">
{this.props.headers.map(header => { {this.props.headers.map(header => {

@ -44,7 +44,6 @@ class HeaderCell extends Component {
componentWillUnmount() { componentWillUnmount() {
Theme.removeThemingScripts(this.scriptId); Theme.removeThemingScripts(this.scriptId);
} }
/** /**
@ -56,10 +55,6 @@ class HeaderCell extends Component {
} }
render() { render() {
/*margin-top: 30px
* margin-bottom: 10px
* */
return ( return (
<Row className="data-table-header"> <Row className="data-table-header">
{this.props.headers.map(header => { {this.props.headers.map(header => {

Loading…
Cancel
Save