Skip to content

Commit 16773bf

Browse files
committed
[qa] Formatted JS, YAML and markdown
1 parent 9f9f0e0 commit 16773bf

7 files changed

Lines changed: 32 additions & 46 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ name: Bug report
33
about: Open a bug report
44
title: "[bug] "
55
labels: bug
6-
assignees: ''
7-
6+
assignees: ""
87
---
98

109
**Describe the bug**
1110
A clear and concise description of the bug or unexpected behavior.
1211

1312
**Steps To Reproduce**
1413
Steps to reproduce the behavior:
14+
1515
1. Go to '...'
1616
2. Click on '....'
1717
3. Scroll down to '....'
@@ -24,7 +24,8 @@ A clear and concise description of what you expected to happen.
2424
If applicable, add screenshots to help explain your problem.
2525

2626
**System Informatioon:**
27-
- OS: [e.g. Ubuntu 24.04 LTS]
28-
- Python Version: [e.g. Python 3.11.2]
29-
- Django Version: [e.g. Django 4.2.5]
30-
- Browser and Browser Version (if applicable): [e.g. Chromium v126.0.6478.126]
27+
28+
- OS: [e.g. Ubuntu 24.04 LTS]
29+
- Python Version: [e.g. Python 3.11.2]
30+
- Django Version: [e.g. Django 4.2.5]
31+
- Browser and Browser Version (if applicable): [e.g. Chromium v126.0.6478.126]

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: Feature request
33
about: Suggest an idea for this project
44
title: "[feature] "
55
labels: enhancement
6-
assignees: ''
7-
6+
assignees: ""
87
---
98

109
**Is your feature request related to a problem? Please describe.**
@@ -17,4 +16,4 @@ A clear and concise description of what you want to happen.
1716
A clear and concise description of any alternative solutions or features you've considered.
1817

1918
**Additional context**
20-
Add any other context or screenshots about the feature request here.
19+
Add any other context or screenshots about the feature request here.

.github/ISSUE_TEMPLATE/question.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: Question
33
about: Please use the Discussion Forum to ask questions
44
title: "[question] "
55
labels: question
6-
assignees: ''
7-
6+
assignees: ""
87
---
98

109
Please use the [Discussion Forum](https://github.com/orgs/openwisp/discussions) to ask questions.

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- uses: actions/checkout@v4
4242
with:
4343
ref: ${{ github.event.pull_request.head.sha }}
44-
44+
4545
# Caches downloaded .deb packages to speed up future installations
4646
- name: Cache APT packages
4747
uses: actions/cache@v4
@@ -51,7 +51,7 @@ jobs:
5151
restore-keys: |
5252
apt-${{ runner.os }}-
5353
54-
# Disables man-db auto-update to prevent delays during package installation
54+
# Disables man-db auto-update to prevent delays during package installation
5555
- name: Disable man page auto-update
5656
run: |
5757
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
@@ -61,7 +61,7 @@ jobs:
6161
uses: actions/setup-python@v5
6262
with:
6363
python-version: ${{ matrix.python-version }}
64-
cache: 'pip'
64+
cache: "pip"
6565
cache-dependency-path: |
6666
**/requirements*.txt
6767

.github/workflows/pypi.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ jobs:
1717
permissions:
1818
id-token: write
1919
steps:
20-
- uses: actions/checkout@v4
21-
- name: Set up Python
22-
uses: actions/setup-python@v5
23-
with:
24-
python-version: '3.10'
25-
- name: Install dependencies
26-
run: |
27-
pip install -U pip
28-
pip install build
29-
- name: Build package
30-
run: python -m build
31-
- name: Publish package distributions to PyPI
32-
uses: pypa/gh-action-pypi-publish@v1.12.4
20+
- uses: actions/checkout@v4
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.10"
25+
- name: Install dependencies
26+
run: |
27+
pip install -U pip
28+
pip install build
29+
- name: Build package
30+
run: python -m build
31+
- name: Publish package distributions to PyPI
32+
uses: pypa/gh-action-pypi-publish@v1.12.4

openwisp_ipam/static/openwisp-ipam/js/ip-request.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
function getAvailableIp() {
77
$.ajax({
88
type: "GET",
9-
url: django.ipamGetNextAvailableIpUrl.replace(
10-
"0000",
11-
$("#id_subnet").val(),
12-
),
9+
url: django.ipamGetNextAvailableIpUrl.replace("0000", $("#id_subnet").val()),
1310
success: function (res) {
1411
if (!res) {
1512
alert("No IP address available");
@@ -21,9 +18,7 @@
2118

2219
function getURLParameter(name) {
2320
return decodeURI(
24-
(new RegExp(name + "=" + "(.+?)(&|$)").exec(location.search) || [
25-
null,
26-
])[1],
21+
(new RegExp(name + "=" + "(.+?)(&|$)").exec(location.search) || [null])[1],
2722
);
2823
}
2924

openwisp_ipam/static/openwisp-ipam/js/subnet.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ function dismissAddAnotherPopup(win, ip_address) {
1111
win.close();
1212
var id = normalizeIP(ip_address);
1313
var host = django.jQuery("#addr_" + id);
14-
host.replaceWith(
15-
'<a class="used" id="addr_' + id + '">' + ip_address + "</a>",
16-
);
14+
host.replaceWith('<a class="used" id="addr_' + id + '">' + ip_address + "</a>");
1715
}
1816

1917
django.jQuery(function ($) {
@@ -100,8 +98,7 @@ function initHostsInfiniteScroll(
10098
}
10199
$.ajax({
102100
type: "GET",
103-
url:
104-
"/api/v1/ipam/subnet/" + current_subnet + "/hosts/?start=" + ip_address,
101+
url: "/api/v1/ipam/subnet/" + current_subnet + "/hosts/?start=" + ip_address,
105102
success: function (res) {
106103
callback(res.results[0].address === ip_address);
107104
},
@@ -119,10 +116,7 @@ function initHostsInfiniteScroll(
119116
if (input !== searchQuery) {
120117
searchQuery = input;
121118
nextPageUrl =
122-
"/api/v1/ipam/subnet/" +
123-
current_subnet +
124-
"/hosts/?start=" +
125-
searchQuery;
119+
"/api/v1/ipam/subnet/" + current_subnet + "/hosts/?start=" + searchQuery;
126120
$("#subnet-visual").empty();
127121
fetchedPages = [];
128122
lastRenderedPage = 0;
@@ -176,9 +170,7 @@ function initHostsInfiniteScroll(
176170
busy = true;
177171
if (lastRenderedPage > renderedPages) {
178172
$("#subnet-visual div:last").remove();
179-
var addedDiv = pageContainer(
180-
fetchedPages[lastRenderedPage - renderedPages - 1],
181-
);
173+
var addedDiv = pageContainer(fetchedPages[lastRenderedPage - renderedPages - 1]);
182174
$("#subnet-visual").prepend(addedDiv);
183175
$("#subnet-visual").scrollTop(
184176
$("#subnet-visual").scrollTop() + addedDiv.height(),

0 commit comments

Comments
 (0)