mirror of
https://github.com/unraid/webgui.git
synced 2026-01-28 20:49:04 -06:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -268,11 +268,12 @@ class DockerTemplates {
|
||||
return false;
|
||||
}
|
||||
|
||||
private function getControlURL(&$ct, $myIP) {
|
||||
private function getControlURL(&$ct, $myIP, $WebUI) {
|
||||
global $host;
|
||||
$port = &$ct['Ports'][0];
|
||||
$myIP = $myIP ?: $this->getTemplateValue($ct['Image'], 'MyIP') ?: ($ct['NetworkMode']=='host'||$port['NAT'] ? $host : ($port['IP'] ?: DockerUtil::myIP($ct['Name'])));
|
||||
$WebUI = preg_replace("%\[IP\]%", $myIP, $this->getTemplateValue($ct['Image'], 'WebUI'));
|
||||
// Get the WebUI address from the templates as a fallback
|
||||
$WebUI = preg_replace("%\[IP\]%", $myIP, $WebUI ?: $this->getTemplateValue($ct['Image'], 'WebUI'));
|
||||
if (preg_match("%\[PORT:(\d+)\]%", $WebUI, $matches)) {
|
||||
$ConfigPort = $matches[1];
|
||||
foreach ($ct['Ports'] as $port) {
|
||||
@@ -306,13 +307,13 @@ class DockerTemplates {
|
||||
}
|
||||
if ($ct['Running']) {
|
||||
$port = &$ct['Ports'][0];
|
||||
$webui = $this->getTemplateValue($ct['Image'], 'WebUI');
|
||||
$webui = $tmp['url'] ?: $this->getTemplateValue($ct['Image'], 'WebUI');
|
||||
if (strlen($webui) > 0 && !preg_match("%\[(IP|PORT:(\d+))\]%", $webui)) {
|
||||
// non-templated webui, user specified
|
||||
$tmp['url'] = $webui;
|
||||
} else {
|
||||
$ip = ($ct['NetworkMode']=='host'||$port['NAT'] ? $host : $port['IP']);
|
||||
$tmp['url'] = $ip ? (strpos($tmp['url'],$ip)!==false ? $tmp['url'] : $this->getControlURL($ct, $ip)) : $tmp['url'];
|
||||
$tmp['url'] = $ip ? (strpos($tmp['url'],$ip)!==false ? $tmp['url'] : $this->getControlURL($ct, $ip, $tmp['url'])) : $tmp['url'];
|
||||
}
|
||||
$tmp['shell'] = $tmp['shell'] ?? $this->getTemplateValue($image, 'Shell');
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ switch ($UPC_ENV) {
|
||||
$upcSrc = 'https://registration-dev-logs.unraid.net/webComps/unraid.min.js';
|
||||
break;
|
||||
case 'development':
|
||||
$upcSrc = 'https://launchpad.unraid.test:6969/webComps/unraid.js';
|
||||
$upcSrc = 'https://launchpad.unraid.test:6969/webComps/unraid.js?t=' . time();
|
||||
break;
|
||||
default: // load from webGUI filesystem.
|
||||
$upcSrc = $upcLocalSrc;
|
||||
|
||||
@@ -522,6 +522,11 @@
|
||||
'open' => _('Open Dropdown'),
|
||||
],
|
||||
'yargYePirate' => _('Oh no! Are you pirating Unraid OS?<br>Are you ready to buy a real license?'),
|
||||
'keyFileNotValid' => _('Key file not valid'),
|
||||
'installFailed' => [
|
||||
'heading' => _('My Servers plugin install failed'),
|
||||
'message' => _('The My Servers plugin install is incomplete').'. '._('Please uninstall and reinstall the My Servers plugin').'. '._('Be sure to let the install complete before you close the window').'.',
|
||||
],
|
||||
],
|
||||
];
|
||||
$configErrorEnum = [ // used to map $var['configValid'] value to mimic unraid-api's `configError` ENUM
|
||||
@@ -531,11 +536,18 @@
|
||||
"withdrawn" => 'WITHDRAWN',
|
||||
];
|
||||
$nginx = parse_ini_file('/var/local/emhttp/nginx.ini');
|
||||
$plgInstalled = (file_exists('/var/log/plugins/dynamix.unraid.net.plg')
|
||||
? 'dynamix.unraid.net.plg'
|
||||
: (file_exists('/var/log/plugins/dynamix.unraid.net.staging.plg')
|
||||
? 'dynamix.unraid.net.staging.plg'
|
||||
: ''));
|
||||
|
||||
$plgInstalled = '';
|
||||
if (!file_exists('/var/lib/pkgtools/packages/dynamix.unraid.net') && !file_exists('/var/lib/pkgtools/packages/dynamix.unraid.net.staging')) {
|
||||
$plgInstalled = ''; // base OS only, My Servers plugin not installed • show ad for My Servers
|
||||
} else {
|
||||
// plugin is installed but if the unraid-api file doesn't fully install it's a failed install
|
||||
if (file_exists('/var/lib/pkgtools/packages/dynamix.unraid.net')) $plgInstalled = 'dynamix.unraid.net.plg';
|
||||
if (file_exists('/var/lib/pkgtools/packages/dynamix.unraid.net.staging')) $plgInstalled = 'dynamix.unraid.net.staging.plg';
|
||||
// plugin install failed • append failure detected so we can show warning about failed install via UPC
|
||||
if (!file_exists('/usr/local/sbin/unraid-api')) $plgInstalled = $plgInstalled . '_installFailed';
|
||||
}
|
||||
|
||||
$serverstate = [ // feeds server vars to Vuex store in a slightly different array than state.php
|
||||
"avatar" => (!empty($remote['avatar']) && $plgInstalled) ? $remote['avatar'] : '',
|
||||
"config" => [
|
||||
@@ -597,7 +609,7 @@
|
||||
csrf="<?=$var['csrf_token']?>"
|
||||
displaydesc="<?=($display['headerdescription']!='no') ? 'true' : ''?>"
|
||||
expiretime="<?=1000*($var['regTy']=='Trial'||strstr($var['regTy'],'expired')?$var['regTm2']:0)?>"
|
||||
hide-my-servers="<?=(file_exists('/usr/local/sbin/unraid-api')) ? '' : 'yes' ?>"
|
||||
hide-my-servers="<?=$plgInstalled ? '' : 'yes' ?>"
|
||||
locale="<?=($_SESSION['locale']) ? $_SESSION['locale'] : 'en_US'?>"
|
||||
locale-messages="<?=rawurlencode(json_encode($upc_translations, JSON_UNESCAPED_SLASHES, JSON_UNESCAPED_UNICODE))?>"
|
||||
metacolor="<?=($display['headermetacolor']) ? '#'.$display['headermetacolor'] : ''?>"
|
||||
|
||||
@@ -358,6 +358,31 @@ SOFTWARE.
|
||||
backo2
|
||||
MIT
|
||||
|
||||
clipboard
|
||||
MIT
|
||||
MIT License
|
||||
|
||||
Copyright (c) Zeno Rocha
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
css-loader
|
||||
MIT
|
||||
Copyright JS Foundation and other contributors
|
||||
@@ -1236,57 +1261,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
lodash
|
||||
MIT
|
||||
Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||
|
||||
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/lodash/lodash
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
====
|
||||
|
||||
Copyright and related rights for sample code are waived via CC0. Sample
|
||||
code is defined as all source code displayed within the prose of the
|
||||
documentation.
|
||||
|
||||
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
====
|
||||
|
||||
Files located in the node_modules and vendor directories are externally
|
||||
maintained libraries used by this software which have their own
|
||||
licenses; we recommend you read them, as their terms may differ from the
|
||||
terms above.
|
||||
|
||||
|
||||
node-libs-browser
|
||||
MIT
|
||||
(The MIT License)
|
||||
@@ -1549,6 +1523,30 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
vue-clipboard2
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Inndy <inndy \dot tw \at gmail \dot com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
vue-i18n
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -3,9 +3,9 @@ Title="Credits"
|
||||
Icon="icon-credits"
|
||||
Tag="trophy"
|
||||
---
|
||||
**Unraid webGUI** Copyright © 2005-2021, [Lime Technology, Inc.](http://lime-technology.com)
|
||||
**Unraid webGUI** Copyright © 2005-2022, [Lime Technology, Inc.](http://lime-technology.com)
|
||||
|
||||
**Dynamix** Copyright © 2012-2021, Bergware International.
|
||||
**Dynamix** Copyright © 2012-2022, Bergware International.
|
||||
|
||||
**Extended Docker Configuration Page** Copyright © 2014-2021, Guilherme Jardim.
|
||||
|
||||
@@ -17,7 +17,7 @@ Tag="trophy"
|
||||
|
||||
**SysDev UI** Copyright © 2020, Justin Nolan
|
||||
|
||||
**Community Applications** Copyright © 2015-2021, Andrew Zawadzki
|
||||
**Community Applications** Copyright © 2015-2022, Andrew Zawadzki
|
||||
|
||||
The Software comprising the Unraid webGui, which is all files within this repository **except** for
|
||||
files listed below, is licensed under GPL version 2.
|
||||
@@ -45,6 +45,6 @@ foreach (glob("$plugins/lang-*.xml", GLOB_NOSORT) as $link) {
|
||||
$author = language('Author', $xml_file);
|
||||
$credits[] = "<li><p><i>$lang ($local)</i> translation by $author</p></li>";
|
||||
}
|
||||
if (count($credits)) echo '<br><b>Language Translations</b> Copyright © 2020-2021, <a href="http://lime-technology.com">Lime Technology, Inc.</a><br><ul>'.implode('',$credits).'</ul>';
|
||||
if (count($credits)) echo '<br><b>Language Translations</b> Copyright © 2020-2022, <a href="http://lime-technology.com">Lime Technology, Inc.</a><br><ul>'.implode('',$credits).'</ul>';
|
||||
?>
|
||||
<br><input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
@@ -75,7 +75,9 @@ function newNet($vtun) {
|
||||
function wgState($vtun,$state,$type=0) {
|
||||
global $t1,$etc;
|
||||
$tmp = '/tmp/wg-quick.tmp';
|
||||
$log = '/var/log/wg-quick.log';
|
||||
exec("timeout $t1 wg-quick $state $vtun 2>$tmp");
|
||||
file_put_contents($log, "wg-quick $state $vtun\n".file_get_contents($tmp)."\n", FILE_APPEND);
|
||||
if ($type==8) {
|
||||
// make VPN tunneled access for Docker containers only
|
||||
$table = exec("grep -Pom1 'fwmark \K[\d]+' $tmp");
|
||||
|
||||
7
plugins/dynamix/scripts/diagnostics
Executable file → Normal file
7
plugins/dynamix/scripts/diagnostics
Executable file → Normal file
@@ -594,6 +594,13 @@ if (file_exists($vfiopci)) {
|
||||
run("todos <$vfiopci >".escapeshellarg($log));
|
||||
}
|
||||
|
||||
// copy wg-quick log
|
||||
$wgquick = '/var/log/wg-quick.log';
|
||||
if (file_exists($wgquick)) {
|
||||
$log = "/$diag/logs/wg-quick.txt";
|
||||
exert("todos <$wgquick >".escapeshellarg($log));
|
||||
}
|
||||
|
||||
// generate unraid-api.txt
|
||||
if (file_exists("/usr/local/sbin/unraid-api")) {
|
||||
$log = "/$diag/system/unraid-api.txt";
|
||||
|
||||
Reference in New Issue
Block a user