diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/package.json b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/package.json index 2abcaecd71..c8a73873f2 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/package.json +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/package.json @@ -21,7 +21,8 @@ "react-router-config": "^5.0.0", "react-router-dom": "latest", "react-scripts": "2.1.8", - "redux-thunk": "^2.3.0" + "redux-thunk": "^2.3.0", + "storm-react-diagrams": "^5.2.1" }, "devDependencies": { "@babel/core": "^7.0.0", diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/release/LifeCycle.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/release/LifeCycle.css new file mode 100644 index 0000000000..912a757eba --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/release/LifeCycle.css @@ -0,0 +1,7 @@ +.srd-diagram{ + height: 100%; + min-height: 300px; + background-color: #3c3c3c !important; + background-image: linear-gradient(0deg, transparent 24%, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.05) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, 0.05) 75%, rgba(255, 255, 255, 0.05) 76%, transparent 77%, transparent), linear-gradient(90deg, transparent 24%, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.05) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, 0.05) 75%, rgba(255, 255, 255, 0.05) 76%, transparent 77%, transparent); + background-size: 50px 50px; +} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/release/LifeCycle.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/release/LifeCycle.js new file mode 100644 index 0000000000..55d9140a3b --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/release/LifeCycle.js @@ -0,0 +1,39 @@ +import React from "react"; +import * as SRD from "storm-react-diagrams"; +import "storm-react-diagrams/dist/style.min.css"; +import "./LifeCycle.css"; + +class LifeCycle extends React.Component { + render() { + const engine = new SRD.DiagramEngine(); + engine.installDefaultFactories(); + + const model = new SRD.DiagramModel(); + + const node1 = new SRD.DefaultNodeModel("Node 1", "rgb(0,192,255)"); + const port1 = node1.addOutPort(" "); + // node1.setPosition(100, 100); + + const node2 = new SRD.DefaultNodeModel("Node 2", "rgb(192,255,0)"); + const port2 = node2.addInPort(" "); + + const node3 = new SRD.DefaultNodeModel("Node 3", "rgb(192,255,0)"); + const port3 = node3.addInPort(" "); + // node2.setPosition(400, 100); + + const link1 = port1.link(port2); + const link2 = port1.link(port3); + + model.addAll(node1, node2, node3, link1, link2); + + engine.setDiagramModel(model); + + return ( +