Cleaned up current Health Table #5

Open
aurora wants to merge 23 commits from alice into dev
2 changed files with 21 additions and 9 deletions
Showing only changes of commit 957d0319df - Show all commits

View File

@ -46,23 +46,17 @@
<thead>
<tr>
<th scope="col">Drone</th>
<th scope="col">Mu1</th>
<th scope="col">Mu2</th>
<th scope="col">Mu3</th>
<td id="name"></th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">IP Address</th>
<td>1</td>
<td>2</td>
<td>3</td>
<td id="address"></td>
</tr>
<tr>
<th scope="row">Docker Container</th>
<td>Container1</td>
<td>Container2</td>
<td>Container3</td>
<td id="container"></td>
</tr>
</tbody>
</table>

View File

@ -19,6 +19,24 @@ function initPage() {
// Search for drones files in the services directory and populate the dropdown with directory names
addDropDown(droneDropdown, drones, "1");
const command1 = "hostname -I"
const command2 = "hostname"
const command3 = "docker container ls"
cockpit.spawn(["bash", "-c", command1])
.then((data) => {
console.log(data.split(" ")[0]);
})
.catch((error) => console.log(error));
cockpit.spawn(["bash", "-c", command2])
.then((data) => {
console.log(data.split(" ")[0]);
})
.catch((error) => console.log(error));
cockpit.spawn(["bash", "-c", command3])
.then((data) => {
console.log(data.split(" ")[0]);
})
.catch((error) => console.log(error));
}
function droneChange() {