This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Entity} from 'aframe-react'; | |
import React from 'react'; | |
export default props => ( | |
<Entity id="controller-ent"> | |
<Entity static-body={{shape: 'sphere', sphereRadius: '0.02'}} | |
vive-controls={{hand: 'right'}} | |
vive-cursor | |
className="controllers" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDom from 'react-dom'; | |
import {Entity} from 'aframe-react'; | |
import io from 'socket.io-client'; | |
const socket = io('http://localhost:9003'); | |
class ClusterInfo extends React.Component { | |
constructor(props) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
socket.on('k8sDestroyPod', function(data) { | |
k8.ns.po.delete(data.name, (err) => { | |
if(err) { | |
err; | |
} | |
}); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
destroyChildPod(evt) { | |
var pod = { | |
name: evt.srcElement.id | |
} | |
socket.emit('k8sDestroyPod', pod) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Simple y position tracker to determine if an object has fallen off the platform | |
*/ | |
module.exports = { | |
schema: {type: 'vec3'}, | |
init: function() { | |
this.timeout = setInterval(this.checkPosition.bind(this), 5000); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default props => ( | |
<a-assets> | |
<img id="nginx" src="../assets/images/nginx.jpg" /> | |
<img id="wordpress" src="../assets/images/wordpress.jpg" /> | |
<img id="ubuntu" src="../assets/images/ubuntu.png" /> | |
<img id="redis" src="../assets/images/redis.jpg" /> | |
<img id="k8s" src="../assets/images/k8s.jpg" /> | |
</a-assets> | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ("object.metadata.labels.type" in object) { | |
type = object.object.metadata.labels.type | |
} else { | |
type = "k8s" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Pod extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
color: props.color, | |
clicked: false | |
} | |
this.containerMat = { | |
nginx: "#nginx", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDom from 'react-dom'; | |
import {Entity} from 'aframe-react'; | |
import Pod from './Pod'; | |
import io from 'socket.io-client'; | |
const socket = io('http://localhost:9003'); | |
class PodLayout extends React.Component { | |
constructor(props) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDom from 'react-dom'; | |
import {Entity} from 'aframe-react'; | |
class Pod extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
color: props.color, |