Skip to content

Commit

Permalink
rename functions to be widget specific
Browse files Browse the repository at this point in the history
Signed-off-by: ianmuchyri <[email protected]>
  • Loading branch information
ianmuchyri committed Mar 18, 2024
1 parent 17e3df8 commit 1226aeb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ui/web/templates/charts/linechartmodal.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,18 @@ <h5>Data Source</h5>
<input type="color" class="form-control" name="lineColor" />
</td>
<td class="text-center">
<button type="button" class="btn btn-sm" onclick="removeRow(this)">
<button
type="button"
class="btn btn-sm"
onclick="removeLineChartRow(this)"
>
<i class="fas fa-trash-alt"></i>
</button>
</td>
</tr>
</tbody>
</table>
<button type="button" class="btn body-button btn-sm" onclick="addRow()">
<button type="button" class="btn body-button btn-sm" onclick="addLineChartRow()">
Add source
</button>
</div>
Expand Down Expand Up @@ -340,7 +344,7 @@ <h5>Data Source</h5>
})
});

function addRow() {
function addLineChartRow() {
const uuidPattern = "{{ .UUIDPattern }}";
const table = document
.getElementById("linechart-data");
Expand Down Expand Up @@ -368,7 +372,7 @@ <h5>Data Source</h5>
</td>`;
}

function removeRow(button) {
function removeLineChartRow(button) {
const row = button.parentNode.parentNode;
row.parentNode.removeChild(row);
}
Expand Down

0 comments on commit 1226aeb

Please sign in to comment.