Skip to content

Commit 142ea6a

Browse files
committed
added indicator to setup buttons
1 parent 78366b0 commit 142ea6a

File tree

2 files changed

+29
-7
lines changed

2 files changed

+29
-7
lines changed

SetupApp/index.html

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,28 @@
5959
cursor: pointer;
6060
transition: all 0.3s ease-in-out;
6161
}
62+
.buttonDiv {
63+
display: flex;
64+
flex-direction: row;
65+
line-height: 60px;
66+
}
67+
68+
#promCheck, #grafCheck, #portCheck {
69+
visibility: hidden;
70+
}
6271
</style>
6372
</head>
6473

6574
<body>
6675
<div id="root2"></div>
6776
<div class="buttonContainer">
68-
6977
<div class="buttons">
7078
<h1>Set Up Your Kubernetes Cluster with Docketeer!</h1>
7179
<span>You only need to Install Prometheus Operator once!</span>
72-
<button id="prom">Install Prometheus Operator</button>
73-
<button id="metrics">Set Up Grafana</button>
74-
<button id="port">Launch Port Forwarding</button>
80+
<span>Please wait for the green check mark to appear before moving onto the next step!</span>
81+
<div class="buttonDiv"><button id="prom">Install Prometheus Operator</button><span id="promCheck">&#9989;</span></div>
82+
<div class="buttonDiv"><button id="metrics">Set Up Grafana</button><span id="grafCheck">&#9989;</span></div>
83+
<div class="buttonDiv"><button id="port">Launch Port Forwarding</button><span id="portCheck">&#9989;</span></div>
7584
</div>
7685
</div>
7786
</body>

SetupApp/index.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,29 @@ document.addEventListener('DOMContentLoaded', () => {
22
const promInstall = document.querySelector('#prom');
33
const grafInstall = document.querySelector('#metrics');
44
const portForward = document.querySelector('#port');
5+
const promCheck = document.querySelector('#promCheck');
6+
const grafCheck = document.querySelector('#grafCheck');
7+
const portCheck = document.querySelector('#portCheck');
8+
59

610
promInstall.addEventListener('click', () => {
7-
fetch('/api/setup/promInstall');
11+
fetch('/api/setup/promInstall')
12+
.then(() => {
13+
promCheck.setAttribute('style', 'visibility: visible;');
14+
});
815
});
916

1017
grafInstall.addEventListener('click', () => {
11-
fetch('/api/setup/applyGraf');
18+
fetch('/api/setup/applyGraf')
19+
.then(() => {
20+
grafCheck.setAttribute('style', 'visibility: visible;');
21+
});
1222
});
1323

1424
portForward.addEventListener('click', () => {
15-
fetch('/api/setup/portForward');
25+
fetch('/api/setup/portForward')
26+
.then(() => {
27+
portCheck.setAttribute('style', 'visibility: visible;');
28+
});
1629
});
1730
});

0 commit comments

Comments
 (0)