Merge pull request #104 from amnuts/103-doc-links

Fixes #103
This commit is contained in:
Andrew Collington 2023-10-19 20:33:35 +01:00 committed by GitHub
commit edbcbbedd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 34 additions and 8 deletions

View file

@ -231,6 +231,9 @@ So to get started with a new language, copy the `example.json` to the language y
## Releases ## Releases
**Version 3.5.3**\
Worked around some inconsistencies with links in the opcache documentation on php.net.
**Version 3.5.2**\ **Version 3.5.2**\
Removed some warnings for PHP 8.2 by dropping the `namespace` and `use` statements in the bundled `index.php` file. Removed some warnings for PHP 8.2 by dropping the `namespace` and `use` statements in the bundled `index.php` file.

View file

@ -383,10 +383,25 @@ function Directives(props) {
vShow = directive.v; vShow = directive.v;
} }
} }
let directiveLink = (name) => {
if (name === 'opcache.jit_max_recursive_returns') {
return 'opcache.jit-max-recursive-return';
}
return (
[
'opcache.file_update_protection',
'opcache.huge_code_pages',
'opcache.lockfile_path',
'opcache.opt_debug_level',
].includes(name)
? name
: name.replace(/_/g,'-')
);
}
return ( return (
<tr key={directive.k}> <tr key={directive.k}>
<td title={props.txt('View {0} manual entry', directive.k)}><a href={'https://php.net/manual/en/opcache.configuration.php#ini.' <td title={props.txt('View {0} manual entry', directive.k)}><a href={'https://php.net/manual/en/opcache.configuration.php#ini.'
+ (directive.k).replace(/_/g,'-')} target="_blank">{dShow}</a></td> + directiveLink(directive.k)} target="_blank">{dShow}</a></td>
<td>{vShow}</td> <td>{vShow}</td>
</tr> </tr>
); );

View file

@ -4,7 +4,7 @@
* OPcache GUI - build script * OPcache GUI - build script
* *
* @author Andrew Collington, andy@amnuts.com * @author Andrew Collington, andy@amnuts.com
* @version 3.5.2 * @version 3.5.3
* @link https://github.com/amnuts/opcache-gui * @link https://github.com/amnuts/opcache-gui
* @license MIT, https://acollington.mit-license.org/ * @license MIT, https://acollington.mit-license.org/
*/ */

View file

@ -6,7 +6,7 @@
* A simple but effective single-file GUI for the OPcache PHP extension. * A simple but effective single-file GUI for the OPcache PHP extension.
* *
* @author Andrew Collington, andy@amnuts.com * @author Andrew Collington, andy@amnuts.com
* @version 3.5.2 * @version 3.5.3
* @link https://github.com/amnuts/opcache-gui * @link https://github.com/amnuts/opcache-gui
* @license MIT, https://acollington.mit-license.org/ * @license MIT, https://acollington.mit-license.org/
*/ */

View file

@ -6,7 +6,7 @@
* A simple but effective single-file GUI for the OPcache PHP extension. * A simple but effective single-file GUI for the OPcache PHP extension.
* *
* @author Andrew Collington, andy@amnuts.com * @author Andrew Collington, andy@amnuts.com
* @version 3.5.2 * @version 3.5.3
* @link https://github.com/amnuts/opcache-gui * @link https://github.com/amnuts/opcache-gui
* @license MIT, https://acollington.mit-license.org/ * @license MIT, https://acollington.mit-license.org/
*/ */
@ -59,7 +59,7 @@ header('Pragma: no-cache');
class Service class Service
{ {
public const VERSION = '3.5.2'; public const VERSION = '3.5.3';
protected $tz; protected $tz;
protected $data; protected $data;
@ -936,12 +936,20 @@ function Directives(props) {
} }
} }
let directiveLink = name => {
if (name === 'opcache.jit_max_recursive_returns') {
return 'opcache.jit-max-recursive-return';
}
return ['opcache.file_update_protection', 'opcache.huge_code_pages', 'opcache.lockfile_path', 'opcache.opt_debug_level'].includes(name) ? name : name.replace(/_/g, '-');
};
return /*#__PURE__*/React.createElement("tr", { return /*#__PURE__*/React.createElement("tr", {
key: directive.k key: directive.k
}, /*#__PURE__*/React.createElement("td", { }, /*#__PURE__*/React.createElement("td", {
title: props.txt('View {0} manual entry', directive.k) title: props.txt('View {0} manual entry', directive.k)
}, /*#__PURE__*/React.createElement("a", { }, /*#__PURE__*/React.createElement("a", {
href: 'https://php.net/manual/en/opcache.configuration.php#ini.' + directive.k.replace(/_/g, '-'), href: 'https://php.net/manual/en/opcache.configuration.php#ini.' + directiveLink(directive.k),
target: "_blank" target: "_blank"
}, dShow)), /*#__PURE__*/React.createElement("td", null, vShow)); }, dShow)), /*#__PURE__*/React.createElement("td", null, vShow));
}); });

View file

@ -1,7 +1,7 @@
{ {
"name": "opcache-gui", "name": "opcache-gui",
"description": "A clean and responsive interface for Zend OPcache information, showing statistics, settings and cached files, and providing a real-time update for the information (using jQuery and React).", "description": "A clean and responsive interface for Zend OPcache information, showing statistics, settings and cached files, and providing a real-time update for the information (using jQuery and React).",
"version": "3.5.2", "version": "3.5.3",
"main": "index.js", "main": "index.js",
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.12.8", "@babel/cli": "^7.12.8",

View file

@ -8,7 +8,7 @@ use Exception;
class Service class Service
{ {
public const VERSION = '3.5.2'; public const VERSION = '3.5.3';
protected $tz; protected $tz;
protected $data; protected $data;