mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Merge branch 'devel' into patch-1
This commit is contained in:
+10
-12
@@ -9,18 +9,6 @@ updates:
|
||||
open-pull-requests-limit: 10
|
||||
target-branch: devel
|
||||
versioning-strategy: increase
|
||||
ignore:
|
||||
- dependency-name: postcss
|
||||
versions:
|
||||
- 8.2.6
|
||||
- 8.2.7
|
||||
- dependency-name: xo
|
||||
versions:
|
||||
- 0.38.1
|
||||
- dependency-name: autoprefixer
|
||||
versions:
|
||||
- 10.2.3
|
||||
- 10.2.4
|
||||
reviewers:
|
||||
- "pi-hole/web-maintainers"
|
||||
- package-ecosystem: github-actions
|
||||
@@ -33,3 +21,13 @@ updates:
|
||||
target-branch: devel
|
||||
reviewers:
|
||||
- "pi-hole/web-maintainers"
|
||||
- package-ecosystem: composer
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: saturday
|
||||
time: "10:00"
|
||||
open-pull-requests-limit: 10
|
||||
target-branch: devel
|
||||
reviewers:
|
||||
- "pi-hole/web-maintainers"
|
||||
|
||||
@@ -9,26 +9,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3.1.0
|
||||
- name: Change PHP version
|
||||
run: |
|
||||
sudo update-alternatives --set php /usr/bin/php8.0
|
||||
sudo update-alternatives --set phar /usr/bin/phar8.0
|
||||
sudo update-alternatives --set phpdbg /usr/bin/phpdbg8.0
|
||||
sudo update-alternatives --set php-cgi /usr/bin/php-cgi8.0
|
||||
sudo update-alternatives --set phar.phar /usr/bin/phar.phar8.0
|
||||
php -version
|
||||
- name: Validate composer.json and composer.lock
|
||||
run: composer validate
|
||||
- name: Cache Composer packages
|
||||
id: composer-cache
|
||||
uses: actions/cache@v3.0.11
|
||||
|
||||
- name: Install composer
|
||||
uses: php-actions/composer@v6
|
||||
|
||||
- name: Run PHPStan
|
||||
uses: php-actions/phpstan@v3
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-php-
|
||||
- name: Install dependencies
|
||||
if: steps.composer-cache.outputs.cache-hit != 'true'
|
||||
run: composer install --prefer-dist --no-progress --no-suggest
|
||||
- name: Run phpstan
|
||||
run: composer run-script phpstan
|
||||
configuration: phpstan.neon.dist
|
||||
memory_limit: 256M
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
days-before-close: 5
|
||||
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.'
|
||||
stale-issue-label: 'stale'
|
||||
exempt-issue-labels: 'internal, Fixed In Next Release, Bug'
|
||||
exempt-issue-labels: 'internal, Fixed In Next Release, Bug, never-stale'
|
||||
exempt-all-issue-assignees: true
|
||||
operations-per-run: 300
|
||||
close-issue-reason: 'not_planned'
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@ if (isset($_GET['version'])) {
|
||||
$data['version'] = 3;
|
||||
}
|
||||
|
||||
if (isset($_GET['status'])) {
|
||||
if (isset($_GET['status']) && $auth) {
|
||||
$return = callFTLAPI('stats');
|
||||
if (array_key_exists('FTLnotrunning', $return)) {
|
||||
$data = array('FTLnotrunning' => true);
|
||||
@@ -32,7 +32,7 @@ if (isset($_GET['status'])) {
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_GET['summary']) || isset($_GET['summaryRaw']) || !count($_GET)) {
|
||||
if ((isset($_GET['summary']) || isset($_GET['summaryRaw']) || !count($_GET)) && $auth) {
|
||||
require_once 'scripts/pi-hole/php/gravity.php';
|
||||
|
||||
$return = callFTLAPI('stats');
|
||||
@@ -77,7 +77,7 @@ if (isset($_GET['getMaxlogage']) && $auth) {
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_GET['overTimeData10mins'])) {
|
||||
if (isset($_GET['overTimeData10mins']) && $auth) {
|
||||
$return = callFTLAPI('overTime');
|
||||
if (array_key_exists('FTLnotrunning', $return)) {
|
||||
$data = array('FTLnotrunning' => true);
|
||||
|
||||
+1
-4
@@ -4,7 +4,7 @@
|
||||
"description": "Pi-hole Dashboard for stats and more",
|
||||
"require": {
|
||||
"php": ">=5.4",
|
||||
"phpstan/phpstan": "^0.12.42"
|
||||
"phpstan/phpstan": "1.*"
|
||||
},
|
||||
"license": "EUPL-1.2",
|
||||
"minimum-stability": "stable",
|
||||
@@ -12,8 +12,5 @@
|
||||
"files": [
|
||||
"scripts/vendor/qrcode.php"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"phpstan": "vendor/phpstan/phpstan/phpstan analyse -c phpstan.neon.dist"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+432
-311
File diff suppressed because it is too large
Load Diff
+6
-4
@@ -27,9 +27,9 @@
|
||||
"autoprefixer": "^10.4.13",
|
||||
"eslint-plugin-compat": "^4.0.2",
|
||||
"postcss": "^8.4.19",
|
||||
"postcss-cli": "^10.0.0",
|
||||
"prettier": "2.7.1",
|
||||
"xo": "^0.52.4"
|
||||
"postcss-cli": "^10.1.0",
|
||||
"prettier": "2.8.1",
|
||||
"xo": "^0.53.1"
|
||||
},
|
||||
"browserslist": [
|
||||
"defaults",
|
||||
@@ -99,7 +99,9 @@
|
||||
"unicorn/prefer-number-properties": "off",
|
||||
"unicorn/prefer-query-selector": "off",
|
||||
"unicorn/prefer-string-slice": "off",
|
||||
"unicorn/prevent-abbreviations": "off"
|
||||
"unicorn/prevent-abbreviations": "off",
|
||||
"unicorn/prefer-logical-operator-over-ternary": "off",
|
||||
"unicorn/switch-case-braces": "off"
|
||||
}
|
||||
},
|
||||
"dependencies": {}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
parameters:
|
||||
level: 0
|
||||
excludes_analyse:
|
||||
excludePaths:
|
||||
- vendor
|
||||
scanDirectories:
|
||||
- .
|
||||
|
||||
@@ -732,7 +732,7 @@ function doughnutTooltip(tooltipLabel) {
|
||||
// in case the item share is really small it could be rounded to 0.0
|
||||
// we compensate for this
|
||||
var itemPercentage =
|
||||
tooltipLabel.parsed.toFixed(1) === 0 ? "< 0.1" : tooltipLabel.parsed.toFixed(1);
|
||||
tooltipLabel.parsed.toFixed(1) === "0.0" ? "< 0.1" : tooltipLabel.parsed.toFixed(1);
|
||||
|
||||
// even if no doughnut slice is hidden, sometimes percentageTotalShown is slightly less then 100
|
||||
// we therefore use 99.9 to decide if slices are hidden (we only show with 0.1 precision)
|
||||
@@ -740,6 +740,9 @@ function doughnutTooltip(tooltipLabel) {
|
||||
// All items shown
|
||||
return label + ": " + itemPercentage + "%";
|
||||
} else {
|
||||
// set percentageTotalShown again without rounding to account
|
||||
// for cases where the total shown percentage would be <0.1% of all
|
||||
percentageTotalShown = tooltipLabel.chart._metasets[0].total;
|
||||
return (
|
||||
label +
|
||||
":<br>• " +
|
||||
|
||||
@@ -200,12 +200,12 @@ function validateIPv6CIDR(ip) {
|
||||
}
|
||||
|
||||
function validateMAC(mac) {
|
||||
var macvalidator = new RegExp(/^([\da-fA-F]{2}:){5}([\da-fA-F]{2})$/);
|
||||
var macvalidator = /^([\da-fA-F]{2}:){5}([\da-fA-F]{2})$/;
|
||||
return macvalidator.test(mac);
|
||||
}
|
||||
|
||||
function validateHostname(name) {
|
||||
var namevalidator = new RegExp(/[^<>;"]/);
|
||||
var namevalidator = /[^<>;"]/;
|
||||
return namevalidator.test(name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user