diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/add-new-app/Step1.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/add-new-app/Step1.js
deleted file mode 100644
index f40c79060b..0000000000
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/add-new-app/Step1.js
+++ /dev/null
@@ -1,150 +0,0 @@
-import React from "react";
-import {Form, Input, Button, Select, Divider, Tag, Tooltip, Icon, Checkbox, Row, Col} from "antd";
-import styles from './Style.less';
-
-const { Option } = Select;
-const { TextArea } = Input;
-const InputGroup = Input.Group;
-
-const formItemLayout = {
- labelCol: {
- span: 8,
- },
- wrapperCol: {
- span: 16,
- },
-};
-
-class EditableTagGroup extends React.Component {
- state = {
- tags: [],
- inputVisible: false,
- inputValue: '',
- };
-
- handleClose = (removedTag) => {
- const tags = this.state.tags.filter(tag => tag !== removedTag);
- this.setState({ tags });
- }
-
- showInput = () => {
- this.setState({ inputVisible: true }, () => this.input.focus());
- }
-
- handleInputChange = (e) => {
- this.setState({ inputValue: e.target.value });
- }
-
- handleInputConfirm = () => {
- const { inputValue } = this.state;
- let { tags } = this.state;
- if (inputValue && tags.indexOf(inputValue) === -1) {
- tags = [...tags, inputValue];
- }
- this.setState({
- tags,
- inputVisible: false,
- inputValue: '',
- });
- }
-
- saveInputRef = input => this.input = input
-
- render() {
- const { tags, inputVisible, inputValue } = this.state;
- return (
-
- {tags.map((tag, index) => {
- const isLongTag = tag.length > 20;
- const tagElem = (
- this.handleClose(tag)}>
- {isLongTag ? `${tag.slice(0, 20)}...` : tag}
-
- );
- return isLongTag ? {tagElem} : tagElem;
- })}
- {inputVisible && (
-
- )}
- {!inputVisible && (
-
- New Tag
-
- )}
-
- );
- }
-}
-
-class Step1 extends React.Component {
- render() {
- return (
-
-
-
- Android
- iOS
-
-
-
-
- Enterprise
-
-
-
-
-
-
-
-
-
-
- Travel
- Entertainment
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
- }
-}
-
-export default Step1;
\ No newline at end of file
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/add-new-app/Step2.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/add-new-app/Step2.js
deleted file mode 100644
index 636e2ecb39..0000000000
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/add-new-app/Step2.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import React from "react"
-
-class Step2 extends React.Component {
- render() {
- return (
-
tttoooeeee
- );
- }
-}
-
-export default Step2;
\ No newline at end of file
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/add-new-app/Step3.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/add-new-app/Step3.js
deleted file mode 100644
index e9339ed0a5..0000000000
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/add-new-app/Step3.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import React from "react"
-
-class Step3 extends React.Component {
- render() {
- return (
-
tttoooeeee
- );
- }
-}
-
-export default Step3;
\ No newline at end of file
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/add-new-release/AddNewRelease.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/add-new-release/AddNewRelease.js
index 3578dca633..f76cf96e7a 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/add-new-release/AddNewRelease.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/add-new-release/AddNewRelease.js
@@ -1,9 +1,12 @@
import React from "react";
import {
+ Icon,
PageHeader,
- Typography
+ Typography,
+ Breadcrumb
} from "antd";
-import AddNewAppForm from "../../../components/new-release/AddReleaseForm";
+import AddNewReleaseForm from "../../../components/new-release/AddReleaseForm";
+import {Link} from "react-router-dom";
const Paragraph = Typography;
@@ -17,27 +20,24 @@ class AddNewRelease extends React.Component {
};
}
- componentDidMount() {
- // this.getCategories();
- }
-
render() {
const {appId} = this.props.match.params;
return (
-
+
+
+
+ Home
+
+ Add New Release
+
-
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempo.
-
-
+
Add New Release
+
Maintain and manage categories and tags here..
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/apps/release/Release.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/apps/release/Release.js
index a4a739a06d..66115abdf7 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/apps/release/Release.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/apps/release/Release.js
@@ -22,7 +22,8 @@ class Release extends React.Component {
uuid: null,
release: null,
currentLifecycleStatus: null,
- }
+ lifecycle: null
+ };
}
componentDidMount() {
@@ -36,12 +37,19 @@ class Release extends React.Component {
this.fetchData(uuid);
}
}
+
changeCurrentLifecycleStatus = (status) =>{
this.setState({
currentLifecycleStatus: status
});
};
+ updateRelease = (release) =>{
+ this.setState({
+ release
+ });
+ };
+
fetchData = (uuid) => {
const config = this.props.context;
@@ -77,10 +85,38 @@ class Release extends React.Component {
}
this.setState({loading: false});
});
+
+ this.getLifecycle();
+ };
+
+ getLifecycle = () => {
+ const config = this.props.context;
+ axios.get(
+ window.location.origin+ config.serverConfig.invoker.uri + config.serverConfig.invoker.publisher + "/applications/lifecycle-config"
+ ).then(res => {
+ if (res.status === 200) {
+ const lifecycle = res.data.data;
+ this.setState({
+ lifecycle: lifecycle
+ })
+ }
+
+ }).catch(function (error) {
+ if (error.hasOwnProperty("response") && error.response.status === 401) {
+ window.location.href = window.location.origin+ '/publisher/login';
+ } else {
+ notification["error"]({
+ message: "There was a problem",
+ duration: 0,
+ description:
+ "Error occurred while trying to load lifecycle configuration.",
+ });
+ }
+ });
};
render() {
- const {app, release, currentLifecycleStatus} = this.state;
+ const {app, release, currentLifecycleStatus, lifecycle} = this.state;
if (release == null) {
return (
@@ -97,12 +133,22 @@ class Release extends React.Component {
-
+
-
+
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/manage/Manage.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/manage/Manage.js
index 236d06c2f2..73a1f47738 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/manage/Manage.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/manage/Manage.js
@@ -1,7 +1,8 @@
import React from "react";
-import {PageHeader, Typography, Input, Button, Row, Col} from "antd";
+import {PageHeader, Typography, Breadcrumb, Row, Col, Icon} from "antd";
import ManageCategories from "../../../components/manage/categories/ManageCategories";
import ManageTags from "../../../components/manage/categories/ManageTags";
+import {Link} from "react-router-dom";
const {Paragraph} = Typography;
@@ -33,14 +34,16 @@ class Manage extends React.Component {
render() {
return (
-
+
+
+
+ Home
+
+ Manage
+
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempo.
-
+
Manage
+
Maintain and manage categories and tags here..
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/public/conf/config.json b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/public/conf/config.json
index 3fab34b8b4..062ac0df96 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/public/conf/config.json
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/public/conf/config.json
@@ -19,16 +19,24 @@
},
"defaultPlatformIcons": {
"default": {
- "icon": "mobile",
- "color": "#535c68"
+ "icon": "global",
+ "color": "#535c68",
+ "theme": "outlined"
},
"android": {
"icon": "android",
- "color": "#7db343"
+ "color": "#7db343",
+ "theme": "filled"
},
"ios": {
"icon": "apple",
- "color": "#535c68"
+ "color": "#535c68",
+ "theme": "filled"
+ },
+ "windows": {
+ "icon": "windows",
+ "color": "#008cc4",
+ "theme": "filled"
}
}
}
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/ReleaseView.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/ReleaseView.js
index 516ac367e4..e2f89051df 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/ReleaseView.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/ReleaseView.js
@@ -37,7 +37,7 @@ class ReleaseView extends React.Component {
headers: {'X-Platform': config.serverConfig.platform}
}
).then(res => {
- if (res.status === 201) {
+ if (res.status === 200) {
this.setState({
loading: false,
appInstallModalVisible: false
@@ -45,7 +45,7 @@ class ReleaseView extends React.Component {
notification["success"]({
message: 'Done!',
description:
- 'App installed successfully.',
+ 'App installed triggered.',
});
} else {
this.setState({
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/pages/dashboard/Dashboard.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/pages/dashboard/Dashboard.js
index d83e3ba32c..3a0d3a88c7 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/pages/dashboard/Dashboard.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/pages/dashboard/Dashboard.js
@@ -1,9 +1,11 @@
import React from "react";
import {Layout, Menu, Icon} from 'antd';
+
const {Header, Content, Footer} = Layout;
import {Link} from "react-router-dom";
-import RouteWithSubRoutes from "../../components/RouteWithSubRoutes"
-import {Switch} from 'react-router'
+import RouteWithSubRoutes from "../../components/RouteWithSubRoutes";
+import {Switch} from 'react-router';
+import axios from "axios";
import "../../App.css";
import {withConfigContext} from "../../context/ConfigContext";
@@ -12,19 +14,56 @@ class Dashboard extends React.Component {
super(props);
this.state = {
routes: props.routes,
- selectedKeys: []
+ selectedKeys: [],
+ deviceTypes: []
};
this.logo = this.props.context.theme.logo;
}
- changeSelectedMenuItem = (key) =>{
+ componentDidMount() {
+ this.getDeviceTypes();
+ }
+
+ getDeviceTypes = () => {
+ const config = this.props.context;
+ axios.get(
+ window.location.origin + config.serverConfig.invoker.uri + config.serverConfig.invoker.deviceMgt + "/device-types"
+ ).then(res => {
+ if (res.status === 200) {
+ const deviceTypes = JSON.parse(res.data.data);
+ this.setState({
+ deviceTypes,
+ loading: false,
+ });
+ }
+
+ }).catch((error) => {
+ if (error.hasOwnProperty("response") && error.response.status === 401) {
+ window.location.href = window.location.origin + '/publisher/login';
+ } else {
+ notification["error"]({
+ message: "There was a problem",
+ duration: 0,
+ description:
+ "Error occurred while trying to load device types.",
+ });
+ }
+ this.setState({
+ loading: false
+ });
+ });
+ };
+
+ changeSelectedMenuItem = (key) => {
this.setState({
selectedKeys: [key]
})
};
render() {
- const {selectedKeys} = this.state;
+ const config = this.props.context;
+ const {selectedKeys, deviceTypes} = this.state;
+
return (
@@ -38,9 +77,28 @@ class Dashboard extends React.Component {
defaultSelectedKeys={selectedKeys}
style={{lineHeight: '64px'}}
>
- Android
- iOS
- Web Clips
+ {
+ deviceTypes.map((deviceType)=>{
+ const platform = deviceType.name;
+ const defaultPlatformIcons = config.defaultPlatformIcons;
+ let icon = defaultPlatformIcons.default.icon;
+ let theme = defaultPlatformIcons.default.theme;
+ if (defaultPlatformIcons.hasOwnProperty(platform)) {
+ icon = defaultPlatformIcons[platform].icon;
+ theme = defaultPlatformIcons[platform].theme;
+ }
+ return (
+
+
+
+ {platform}
+
+
+ );
+ })
+ }
+ Web
+ Clips
@@ -48,7 +106,8 @@ class Dashboard extends React.Component {
{this.state.routes.map((route) => (
-
+
))}
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/pages/dashboard/apps/release/Release.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/pages/dashboard/apps/release/Release.js
index 7989ba6827..874516c2b1 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/pages/dashboard/apps/release/Release.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/pages/dashboard/apps/release/Release.js
@@ -1,9 +1,10 @@
import React from "react";
import '../../../../App.css';
-import {Skeleton, Typography, Row, Col, Card, message, notification} from "antd";
+import {Skeleton, Typography, Row, Col, Card, message, notification, Breadcrumb, Icon} from "antd";
import ReleaseView from "../../../../components/apps/release/ReleaseView";
import axios from "axios";
import {withConfigContext} from "../../../../context/ConfigContext";
+import {Link} from "react-router-dom";
const {Title} = Typography;
@@ -13,12 +14,11 @@ class Release extends React.Component {
constructor(props) {
super(props);
this.routes = props.routes;
- this.state={
+ this.state = {
loading: true,
app: null,
uuid: null
- }
-
+ };
}
componentDidMount() {
@@ -29,19 +29,18 @@ class Release extends React.Component {
componentDidUpdate(prevProps, prevState, snapshot) {
if (prevState.uuid !== this.state.uuid) {
- const {uuid,deviceType} = this.props.match.params;
+ const {uuid, deviceType} = this.props.match.params;
this.fetchData(uuid);
this.props.changeSelectedMenuItem(deviceType);
}
}
- fetchData = (uuid)=>{
+ fetchData = (uuid) => {
const config = this.props.context;
//send request to the invoker
axios.get(
- window.location.origin+ config.serverConfig.invoker.uri + config.serverConfig.invoker.store+"/applications/"+uuid,
-
+ window.location.origin + config.serverConfig.invoker.uri + config.serverConfig.invoker.store + "/applications/" + uuid,
).then(res => {
if (res.status === 200) {
let app = res.data.data;
@@ -53,11 +52,12 @@ class Release extends React.Component {
})
}
- }).catch((error) => { console.log(error);
+ }).catch((error) => {
+ console.log(error);
if (error.hasOwnProperty("response") && error.response.status === 401) {
//todo display a popop with error
message.error('You are not logged in');
- window.location.href = window.location.origin+ '/store/login';
+ window.location.href = window.location.origin + '/store/login';
} else {
notification["error"]({
message: "There was a problem",
@@ -76,12 +76,13 @@ class Release extends React.Component {
const {deviceType} = this.props.match.params;
let content = No Releases Found ;
+ let appName = "loading...";
- if (app != null && app.applicationReleases.length!==0) {
+ if (app != null && app.applicationReleases.length !== 0) {
content = ;
+ appName = app.name;
}
-
return (
@@ -89,6 +90,12 @@ class Release extends React.Component {
+
+
+ {deviceType + " apps"}
+
+ {appName}
+
{content}