Skip to content

Commit e8fcd0c

Browse files
authored
Merge pull request #114 from PheysX/elasticsearch-optional
Added new info health check type and ...
2 parents 050027e + 391ac83 commit e8fcd0c

9 files changed

Lines changed: 30 additions & 8 deletions

File tree

src/Components/Health/Checker/PerformanceChecker/EsChecker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function collect(HealthCollection $collection): void
2020
{
2121
if (!$this->esEnabled) {
2222
$collection->add(
23-
SettingsResult::warning('frosh-tools.checker.esWarning',
23+
SettingsResult::info('frosh-tools.checker.esInfo',
2424
'disabled',
2525
'enabled',
2626
'https://developer.shopware.com/docs/guides/hosting/infrastructure/infrastructure/elasticsearch-setup'

src/Components/Health/Checker/PerformanceChecker/PublicFilesystemChecker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function collect(HealthCollection $collection): void
3131
}
3232

3333
$collection->add(
34-
SettingsResult::warning('frosh-tools.checker.publicFilesystemWarning',
34+
SettingsResult::info('frosh-tools.checker.publicFilesystemInfo',
3535
$this->fileSystemType,
3636
'not local',
3737
$url

src/Components/Health/SettingsResult.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class SettingsResult extends Struct
99
private const GREEN = 'STATE_OK';
1010
private const WARNING = 'STATE_WARNING';
1111
private const ERROR = 'STATE_ERROR';
12+
private const INFO = 'STATE_INFO';
1213

1314
protected string $state;
1415

@@ -55,4 +56,16 @@ public static function error(string $snippet, string $current = '', string $reco
5556

5657
return $me;
5758
}
59+
60+
public static function info(string $snippet, string $current = '', string $recommended = '', ?string $url = null): self
61+
{
62+
$me = new self();
63+
$me->state = self::INFO;
64+
$me->snippet = $snippet;
65+
$me->current = $current;
66+
$me->recommended = $recommended;
67+
$me->url = $url;
68+
69+
return $me;
70+
}
5871
}

src/Resources/app/administration/src/module/frosh-tools/component/frosh-tools-tab-index/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
.sw-label {
66
text-align: center;
7+
min-width: 70px;
78
}
89
}
910
}

src/Resources/app/administration/src/module/frosh-tools/component/frosh-tools-tab-index/template.twig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
<sw-label variant="danger" appearance="pill" v-if="item.state === 'STATE_ERROR'">
3232
{{ $tc('frosh-tools.error') }}
3333
</sw-label>
34+
<sw-label variant="info" appearance="pill" v-if="item.state === 'STATE_INFO'">
35+
{{ $tc('frosh-tools.info') }}
36+
</sw-label>
3437
</template>
3538

3639
<template v-if="item.url">
@@ -64,6 +67,9 @@
6467
<sw-label variant="danger" appearance="pill" v-if="item.state === 'STATE_ERROR'">
6568
{{ $tc('frosh-tools.error') }}
6669
</sw-label>
70+
<sw-label variant="info" appearance="pill" v-if="item.state === 'STATE_INFO'">
71+
{{ $tc('frosh-tools.info') }}
72+
</sw-label>
6773
</template>
6874

6975
<template v-if="item.url">

src/Resources/app/administration/src/module/frosh-tools/snippet/de-DE.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"good": "Gut",
6262
"warning": "Warnung",
6363
"error": "Fehler",
64+
"info": "Info",
6465
"active": "Aktiv",
6566
"used": "Belegt",
6667
"free": "Frei",
@@ -99,11 +100,11 @@
99100
"not-prod": "Shop ist nicht im Produktivmodus",
100101
"prodGood": "Shop ist im Produktivmodus",
101102
"esGood": "Elasticsearch ist aktiviert",
102-
"esWarning": "Elasticsearch ist deaktiviert",
103+
"esInfo": "Elasticsearch ist deaktiviert",
103104
"adminWorkerGood": "Admin-Worker ist deaktiviert",
104105
"adminWorkerWarning": "Admin-Worker sollte deaktiviert sein",
105106
"publicFilesystemGood": "PublicFilesystem ist nicht lokal",
106-
"publicFilesystemWarning": "PublicFilesystem sollte nicht lokal sein",
107+
"publicFilesystemInfo": "PublicFilesystem sollte nicht lokal sein",
107108
"updateMailVarialesGood": "MailVariables werden nicht aktualisiert",
108109
"updateMailVarialesWarning": "MailVariables sollten nicht aktualisiert werden",
109110
"mailNotSendWithQueue": "Die Mails sollten im Hintergrund versendet werden",

src/Resources/app/administration/src/module/frosh-tools/snippet/en-GB.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"good": "Good",
6262
"warning": "Warning",
6363
"error": "Error",
64+
"info": "Info",
6465
"active": "Active",
6566
"used": "Used",
6667
"free": "Free",
@@ -99,11 +100,11 @@
99100
"not-prod": "Shop is not in production mode",
100101
"prodGood": "Shop is in production mode",
101102
"esGood": "Elasticsearch is enabled",
102-
"esWarning": "Elasticsearch is disabled",
103+
"esInfo": "Elasticsearch is disabled",
103104
"adminWorkerGood": "Admin-Worker is disabled",
104105
"adminWorkerWarning": "Admin-Worker should be disabled",
105106
"publicFilesystemGood": "PublicFilesystem is not local",
106-
"publicFilesystemWarning": "PublicFilesystem should not be local",
107+
"publicFilesystemInfo": "PublicFilesystem should not be local",
107108
"updateMailVarialesGood": "MailVariables are not updated frequently",
108109
"updateMailVarialesWarning": "MailVariables should not be updated frequently",
109110
"mailNotSendWithQueue": "Mails should be sent using the message queue",

src/Resources/public/administration/css/frosh-tools.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Resources/public/administration/js/frosh-tools.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)