
The files in tools/vnc-container allow a container image to be built which supports Ironic's graphical console functionality. For each node with an enabled graphical console, the service ironic-novncproxy (or nova-novncproxy) will connect to a VNC server exposed by a container running this image. If the devstack ir-novnc serivce is enabled then this container image will be built locally and ironic configured to used it for the systemd console container provider. This makes a devstack environment functional in accessing graphical consoles for Dell, HPE and Supermicro. Related-Bug: 2086715 Change-Id: I0842570cca22ac0e67d358c30225e8e08561f459
81 lines
1.8 KiB
HTML
81 lines
1.8 KiB
HTML
<html>
|
|
<head>
|
|
<title>Bouncing Pixie</title>
|
|
<style>
|
|
* {margin:0; padding: 0; color:red;}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<canvas id="tv-screen"></canvas>
|
|
<script>
|
|
let speed = 50;
|
|
let scale = 0.4; // Image scale (I work on 1080p monitor)
|
|
let canvas;
|
|
let ctx;
|
|
let logoColor;
|
|
|
|
let dvd = {
|
|
x: 200,
|
|
y: 300,
|
|
xspeed: 10,
|
|
yspeed: 10,
|
|
img: new Image()
|
|
};
|
|
|
|
(function main(){
|
|
canvas = document.getElementById("tv-screen");
|
|
ctx = canvas.getContext("2d");
|
|
dvd.img.src = 'ironic_mascot_color.png';
|
|
|
|
//Draw the "tv screen"
|
|
canvas.width = window.innerWidth;
|
|
canvas.height = window.innerHeight;
|
|
|
|
pickColor();
|
|
update();
|
|
})();
|
|
|
|
function update() {
|
|
setTimeout(() => {
|
|
//Draw the canvas background
|
|
ctx.fillStyle = '#000';
|
|
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
//Draw DVD Logo and his background
|
|
ctx.fillStyle = logoColor;
|
|
ctx.fillRect(dvd.x, dvd.y, dvd.img.width*scale, dvd.img.height*scale);
|
|
ctx.drawImage(dvd.img, dvd.x, dvd.y, dvd.img.width*scale, dvd.img.height*scale);
|
|
//Move the logo
|
|
dvd.x+=dvd.xspeed;
|
|
dvd.y+=dvd.yspeed;
|
|
//Check for collision
|
|
checkHitBox();
|
|
update();
|
|
}, speed)
|
|
}
|
|
|
|
//Check for border collision
|
|
function checkHitBox(){
|
|
if(dvd.x+dvd.img.width*scale >= canvas.width || dvd.x <= 0){
|
|
dvd.xspeed *= -1;
|
|
pickColor();
|
|
}
|
|
|
|
if(dvd.y+dvd.img.height*scale >= canvas.height || dvd.y <= 0){
|
|
dvd.yspeed *= -1;
|
|
pickColor();
|
|
}
|
|
}
|
|
|
|
//Pick a random color in RGB format
|
|
function pickColor(){
|
|
r = Math.random() * (254 - 0) + 0;
|
|
g = Math.random() * (254 - 0) + 0;
|
|
b = Math.random() * (254 - 0) + 0;
|
|
|
|
logoColor = 'rgb('+r+','+g+', '+b+')';
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|