mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fixing code formatting issues in Platform related components.
This commit is contained in:
parent
73e820b78e
commit
5756fa1519
@ -22,7 +22,6 @@ import {FormattedMessage} from "react-intl";
|
||||
import Switch from "../../../UIComponents/Switch/Switch";
|
||||
import Chip from "../../../UIComponents/Chip/Chip";
|
||||
|
||||
|
||||
/**
|
||||
* Enable : 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.
|
||||
* Clears the tags text field.
|
||||
@ -192,7 +190,6 @@ class Configure extends Component {
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default Configure;
|
||||
|
||||
@ -47,8 +47,6 @@ class General extends Component {
|
||||
onNextClick() {
|
||||
const {name, description, identifier, icon} = this.state;
|
||||
|
||||
console.log("Next")
|
||||
|
||||
let general = {
|
||||
name: name,
|
||||
description: description,
|
||||
@ -74,8 +72,6 @@ class General extends Component {
|
||||
let field = event.target.name;
|
||||
let value = event.target.value;
|
||||
|
||||
console.log(field, value)
|
||||
|
||||
switch (field) {
|
||||
case("platformName") : {
|
||||
this.setState({name: value});
|
||||
@ -93,7 +89,6 @@ class General extends Component {
|
||||
}
|
||||
|
||||
validate() {
|
||||
|
||||
const {name, identifier, description} = this.state;
|
||||
let errorCount = 0;
|
||||
let errors = {};
|
||||
@ -112,7 +107,6 @@ class General extends Component {
|
||||
errorCount++;
|
||||
errors.description = "Platform Desciption is Required!"
|
||||
}
|
||||
|
||||
return {errorCount, errors};
|
||||
}
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ import {Button, Col, FormGroup, Input, Label, ModalBody, ModalFooter, Row} from
|
||||
import {FormattedMessage} from "react-intl";
|
||||
|
||||
/**
|
||||
* key : value +
|
||||
* key : value
|
||||
* */
|
||||
class Properties extends Component {
|
||||
constructor() {
|
||||
@ -163,7 +163,6 @@ class Properties extends Component {
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default Properties;
|
||||
|
||||
@ -46,7 +46,6 @@ class PlatformCreate extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
componentWillReceiveProps(props, nextprops) {
|
||||
this.setState({open: props.open})
|
||||
}
|
||||
@ -67,7 +66,6 @@ class PlatformCreate extends Component {
|
||||
const {stepIndex} = this.state;
|
||||
|
||||
if (stepIndex + 1 > 2) {
|
||||
console.log(this.state);
|
||||
this.onSubmit();
|
||||
} else {
|
||||
this.setState({
|
||||
@ -75,8 +73,6 @@ class PlatformCreate extends Component {
|
||||
finished: stepIndex + 1 > 1
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
@ -96,9 +92,6 @@ class PlatformCreate extends Component {
|
||||
* */
|
||||
onSubmit(platformProps) {
|
||||
let {general, configure} = this.state;
|
||||
|
||||
console.log(general);
|
||||
|
||||
let platformCreatePromise = PlatformMgtApi.createPlatform(general, configure, platformProps);
|
||||
platformCreatePromise.then(response => {
|
||||
console.log(response.data)
|
||||
@ -116,7 +109,6 @@ class PlatformCreate extends Component {
|
||||
* @param data: The form data of the step.
|
||||
* */
|
||||
setStepData(step, data) {
|
||||
console.log(data); //TODO: Remove this
|
||||
switch (step) {
|
||||
case "general": {
|
||||
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.
|
||||
* */
|
||||
onPrevClick() {
|
||||
console.log(this.state.stepIndex);
|
||||
const {stepIndex} = this.state;
|
||||
if (stepIndex > 0) {
|
||||
this.setState({stepIndex: stepIndex - 1, finished: false});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Defines all the Steps in the stepper. (Wizard)
|
||||
*
|
||||
@ -188,7 +178,6 @@ class PlatformCreate extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
getStepperHeaders() {
|
||||
return (
|
||||
[{index: 1, text: "General"},
|
||||
|
||||
@ -38,7 +38,6 @@ class PlatformListing extends Component {
|
||||
|
||||
componentWillMount() {
|
||||
PlatformMgtApi.getPlatforms().then(response => {
|
||||
console.log(response);
|
||||
this.setState({platforms: response.data});
|
||||
}).catch(err => {
|
||||
AuthHandler.unauthorizedErrorHandler(err);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user