-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathk8s-front.html
More file actions
337 lines (290 loc) · 8.81 KB
/
Copy pathk8s-front.html
File metadata and controls
337 lines (290 loc) · 8.81 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
<!DOCTYPE html>
<html>
<head>
<title> Kubernetes WebApp</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
body {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
}
.topnav {
overflow: hidden;
background-color: #050303;
}
.topnav a {
float: left;
display: block;
color: rgb(255, 254, 254);
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav a:hover {
background-color: dodgerblue;
color: #000;
}
.topnav a.active {
background-color: dodgerblue;
color: #000;
}
.topnav .icon {
display: none;
}
@media screen and (max-width: 600px) {
.topnav a:not(:first-child) {display: none;}
.topnav a.icon {
float: right;
display: block;
}
}
@media screen and (max-width: 600px) {
.topnav.responsive {position: relative;}
.topnav.responsive .icon {
position: absolute;
right: 0;
top: 0;
}
.topnav.responsive a {
float: none;
display: block;
text-align: left;
}
}
</style>
</head>
<body>
<div class="topnav" id="myTopnav">
<a href="#home" class="active">Home</a>
<a href="https://kubernetes.io/docs/home/">Documentation</a>
<a href="https://kubernetes.io/docs/reference/kubectl/cheatsheet/">CheatSheet</a>
<a href="javascript:void(0);" class="icon" onclick="myFunction()">
<i class="fa fa-bars"></i>
</a>
</div>
<script>
function myFunction() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
</script>
</body>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
background-color: black;
font-family: Cursive;
}
.glow {
font-size: 80px;
color: #fff;
text-align: center;
animation: glow 1s ease-in-out infinite alternate;
}
@-webkit-keyframes glow {
from {
text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px dodgerblue, 0 0 40px rgb(38, 145, 253), 0 0 50px rgb(53, 152, 250), 0 0 60px rgb(58, 156, 255), 0 0 70px dodgerblue;
}
to {
text-shadow: 0 0 20px #fff, 0 0 30px rgb(95, 172, 248), 0 0 40px rgb(150, 200, 250), 0 0 50px rgb(193, 224, 255), 0 0 60px rgb(136, 193, 250), 0 0 70px dodgerblue, 0 0 80px dodgerblue;
}
}
</style>
</head>
<body>
<h1 class="glow", style="font-family:Comic sans MS;">KUBERNETES</h1>
</body>
</html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Add icon library -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
body {font-family: Arial, Helvetica, sans-serif;}
* {box-sizing: border-box;}
.input-container {
display: -ms-flexbox; /* IE10 */
display: flex;
width: 100%;
margin-bottom: 15px;
height:50px;
}
.icon {
padding: 10px;
background: dodgerblue;
color: rgb(10, 1, 1);
min-width: 50px;
text-align: center;
}
.input-field {
font-weight: bold;
font-size:20px;
border-radius:10px;
width: 100%;
padding: 10px;
outline: none;
}
.input-field:focus {
border: 2px solid dodgerblue;
}
/* Set a style for the submit button */
.btn {
background-color: dodgerblue;
color: white;
padding: 15px 20px;
border-radius: 10px;
cursor: pointer;
width: 100%;
opacity: 0.9;
font-size: 20px;
font-weight: bold;
}
.btn:hover {
opacity: 1;
color: dodgerblue;
background-color: #fff;
}
</style>
</head>
<body>
<!--<form action="/action_page.php" style="max-width:500px;margin:auto">-->
<h1 style="color:dodgerblue;font-family:cursive;" > Enter Your Requirements </h1>
<div class="input-container">
<i class="fa fa-info-circle icon"></i>
<input id="n1" class="input-field" placeholder="Command" >
</div>
<script>
function run( p2 , p3)
{
var xhr = new XMLHttpRequest();
var i = document.getElementById("n1").value.toLowerCase();
xhr.open("GET", `http://192.168.225.163/cgi-bin/k8s/k8s-server.py?x=${i}&n=${p2}&a=${p3}`, true);
xhr.send();
xhr.onload = function()
{
var output = xhr.responseText;
document.getElementById("p1").innerHTML = output;
}
};
function launchPodDep() {
var image = prompt('Enter image name:');
var name = prompt('Enter pod/Deployment name :');
run(name , image);
};
function deletePodDep() {
var delp = prompt('Enter Deployment/Pod Name you want to delete');
run(delp);
};
function showpods(){
run();
};
function scale(){
var name = prompt("Enter Your Deployment name : ");
var count = prompt("Enter no. copies you want : ");
run(name,count);
};
function exposePodDep(){
var name = prompt("Enter Your Deployment/Pod name : ");
var port = prompt("Enter the Port No. For Exposing Deployment : ");
run(name , port);
};
function deleteAll(){
run();
}
function ask() {
var str = document.getElementById('n1').value
var lowercase = str.toLowerCase();
var arr = lowercase.split(" ");
if (((arr.indexOf("deploy") > -1) || (arr.indexOf("deployment") > -1) || (arr.indexOf("pod") > -1) || (arr.indexOf("container") > -1) ) && ((arr.indexOf("launch") > -1) || (arr.indexOf("create") > -1))) {
alert("pod")
launchPodDep();
}
else if (((arr.indexOf("delete") > -1) || (arr.indexOf("remove") > -1) || (arr.indexOf("destroy") > -1)) && ((arr.indexOf("pod") > -1) || (arr.indexOf("container") > -1) ||(arr.indexOf("deploy") > -1) || (arr.indexOf("deployment") > -1) || (arr.indexOf("rc") > -1) || (arr.indexOf("svc") > -1) || (arr.indexOf("service") > -1))) {
deletePodDep();
}
else if (((arr.indexOf("show") > -1) || (arr.indexOf("list") > -1) || (arr.indexOf("display") > -1)) && ((arr.indexOf("pod") > -1) || (arr.indexOf("pods") > -1) || (arr.indexOf("container") > -1) ||(arr.indexOf("deploy") > -1) || (arr.indexOf("deployment") > -1) || (arr.indexOf("service") > -1) || (arr.indexOf("svc") > -1) || (arr.indexOf("rc") > -1) || (arr.indexOf("nodes") > -1))) {
showpods();
}
else if (((arr.indexOf("create") > -1) || (arr.indexOf("scale") > -1) || (arr.indexOf("replicate") > -1)) && ((arr.indexOf("deploy") > -1) || (arr.indexOf("deployment") > -1))) {
scale();
}
else if (((arr.indexOf("expose") > -1) || (arr.indexOf("create") > -1) || (arr.indexOf("disclose") > -1)) && ((arr.indexOf("loadbalancer") > -1) || (arr.indexOf("deploy") > -1) || (arr.indexOf("deployment") > -1) || (arr.indexOf("service") > -1) || (arr.indexOf("pod") > -1) || (arr.indexOf("pods") > -1))) {
exposePodDep();
}
else if (((arr.indexOf("delete") > -1) || (arr.indexOf("destroy") > -1) || (arr.indexOf("clean") > -1)) && ((arr.indexOf("all") > -1) || (arr.indexOf("environment") > -1) || (arr.indexOf("infrastructure") > -1))) {
deleteAll();
}
else {
alert("The syntax is wrong...try again!!")
}
};
</script>
<button onclick="ask();" class="btn">Submit</button>
<!--</form>-->
</body>
</html>
<div> w</div>
<div> w</div>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 20px;
}
#myBtn {
display: none;
position: fixed;
bottom: 20px;
right: 30px;
z-index: 99;
font-size: 20px;
border: none;
outline: none;
background-color: dodgerblue;
color: white;
cursor: pointer;
padding: 15px;
border-radius: 10px;
}
#myBtn:hover {
background-color: #fff;
color:dodgerblue;
}
</style>
</head>
<body>
<button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
<div style="background-color:dodgerblue;color:white;padding:20px;font-weight:bold;text-align:center;">Output</div>
<div id='p1' style="background-color:lightgrey;padding:30px 30px 2500px">Here is your
<strong>Output..!</strong>.</div>
<script>
//Get the button
var mybutton = document.getElementById("myBtn");
// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
</body>
</html>