From 29261fad1047e2f15113b5be53f89caa550fa89f Mon Sep 17 00:00:00 2001 From: Eli Bosley Date: Tue, 8 Apr 2025 14:46:03 -0400 Subject: [PATCH] fix: remove some unused fields from the report object --- api/dev/states/myservers.cfg | 4 +- api/src/unraid-api/cli/report.command.ts | 11 +++ .../downloaded/.login.php.last-download-time | 2 +- .../downloaded/DefaultPageLayout.php | 77 +++++++++---------- .../DefaultPageLayout.php.last-download-time | 2 +- .../Notifications.page.last-download-time | 2 +- .../auth-request.php.last-download-time | 2 +- ...efaultPageLayout.php.modified.snapshot.php | 77 +++++++++---------- .../patches/default-page-layout.patch | 8 +- 9 files changed, 93 insertions(+), 92 deletions(-) diff --git a/api/dev/states/myservers.cfg b/api/dev/states/myservers.cfg index 7da25ee640..42ccb6be12 100644 --- a/api/dev/states/myservers.cfg +++ b/api/dev/states/myservers.cfg @@ -18,7 +18,7 @@ idtoken="" refreshtoken="" dynamicRemoteAccessType="DISABLED" ssoSubIds="" -allowedOrigins="/var/run/unraid-notifications.sock, /var/run/unraid-php.sock, /var/run/unraid-cli.sock, http://localhost:8080, https://localhost:4443, https://tower.local:4443, https://192.168.1.150:4443, https://tower:4443, https://192-168-1-150.thisisfourtyrandomcharacters012345678900.myunraid.net:4443, https://10-252-0-1.hash.myunraid.net:4443, https://10-252-1-1.hash.myunraid.net:4443, https://10-253-3-1.hash.myunraid.net:4443, https://10-253-4-1.hash.myunraid.net:4443, https://10-253-5-1.hash.myunraid.net:4443, https://10-100-0-1.hash.myunraid.net:4443, https://10-100-0-2.hash.myunraid.net:4443, https://10-123-1-2.hash.myunraid.net:4443, https://221-123-121-112.hash.myunraid.net:4443, https://google.com, https://test.com, https://connect.myunraid.net, https://connect-staging.myunraid.net, https://dev-my.myunraid.net:4000, https://studio.apollographql.com" +allowedOrigins="/var/run/unraid-notifications.sock, /var/run/unraid-php.sock, /var/run/unraid-cli.sock, http://localhost:8080, https://localhost:4443, https://tower.local:4443, https://192.168.1.150:4443, https://tower:4443, https://192-168-1-150.thisisfourtyrandomcharacters012345678900.myunraid.net:4443, https://85-121-123-122.thisisfourtyrandomcharacters012345678900.myunraid.net:8443, https://10-252-0-1.hash.myunraid.net:4443, https://10-252-1-1.hash.myunraid.net:4443, https://10-253-3-1.hash.myunraid.net:4443, https://10-253-4-1.hash.myunraid.net:4443, https://10-253-5-1.hash.myunraid.net:4443, https://10-100-0-1.hash.myunraid.net:4443, https://10-100-0-2.hash.myunraid.net:4443, https://10-123-1-2.hash.myunraid.net:4443, https://221-123-121-112.hash.myunraid.net:4443, https://google.com, https://test.com, https://connect.myunraid.net, https://connect-staging.myunraid.net, https://dev-my.myunraid.net:4000, https://studio.apollographql.com" [connectionStatus] minigraph="ERROR_RETRYING" -upnpStatus="Success: UPNP Lease Renewed [4/2/2025 12:00:00 PM] Public Port [41820] Local Port [443]" +upnpStatus="" diff --git a/api/src/unraid-api/cli/report.command.ts b/api/src/unraid-api/cli/report.command.ts index 9613eb61f5..7ca79a88ed 100644 --- a/api/src/unraid-api/cli/report.command.ts +++ b/api/src/unraid-api/cli/report.command.ts @@ -62,6 +62,17 @@ export class ReportCommand extends CommandRunner { connectionStatus: { running: 'yes' | 'no' }; }; config.connectionStatus.running = apiRunning ? 'yes' : 'no'; + config.remote = { + ...config.remote, + apikey: 'REDACTED', + localApiKey: 'REDACTED', + accesstoken: 'REDACTED', + idtoken: 'REDACTED', + refreshtoken: 'REDACTED', + ssoSubIds: 'REDACTED', + allowedOrigins: 'REDACTED', + email: 'REDACTED', + }; this.logger.clear(); this.logger.info(JSON.stringify(config, null, 2)); } catch (error) { diff --git a/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/.login.php.last-download-time b/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/.login.php.last-download-time index f82e41be30..2187ea33e1 100644 --- a/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/.login.php.last-download-time +++ b/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/.login.php.last-download-time @@ -1 +1 @@ -1743448824441 +1744137872623 \ No newline at end of file diff --git a/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/DefaultPageLayout.php b/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/DefaultPageLayout.php index 0348215f9f..e71f307c16 100644 --- a/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/DefaultPageLayout.php +++ b/api/src/unraid-api/unraid-file-modifier/modifications/__test__/__fixtures__/downloaded/DefaultPageLayout.php @@ -17,6 +17,10 @@ $backgnd = $display['background']; $themes1 = in_array($theme,['black','white']); $themes2 = in_array($theme,['gray','azure']); +$themeHtmlClass = "Theme--$theme"; +if ($themes2) { + $themeHtmlClass .= " Theme--sidebar"; +} $config = "/boot/config"; $entity = $notify['entity'] & 1 == 1; $alerts = '/tmp/plugins/my_alerts.txt'; @@ -29,7 +33,7 @@ function annotate($text) {echo "\n\n";} ?> -lang=""> +lang="" class=""> <?=_var($var,'NAME')?>/<?=_var($myPage,'name')?> @@ -45,9 +49,13 @@ function annotate($text) {echo "\n\n";} ?> -lang=""> +lang="" class=""> <?=_var($var,'NAME')?>/<?=_var($myPage,'name')?> @@ -45,9 +49,13 @@ function annotate($text) {echo "\n