Skip to content

Commit e53cd57

Browse files
committed
[qa] Reformatted YAML, Markdown, JS, CSS (prettier 3.6.2)
1 parent 3aa939a commit e53cd57

File tree

10 files changed

+87
-153
lines changed

10 files changed

+87
-153
lines changed

.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: 1 addition & 2 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.**

.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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
uses: actions/setup-python@v5
6969
with:
7070
python-version: ${{ matrix.python-version }}
71-
cache: 'pip'
71+
cache: "pip"
7272
cache-dependency-path: |
7373
**/requirements*.txt
7474

.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_monitoring/device/static/monitoring/css/leaflet.fullscreen.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
.njg-container .leaflet-container-fullscreen .leaflet-control-fullscreen a {
1010
background-position: 0 -26px;
1111
}
12-
.njg-container.leaflet-touch.leaflet-fullscreen-on
13-
.leaflet-control-fullscreen
14-
a,
12+
.njg-container.leaflet-touch.leaflet-fullscreen-on .leaflet-control-fullscreen a,
1513
.njg-container
1614
.leaflet-touch
1715
.leaflet-container-fullscreen

openwisp_monitoring/device/static/monitoring/css/monitoring.css

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,7 @@ td.field-health_status,
8686
.form-row.field-health_checks div.readonly {
8787
margin-left: 0px !important;
8888
}
89-
.form-row.field-health_checks
90-
div
91-
div.flex-container
92-
div.readonly
93-
ul.health_checks {
89+
.form-row.field-health_checks div div.flex-container div.readonly ul.health_checks {
9490
margin-left: 0px !important;
9591
padding-left: 0px !important;
9692
}

openwisp_monitoring/device/static/monitoring/js/device-map.js

Lines changed: 10 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@
9191
? `<p class="paginator">${parts.join(" ")}</p>`
9292
: "";
9393

94-
const popupTitle =
95-
nodeData.label || nodeData?.properties?.name || nodeData.id;
94+
const popupTitle = nodeData.label || nodeData?.properties?.name || nodeData.id;
9695

9796
// Determine coordinates for the popup. We support:
9897
// 1. NetJSONGraph objects (nodeData.location)
@@ -106,10 +105,7 @@
106105
} else if (Array.isArray(nodeData.coordinates)) {
107106
latLng = [nodeData.coordinates[1], nodeData.coordinates[0]];
108107
} else if (nodeData.geometry?.coordinates?.length >= 2) {
109-
latLng = [
110-
nodeData.geometry.coordinates[1],
111-
nodeData.geometry.coordinates[0],
112-
];
108+
latLng = [nodeData.geometry.coordinates[1], nodeData.geometry.coordinates[0]];
113109
}
114110

115111
if (!latLng || isNaN(latLng[0]) || isNaN(latLng[1])) {
@@ -131,10 +127,7 @@
131127
</div>
132128
`;
133129

134-
currentPopup = L.popup()
135-
.setLatLng(latLng)
136-
.setContent(popupContent)
137-
.openOn(map);
130+
currentPopup = L.popup().setLatLng(latLng).setContent(popupContent).openOn(map);
138131

139132
const $el = $(currentPopup.getElement());
140133
$el.find(".next").click(function (e) {
@@ -161,8 +154,7 @@
161154
if (tileLayer.includes("https:")) {
162155
tileLayer = tileLayer.split("https:")[1];
163156
}
164-
let options =
165-
typeof tile[2] === "object" ? tile[2] : { attribution: tile[2] };
157+
let options = typeof tile[2] === "object" ? tile[2] : { attribution: tile[2] };
166158
return { label: tile[0], urlTemplate: `https:${tileLayer}`, options };
167159
});
168160

@@ -238,8 +230,7 @@
238230
if (!status) {
239231
const color = getColor(props);
240232
status =
241-
Object.keys(colors).find((k) => colors[k] === color) ||
242-
"unknown";
233+
Object.keys(colors).find((k) => colors[k] === color) || "unknown";
243234
}
244235
props.status = status;
245236
props.category = status;
@@ -344,9 +335,7 @@
344335
// Make sure points sit above polygons for interaction clarity
345336
tempLayer.eachLayer((layer) => {
346337
layer[
347-
layer.feature.geometry.type === "Point"
348-
? "bringToFront"
349-
: "bringToBack"
338+
layer.feature.geometry.type === "Point" ? "bringToFront" : "bringToBack"
350339
]();
351340
});
352341
}
@@ -364,18 +353,12 @@
364353
const bounds = event.target.getBounds();
365354

366355
// Ensure data.features exists; otherwise skip wrap logic
367-
if (
368-
!netjsonGraph.data ||
369-
!Array.isArray(netjsonGraph.data.features)
370-
) {
356+
if (!netjsonGraph.data || !Array.isArray(netjsonGraph.data.features)) {
371357
return; // nothing to wrap
372358
}
373359

374360
// When panning west past the dateline, clone features shifted −360°
375-
if (
376-
bounds._southWest.lng < -180 &&
377-
!netjsonGraph.westWorldFeaturesAppended
378-
) {
361+
if (bounds._southWest.lng < -180 && !netjsonGraph.westWorldFeaturesAppended) {
379362
const westWorld = structuredClone(netjsonGraph.data);
380363
westWorld.features = westWorld.features.filter(
381364
(f) => !f.geometry || f.geometry.coordinates[0] <= 180,
@@ -390,10 +373,7 @@
390373
}
391374

392375
// When panning east past the dateline, clone features shifted +360°
393-
if (
394-
bounds._northEast.lng > 180 &&
395-
!netjsonGraph.eastWorldFeaturesAppended
396-
) {
376+
if (bounds._northEast.lng > 180 && !netjsonGraph.eastWorldFeaturesAppended) {
397377
const eastWorld = structuredClone(netjsonGraph.data);
398378
eastWorld.features = eastWorld.features.filter(
399379
(f) => !f.geometry || f.geometry.coordinates[0] >= -180,
@@ -422,10 +402,7 @@
422402
try {
423403
res = await this.utils.JSONParamParse(JSONParam);
424404
data = res;
425-
while (
426-
res.next &&
427-
data.features.length <= this.config.maxPointsFetched
428-
) {
405+
while (res.next && data.features.length <= this.config.maxPointsFetched) {
429406
res = await this.utils.JSONParamParse(res.next);
430407
res = await res.json();
431408
data.features = data.features.concat(res.features);

0 commit comments

Comments
 (0)