mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Pi-hole web v5.18 (#2463)
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"
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3.1.0
|
||||
uses: actions/checkout@v3.2.0
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout repository
|
||||
uses: actions/checkout@v3.1.0
|
||||
uses: actions/checkout@v3.2.0
|
||||
-
|
||||
name: Spell-Checking
|
||||
uses: codespell-project/actions-codespell@master
|
||||
|
||||
@@ -9,6 +9,6 @@ jobs:
|
||||
name: editorconfig-checker
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3.1.0
|
||||
- uses: actions/checkout@v3.2.0
|
||||
- uses: editorconfig-checker/action-editorconfig-checker@main
|
||||
- run: editorconfig-checker
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
name: "Check for merge conflicts"
|
||||
on:
|
||||
# So that PRs touching the same files as the push are updated
|
||||
push:
|
||||
# So that the `dirtyLabel` is removed if conflicts are resolve
|
||||
# We recommend `pull_request_target` so that github secrets are available.
|
||||
# In `pull_request` we wouldn't be able to change labels of fork PRs
|
||||
pull_request_target:
|
||||
types: [synchronize]
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if PRs are have merge conflicts
|
||||
uses: eps1lon/actions-label-merge-conflict@v2.1.0
|
||||
with:
|
||||
dirtyLabel: "Merge Conflicts"
|
||||
repoToken: "${{ secrets.GITHUB_TOKEN }}"
|
||||
commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request."
|
||||
commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly."
|
||||
@@ -6,7 +6,7 @@ jobs:
|
||||
name: PHP-CS-Fixer
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3.1.0
|
||||
- uses: actions/checkout@v3.2.0
|
||||
- name: PHP-CS-Fixer
|
||||
uses: docker://oskarstark/php-cs-fixer-ga
|
||||
with:
|
||||
|
||||
@@ -8,27 +8,14 @@ jobs:
|
||||
build:
|
||||
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
|
||||
- uses: actions/checkout@v3.2.0
|
||||
|
||||
- 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'
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
name: Syncing branches
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.1.0
|
||||
uses: actions/checkout@v3.2.0
|
||||
- name: Opening pull request
|
||||
run: gh pr create -B devel -H master --title 'Sync master back into development' --body 'Created by Github action' --label 'internal'
|
||||
env:
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v3.1.0
|
||||
uses: actions/checkout@v3.2.0
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3.5.1
|
||||
|
||||
+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
+3
-3
@@ -8,7 +8,7 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "0.12.58",
|
||||
"version": "1.9.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan.git",
|
||||
@@ -16,8 +16,8 @@
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/2a4847df6047b30af28854ed9dc95304cdb56ae5",
|
||||
"reference": "2a4847df6047b30af28854ed9dc95304cdb56ae5",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/d03bccee595e2146b7c9d174486b84f4dc61b0f2",
|
||||
"reference": "d03bccee595e2146b7c9d174486b84f4dc61b0f2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
||||
Generated
+435
-314
File diff suppressed because it is too large
Load Diff
+7
-5
@@ -26,10 +26,10 @@
|
||||
"devDependencies": {
|
||||
"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": "^8.4.20",
|
||||
"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);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
* Please see LICENSE file for your rights under this license.
|
||||
*/
|
||||
|
||||
require 'password.php';
|
||||
if (!$auth) {
|
||||
exit('Not authorized');
|
||||
}
|
||||
|
||||
while (ob_get_level() > 0) {
|
||||
ob_end_flush();
|
||||
}
|
||||
|
||||
+1
-1
@@ -447,7 +447,7 @@ td.lookatme {
|
||||
}
|
||||
|
||||
.small-box > .small-box-footer {
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
color: rgba(255, 255, 255, 0.75);
|
||||
transition: all 0.5s;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user