forked from community/device-mgt-core
parent
5ba211191f
commit
8ee0bd0404
@ -1,71 +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 {withRouter} from 'react-router-dom';
|
|
||||||
import IconButton from 'material-ui/IconButton'
|
|
||||||
import Create from 'material-ui/svg-icons/content/create';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Application view component.
|
|
||||||
* Shows the details of the application.
|
|
||||||
* */
|
|
||||||
class ApplicationView extends Component{
|
|
||||||
constructor() {
|
|
||||||
super();
|
|
||||||
this.state = {
|
|
||||||
application: {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(props, nextProps) {
|
|
||||||
this.setState({application: props.application});
|
|
||||||
console.log(props.application, nextProps)
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
//Download image artifacts.
|
|
||||||
// this.setState({application: this.props.application});
|
|
||||||
}
|
|
||||||
|
|
||||||
handleEdit() {
|
|
||||||
this.props.history.push("/assets/apps/edit/" + this.state.application.uuid);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const platform = this.state.application;
|
|
||||||
console.log(platform);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
|
|
||||||
<label>Application Name : {this.state.application.name}</label>
|
|
||||||
<br/>
|
|
||||||
<label>Description: {this.state.application.description}</label>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
<IconButton onClick={this.handleEdit.bind(this)}>
|
|
||||||
<Create/>
|
|
||||||
</IconButton>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default withRouter(ApplicationView);
|
|
@ -0,0 +1,124 @@
|
|||||||
|
/*
|
||||||
|
* 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 {withRouter} from 'react-router-dom';
|
||||||
|
import {Col, Row} from "reactstrap";
|
||||||
|
import './applicationView.css';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Application view component.
|
||||||
|
* Shows the details of the application.
|
||||||
|
* */
|
||||||
|
class ApplicationView extends Component {
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
this.state = {
|
||||||
|
application: {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(props, nextProps) {
|
||||||
|
this.setState({application: props.application});
|
||||||
|
console.log(props.application, nextProps)
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
//Download image artifacts.
|
||||||
|
// this.setState({application: this.props.application});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleEdit() {
|
||||||
|
this.props.history.push("/assets/apps/edit/" + this.state.application.uuid);
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const platform = this.state.application;
|
||||||
|
console.log(platform);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div id="application-view-content">
|
||||||
|
<div id="application-view-row">
|
||||||
|
<Row>
|
||||||
|
<Col>
|
||||||
|
<div id="app-icon">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
<Col>
|
||||||
|
<Row>
|
||||||
|
<span><strong>Facebook</strong></span>
|
||||||
|
</Row>
|
||||||
|
<Row>
|
||||||
|
<span className="app-updated-date">Last updated on 2017-09-23</span>
|
||||||
|
</Row>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</div>
|
||||||
|
<div id="application-view-row">
|
||||||
|
<Row>
|
||||||
|
<Col>
|
||||||
|
<span className="app-install-count">2k Installs</span>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<Row>
|
||||||
|
<Col>Rating</Col>
|
||||||
|
<Col>View in Store</Col>
|
||||||
|
</Row>
|
||||||
|
</div>
|
||||||
|
<hr/>
|
||||||
|
<div id="application-view-row">
|
||||||
|
<Row>
|
||||||
|
<Col>
|
||||||
|
<span><strong>Description: </strong></span>
|
||||||
|
</Col>
|
||||||
|
<Col>
|
||||||
|
<p>sdfjlkdsjfsjdfjsdf sfjdslkjfdsflkjdsfslkdjfl j</p>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<Row>
|
||||||
|
<Col>
|
||||||
|
<span><strong>Tags: </strong></span>
|
||||||
|
</Col>
|
||||||
|
<Col>
|
||||||
|
<p>[list of tags...]</p>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<Row>
|
||||||
|
<Col>
|
||||||
|
<span><strong>Release: </strong></span>
|
||||||
|
</Col>
|
||||||
|
<Col>
|
||||||
|
<p>Production</p>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<Row>
|
||||||
|
<Col>
|
||||||
|
<span><strong>Version: </strong></span>
|
||||||
|
</Col>
|
||||||
|
<Col>
|
||||||
|
<p>v1.0</p>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default withRouter(ApplicationView);
|
@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#application-view-content {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#application-view-row {
|
||||||
|
margin: 10px 10px 20px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app-icon {
|
||||||
|
height: 100px;
|
||||||
|
width: 100px;
|
||||||
|
border: solid 1px black;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-updated-date {
|
||||||
|
color: #888888;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-install-count {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-details-tbl {
|
||||||
|
outline: none;
|
||||||
|
border-color: #2196F3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-details-tbl tr {
|
||||||
|
margin: 20px 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-details-tbl td {
|
||||||
|
margin-left: 10px;
|
||||||
|
max-width: 400px;
|
||||||
|
}
|
Loading…
Reference in new issue