Asking ChatGPT for help

This commit is contained in:
Alice Sedgwick 2024-11-16 23:02:56 -05:00
parent a8c2d628e0
commit a339e910c4
2 changed files with 19 additions and 2 deletions

View File

@ -7,6 +7,9 @@
<link href="../base1/bootstrap.min.css" type="text/css" rel="stylesheet"> <link href="../base1/bootstrap.min.css" type="text/css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" ></script> <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" ></script>
<script src="../base1/cockpit.js"></script> <script src="../base1/cockpit.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.min.js"></script>
<script src="../base1/jquery-3.7.1.min.js"></script> <script src="../base1/jquery-3.7.1.min.js"></script>
</head> </head>
@ -85,8 +88,18 @@
<option value="Drone3">Drone4</option> <option value="Drone3">Drone4</option>
<option value="Drone5">Drone5</option> <option value="Drone5">Drone5</option>
</select> </select>
<div id="myTableContainer"></div> <div id="myTableContainer"></div>
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
Choose a Drone
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
<li><a class="dropdown-item" href="#">Drone1</a></li>
<li><a class="dropdown-item" href="#">Drone2</a></li>
<li><a class="dropdown-item" href="#">Drone3</a></li>
</ul>
</div>
<table class="table table-dark"> <table class="table table-dark">
<thead> <thead>

View File

@ -12,6 +12,9 @@ document.onload = initPage();
document.getElementById("save").addEventListener("click", saveSettings); document.getElementById("save").addEventListener("click", saveSettings);
const dropdownElement = document.getElementById('dropdownMenuButton1');
new bootstrap.Dropdown(dropdownElement);
// Function to initialize the page // Function to initialize the page
function initPage() { function initPage() {
// TODO: Replace /home/spiri/services with some root level path // TODO: Replace /home/spiri/services with some root level path
@ -78,7 +81,8 @@ function saveSettings() {
// Restart drone service // Restart drone service
function displayDroneTable() { function displayDroneTable() {
upaate table // upaate table
;
} }
function addDropDown(box, pairs, defaultValue) { function addDropDown(box, pairs, defaultValue) {