-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtask-4.js
More file actions
79 lines (71 loc) · 1.36 KB
/
task-4.js
File metadata and controls
79 lines (71 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
const registry = new Container({
position: {
x: 500,
y: 100,
},
width: 200,
height: 100,
label: "Registry (https://hub.docker.com)"
});
const host = new Container({
position: {
x: 50,
y: 250,
},
width: 500,
height: 300,
label: "Host"
});
const images = new Container({
position: {
x: 340,
y: 340,
},
width: 200,
height: 200,
label: "Images",
style: {
backgroundColor: 'white'
}
});
const containers = new Container({
position: {
x: 110,
y: 340,
},
width: 200,
height: 200,
label: "Containers",
style: {
backgroundColor: 'white'
}
});
const ubuntuImage = new DockerImage({
position: {x: 550, y: 130},
imageSrc: "./img/ubuntu-logo.png",
scale: 60,
name: 'ubuntu',
animations: {
pull: {
movement:[['x', -150], ['y', 250]]
},
run: {
movement: [['x', -200]],
timeout: 1000
}
},
logs: {
run: [[2000,'']]
}
});
async function taskInputHandle() {
if (input.command === 'run') {
const img = imagesArr.find((image)=> image.name === input.name)
if (img) {
term.write("\r\n");
await img.runImage()
} else {
setConsoleToNewLine()
}
}
}