diff --git a/README.md b/README.md index dbbc7fa35..6f26d02fb 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ For an overview of the software quality over time and the evolving metrics, chec | sql.php | ❌ | yyyy-mm-dd | | sqledit.php | ✅ | 2025-08-26 | | tables.php | ❌ | yyyy-mm-dd | -| tablespaces.php | ❌ | yyyy-mm-dd | +| tablespaces.php | ✅ | 2026-03-18 | | tblproperties.php | ❌ | yyyy-mm-dd | | triggers.php | ❌ | yyyy-mm-dd | | types.php | ❌ | yyyy-mm-dd | diff --git a/Tests/Architecture/DDD/DomainTest.php b/Tests/Architecture/DDD/DomainTest.php index 0ca1288fc..c61816094 100644 --- a/Tests/Architecture/DDD/DomainTest.php +++ b/Tests/Architecture/DDD/DomainTest.php @@ -16,7 +16,7 @@ public function testDomainIndependence(): Rule { return PHPat::rule() ->classes(Selector::inNamespace('PhpPgAdmin\DDD')) - ->canOnlyDependOn() + ->canOnly()->dependOn() ->classes(Selector::inNamespace('PhpPgAdmin\DDD')) ->because('Domain layer should only depend on itself and PHP standard classes.'); } diff --git a/Tests/Architecture/DDD/ValueObjectsTest.php b/Tests/Architecture/DDD/ValueObjectsTest.php index 32abec054..988add413 100644 --- a/Tests/Architecture/DDD/ValueObjectsTest.php +++ b/Tests/Architecture/DDD/ValueObjectsTest.php @@ -21,7 +21,7 @@ public function testValueObjectsAreReadonly(): Rule Selector::Not(Selector::isEnum()), ) ) - ->shouldBeReadonly() + ->should()->beReadonly() ->because('ValueObjects are immutable by definition.'); } } diff --git a/alter_tablespace.php b/alter_tablespace.php new file mode 100644 index 000000000..9f4df6fd0 --- /dev/null +++ b/alter_tablespace.php @@ -0,0 +1,10 @@ +buildHtmlString(); diff --git a/composer.json b/composer.json index 430f489dc..0ccd18d0b 100644 --- a/composer.json +++ b/composer.json @@ -63,7 +63,7 @@ "@dev:lint:phpcs" ], "dev:lint:php": "parallel-lint --exclude vendor .", - "dev:lint:phpcs": "phpcs -d memory_limit=256M src/ autoload.php all_db.php all_db_export.php alter_db.php alter_role.php browser.php create_db.php create_role.php dbexport.php drop_db.php drop_role.php history.php history_clear.php history_delete.php history_download.php index.php intro.php login.php logout.php roles.php server-logout.php servers.php servers-tree.php sqledit.php", + "dev:lint:phpcs": "phpcs -d memory_limit=256M src/ autoload.php all_db.php all_db_export.php alter_db.php alter_role.php alter_tablespace.php browser.php create_db.php create_role.php create_tablespace.php dbexport.php drop_db.php drop_role.php drop_tablespace.php history.php history_clear.php history_delete.php history_download.php index.php intro.php login.php logout.php roles.php server-logout.php servers.php servers-tree.php sqledit.php tablespaces.php", "dev:test": [ "@dev:test:acceptance" ], diff --git a/composer.lock b/composer.lock index cdb3a3956..669e8accb 100644 --- a/composer.lock +++ b/composer.lock @@ -1977,16 +1977,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.8.0", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "21dc724a0583619cd1652f673303492272778051" + "reference": "7d0ed42f28e42d61352a7a79de682e5e67fec884" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/21dc724a0583619cd1652f673303492272778051", - "reference": "21dc724a0583619cd1652f673303492272778051", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/7d0ed42f28e42d61352a7a79de682e5e67fec884", + "reference": "7d0ed42f28e42d61352a7a79de682e5e67fec884", "shasum": "" }, "require": { @@ -2002,6 +2002,7 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", "http-interop/http-factory-tests": "0.9.0", + "jshttp/mime-db": "1.54.0.1", "phpunit/phpunit": "^8.5.44 || ^9.6.25" }, "suggest": { @@ -2073,7 +2074,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.8.0" + "source": "https://github.com/guzzle/psr7/tree/2.9.0" }, "funding": [ { @@ -2089,7 +2090,7 @@ "type": "tidelift" } ], - "time": "2025-08-23T21:21:41+00:00" + "time": "2026-03-10T16:41:02+00:00" }, { "name": "masterminds/html5", @@ -2842,16 +2843,16 @@ }, { "name": "phpat/phpat", - "version": "0.12.3", + "version": "0.12.4", "source": { "type": "git", "url": "https://github.com/carlosas/phpat.git", - "reference": "2412a8959254a076e751498cbba8cf29406e0cf4" + "reference": "5319264270c335f548451209bb0f32b55aa59924" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/carlosas/phpat/zipball/2412a8959254a076e751498cbba8cf29406e0cf4", - "reference": "2412a8959254a076e751498cbba8cf29406e0cf4", + "url": "https://api.github.com/repos/carlosas/phpat/zipball/5319264270c335f548451209bb0f32b55aa59924", + "reference": "5319264270c335f548451209bb0f32b55aa59924", "shasum": "" }, "require": { @@ -2893,9 +2894,9 @@ "description": "PHP Architecture Tester", "support": { "issues": "https://github.com/carlosas/phpat/issues", - "source": "https://github.com/carlosas/phpat/tree/0.12.3" + "source": "https://github.com/carlosas/phpat/tree/0.12.4" }, - "time": "2026-02-20T11:15:22+00:00" + "time": "2026-03-17T16:47:43+00:00" }, { "name": "phpmd/phpmd", @@ -3152,11 +3153,11 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.40", + "version": "2.1.42", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9b2c7aeb83a75d8680ea5e7c9b7fca88052b766b", - "reference": "9b2c7aeb83a75d8680ea5e7c9b7fca88052b766b", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/1279e1ce86ba768f0780c9d889852b4e02ff40d0", + "reference": "1279e1ce86ba768f0780c9d889852b4e02ff40d0", "shasum": "" }, "require": { @@ -3201,7 +3202,7 @@ "type": "github" } ], - "time": "2026-02-23T15:04:35+00:00" + "time": "2026-03-17T14:58:32+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -4025,16 +4026,16 @@ }, { "name": "psy/psysh", - "version": "v0.12.20", + "version": "v0.12.21", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "19678eb6b952a03b8a1d96ecee9edba518bb0373" + "reference": "4821fab5b7cd8c49a673a9fd5754dc9162bb9e97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/19678eb6b952a03b8a1d96ecee9edba518bb0373", - "reference": "19678eb6b952a03b8a1d96ecee9edba518bb0373", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/4821fab5b7cd8c49a673a9fd5754dc9162bb9e97", + "reference": "4821fab5b7cd8c49a673a9fd5754dc9162bb9e97", "shasum": "" }, "require": { @@ -4098,9 +4099,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.12.20" + "source": "https://github.com/bobthecow/psysh/tree/v0.12.21" }, - "time": "2026-02-11T15:05:28+00:00" + "time": "2026-03-06T21:21:28+00:00" }, { "name": "ralouphie/getallheaders", @@ -5579,16 +5580,16 @@ }, { "name": "symfony/config", - "version": "v7.4.6", + "version": "v7.4.7", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "9400e2f9226b3b64ebb0a8ae967ae84e54e39640" + "reference": "6c17162555bfb58957a55bb0e43e00035b6ae3d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/9400e2f9226b3b64ebb0a8ae967ae84e54e39640", - "reference": "9400e2f9226b3b64ebb0a8ae967ae84e54e39640", + "url": "https://api.github.com/repos/symfony/config/zipball/6c17162555bfb58957a55bb0e43e00035b6ae3d5", + "reference": "6c17162555bfb58957a55bb0e43e00035b6ae3d5", "shasum": "" }, "require": { @@ -5634,7 +5635,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v7.4.6" + "source": "https://github.com/symfony/config/tree/v7.4.7" }, "funding": [ { @@ -5654,20 +5655,20 @@ "type": "tidelift" } ], - "time": "2026-02-25T16:50:00+00:00" + "time": "2026-03-06T10:41:14+00:00" }, { "name": "symfony/console", - "version": "v7.4.6", + "version": "v7.4.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "6d643a93b47398599124022eb24d97c153c12f27" + "reference": "e1e6770440fb9c9b0cf725f81d1361ad1835329d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/6d643a93b47398599124022eb24d97c153c12f27", - "reference": "6d643a93b47398599124022eb24d97c153c12f27", + "url": "https://api.github.com/repos/symfony/console/zipball/e1e6770440fb9c9b0cf725f81d1361ad1835329d", + "reference": "e1e6770440fb9c9b0cf725f81d1361ad1835329d", "shasum": "" }, "require": { @@ -5732,7 +5733,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.4.6" + "source": "https://github.com/symfony/console/tree/v7.4.7" }, "funding": [ { @@ -5752,7 +5753,7 @@ "type": "tidelift" } ], - "time": "2026-02-25T17:02:47+00:00" + "time": "2026-03-06T14:06:20+00:00" }, { "name": "symfony/css-selector", @@ -5825,16 +5826,16 @@ }, { "name": "symfony/dependency-injection", - "version": "v7.4.6", + "version": "v7.4.7", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "a3f7d594ca53a34a7d39ae683fbca09408b0c598" + "reference": "0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/a3f7d594ca53a34a7d39ae683fbca09408b0c598", - "reference": "a3f7d594ca53a34a7d39ae683fbca09408b0c598", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db", + "reference": "0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db", "shasum": "" }, "require": { @@ -5885,7 +5886,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v7.4.6" + "source": "https://github.com/symfony/dependency-injection/tree/v7.4.7" }, "funding": [ { @@ -5905,7 +5906,7 @@ "type": "tidelift" } ], - "time": "2026-02-25T16:50:00+00:00" + "time": "2026-03-03T07:48:48+00:00" }, { "name": "symfony/dom-crawler", diff --git a/create_tablespace.php b/create_tablespace.php new file mode 100644 index 000000000..0bc43231f --- /dev/null +++ b/create_tablespace.php @@ -0,0 +1,10 @@ +buildHtmlString(); diff --git a/drop_tablespace.php b/drop_tablespace.php new file mode 100644 index 000000000..254b4dbd6 --- /dev/null +++ b/drop_tablespace.php @@ -0,0 +1,10 @@ +buildHtmlString(); diff --git a/locale/af_ZA/LC_MESSAGES/messages.mo b/locale/af_ZA/LC_MESSAGES/messages.mo index 41763e100..34b78e4ae 100644 Binary files a/locale/af_ZA/LC_MESSAGES/messages.mo and b/locale/af_ZA/LC_MESSAGES/messages.mo differ diff --git a/locale/af_ZA/LC_MESSAGES/messages.po b/locale/af_ZA/LC_MESSAGES/messages.po index 14c420d2d..5145fd412 100644 --- a/locale/af_ZA/LC_MESSAGES/messages.po +++ b/locale/af_ZA/LC_MESSAGES/messages.po @@ -1640,13 +1640,13 @@ msgstr "Tabelruimtes" msgid "strshowalltablespaces" msgstr "Wys alle tabelruimtes" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "Geen tabelruimtes gevind." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Skep tabelruimte" -msgid "strlocation" +msgid "Location" msgstr "Plek" msgid "strtablespaceneedsname" @@ -1655,25 +1655,25 @@ msgstr "Jy moet 'n naam gee vir jou tabelruimte." msgid "strtablespaceneedsloc" msgstr "Jy moet 'n gids gee om jou tabelruimte in te skep." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Tabelruimte geskep." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "Skep van tabelruimte het misluk." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "Is jy seker jy wil die tabelruimte \"%s\" uitvee?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Tabelruimte is uitgevee." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Uitvee van tabelruimte het misluk." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Tabelruimte gewysig." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Wysiging van tabelruimte het misluk." # Miscellaneous diff --git a/locale/ca_ES/LC_MESSAGES/messages.mo b/locale/ca_ES/LC_MESSAGES/messages.mo index 3b7fa8cfe..98d006355 100644 Binary files a/locale/ca_ES/LC_MESSAGES/messages.mo and b/locale/ca_ES/LC_MESSAGES/messages.mo differ diff --git a/locale/ca_ES/LC_MESSAGES/messages.po b/locale/ca_ES/LC_MESSAGES/messages.po index 4c31b2084..f8e6a9076 100644 --- a/locale/ca_ES/LC_MESSAGES/messages.po +++ b/locale/ca_ES/LC_MESSAGES/messages.po @@ -2152,13 +2152,13 @@ msgstr "Tablespaces" msgid "strshowalltablespaces" msgstr "Mostrar tots els tablespaces" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "No s'han trobat tablespaces" -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Crea un tablespace" -msgid "strlocation" +msgid "Location" msgstr "Localització" msgid "strtablespaceneedsname" @@ -2167,25 +2167,25 @@ msgstr "Ha de donar un nom al tablespace." msgid "strtablespaceneedsloc" msgstr "Ha de donar un directori on crear el tablespace." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Tablespace creat." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "No s'ha pogut crear el Tablespace." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "Està segur de voler eliminar el tablespace \"%s\"?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Tablespace eliminat." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "No s'ha pogut eliminar el tablespace." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Tablespace modificat." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "No s'ha pogut modifcar el tablespace." # Miscellaneous diff --git a/locale/cs_CZ/LC_MESSAGES/messages.mo b/locale/cs_CZ/LC_MESSAGES/messages.mo index 54e58166d..5071bb45a 100644 Binary files a/locale/cs_CZ/LC_MESSAGES/messages.mo and b/locale/cs_CZ/LC_MESSAGES/messages.mo differ diff --git a/locale/cs_CZ/LC_MESSAGES/messages.po b/locale/cs_CZ/LC_MESSAGES/messages.po index 6f46c0643..aa5916b01 100644 --- a/locale/cs_CZ/LC_MESSAGES/messages.po +++ b/locale/cs_CZ/LC_MESSAGES/messages.po @@ -2152,13 +2152,13 @@ msgstr "Prostory tabulek" msgid "strshowalltablespaces" msgstr "Zobrazit všechny prostory tabulek" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "Nebyly nalezeny žádné prostory tabulek." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Vytvořit prostor tabulek" -msgid "strlocation" +msgid "Location" msgstr "Umístění" msgid "strtablespaceneedsname" @@ -2167,25 +2167,25 @@ msgstr "Musíte zadat název pro prostor tabulek." msgid "strtablespaceneedsloc" msgstr "Musíte zadat složku, ve které se má prostor tabulek vytvořit." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Prostor tabulek byl vytvořen." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "Nezdařilo se vytvořit prostor tabulek." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "Opravdu chcete odstranit prostor tabulek „%s“?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Prostor tabulek byl odstraněn." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Nezdařilo se odstranit prostor tabulek." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Změny v prostoru tabulek byly provedeny." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Nezdařilo se provést změny v prostoru tabulek." # Miscellaneous diff --git a/locale/da_DK/LC_MESSAGES/messages.mo b/locale/da_DK/LC_MESSAGES/messages.mo index b6e3d074d..848aa5842 100644 Binary files a/locale/da_DK/LC_MESSAGES/messages.mo and b/locale/da_DK/LC_MESSAGES/messages.mo differ diff --git a/locale/da_DK/LC_MESSAGES/messages.po b/locale/da_DK/LC_MESSAGES/messages.po index 8b417dfb2..ec30339eb 100644 --- a/locale/da_DK/LC_MESSAGES/messages.po +++ b/locale/da_DK/LC_MESSAGES/messages.po @@ -1607,13 +1607,13 @@ msgstr "Tabelområder" msgid "strshowalltablespaces" msgstr "Vis alle tabelområder" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "Ingen tabelområder fundet." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Opret tabelområder" -msgid "strlocation" +msgid "Location" msgstr "Location" msgid "strtablespaceneedsname" @@ -1622,25 +1622,25 @@ msgstr "Tabelområdet skal have et navn." msgid "strtablespaceneedsloc" msgstr "Du skal angive hvilken mappe tabelområdet skal oprettes i." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Tabelområde oprettet." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "Oprettelse af tabelområde lykkedes ikke." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "Er du sikker på, at du vil fjerne tabelområde \"%s\"?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Tabelområde fjernet." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Fjernelse af tabelområde lykkedes ikke." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Tabelområde ændret." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Ændring af tabelområde lykkedes ikke." # Miscellaneous diff --git a/locale/de_DE/LC_MESSAGES/messages.mo b/locale/de_DE/LC_MESSAGES/messages.mo index 31e4f1792..590bea239 100644 Binary files a/locale/de_DE/LC_MESSAGES/messages.mo and b/locale/de_DE/LC_MESSAGES/messages.mo differ diff --git a/locale/de_DE/LC_MESSAGES/messages.po b/locale/de_DE/LC_MESSAGES/messages.po index 45acc2dfe..342bf3096 100644 --- a/locale/de_DE/LC_MESSAGES/messages.po +++ b/locale/de_DE/LC_MESSAGES/messages.po @@ -2052,13 +2052,13 @@ msgstr "Tablespaces" msgid "strshowalltablespaces" msgstr "Alle Tablespaces anzeigen" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "Keine Tablespaces gefunden." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Tablespace erstellen" -msgid "strlocation" +msgid "Location" msgstr "Pfad" msgid "strtablespaceneedsname" @@ -2067,25 +2067,25 @@ msgstr "Sie müssen einen Namen für den Tablespace angeben." msgid "strtablespaceneedsloc" msgstr "Sie müssen ein Verzeichnis angeben, in dem Sie den Tablespace erstellen möchten." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Tablespace erstellt." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "Erstellen des Tablespace fehlgeschlagen." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "Sind Sie sicher, dass Sie den Tablespace \"%s\" löschen wollen?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Tablespace gelöscht." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Löschen des Tablespace fehlgeschlagen." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Tablespace geändert." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Ändern des Tablespace fehlgeschlagen." # Miscellaneous diff --git a/locale/el_GR/LC_MESSAGES/messages.mo b/locale/el_GR/LC_MESSAGES/messages.mo index e6e97ffac..c477bc456 100644 Binary files a/locale/el_GR/LC_MESSAGES/messages.mo and b/locale/el_GR/LC_MESSAGES/messages.mo differ diff --git a/locale/el_GR/LC_MESSAGES/messages.po b/locale/el_GR/LC_MESSAGES/messages.po index 4023fedda..80dbbffa4 100644 --- a/locale/el_GR/LC_MESSAGES/messages.po +++ b/locale/el_GR/LC_MESSAGES/messages.po @@ -1910,13 +1910,13 @@ msgstr "Τοποθεσίες πινάκων" msgid "strshowalltablespaces" msgstr "Εμφάνιση όλων των τοποθεσιών" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "Δε βρέθηκαν τοποθεσίες πινάκων." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Δημιουργία τοποθεσίας πίνακα" -msgid "strlocation" +msgid "Location" msgstr "Τοποθεσία" msgid "strtablespaceneedsname" @@ -1925,25 +1925,25 @@ msgstr "Πρέπει να δώσετε όνομα στην τοποθεσία." msgid "strtablespaceneedsloc" msgstr "Πρέπει να δώσετε την ακριβή θέση του καταλόγου όπου θα δημιουργηθεί ο πίνακας." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Η τοποθεσία δημιουργήθηκε." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "Η δημιουργία της τοποθεσίας απέτυχε." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "Να διαγραφεί η τοποθεσία \"%s\"?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Η τοποθεσία διαγράφηκε." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Η διαγραφή της τοποθεσίας απέτυχε." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Η τοποθεσία τροποποιήθηκε." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Η τροποποίηση της τοποθεσίας απέτυχε." # Miscellaneous diff --git a/locale/en_US/LC_MESSAGES/messages.mo b/locale/en_US/LC_MESSAGES/messages.mo index fb8888d0a..13ea64d36 100644 Binary files a/locale/en_US/LC_MESSAGES/messages.mo and b/locale/en_US/LC_MESSAGES/messages.mo differ diff --git a/locale/en_US/LC_MESSAGES/messages.po b/locale/en_US/LC_MESSAGES/messages.po index 5beb03c37..33febf604 100644 --- a/locale/en_US/LC_MESSAGES/messages.po +++ b/locale/en_US/LC_MESSAGES/messages.po @@ -2287,13 +2287,16 @@ msgstr "Tablespaces" msgid "strshowalltablespaces" msgstr "Show all tablespaces" -msgid "strnotablespaces" +# original: "strnotablespaces" +msgid "No tablespaces found." msgstr "No tablespaces found." -msgid "strcreatetablespace" +# original: "strcreatetablespace" +msgid "Create tablespace" msgstr "Create tablespace" -msgid "strlocation" +# original: "strlocation" +msgid "Location" msgstr "Location" msgid "strtablespaceneedsname" @@ -2302,25 +2305,32 @@ msgstr "You must give a name for your tablespace." msgid "strtablespaceneedsloc" msgstr "You must give a directory in which to create the tablespace." -msgid "strtablespacecreated" +# original: "strtablespacecreated" +msgid "Tablespace created." msgstr "Tablespace created." -msgid "strtablespacecreatedbad" +# original: "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "Tablespace creation failed." -msgid "strconfdroptablespace" +# original: "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "Are you sure you want to drop the tablespace \"%s\"?" -msgid "strtablespacedropped" +# original: "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Tablespace dropped." -msgid "strtablespacedroppedbad" +# original: "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Tablespace drop failed." -msgid "strtablespacealtered" +# original: "strtablespacealtered" +msgid "Tablespace altered." msgstr "Tablespace altered." -msgid "strtablespacealteredbad" +# original: "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Tablespace alteration failed." # Miscellaneous diff --git a/locale/es_ES/LC_MESSAGES/messages.mo b/locale/es_ES/LC_MESSAGES/messages.mo index 3a415ddb9..b13dc6c26 100644 Binary files a/locale/es_ES/LC_MESSAGES/messages.mo and b/locale/es_ES/LC_MESSAGES/messages.mo differ diff --git a/locale/es_ES/LC_MESSAGES/messages.po b/locale/es_ES/LC_MESSAGES/messages.po index 056f9a902..a0c6e7ccc 100644 --- a/locale/es_ES/LC_MESSAGES/messages.po +++ b/locale/es_ES/LC_MESSAGES/messages.po @@ -2161,13 +2161,13 @@ msgstr "Tablespaces" msgid "strshowalltablespaces" msgstr "Mostrar todos los tablespaces" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "No se encontraron tablespaces." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Crear tablespace" -msgid "strlocation" +msgid "Location" msgstr "Ubicación" msgid "strtablespaceneedsname" @@ -2176,25 +2176,25 @@ msgstr "Debes darle un nombre al tablespace." msgid "strtablespaceneedsloc" msgstr "Debes dar un directorio en donde crear el tablespace." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Tablespace creado." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "Falló la creación del tablespace." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "¿Esta seguro que quiere eliminar el tablespace \"%s\"?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Tablespace eliminado." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Falló la eliminación del tablespace." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Tablespace modificado." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Falló la modificación del Tablespace." # Miscellaneous diff --git a/locale/fr_FR/LC_MESSAGES/messages.mo b/locale/fr_FR/LC_MESSAGES/messages.mo index 9f53e8497..1504e0cd1 100644 Binary files a/locale/fr_FR/LC_MESSAGES/messages.mo and b/locale/fr_FR/LC_MESSAGES/messages.mo differ diff --git a/locale/fr_FR/LC_MESSAGES/messages.po b/locale/fr_FR/LC_MESSAGES/messages.po index 0df112f1a..65fc82712 100644 --- a/locale/fr_FR/LC_MESSAGES/messages.po +++ b/locale/fr_FR/LC_MESSAGES/messages.po @@ -2167,13 +2167,13 @@ msgstr "Tablespaces" msgid "strshowalltablespaces" msgstr "Voir tous les tablespaces" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "Aucun tablespace trouvé." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Créer un tablespace" -msgid "strlocation" +msgid "Location" msgstr "Emplacement" msgid "strtablespaceneedsname" @@ -2182,25 +2182,25 @@ msgstr "Vous devez donner un nom à votre tablespace." msgid "strtablespaceneedsloc" msgstr "Vous devez préciser un répertoire dans lequel sera créé le tablespace." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Tablespace créé." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "Échec lors de la création du tablespace." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "Êtes-vous sûr de vouloir supprimer le tablespace « %s » ?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Tablespace supprimé." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Échec lors de la suppression du tablespace." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Tablespace modifié." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Échec lors de la modification du tablespace." # Miscellaneous diff --git a/locale/gl_ES/LC_MESSAGES/messages.mo b/locale/gl_ES/LC_MESSAGES/messages.mo index 60e6aa46b..3cc26413b 100644 Binary files a/locale/gl_ES/LC_MESSAGES/messages.mo and b/locale/gl_ES/LC_MESSAGES/messages.mo differ diff --git a/locale/gl_ES/LC_MESSAGES/messages.po b/locale/gl_ES/LC_MESSAGES/messages.po index f96672577..871fe9f12 100644 --- a/locale/gl_ES/LC_MESSAGES/messages.po +++ b/locale/gl_ES/LC_MESSAGES/messages.po @@ -2160,13 +2160,13 @@ msgstr "Alias de ruta" msgid "strshowalltablespaces" msgstr "Listar todos os alias de ruta" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "Non se atopou alias de ruta algún." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Crear un alias de ruta" -msgid "strlocation" +msgid "Location" msgstr "Lugar" msgid "strtablespaceneedsname" @@ -2175,25 +2175,25 @@ msgstr "Debe fornecer un nome para o alias de ruta." msgid "strtablespaceneedsloc" msgstr "Debe fornecer unha ruta para a que crear o alias." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Creouse o alias de ruta." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "non se conseguiu crear o alias de ruta." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "Está seguro de que quere borrar o alias de ruta «%s»?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Eliminouse o alias de ruta." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Non se conseguiu eliminar o alias de ruta." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Modificouse o alias de ruta." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Non se conseguiu modificar o alias de ruta." # Miscellaneous diff --git a/locale/he_IL/LC_MESSAGES/messages.mo b/locale/he_IL/LC_MESSAGES/messages.mo index e1ab45dba..2a4e88bf2 100644 Binary files a/locale/he_IL/LC_MESSAGES/messages.mo and b/locale/he_IL/LC_MESSAGES/messages.mo differ diff --git a/locale/he_IL/LC_MESSAGES/messages.po b/locale/he_IL/LC_MESSAGES/messages.po index 56757aef2..35295db77 100644 --- a/locale/he_IL/LC_MESSAGES/messages.po +++ b/locale/he_IL/LC_MESSAGES/messages.po @@ -1628,13 +1628,13 @@ msgstr "מרחבונים" msgid "strshowalltablespaces" msgstr "הראה את כל המרחבונים" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "לא נמצאו מרחבונים." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "צור מרחבון" -msgid "strlocation" +msgid "Location" msgstr "מיקום" msgid "strtablespaceneedsname" @@ -1643,25 +1643,25 @@ msgstr "אתה חייב לציין שם למרחבון." msgid "strtablespaceneedsloc" msgstr "אתה חייב לציין תיקיה שבה יבצר המרחבון." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "מרחבון נוצר." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "יצירת מרחבון נכשלה." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "האם אתה בטוח שברצונך למחוק את המרחבון \"%s\"?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "מרחבון נמחק." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "מחיקת מרחבון נכשלה." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "מרחבון נערך." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "עריכת מרחבון מכשלה." # Miscellaneous diff --git a/locale/hu_HU/LC_MESSAGES/messages.mo b/locale/hu_HU/LC_MESSAGES/messages.mo index 98fade7b4..afea01870 100644 Binary files a/locale/hu_HU/LC_MESSAGES/messages.mo and b/locale/hu_HU/LC_MESSAGES/messages.mo differ diff --git a/locale/hu_HU/LC_MESSAGES/messages.po b/locale/hu_HU/LC_MESSAGES/messages.po index b3ea0db08..76543e2bd 100644 --- a/locale/hu_HU/LC_MESSAGES/messages.po +++ b/locale/hu_HU/LC_MESSAGES/messages.po @@ -2152,13 +2152,13 @@ msgstr "Táblahelyek" msgid "strshowalltablespaces" msgstr "Minden táblahelyet megjelenít" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "Nincsenek táblahelyek." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Táblahelyet teremt" -msgid "strlocation" +msgid "Location" msgstr "Hely" msgid "strtablespaceneedsname" @@ -2167,25 +2167,25 @@ msgstr "Nevet kell adnia a táblahelynek." msgid "strtablespaceneedsloc" msgstr "Meg kell adnia egy mappát, ahol a táblahelyet teremti." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Táblahely teremtve." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "Nem sikerült táblahelyet teremteni." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "Biztosan ki akarja dobni „%s” táblahelyet?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Táblahely kidobva." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Nem sikerült kidobni a táblahelyet." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Táblahely megváltoztatva." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Nem sikerült megváltoztatni a táblahelyet." # Miscellaneous diff --git a/locale/it_IT/LC_MESSAGES/messages.mo b/locale/it_IT/LC_MESSAGES/messages.mo index 65677328c..ce8e7205f 100644 Binary files a/locale/it_IT/LC_MESSAGES/messages.mo and b/locale/it_IT/LC_MESSAGES/messages.mo differ diff --git a/locale/it_IT/LC_MESSAGES/messages.po b/locale/it_IT/LC_MESSAGES/messages.po index 32c45983a..6fe7cccd5 100644 --- a/locale/it_IT/LC_MESSAGES/messages.po +++ b/locale/it_IT/LC_MESSAGES/messages.po @@ -1880,13 +1880,13 @@ msgstr "Tablespace" msgid "strshowalltablespaces" msgstr "Mostra tutti i tablespace" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "Nessun tablespace trovato." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Crea tablespace" -msgid "strlocation" +msgid "Location" msgstr "Directory" msgid "strtablespaceneedsname" @@ -1895,25 +1895,25 @@ msgstr "È necessario specificare un nome per il tablespace." msgid "strtablespaceneedsloc" msgstr "È necessario specificare una directory in cui creare il tablespace." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Tablespace creato." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "Crezione del tablespace fallita." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "Eliminare il tablespace \"%s\"?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Tablespace eliminato." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Eliminazione del tablespace fallita." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Tablespace modificato." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Modifica del tablespace fallita." # Miscellaneous - Varie diff --git a/locale/ja_JP/LC_MESSAGES/messages.mo b/locale/ja_JP/LC_MESSAGES/messages.mo index 17ca9a48c..a035a2443 100644 Binary files a/locale/ja_JP/LC_MESSAGES/messages.mo and b/locale/ja_JP/LC_MESSAGES/messages.mo differ diff --git a/locale/ja_JP/LC_MESSAGES/messages.po b/locale/ja_JP/LC_MESSAGES/messages.po index 6c2c02040..f4375b2e7 100644 --- a/locale/ja_JP/LC_MESSAGES/messages.po +++ b/locale/ja_JP/LC_MESSAGES/messages.po @@ -2049,13 +2049,13 @@ msgstr "テーブル空間" msgid "strshowalltablespaces" msgstr "すべてのテーブルスペースを表示する" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "テーブル空間が見つかりません。" -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "テーブル空間を作成する" -msgid "strlocation" +msgid "Location" msgstr "ロケーション" msgid "strtablespaceneedsname" @@ -2064,25 +2064,25 @@ msgstr "テーブル空間名を指定する必要があります。" msgid "strtablespaceneedsloc" msgstr "テーブル空間作成をするディレクトリを指定する必要があります。" -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "テーブル空間を作成しました。" -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "テーブル空間の作成に失敗しました。" -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "本当にテーブル空間「%s」を破棄しますか?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "テーブル空間を破棄しました。" -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "テーブル空間の破棄に失敗しました。" -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "テーブル空間を変更しました。" -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "テーブル空間の変更に失敗しました。" # Miscellaneous diff --git a/locale/lt_LT/LC_MESSAGES/messages.mo b/locale/lt_LT/LC_MESSAGES/messages.mo index 535a0d45a..afd72cff4 100644 Binary files a/locale/lt_LT/LC_MESSAGES/messages.mo and b/locale/lt_LT/LC_MESSAGES/messages.mo differ diff --git a/locale/lt_LT/LC_MESSAGES/messages.po b/locale/lt_LT/LC_MESSAGES/messages.po index f24c7c6b1..6aedc261a 100644 --- a/locale/lt_LT/LC_MESSAGES/messages.po +++ b/locale/lt_LT/LC_MESSAGES/messages.po @@ -2186,13 +2186,13 @@ msgstr "Lentelių erdvės" msgid "strshowalltablespaces" msgstr "Rodyti visas lentelių erdves" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "Lentelių erdvių nerasta." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Kurti lentelių erdvę" -msgid "strlocation" +msgid "Location" msgstr "Vieta" msgid "strtablespaceneedsname" @@ -2201,25 +2201,25 @@ msgstr "Turite suteikti lentelių erdvei pavadinimą." msgid "strtablespaceneedsloc" msgstr "Turite nurodyti katalogą, kuriame turi būti sukurta lentelių erdvė." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Lentelių erdvė sukurta." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "Nepavyko sukurti lentelių erdvės." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "Ar tikrai norite šalinti lentelių erdvę \"%s\"?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Lentelių erdvė pašalinta." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Nepavyko pašalinti lentelių erdvės." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Lentelių erdvė pakeista." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Nepavyko pakeisti lentelių erdvės." # Miscellaneous diff --git a/locale/pl_PL/LC_MESSAGES/messages.mo b/locale/pl_PL/LC_MESSAGES/messages.mo index ff1e561f6..2415d9d39 100644 Binary files a/locale/pl_PL/LC_MESSAGES/messages.mo and b/locale/pl_PL/LC_MESSAGES/messages.mo differ diff --git a/locale/pl_PL/LC_MESSAGES/messages.po b/locale/pl_PL/LC_MESSAGES/messages.po index 9da78547b..d14a5a790 100644 --- a/locale/pl_PL/LC_MESSAGES/messages.po +++ b/locale/pl_PL/LC_MESSAGES/messages.po @@ -1907,13 +1907,13 @@ msgstr "Przestrzenie tabel" msgid "strshowalltablespaces" msgstr "Pokaż wszystkie przestrzenie tabel" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "Nie znaleziono przestrzeni tabel." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Utwórz przestrzeń tabel" -msgid "strlocation" +msgid "Location" msgstr "Położenie" msgid "strtablespaceneedsname" @@ -1922,25 +1922,25 @@ msgstr "Musisz podać nazwę przestrzeni tabel." msgid "strtablespaceneedsloc" msgstr "Musisz podać nazwę katalogu, w którym chcesz utworzyć przestrzeń tabel." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Przestrzeń tabel została utworzona." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "Próba utworzenia przestrzeni tabel się nie powiodła." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "Czy na pewno chcesz usunąć przestrzeń tabel \"%s\"?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Przestrzeń tabel została usunięta." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Próba usunięcia przestrzeni tabel się nie powiodła." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Przestrzeń tabel została zmieniona." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Próba modyfikacji przestrzeni tabel się nie powiodła." # Miscellaneous diff --git a/locale/pt_BR/LC_MESSAGES/messages.mo b/locale/pt_BR/LC_MESSAGES/messages.mo index 73ce697a2..837e3255c 100644 Binary files a/locale/pt_BR/LC_MESSAGES/messages.mo and b/locale/pt_BR/LC_MESSAGES/messages.mo differ diff --git a/locale/pt_BR/LC_MESSAGES/messages.po b/locale/pt_BR/LC_MESSAGES/messages.po index 00ad59621..e6f775c0a 100644 --- a/locale/pt_BR/LC_MESSAGES/messages.po +++ b/locale/pt_BR/LC_MESSAGES/messages.po @@ -2155,13 +2155,13 @@ msgstr "Tablespaces" msgid "strshowalltablespaces" msgstr "Exibir todos os tablespaces" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "Nenhum tablespace encontrado." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Criar tablespace" -msgid "strlocation" +msgid "Location" msgstr "Localização" msgid "strtablespaceneedsname" @@ -2170,25 +2170,25 @@ msgstr "Você deve informar um nome para o tablespace." msgid "strtablespaceneedsloc" msgstr "Você deve informar um diretório em qual será criado o tablespace." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Tablespace criado." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "Falha ao criar o tablespace." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "Você têm certeza que deseja deletar o tablespace \"%s\"?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Tablespace deletado." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Falha ao deletar o tablespace." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Tablespace alterado." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Falha ao alterar o tablespace." # Miscellaneous diff --git a/locale/pt_PT/LC_MESSAGES/messages.mo b/locale/pt_PT/LC_MESSAGES/messages.mo index ad1ca83fd..fc130c864 100644 Binary files a/locale/pt_PT/LC_MESSAGES/messages.mo and b/locale/pt_PT/LC_MESSAGES/messages.mo differ diff --git a/locale/pt_PT/LC_MESSAGES/messages.po b/locale/pt_PT/LC_MESSAGES/messages.po index cdbff9364..5eb80fd37 100644 --- a/locale/pt_PT/LC_MESSAGES/messages.po +++ b/locale/pt_PT/LC_MESSAGES/messages.po @@ -1652,13 +1652,13 @@ msgstr "Espaços de Tabela" msgid "strshowalltablespaces" msgstr "Lista todos os espaços de tabela" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "Não foram encontrados espaços de tabela." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Criar espaço de tabela" -msgid "strlocation" +msgid "Location" msgstr "Localização" msgid "strtablespaceneedsname" @@ -1667,25 +1667,25 @@ msgstr "Tem de específicar um nome para o espaço de tabela." msgid "strtablespaceneedsloc" msgstr "Tem de específicar um directório no qual irá criar o espaço de tabela." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Espaço de Tabela criado." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "Falha ao criar espaço de tabela." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "Tem a certeza que pretende eliminar o espaço de tabela \"%s\"?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Espaço de tabela eliminado." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Falha ao eliminar o espaço de tabela." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Espaço de tabela alterado." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Alteração do Espaçamento de Tabela falhou." msgid "Help" diff --git a/locale/ro_RO/LC_MESSAGES/messages.mo b/locale/ro_RO/LC_MESSAGES/messages.mo index c7abf6b17..0aab185a9 100644 Binary files a/locale/ro_RO/LC_MESSAGES/messages.mo and b/locale/ro_RO/LC_MESSAGES/messages.mo differ diff --git a/locale/ro_RO/LC_MESSAGES/messages.po b/locale/ro_RO/LC_MESSAGES/messages.po index 7638c10bb..fc55f2740 100644 --- a/locale/ro_RO/LC_MESSAGES/messages.po +++ b/locale/ro_RO/LC_MESSAGES/messages.po @@ -1940,13 +1940,13 @@ msgstr "Spaţii de tabele" msgid "strshowalltablespaces" msgstr "Afişare toate spaţiile de tabele" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "Nici un spaţiu de tabele găsit." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Creare spaţiu de tabele" -msgid "strlocation" +msgid "Location" msgstr "Locaţie" msgid "strtablespaceneedsname" @@ -1955,25 +1955,25 @@ msgstr "Specificaţi un nume pentru spaţiul de tabele." msgid "strtablespaceneedsloc" msgstr "Specificaţi directorul în care va fi creat spaţiul de tabele." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Spaţiu de tabele creat." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "Creare spaţiu de tabele eşuată." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "Sigur ştergeţi spaţiul de tabele \"%s\"?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Spaţiu de tabele şters." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Ştergere şpaţiu de tabele eşuată." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Spaţiu de tabele modificat." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Modificare şpaţiu de tabele eşuată." # Miscellaneous diff --git a/locale/ru_RU/LC_MESSAGES/messages.mo b/locale/ru_RU/LC_MESSAGES/messages.mo index 25ebf5832..36f1c2ea1 100644 Binary files a/locale/ru_RU/LC_MESSAGES/messages.mo and b/locale/ru_RU/LC_MESSAGES/messages.mo differ diff --git a/locale/ru_RU/LC_MESSAGES/messages.po b/locale/ru_RU/LC_MESSAGES/messages.po index c317548ac..a8b543f43 100644 --- a/locale/ru_RU/LC_MESSAGES/messages.po +++ b/locale/ru_RU/LC_MESSAGES/messages.po @@ -2140,13 +2140,13 @@ msgstr "Табличные пространства" msgid "strshowalltablespaces" msgstr "Показать все табличные пространства" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "Табличные пространства не найдены." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Создать табличное пространство" -msgid "strlocation" +msgid "Location" msgstr "Расположение" msgid "strtablespaceneedsname" @@ -2155,25 +2155,25 @@ msgstr "Вам необходимо определить имя таблично msgid "strtablespaceneedsloc" msgstr "Вам необходимо определить директорию, в которой табличное пространство буде создано." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Табличное пространство создано." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "Создание табличного пространства прервано." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "Вы действительно хотите удалить табличное пространство \"%s\"?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Табличное пространство удалено." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Удаление табличного пространства прервано." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Табличное пространство изменено." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Изменение табличного пространства прервано." # Miscellaneous diff --git a/locale/sk_SK/LC_MESSAGES/messages.mo b/locale/sk_SK/LC_MESSAGES/messages.mo index e4667a139..b66e22a8f 100644 Binary files a/locale/sk_SK/LC_MESSAGES/messages.mo and b/locale/sk_SK/LC_MESSAGES/messages.mo differ diff --git a/locale/sk_SK/LC_MESSAGES/messages.po b/locale/sk_SK/LC_MESSAGES/messages.po index a4053523c..113dc5b55 100644 --- a/locale/sk_SK/LC_MESSAGES/messages.po +++ b/locale/sk_SK/LC_MESSAGES/messages.po @@ -1709,13 +1709,13 @@ msgstr "Priestory tabuliek" msgid "strshowalltablespaces" msgstr "Zobraziť všetky priestory pre tabuľky" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "Nenájdené žiadne priestory tabuliek." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Vytvoriť priestor pre tabuľku" -msgid "strlocation" +msgid "Location" msgstr "Umiestnenie" msgid "strtablespaceneedsname" @@ -1724,25 +1724,25 @@ msgstr "Musíš zadať názov priestoru tabuľky." msgid "strtablespaceneedsloc" msgstr "Musíš zadať adresár, vktorom sa má vytvoriť priestor pre tabuľku." -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Priestor pre tabuľku bol vytvorený." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "Vytvorenie priestoru pre tabuľku zlyhalo." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "Naozaj chceš odstrániť priestor tabuľky \"%s\"?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Priestor pre tabuľku bol odstránený." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Odstránenie priestoru zlyhalo." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Priestor tabuľky zmenený." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Zmenenie priestoru tabuľky zlyhalo." # Miscellaneous diff --git a/locale/tr_TR/LC_MESSAGES/messages.mo b/locale/tr_TR/LC_MESSAGES/messages.mo index 8ea5fec93..5fb08b81d 100644 Binary files a/locale/tr_TR/LC_MESSAGES/messages.mo and b/locale/tr_TR/LC_MESSAGES/messages.mo differ diff --git a/locale/tr_TR/LC_MESSAGES/messages.po b/locale/tr_TR/LC_MESSAGES/messages.po index 6c4dc0a58..54dc5e09b 100644 --- a/locale/tr_TR/LC_MESSAGES/messages.po +++ b/locale/tr_TR/LC_MESSAGES/messages.po @@ -1697,13 +1697,13 @@ msgstr "Tablespaceler" msgid "strshowalltablespaces" msgstr "Tüm tablespaceleri göster" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "Hiç tablespace bulunamadı." -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "Tablespace yarat" -msgid "strlocation" +msgid "Location" msgstr "Yer" msgid "strtablespaceneedsname" @@ -1712,25 +1712,25 @@ msgstr "Tablespace'e bir ad vermelisiniz." msgid "strtablespaceneedsloc" msgstr "Tablespace'in yaratılacağı dizini belirtmelisiniz" -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "Tablespace yaratıldı." -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "Tablespace yaratılamadı." -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "\"%s\" adlı tablespace'i kaldırmak istediğinize emin misiniz?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "Tablespace kaldırıldı." -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "Tablespace kaldırılamadı." -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "Tablespace değiştirildi." -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "Tablespace değiştirilemedi." # Miscellaneous diff --git a/locale/zh_CN/LC_MESSAGES/messages.mo b/locale/zh_CN/LC_MESSAGES/messages.mo index 4a9a44df0..89d0ceed9 100644 Binary files a/locale/zh_CN/LC_MESSAGES/messages.mo and b/locale/zh_CN/LC_MESSAGES/messages.mo differ diff --git a/locale/zh_CN/LC_MESSAGES/messages.po b/locale/zh_CN/LC_MESSAGES/messages.po index b0a49406c..85b99cac1 100644 --- a/locale/zh_CN/LC_MESSAGES/messages.po +++ b/locale/zh_CN/LC_MESSAGES/messages.po @@ -2158,13 +2158,13 @@ msgstr "表空间" msgid "strshowalltablespaces" msgstr "显示所有表空间" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "查无此表空间。" -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "创建表空间" -msgid "strlocation" +msgid "Location" msgstr "位置" msgid "strtablespaceneedsname" @@ -2173,25 +2173,25 @@ msgstr "必须指定表空间名称。" msgid "strtablespaceneedsloc" msgstr "必须指定创建表空间的文件夹。" -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "表空间已创建。" -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "表空间创建失败。" -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "确定要删除表空间 \"%s\"吗?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "表空间已删除。" -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "表空间删除失败。" -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "表空间已变更。" -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "表空间变更失败。" # Miscellaneous diff --git a/locale/zh_TW/LC_MESSAGES/messages.mo b/locale/zh_TW/LC_MESSAGES/messages.mo index bb4a8c70c..51f291705 100644 Binary files a/locale/zh_TW/LC_MESSAGES/messages.mo and b/locale/zh_TW/LC_MESSAGES/messages.mo differ diff --git a/locale/zh_TW/LC_MESSAGES/messages.po b/locale/zh_TW/LC_MESSAGES/messages.po index 57807a645..8b0229beb 100644 --- a/locale/zh_TW/LC_MESSAGES/messages.po +++ b/locale/zh_TW/LC_MESSAGES/messages.po @@ -2031,13 +2031,13 @@ msgstr "表空間" msgid "strshowalltablespaces" msgstr "顯示全部表空間" -msgid "strnotablespaces" +msgid "No tablespaces found." msgstr "找不到任何表空間。" -msgid "strcreatetablespace" +msgid "Create tablespace" msgstr "建立表空間" -msgid "strlocation" +msgid "Location" msgstr "所在位置" msgid "strtablespaceneedsname" @@ -2046,25 +2046,25 @@ msgstr "您必需為您的表空間給一個名稱。" msgid "strtablespaceneedsloc" msgstr "您必需給一個目錄夾來建立表空間。" -msgid "strtablespacecreated" +msgid "Tablespace created." msgstr "表空間已建立。" -msgid "strtablespacecreatedbad" +msgid "Tablespace creation failed." msgstr "表空間建立已失敗。" -msgid "strconfdroptablespace" +msgid "Are you sure you want to drop the tablespace \"%s\"?" msgstr "您確定您要移除這個表空間 \"%s\"?" -msgid "strtablespacedropped" +msgid "Tablespace dropped." msgstr "表空間已移除。" -msgid "strtablespacedroppedbad" +msgid "Tablespace drop failed." msgstr "表空間移除已失敗。" -msgid "strtablespacealtered" +msgid "Tablespace altered." msgstr "表空間已修改。" -msgid "strtablespacealteredbad" +msgid "Tablespace alteration failed." msgstr "表空間修改已失敗。" # Miscellaneous diff --git a/package-lock.json b/package-lock.json index 977d6802d..d8756ea7d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,13 +11,13 @@ } }, "node_modules/@playwright/test": { - "version": "1.57.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.57.0.tgz", - "integrity": "sha512-6TyEnHgd6SArQO8UO2OMTxshln3QMWBtPGrOCgs3wVEmQmwyuNtB10IZMfmYDE0riwNR1cu4q+pPcxMVtaG3TA==", + "version": "1.58.2", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.58.2.tgz", + "integrity": "sha512-akea+6bHYBBfA9uQqSYmlJXn61cTa+jbO87xVLCWbTqbWadRVmhxlXATaOjOgcBaWU4ePo0wB41KMFv3o35IXA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright": "1.57.0" + "playwright": "1.58.2" }, "bin": { "playwright": "cli.js" @@ -66,9 +66,9 @@ } }, "node_modules/@types/http-cache-semantics": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", - "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q==", "dev": true, "license": "MIT" }, @@ -83,13 +83,13 @@ } }, "node_modules/@types/node": { - "version": "25.0.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.8.tgz", - "integrity": "sha512-powIePYMmC3ibL0UJ2i2s0WIbq6cg6UyVFQxSCpaPxxzAaziRfimGivjdF943sSGV6RADVbk0Nvlm5P/FB44Zg==", + "version": "25.5.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz", + "integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~7.16.0" + "undici-types": "~7.18.0" } }, "node_modules/@types/responselike": { @@ -103,9 +103,9 @@ } }, "node_modules/agent-base": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", - "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", "dev": true, "license": "MIT", "engines": { @@ -153,19 +153,34 @@ } }, "node_modules/b4a": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", - "integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.8.0.tgz", + "integrity": "sha512-qRuSmNSkGQaHwNbM7J78Wwy+ghLEYF1zNrSeMxj4Kgw6y33O3mXcQ6Ie9fRvfU/YnxWkOchPXbaLb73TkIsfdg==", "dev": true, - "license": "Apache-2.0" + "license": "Apache-2.0", + "peerDependencies": { + "react-native-b4a": "*" + }, + "peerDependenciesMeta": { + "react-native-b4a": { + "optional": true + } + } }, "node_modules/bare-events": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.4.tgz", - "integrity": "sha512-+gFfDkR8pj4/TrWCGUGWmJIkBwuxPS5F+a5yWjOHQt2hHvNZd5YLzadjmDUtFmMM4y429bnKLa8bYBMHcYdnQA==", + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.8.2.tgz", + "integrity": "sha512-riJjyv1/mHLIPX4RwiK+oW9/4c3TEUeORHKefKAKnZ5kyslbN+HXowtbaVEqt4IMUB7OXlfixcs6gsFeo/jhiQ==", "dev": true, "license": "Apache-2.0", - "optional": true + "peerDependencies": { + "bare-abort-controller": "*" + }, + "peerDependenciesMeta": { + "bare-abort-controller": { + "optional": true + } + } }, "node_modules/buffer-crc32": { "version": "0.2.13", @@ -328,9 +343,9 @@ } }, "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, "license": "MIT", "dependencies": { @@ -385,15 +400,25 @@ } }, "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", "dev": true, "license": "MIT", "dependencies": { "once": "^1.4.0" } }, + "node_modules/events-universal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/events-universal/-/events-universal-1.0.1.tgz", + "integrity": "sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bare-events": "^2.7.0" + } + }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -537,9 +562,9 @@ } }, "node_modules/http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", "dev": true, "license": "BSD-2-Clause" }, @@ -861,13 +886,13 @@ } }, "node_modules/playwright": { - "version": "1.57.0", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.57.0.tgz", - "integrity": "sha512-ilYQj1s8sr2ppEJ2YVadYBN0Mb3mdo9J0wQ+UuDhzYqURwSoW4n1Xs5vs7ORwgDGmyEh33tRMeS8KhdkMoLXQw==", + "version": "1.58.2", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.58.2.tgz", + "integrity": "sha512-vA30H8Nvkq/cPBnNw4Q8TWz1EJyqgpuinBcHET0YVJVFldr8JDNiU9LaWAE1KqSkRYazuaBhTpB5ZzShOezQ6A==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright-core": "1.57.0" + "playwright-core": "1.58.2" }, "bin": { "playwright": "cli.js" @@ -880,9 +905,9 @@ } }, "node_modules/playwright-core": { - "version": "1.57.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.57.0.tgz", - "integrity": "sha512-agTcKlMw/mjBWOnD6kFZttAAGHgi/Nw0CZ2o6JqWSbMlI219lAFLZZCyqByTsvVAJq5XA5H8cA6PrvBRpBWEuQ==", + "version": "1.58.2", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.58.2.tgz", + "integrity": "sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg==", "dev": true, "license": "Apache-2.0", "bin": { @@ -942,9 +967,9 @@ } }, "node_modules/pump": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", - "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz", + "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", "dev": true, "license": "MIT", "dependencies": { @@ -986,9 +1011,9 @@ } }, "node_modules/selenium-standalone": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/selenium-standalone/-/selenium-standalone-10.0.1.tgz", - "integrity": "sha512-lc79sfk/SHFy8TdjRi8Qh0wnz86HFYQTGIiJorK0tz6RyKHubJtnURAqSTnw1slChcH4rSUkq7P4MDuXYdWHbA==", + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/selenium-standalone/-/selenium-standalone-10.0.2.tgz", + "integrity": "sha512-JoFFVbCijsSHtAD9kJa4el0uT5hszL/2Z72PcXnXQLhfUUQdMTe25V3O6Dk13RPA3s0CKQN9GZoMk+rPg0+5+A==", "dev": true, "license": "MIT", "dependencies": { @@ -1050,17 +1075,15 @@ "license": "ISC" }, "node_modules/streamx": { - "version": "2.22.0", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.22.0.tgz", - "integrity": "sha512-sLh1evHOzBy/iWRiR6d1zRcLao4gGZr3C1kzNz4fopCOKJb6xD9ub8Mpi9Mr1R6id5o43S+d93fI48UC5uM9aw==", + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.23.0.tgz", + "integrity": "sha512-kn+e44esVfn2Fa/O0CPFcex27fjIL6MkVae0Mm6q+E6f0hWv578YCERbv+4m02cjxvDsPKLnmxral/rR6lBMAg==", "dev": true, "license": "MIT", "dependencies": { + "events-universal": "^1.0.0", "fast-fifo": "^1.3.2", "text-decoder": "^1.1.0" - }, - "optionalDependencies": { - "bare-events": "^2.2.0" } }, "node_modules/strip-final-newline": { @@ -1161,9 +1184,9 @@ } }, "node_modules/text-decoder": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz", - "integrity": "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.7.tgz", + "integrity": "sha512-vlLytXkeP4xvEq2otHeJfSQIRyWxo/oZGEbXrtEEF9Hnmrdly59sUbzZ/QgyWuLYHctCHxFF4tRQZNQ9k60ExQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -1171,9 +1194,9 @@ } }, "node_modules/undici-types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", - "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", "dev": true, "license": "MIT" }, @@ -1201,9 +1224,9 @@ "license": "ISC" }, "node_modules/yauzl": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-3.2.0.tgz", - "integrity": "sha512-Ow9nuGZE+qp1u4JIPvg+uCiUr7xGQWdff7JQSk5VGYTAZMDe2q8lxJ10ygv10qmSj031Ty/6FNJpLO4o1Sgc+w==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-3.2.1.tgz", + "integrity": "sha512-k1isifdbpNSFEHFJ1ZY4YDewv0IH9FR61lDetaRMD3j2ae3bIXGV+7c+LHCqtQGofSd8PIyV4X6+dHMAnSr60A==", "dev": true, "license": "MIT", "dependencies": { diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 6ad539d4d..feb7357c3 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -8,12 +8,15 @@ parameters: - all_db_export.php - alter_db.php - alter_role.php + - alter_tablespace.php - browser.php - create_db.php - create_role.php + - create_tablespace.php - dbexport.php - drop_db.php - drop_role.php + - drop_tablespace.php - history.php - history_clear.php - history_delete.php @@ -27,6 +30,7 @@ parameters: - servers.php - servers-tree.php - sqledit.php + - tablespaces.php excludePaths: - vendor/ phpat: diff --git a/src/Application/DTO/Tablespace.php b/src/Application/DTO/Tablespace.php new file mode 100644 index 000000000..b1371d2af --- /dev/null +++ b/src/Application/DTO/Tablespace.php @@ -0,0 +1,69 @@ + $data + */ + public static function createFromDbArray(array $data): ValueObjectTablespace + { + $requiredFields = [ + 'spcname', + 'spcowner', + 'spclocation', + 'spccomment', + ]; + + foreach ($requiredFields as $field) { + if (!isset($data[$field])) { + throw new \InvalidArgumentException("Missing field '$field' in data for Tablespace value object."); + } + } + + if (!is_string($data['spcname'])) { + throw new \InvalidArgumentException("Type of field 'spcname' is not string."); + } + + if (!is_string($data['spcowner'])) { + throw new \InvalidArgumentException("Type of field 'spcowner' is not string."); + } + + if (!is_string($data['spclocation'])) { + throw new \InvalidArgumentException("Type of field 'spclocation' is not string."); + } + + if (!is_string($data['spccomment'])) { + throw new \InvalidArgumentException("Type of field 'spccomment' is not string."); + } + + return new ValueObjectTablespace( + name: new Name($data['spcname']), + owner: new Owner($data['spcowner']), + location: new Location($data['spclocation']), + comment: new Comment($data['spccomment']), + ); + } + + public static function createFromFormRequest(): ValueObjectTablespace + { + $spacename = RequestParameter::getString(ValueObjectTablespace::FORM_ID_NAME) ?? ''; + $owner = RequestParameter::getString(ValueObjectTablespace::FORM_ID_OWNER) ?? ''; + $location = RequestParameter::getString(ValueObjectTablespace::FORM_ID_LOCATION) ?? ''; + $comment = RequestParameter::getString(ValueObjectTablespace::FORM_ID_COMMENT) ?? ''; + + return new ValueObjectTablespace( + name: new Name($spacename), + owner: new Owner($owner), + location: new Location($location), + comment: new Comment($comment), + ); + } +} diff --git a/src/DDD/ValueObjects/Tablespace.php b/src/DDD/ValueObjects/Tablespace.php new file mode 100644 index 000000000..f25ab0e64 --- /dev/null +++ b/src/DDD/ValueObjects/Tablespace.php @@ -0,0 +1,40 @@ + $this->comment, + 'Location' => $this->location, + 'Name' => $this->name, + 'Owner' => $this->owner, + default => throw new \InvalidArgumentException("Property '$name' does not exist."), + }; + } +} diff --git a/src/DDD/ValueObjects/Tablespace/Comment.php b/src/DDD/ValueObjects/Tablespace/Comment.php new file mode 100644 index 000000000..c3deaaabf --- /dev/null +++ b/src/DDD/ValueObjects/Tablespace/Comment.php @@ -0,0 +1,20 @@ +comment = trim($comment); + } + + public function __toString(): string + { + return $this->comment; + } +} diff --git a/src/DDD/ValueObjects/Tablespace/Location.php b/src/DDD/ValueObjects/Tablespace/Location.php new file mode 100644 index 000000000..30c1129e4 --- /dev/null +++ b/src/DDD/ValueObjects/Tablespace/Location.php @@ -0,0 +1,26 @@ +location = $location; + } + + public function __toString(): string + { + return $this->location; + } +} diff --git a/src/DDD/ValueObjects/Tablespace/Name.php b/src/DDD/ValueObjects/Tablespace/Name.php new file mode 100644 index 000000000..662701f3d --- /dev/null +++ b/src/DDD/ValueObjects/Tablespace/Name.php @@ -0,0 +1,26 @@ +name = $name; + } + + public function __toString(): string + { + return $this->name; + } +} diff --git a/src/DDD/ValueObjects/Tablespace/Owner.php b/src/DDD/ValueObjects/Tablespace/Owner.php new file mode 100644 index 000000000..4c2341cde --- /dev/null +++ b/src/DDD/ValueObjects/Tablespace/Owner.php @@ -0,0 +1,20 @@ +owner = trim($owner); + } + + public function __toString(): string + { + return $this->owner; + } +} diff --git a/src/Database/PhpPgAdminConnection.php b/src/Database/PhpPgAdminConnection.php index 80d140bf8..2d56b96fd 100644 --- a/src/Database/PhpPgAdminConnection.php +++ b/src/Database/PhpPgAdminConnection.php @@ -4,10 +4,10 @@ namespace PhpPgAdmin\Database; -use PhpPgAdmin\Application\DTO\{Role as DTORole, ServerSession as DTOServerSession}; +use PhpPgAdmin\Application\DTO\{Role as DTORole, ServerSession as DTOServerSession, Tablespace as DTOTablespace}; use PhpPgAdmin\Config; use PhpPgAdmin\DDD\Entities\ServerSession; -use PhpPgAdmin\DDD\ValueObjects\Role; +use PhpPgAdmin\DDD\ValueObjects\{Role, Tablespace}; use PhpPgAdmin\DDD\ValueObjects\Server\SslMode; use PhpPgAdmin\Enums\RevokeType; @@ -287,6 +287,30 @@ public function createRole( } } + public function createTablespace(Tablespace $tablespace): void + { + $escapedName = self::escapeIdentifier((string)$tablespace->Name); + $sql = "CREATE TABLESPACE \"{$escapedName}\""; + + if ((string)$tablespace->Owner !== '') { + $escapedOwner = self::escapeIdentifier((string)$tablespace->Owner); + $sql .= " OWNER \"{$escapedOwner}\""; + } + + $escapedLocation = self::escapeIdentifier((string)$tablespace->Location); + $sql .= " LOCATION '{$escapedLocation}'"; + + if ($this->exec($sql) === false) { + throw new \PDOException('Failed to execute SQL statement for creating tablespace.'); + } + + if ((string)$tablespace->Comment === '') { + return; + } + + $this->setCommentForTablespace((string)$tablespace->Name, (string)$tablespace->Comment); + } + public function dropDatabase(string $database): void { $escapedDatabase = self::escapeIdentifier($database); @@ -308,6 +332,17 @@ public function dropRole(string $rolename): void } } + public function dropTablespace(string $tablespace): void + { + $escapedTablespace = self::escapeIdentifier($tablespace); + + $statement = "DROP TABLESPACE \"{$escapedTablespace}\""; + + if ($this->exec($statement) === false) { + throw new \PDOException('Failed to execute SQL statement for dropping tablespace.'); + } + } + /** * @return array */ @@ -655,6 +690,98 @@ public function getRoles(string $excludeRolename = ''): array return $result; } + public function getTablespace(string $tablespace): ?Tablespace + { + $sql = "SELECT spcname, pg_catalog.pg_get_userbyid(spcowner) AS spcowner, + pg_catalog.pg_tablespace_location(oid) AS spclocation, + ( + SELECT description + FROM pg_catalog.pg_shdescription pd + WHERE pg_tablespace.oid=pd.objoid AND pd.classoid='pg_tablespace'::regclass + ) AS spccomment + FROM pg_catalog.pg_tablespace WHERE spcname=:tablespace"; + $sqlParams = [ + 'tablespace' => $tablespace, + ]; + + $statement = $this->prepare($sql); + + if ($statement === false) { + throw new \PDOException('Failed to prepare SQL statement for getting tablespace.'); + } + + if (!$statement->execute($sqlParams)) { + throw new \PDOException('Failed to execute SQL statement for getting tablespace.'); + } + + $row = $statement->fetch(); + + if (!is_array($row)) { + return null; + } + + return DTOTablespace::createFromDbArray($row); + } + + /** + * @return array + */ + public function getTablespaces(bool $all = false): array + { + $sql = "SELECT spcname, + pg_catalog.pg_get_userbyid(spcowner) AS spcowner, + pg_catalog.pg_tablespace_location(oid) AS spclocation, + ( + SELECT description + FROM pg_catalog.pg_shdescription pd + WHERE pg_tablespace.oid=pd.objoid AND pd.classoid='pg_tablespace'::regclass + ) AS spccomment + FROM pg_catalog.pg_tablespace"; + + if (!Config::showSystem() && !$all) { + $sql .= ' WHERE spcname NOT LIKE $$pg\_%$$'; + } + + $sql .= " ORDER BY spcname"; + + $statement = $this->prepare($sql); + + if ($statement === false) { + throw new \PDOException('Failed to prepare SQL statement for getting tablespaces.'); + } + + if (!$statement->execute()) { + throw new \PDOException('Failed to execute SQL statement for getting tablespaces.'); + } + + $result = []; + $requiredFields = [ + 'spcname', + 'spcowner', + 'spclocation', + ]; + + while ($row = $statement->fetch()) { + if (!is_array($row)) { + continue; + } + + foreach ($requiredFields as $field) { + if (!isset($row[$field])) { + continue 2; + } + } + + if (!is_string($row['spcname']) || !is_string($row['spcowner']) || !is_string($row['spclocation'])) { + continue; + } + + $result[] = DTOTablespace::createFromDbArray($row); + } + + return $result; + } + /** * @return arrayexec($sql) === false) { + throw new \PDOException('Failed to execute SQL statement for set comment.'); + } + } + public function setDatabaseComment(string $database, ?string $comment = null): void { $escapedDatabase = self::escapeIdentifier($database); @@ -827,6 +970,44 @@ public function updateRole( $this->tryAlterAdminMembers($newAdminMembers, $role->Name); } + public function updateTablespace(Tablespace $tablespace, string $oldTablespaceName): void + { + if (!$this->beginTransaction()) { + throw new \PDOException('Failed to begin transaction.'); + } + + $escapedTablespaceName = self::escapeIdentifier((string)$oldTablespaceName); + $escapedTablespaceOwner = self::escapeIdentifier((string)$tablespace->Owner); + + $statement = "ALTER TABLESPACE \"{$escapedTablespaceName}\" OWNER TO \"{$escapedTablespaceOwner}\""; + + if ($this->exec($statement) === false) { + if (!$this->rollBack()) { + throw new \PDOException('Failed to roll back transaction after altering tablespace owner.'); + } + + throw new \PDOException('Failed to execute SQL statement for altering tablespace owner.'); + } + + if ($oldTablespaceName !== (string)$tablespace->Name) { + $statement = "ALTER TABLESPACE \"{$oldTablespaceName}\" RENAME TO \"{$tablespace->Name}\""; + + if ($this->exec($statement) === false) { + if (!$this->rollBack()) { + throw new \PDOException('Failed to roll back transaction after renaming tablespace.'); + } + + throw new \PDOException('Failed to execute SQL statement for renaming tablespace.'); + } + } + + $this->setCommentForTablespace((string)$tablespace->Name, (string)$tablespace->Comment); + + if (!$this->commit()) { + throw new \PDOException('Failed to commit transaction.'); + } + } + public static function loginDataIsValid( string $host, int $port, diff --git a/src/TrailSubject.php b/src/TrailSubject.php index 15ba6dc8b..f617a11ef 100644 --- a/src/TrailSubject.php +++ b/src/TrailSubject.php @@ -8,4 +8,5 @@ enum TrailSubject: string { case Role = 'role'; case Server = 'server'; + case Tablespace = 'tablespace'; } diff --git a/src/Website/AlterTablespace.php b/src/Website/AlterTablespace.php new file mode 100644 index 000000000..f9737100a --- /dev/null +++ b/src/Website/AlterTablespace.php @@ -0,0 +1,99 @@ +handlePostRequest(); + } + } + + protected function buildHtmlBody(\DOMDocument $dom): \DOMElement + { + $body = Website::buildHtmlBody($dom); + + $body->appendChild(WebsiteComponents::buildTopBar($dom)); + $body->appendChild(WebsiteComponents::buildTrail($dom, [TrailSubject::Server, TrailSubject::Tablespace])); + + $serverId = RequestParameter::getString('server') ?? ''; + $tablespaceName = RequestParameter::getString('tablespace'); + + $h2 = $dom->createElement('h2'); + $h2->appendChild($dom->createTextNode(_('Alter'))); + $helpLink = WebsiteComponents::buildHelpLink( + dom: $dom, + url: 'help.php', + urlParams: [ + 'help' => 'pg.tablespace.alter', + 'server' => $serverId, + ], + ); + $h2->appendChild($helpLink); + $body->appendChild($h2); + + $form = $dom->createElement('form'); + $form->setAttribute('method', 'post'); + + $tablespace = null; + + if (!is_null($tablespaceName)) { + $serverSession = ServerSession::fromServerId($serverId, Config::getServers()); + $db = PhpPgAdminConnection::createFromServerSession($serverSession); + $tablespace = $db?->getTablespace($tablespaceName); + } + + $form->appendChild(self::buildCreateOrEditTablespaceTable($dom, $serverId, $tablespace)); + $form->appendChild(self::buildCreateOrEditFormParagraphButtonsTable($dom, $serverId, $tablespace)); + + $body->append($form); + + return $body; + } + + private function handlePostRequest(): void + { + $serverId = RequestParameter::getString('server') ?? ''; + $serverSession = ServerSession::fromServerId($serverId, Config::getServers()); + + $db = PhpPgAdminConnection::createFromServerSession($serverSession); + + if (is_null($db)) { + return; + } + + try { + $tablespaceName = RequestParameter::getString('tablespace') ?? ''; + $tablespaceFromForm = DTOTablespace::createFromFormRequest(); + $db->updateTablespace($tablespaceFromForm, $tablespaceName); + + if (!headers_sent()) { + $redirectUrl = 'tablespaces.php'; + $redirectUrlParams = [ + 'message' => _('Tablespace altered.'), + 'server' => $serverId, + 'subject' => 'server', + ]; + header('Location: ' . $redirectUrl . '?' . http_build_query($redirectUrlParams)); + die; + } + } catch (\PDOException $e) { + $this->message = _('Tablespace alteration failed.'); + $this->pdoException = $e; + } catch (\Throwable) { + $this->message = _('Tablespace alteration failed.'); + } + } +} diff --git a/src/Website/CreateRole.php b/src/Website/CreateRole.php index 3ceba48bd..4c4d88c93 100644 --- a/src/Website/CreateRole.php +++ b/src/Website/CreateRole.php @@ -98,6 +98,7 @@ protected static function buildCreateOrEditRoleTable( ?Role $role = null, ): \DOMElement { $table = $dom->createElement('table'); + $table->setAttribute('class', 'form-table'); $tBody = $dom->createElement('tbody'); $rolename = !is_null($role) @@ -115,10 +116,9 @@ protected static function buildCreateOrEditRoleTable( 'content' => $rolename, 'max-length' => 63, 'readonly' => !is_null($role), - 'type' => 'text', ], ]; - $trName = WebsiteComponents::buildTableRowForFormular($dom, $nameSpecs); + $trName = WebsiteComponents::buildTableRowForInputFormular($dom, $nameSpecs); $passwordSpecs = [ 'id' => Role::FORM_ID_PASSWORD, @@ -128,7 +128,7 @@ protected static function buildCreateOrEditRoleTable( 'type' => 'password', ], ]; - $trPassword = WebsiteComponents::buildTableRowForFormular($dom, $passwordSpecs); + $trPassword = WebsiteComponents::buildTableRowForInputFormular($dom, $passwordSpecs); $confirmPasswordSpecs = [ 'id' => Role::FORM_ID_PASSWORD_CONFIRMATION, @@ -138,7 +138,7 @@ protected static function buildCreateOrEditRoleTable( 'type' => 'password', ], ]; - $trConfirm = WebsiteComponents::buildTableRowForFormular($dom, $confirmPasswordSpecs); + $trConfirm = WebsiteComponents::buildTableRowForInputFormular($dom, $confirmPasswordSpecs); $isSuperuserSpecs = [ 'id' => 'formSuper', @@ -148,7 +148,7 @@ protected static function buildCreateOrEditRoleTable( 'type' => 'bool', ], ]; - $trSuperuser = WebsiteComponents::buildTableRowForFormular($dom, $isSuperuserSpecs); + $trSuperuser = WebsiteComponents::buildTableRowForCheckboxFormular($dom, $isSuperuserSpecs); $canCreateDbSpecs = [ 'id' => 'formCreateDB', @@ -158,7 +158,7 @@ protected static function buildCreateOrEditRoleTable( 'type' => 'bool', ], ]; - $trCreateDb = WebsiteComponents::buildTableRowForFormular($dom, $canCreateDbSpecs); + $trCreateDb = WebsiteComponents::buildTableRowForCheckboxFormular($dom, $canCreateDbSpecs); $canCeateRoleSpecs = [ 'id' => 'formCreateRole', @@ -168,7 +168,7 @@ protected static function buildCreateOrEditRoleTable( 'type' => 'bool', ], ]; - $trCreateRole = WebsiteComponents::buildTableRowForFormular($dom, $canCeateRoleSpecs); + $trCreateRole = WebsiteComponents::buildTableRowForCheckboxFormular($dom, $canCeateRoleSpecs); $inheritsSpecs = [ 'id' => 'formInherits', @@ -178,7 +178,7 @@ protected static function buildCreateOrEditRoleTable( 'type' => 'bool', ], ]; - $trInherits = WebsiteComponents::buildTableRowForFormular($dom, $inheritsSpecs); + $trInherits = WebsiteComponents::buildTableRowForCheckboxFormular($dom, $inheritsSpecs); $canLoginSpecs = [ 'id' => 'formCanLogin', @@ -188,7 +188,7 @@ protected static function buildCreateOrEditRoleTable( 'type' => 'bool', ], ]; - $trCanLogin = WebsiteComponents::buildTableRowForFormular($dom, $canLoginSpecs); + $trCanLogin = WebsiteComponents::buildTableRowForCheckboxFormular($dom, $canLoginSpecs); $maxConnectionsSpecs = [ 'id' => 'formConnLimit', @@ -198,7 +198,7 @@ protected static function buildCreateOrEditRoleTable( 'type' => 'number', ], ]; - $trMaxConnections = WebsiteComponents::buildTableRowForFormular($dom, $maxConnectionsSpecs); + $trMaxConnections = WebsiteComponents::buildTableRowForInputFormular($dom, $maxConnectionsSpecs); $expiresSpecs = [ 'id' => 'formExpires', @@ -208,7 +208,7 @@ protected static function buildCreateOrEditRoleTable( 'type' => 'datetime-local', ], ]; - $trExpires = WebsiteComponents::buildTableRowForFormular($dom, $expiresSpecs); + $trExpires = WebsiteComponents::buildTableRowForInputFormular($dom, $expiresSpecs); $serverSession = ServerSession::fromServerId($serverId, Config::getServers()); $db = PhpPgAdminConnection::createFromServerSession($serverSession); @@ -234,33 +234,30 @@ protected static function buildCreateOrEditRoleTable( 'label-text' => _('Member of'), 'value' => [ 'selected-values' => $currentMembersOf, - 'selection-values' => $membersSelectionValues, - 'type' => 'selection', + 'values' => $membersSelectionValues, ], ]; - $trMemberOf = WebsiteComponents::buildTableRowForFormular($dom, $memberOfSpecs); + $trMemberOf = WebsiteComponents::buildTableRowForSelectionFormular($dom, $memberOfSpecs); $membersSpecs = [ 'id' => 'members[]', 'label-text' => _('Members'), 'value' => [ 'selected-values' => $currentMembers, - 'selection-values' => $membersSelectionValues, - 'type' => 'selection', + 'values' => $membersSelectionValues, ], ]; - $trMembers = WebsiteComponents::buildTableRowForFormular($dom, $membersSpecs); + $trMembers = WebsiteComponents::buildTableRowForSelectionFormular($dom, $membersSpecs); $adminMembersSpecs = [ 'id' => 'adminmembers[]', 'label-text' => _('Admin members'), 'value' => [ 'selected-values' => $currentAdminMembers, - 'selection-values' => $membersSelectionValues, - 'type' => 'selection', + 'values' => $membersSelectionValues, ], ]; - $trAdminMembers = WebsiteComponents::buildTableRowForFormular($dom, $adminMembersSpecs); + $trAdminMembers = WebsiteComponents::buildTableRowForSelectionFormular($dom, $adminMembersSpecs); $tBody->appendChild($trName); $tBody->appendChild($trPassword); diff --git a/src/Website/CreateTablespace.php b/src/Website/CreateTablespace.php new file mode 100644 index 000000000..908b238db --- /dev/null +++ b/src/Website/CreateTablespace.php @@ -0,0 +1,237 @@ +handlePostRequest(); + } + } + + protected function buildHtmlBody(\DOMDocument $dom): \DOMElement + { + $body = parent::buildHtmlBody($dom); + + $body->appendChild(WebsiteComponents::buildTopBar($dom)); + $body->appendChild(WebsiteComponents::buildTrail($dom, [TrailSubject::Server])); + + $serverId = RequestParameter::getString('server') ?? ''; + + $h2 = $dom->createElement('h2'); + $h2->appendChild($dom->createTextNode(_('Create tablespace'))); + $helpLink = WebsiteComponents::buildHelpLink( + dom: $dom, + url: 'help.php', + urlParams: [ + 'help' => 'pg.tablespace.create', + 'server' => $serverId, + ], + ); + $h2->appendChild($helpLink); + $body->appendChild($h2); + + $form = $dom->createElement('form'); + $form->setAttribute('method', 'post'); + + $inputServer = $dom->createElement('input'); + $inputServer->setAttribute('type', 'hidden'); + $inputServer->setAttribute('name', $serverId); + + $tablespace = null; + + if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'POST') { + $tablespace = DTOTablespace::createFromFormRequest(); + } + + $form->appendChild($inputServer); + $form->appendChild(self::buildCreateOrEditTablespaceTable($dom, $serverId, $tablespace)); + $form->appendChild(self::buildCreateOrEditFormParagraphButtonsTable($dom, $serverId)); + + $body->appendChild($form); + + return $body; + } + + protected static function buildCreateOrEditFormParagraphButtonsTable( + \DOMDocument $dom, + string $serverId, + ?Tablespace $tablespace = null, + ): \DOMElement { + $p = $dom->createElement('p'); + + $inputAction = $dom->createElement('input'); + $inputAction->setAttribute('type', 'hidden'); + $inputAction->setAttribute('name', 'action'); + $inputAction->setAttribute('value', 'save_create'); + $inputServer = $dom->createElement('input'); + $inputServer->setAttribute('type', 'hidden'); + $inputServer->setAttribute('name', 'server'); + $inputServer->setAttribute('value', $serverId); + $inputSubmitCreate = $dom->createElement('input'); + $inputSubmitCreate->setAttribute('type', 'submit'); + $inputSubmitCreate->setAttribute('name', !is_null($tablespace) ? 'alter' : 'create'); + $inputSubmitCreate->setAttribute('value', !is_null($tablespace) ? _('Alter') : _('Create')); + $inputSubmitCancel = $dom->createElement('input'); + $inputSubmitCancel->setAttribute('type', 'submit'); + $inputSubmitCancel->setAttribute('name', 'cancel'); + $inputSubmitCancel->setAttribute('value', _('Cancel')); + + $p->appendChild($inputAction); + $p->appendChild($inputServer); + $p->appendChild($inputSubmitCreate); + $p->appendChild($dom->createEntityReference('nbsp')); + $p->appendChild($inputSubmitCancel); + + $tablespaceName = RequestParameter::getString('tablespace'); + + if (!is_null($tablespaceName)) { + $inputTablespace = $dom->createElement('input'); + $inputTablespace->setAttribute('type', 'hidden'); + $inputTablespace->setAttribute('name', 'tablespace'); + $inputTablespace->setAttribute('value', $tablespaceName); + $p->appendChild($inputTablespace); + } + + return $p; + } + + protected static function buildCreateOrEditTablespaceTable( + \DOMDocument $dom, + string $serverId, + ?Tablespace $tablespace = null, + ): \DOMElement { + $table = $dom->createElement('table'); + $table->setAttribute('class', 'form-table'); + $tBody = $dom->createElement('tbody'); + + $tablespaceName = ''; + $tablespaceOwner = ''; + $tablespaceLocation = ''; + $tablespaceComment = ''; + + if (!is_null($tablespace)) { + $tablespaceName = (string)$tablespace->Name; + $tablespaceOwner = (string)$tablespace->Owner; + $tablespaceLocation = (string)$tablespace->Location; + $tablespaceComment = (string)$tablespace->Comment; + } + + $nameSpecs = [ + 'id' => Tablespace::FORM_ID_NAME, + 'label-text' => _('Name'), + 'value' => [ + 'content' => $tablespaceName, + 'max-length' => 63, + 'required' => true, + ], + ]; + $trName = WebsiteComponents::buildTableRowForInputFormular($dom, $nameSpecs); + + $serverSession = ServerSession::fromServerId($serverId, Config::getServers()); + $db = PhpPgAdminConnection::createFromServerSession($serverSession); + $dbUsers = $db?->getUsers() ?? []; + $ownerSelectionValues = []; + $ownerSelectedValues = []; + + if ($tablespaceOwner === '' && !is_null($serverSession)) { + $tablespaceOwner = (string)$serverSession->Username; + } + + foreach ($dbUsers as $dbUser) { + $ownerSelectionValues[] = $dbUser['usename']; + + if ($dbUser['usename'] === $tablespaceOwner) { + $ownerSelectedValues[] = $tablespaceOwner; + } + } + + $ownerSpecs = [ + 'id' => Tablespace::FORM_ID_OWNER, + 'label-text' => _('Owner'), + 'value' => [ + 'is-multiple' => false, + 'required' => true, + 'selected-values' => $ownerSelectedValues, + 'values' => $ownerSelectionValues, + ], + ]; + $trOwner = WebsiteComponents::buildTableRowForSelectionFormular($dom, $ownerSpecs); + + $locationSpecs = [ + 'id' => Tablespace::FORM_ID_LOCATION, + 'label-text' => _('Location'), + 'value' => [ + 'content' => $tablespaceLocation, + 'readonly' => !is_null($tablespace), + 'required' => true, + ], + ]; + $trLocation = WebsiteComponents::buildTableRowForInputFormular($dom, $locationSpecs); + + $commentSpecs = [ + 'id' => Tablespace::FORM_ID_COMMENT, + 'label-text' => _('Comment'), + 'value' => [ + 'cols' => 32, + 'content' => $tablespaceComment, + 'rows' => 3, + ], + ]; + $trComment = WebsiteComponents::buildTableRowForTextareaFormular($dom, $commentSpecs); + + $tBody->appendChild($trName); + $tBody->appendChild($trOwner); + $tBody->appendChild($trLocation); + $tBody->appendChild($trComment); + $table->appendChild($tBody); + + return $table; + } + + private function handlePostRequest(): void + { + $tablespace = DTOTablespace::createFromFormRequest(); + + $serverId = RequestParameter::getString('server') ?? ''; + $serverSession = ServerSession::fromServerId($serverId, Config::getServers()); + $db = PhpPgAdminConnection::createFromServerSession($serverSession); + + if (is_null($db)) { + return; + } + + try { + $db->createTablespace(tablespace: $tablespace); + + if (!headers_sent()) { + $redirectUrl = 'tablespaces.php'; + $redirectUrlParams = [ + 'message' => _('Tablespace created.'), + 'server' => $serverId, + 'subject' => 'server', + ]; + header('Location: ' . $redirectUrl . '?' . http_build_query($redirectUrlParams)); + die; + } + } catch (\PDOException $e) { + $this->message = _('Tablespace creation failed.'); + $this->pdoException = $e; + } catch (\Throwable) { + $this->message = _('Tablespace creation failed.'); + } + } +} diff --git a/src/Website/DropTablespace.php b/src/Website/DropTablespace.php new file mode 100644 index 000000000..bd0bdaae9 --- /dev/null +++ b/src/Website/DropTablespace.php @@ -0,0 +1,115 @@ +handlePostRequest(); + } + } + + protected function buildHtmlBody(\DOMDocument $dom): \DOMElement + { + $body = parent::buildHtmlBody($dom); + + $body->appendChild(WebsiteComponents::buildTopBar($dom)); + $body->appendChild(WebsiteComponents::buildTrail($dom, [TrailSubject::Server, TrailSubject::Tablespace])); + + $tablespace = RequestParameter::getString('tablespace') ?? ''; + $serverId = RequestParameter::getString('server') ?? ''; + + $h2 = $dom->createElement('h2', _('Drop')); + $aHelp = WebsiteComponents::buildHelpLink( + dom: $dom, + url: 'help.php', + urlParams: [ + 'help' => 'pg.tablespace.drop', + 'server' => $serverId, + ], + ); + $h2->appendChild($aHelp); + $body->appendChild($h2); + + $form = $dom->createElement('form'); + $form->setAttribute('method', 'post'); + $p = $dom->createElement( + 'p', + sprintf(_('Are you sure you want to drop the tablespace "%s"?'), $tablespace), + ); + $inputHiddenTablespace = $dom->createElement('input'); + $inputHiddenTablespace->setAttribute('type', 'hidden'); + $inputHiddenTablespace->setAttribute('name', 'tablespace'); + $inputHiddenTablespace->setAttribute('value', $tablespace); + $inputHiddenServer = $dom->createElement('input'); + $inputHiddenServer->setAttribute('type', 'hidden'); + $inputHiddenServer->setAttribute('name', 'server'); + $inputHiddenServer->setAttribute('value', $serverId); + $inputSubmit = $dom->createElement('input'); + $inputSubmit->setAttribute('type', 'submit'); + $inputSubmit->setAttribute('name', 'action'); + $inputSubmit->setAttribute('value', _('Drop')); + $aButtonCancel = $dom->createElement('a', _('Cancel')); + $aButtonCancel->setAttribute('class', 'button'); + $cancelUrl = 'tablespaces.php'; + $cancelUrlParams = [ + 'server' => $serverId, + 'subject' => 'server', + ]; + $aButtonCancel->setAttribute('href', $cancelUrl . '?' . http_build_query($cancelUrlParams)); + + $form->appendChild($p); + $form->appendChild($inputHiddenTablespace); + $form->appendChild($inputHiddenServer); + $form->appendChild($inputSubmit); + $form->appendChild($dom->createEntityReference('nbsp')); + $form->appendChild($aButtonCancel); + + $body->appendChild($form); + + return $body; + } + + private function handlePostRequest(): void + { + $tablespace = RequestParameter::getString('tablespace') ?? ''; + $serverId = RequestParameter::getString('server') ?? ''; + $serverSession = ServerSession::fromServerId($serverId, Config::getServers()); + + $redirectUrl = 'tablespaces.php'; + $redirectUrlParams = [ + 'message' => _('Tablespace dropped.'), + 'server' => $serverId, + 'subject' => 'server', + ]; + + $db = PhpPgAdminConnection::createFromServerSession($serverSession); + + if (is_null($db) || empty($tablespace)) { + return; + } + + try { + $db->dropTablespace($tablespace); + $redirectUrlParams['message'] = _('Tablespace dropped.'); + } catch (\Throwable $e) { + $redirectUrlParams['message'] = _('Tablespace drop failed.') . ' - ' . $e->getMessage(); + } + + if (!headers_sent()) { + header('Location: ' . $redirectUrl . '?' . http_build_query($redirectUrlParams)); + die; + } + } +} diff --git a/src/Website/Tablespaces.php b/src/Website/Tablespaces.php new file mode 100644 index 000000000..e94fef83c --- /dev/null +++ b/src/Website/Tablespaces.php @@ -0,0 +1,162 @@ +appendChild(WebsiteComponents::buildTopBar($dom)); + $body->appendChild(WebsiteComponents::buildTrail($dom, [TrailSubject::Server])); + + $serverId = RequestParameter::getString('server') ?? ''; + + $this->appendTablespacesListPage($body, $serverId); + + return $body; + } + + private function appendTablespacesListPage(\DOMElement $body, string $serverId): void + { + $dom = $body->ownerDocument; + + if (is_null($dom)) { + return; + } + + $body->appendChild(WebsiteComponents::buildServerDatabasesTabs($dom, $serverId, 'tablespaces')); + + $serverSession = ServerSession::fromServerId($serverId, Config::getServers()); + $db = PhpPgAdminConnection::createFromServerSession($serverSession); + + $tablespaces = $db?->getTablespaces() ?? []; + + if (empty($tablespaces)) { + $p = $dom->createElement('p'); + $p->appendChild($dom->createTextNode(_('No tablespaces found.'))); + $body->appendChild($p); + } else { + $table = $dom->createElement('table'); + $table->setAttribute('style', 'width: 100%;'); + + $tHead = $dom->createElement('thead'); + $tHeadRow = $dom->createElement('tr'); + + $thName = $dom->createElement('th'); + $thName->setAttribute('class', 'data'); + $thName->appendChild($dom->createTextNode(_('Name'))); + $thOwner = $dom->createElement('th'); + $thOwner->setAttribute('class', 'data'); + $thOwner->appendChild($dom->createTextNode(_('Owner'))); + $thLocation = $dom->createElement('th'); + $thLocation->setAttribute('class', 'data'); + $thLocation->appendChild($dom->createTextNode(_('Location'))); + $thActions = $dom->createElement('th'); + $thActions->setAttribute('class', 'data'); + $thActions->setAttribute('colspan', '3'); + $thActions->appendChild($dom->createTextNode(_('Actions'))); + $thComment = $dom->createElement('th'); + $thComment->setAttribute('class', 'data'); + $thComment->appendChild($dom->createTextNode(_('Comment'))); + + $tHeadRow->appendChild($thName); + $tHeadRow->appendChild($thOwner); + $tHeadRow->appendChild($thLocation); + $tHeadRow->appendChild($thActions); + $tHeadRow->appendChild($thComment); + + $tHead->appendChild($tHeadRow); + + $tBody = $dom->createElement('tbody'); + + foreach ($tablespaces as $index => $tablespace) { + $dataClass = $index % 2 === 0 + ? 'data1' + : 'data2'; + $opButtonClass = $index % 2 === 0 + ? 'opbutton1' + : 'opbutton2'; + + $tr = $dom->createElement('tr'); + $tr->setAttribute('class', $dataClass); + + $tdName = $dom->createElement('td'); + $tdName->appendChild($dom->createTextNode((string)$tablespace->Name)); + $tdOwner = $dom->createElement('td'); + $tdOwner->appendChild($dom->createTextNode((string)$tablespace->Owner)); + $tdLocation = $dom->createElement('td'); + $tdLocation->appendChild($dom->createTextNode((string)$tablespace->Location)); + $tdButtonEdit = $dom->createElement('td'); + $tdButtonEdit->setAttribute('class', $opButtonClass); + $editLink = $dom->createElement('a'); + $editUrl = 'alter_tablespace.php'; + $editUrlParams = [ + 'server' => $serverId, + 'tablespace' => (string)$tablespace->Name, + ]; + $editLink->setAttribute('href', $editUrl . '?' . http_build_query($editUrlParams)); + $editLink->appendChild($dom->createTextNode(_('Alter'))); + $tdButtonEdit->appendChild($editLink); + $tdButtonDrop = $dom->createElement('td'); + $tdButtonDrop->setAttribute('class', $opButtonClass); + $dropLink = $dom->createElement('a'); + $dropUrl = 'drop_tablespace.php'; + $dropUrlParams = [ + 'server' => $serverId, + 'tablespace' => (string)$tablespace->Name, + ]; + $dropLink->setAttribute('href', $dropUrl . '?' . http_build_query($dropUrlParams)); + $dropLink->appendChild($dom->createTextNode(_('Drop'))); + $tdButtonDrop->appendChild($dropLink); + $tdButtonPrivileges = $dom->createElement('td'); + $tdButtonPrivileges->setAttribute('class', $opButtonClass); + $privilegesLink = $dom->createElement('a'); + $privilegesUrl = 'privileges.php'; + $privilegesUrlParams = [ + 'server' => $serverId, + 'subject' => 'tablespace', + 'tablespace' => (string)$tablespace->Name, + ]; + $privilegesLink->setAttribute('href', $privilegesUrl . '?' . http_build_query($privilegesUrlParams)); + $privilegesLink->appendChild($dom->createTextNode(_('Privileges'))); + $tdButtonPrivileges->appendChild($privilegesLink); + $tdComment = $dom->createElement('td'); + $tdComment->appendChild($dom->createTextNode((string)$tablespace->Comment)); + + $tr->appendChild($tdName); + $tr->appendChild($tdOwner); + $tr->appendChild($tdLocation); + $tr->appendChild($tdButtonEdit); + $tr->appendChild($tdButtonDrop); + $tr->appendChild($tdButtonPrivileges); + $tr->appendChild($tdComment); + $tBody->appendChild($tr); + } + + $table->appendChild($tHead); + $table->appendChild($tBody); + + $body->appendChild($table); + } + + $navLinks = [ + [ + 'label' => _('Create tablespace'), + 'url' => 'create_tablespace.php', + 'url-params' => [ + 'server' => $serverId, + ], + ], + ]; + $body->appendChild(WebsiteComponents::buildNavLinks($dom, $navLinks)); + } +} diff --git a/src/WebsiteComponents.php b/src/WebsiteComponents.php index e53183595..754897c11 100644 --- a/src/WebsiteComponents.php +++ b/src/WebsiteComponents.php @@ -461,91 +461,257 @@ public static function buildServerDatabasesTabs(\DOMDocument $dom, string $serve * 'id': string, * 'label-text': string, * 'value': array{ - * 'content'?: bool|number|string|\DateTimeInterface|null, + * 'content'?: bool|null, * 'disabled'?: bool, - * 'max-length'?: number, * 'readonly'?: bool, - * 'selected-values'?: array, - * 'selection-values'?: array, - * 'type': 'bool'|'date'|'datetime-local'|'number'|'password'|'selection'|'text', + * 'required'?: bool, + * }, + * } $specs + */ + public static function buildTableRowForCheckboxFormular(\DOMDocument $dom, array $specs): \DOMElement + { + $tr = $dom->createElement('tr'); + + $tdCol1Class = 'data left'; + + if ($specs['value']['required'] ?? false) { + $tdCol1Class .= ' required'; + } + + $tdCol1 = $dom->createElement('th'); + $tdCol1->setAttribute('class', $tdCol1Class); + $label = $dom->createElement('label'); + $label->setAttribute('for', $specs['id']); + $label->appendChild($dom->createTextNode($specs['label-text'])); + $tdCol1->appendChild($label); + $tdCol2 = $dom->createElement('td'); + $tdCol2->setAttribute('class', 'data1'); + + $input = $dom->createElement('input'); + $input->setAttribute('type', 'checkbox'); + $input->setAttribute('id', $specs['id']); + $input->setAttribute('name', $specs['id']); + + if (isset($specs['value']['disabled']) && $specs['value']['disabled']) { + $input->setAttribute('disabled', 'disabled'); + } + + if (isset($specs['value']['readonly']) && $specs['value']['readonly']) { + $input->setAttribute('readonly', 'readonly'); + } + + if (isset($specs['value']['content']) && $specs['value']['content']) { + $input->setAttribute('checked', 'checked'); + } + + $tdCol2->appendChild($input); + + $tr->appendChild($tdCol1); + $tr->appendChild($tdCol2); + + return $tr; + } + + /** + * @param array{ + * 'id': string, + * 'label-text': string, + * 'value': array{ + * 'content'?: int|float|string|\DateTimeInterface|null, + * 'disabled'?: bool, + * 'max-length'?: int, + * 'readonly'?: bool, + * 'required'?: bool, + * 'type'?: 'date'|'datetime-local'|'number'|'password'|'text', * }, * } $specs */ - public static function buildTableRowForFormular(\DOMDocument $dom, array $specs): \DOMElement + public static function buildTableRowForInputFormular(\DOMDocument $dom, array $specs): \DOMElement { $tr = $dom->createElement('tr'); + + $tdCol1Class = 'data left'; + + if ($specs['value']['required'] ?? false) { + $tdCol1Class .= ' required'; + } + $tdCol1 = $dom->createElement('th'); - $tdCol1->setAttribute('class', 'data left'); + $tdCol1->setAttribute('class', $tdCol1Class); $label = $dom->createElement('label'); $label->setAttribute('for', $specs['id']); $label->appendChild($dom->createTextNode($specs['label-text'])); $tdCol1->appendChild($label); $tdCol2 = $dom->createElement('td'); $tdCol2->setAttribute('class', 'data1'); - $valueType = match ($specs['value']['type']) { - 'bool' => 'checkbox', - default => $specs['value']['type'], - }; - - if ($valueType !== 'selection') { - $input = $dom->createElement('input'); - $input->setAttribute('type', $valueType); - $input->setAttribute('id', $specs['id']); - $input->setAttribute('name', $specs['id']); - - if (isset($specs['value']['disabled']) && $specs['value']['disabled']) { - $input->setAttribute('disabled', 'disabled'); + $valueType = $specs['value']['type'] ?? 'text'; + + $input = $dom->createElement('input'); + $input->setAttribute('type', $valueType); + $input->setAttribute('id', $specs['id']); + $input->setAttribute('name', $specs['id']); + + if (isset($specs['value']['max-length'])) { + $input->setAttribute('maxlength', (string)$specs['value']['max-length']); + } + + if (isset($specs['value']['disabled']) && $specs['value']['disabled']) { + $input->setAttribute('disabled', 'disabled'); + } + + if (isset($specs['value']['readonly']) && $specs['value']['readonly']) { + $input->setAttribute('readonly', 'readonly'); + } + + if (isset($specs['value']['content'])) { + if ($valueType === 'date' && $specs['value']['content'] instanceof \DateTimeInterface) { + $input->setAttribute('value', $specs['value']['content']->format('Y-m-d')); + } elseif ($valueType === 'datetime-local' && $specs['value']['content'] instanceof \DateTimeInterface) { + $input->setAttribute('value', $specs['value']['content']->format('Y-m-d\TH:i')); + } elseif ($valueType === 'number' && is_numeric($specs['value']['content'])) { + $input->setAttribute('value', (string)$specs['value']['content']); + } elseif (is_string($specs['value']['content'])) { + $input->setAttribute('value', $specs['value']['content']); } + } + + $tdCol2->appendChild($input); + + $tr->appendChild($tdCol1); + $tr->appendChild($tdCol2); + + return $tr; + } - if (isset($specs['value']['readonly']) && $specs['value']['readonly']) { - $input->setAttribute('readonly', 'readonly'); + /** + * @param array{ + * 'id': string, + * 'label-text': string, + * 'value': array{ + * 'disabled'?: bool, + * 'is-multiple'?: bool, + * 'readonly'?: bool, + * 'required'?: bool, + * 'selected-values'?: array, + * 'values'?: array, + * }, + * } $specs + */ + public static function buildTableRowForSelectionFormular(\DOMDocument $dom, array $specs): \DOMElement + { + $tr = $dom->createElement('tr'); + + $tdCol1Class = 'data left'; + + if ($specs['value']['required'] ?? false) { + $tdCol1Class .= ' required'; + } + + $tdCol1 = $dom->createElement('th'); + $tdCol1->setAttribute('class', $tdCol1Class); + $label = $dom->createElement('label'); + $label->setAttribute('for', $specs['id']); + $label->appendChild($dom->createTextNode($specs['label-text'])); + $tdCol1->appendChild($label); + $tdCol2 = $dom->createElement('td'); + $tdCol2->setAttribute('class', 'data1'); + + $selectionIsMultiple = $specs['value']['is-multiple'] ?? true; + $select = $dom->createElement('select'); + $select->setAttribute('id', $specs['id']); + $select->setAttribute('name', $specs['id']); + + if ($selectionIsMultiple) { + $select->setAttribute('multiple', 'multiple'); + } + + if (isset($specs['value']['values'])) { + $selectedValues = $specs['value']['selected-values'] ?? []; + + if ($selectionIsMultiple) { + $select->setAttribute('size', (string)min(10, count($specs['value']['values']))); } - if (isset($specs['value']['content'])) { - if ($valueType === 'checkbox' && is_bool($specs['value']['content']) && $specs['value']['content']) { - $input->setAttribute('checked', 'checked'); - } elseif ($valueType === 'date' && $specs['value']['content'] instanceof \DateTimeInterface) { - $input->setAttribute('value', $specs['value']['content']->format('Y-m-d')); - } elseif ($valueType === 'datetime-local' && $specs['value']['content'] instanceof \DateTimeInterface) { - $input->setAttribute('value', $specs['value']['content']->format('Y-m-d\TH:i')); - } elseif ($valueType === 'number' && is_numeric($specs['value']['content'])) { - $input->setAttribute('value', (string)$specs['value']['content']); - } elseif ( - ($valueType === 'text' || $valueType === 'password') && - is_string($specs['value']['content']) - ) { - $input->setAttribute('value', $specs['value']['content']); + foreach ($specs['value']['values'] as $selectionValue) { + $option = $dom->createElement('option'); + $option->setAttribute('value', $selectionValue); + + if (in_array($selectionValue, $selectedValues, true)) { + $option->setAttribute('selected', 'selected'); } + + $option->appendChild($dom->createTextNode($selectionValue)); + $select->appendChild($option); } + } - $tdCol2->appendChild($input); - } else { - $select = $dom->createElement('select'); - $select->setAttribute('id', $specs['id']); - $select->setAttribute('name', $specs['id']); - $select->setAttribute('multiple', 'multiple'); + $tdCol2->appendChild($select); - if (isset($specs['value']['selection-values'])) { - $selectedValues = $specs['value']['selected-values'] ?? []; + $tr->appendChild($tdCol1); + $tr->appendChild($tdCol2); - $select->setAttribute('size', (string)min(10, count($specs['value']['selection-values']))); + return $tr; + } - foreach ($specs['value']['selection-values'] as $selectionValue) { - $option = $dom->createElement('option'); - $option->setAttribute('value', $selectionValue); + /** + * @param array{ + * 'id': string, + * 'label-text': string, + * 'value': array{ + * 'cols'?: int, + * 'content'?: string|null, + * 'disabled'?: bool, + * 'readonly'?: bool, + * 'required'?: bool, + * 'rows'?: int, + * }, + * } $specs + */ + public static function buildTableRowForTextareaFormular(\DOMDocument $dom, array $specs): \DOMElement + { + $tr = $dom->createElement('tr'); - if (in_array($selectionValue, $selectedValues, true)) { - $option->setAttribute('selected', 'selected'); - } + $tdCol1Class = 'data left'; - $option->appendChild($dom->createTextNode($selectionValue)); - $select->appendChild($option); - } - } + if ($specs['value']['required'] ?? false) { + $tdCol1Class .= ' required'; + } + + $tdCol1 = $dom->createElement('th'); + $tdCol1->setAttribute('class', $tdCol1Class); + $label = $dom->createElement('label'); + $label->setAttribute('for', $specs['id']); + $label->appendChild($dom->createTextNode($specs['label-text'])); + $tdCol1->appendChild($label); + $tdCol2 = $dom->createElement('td'); + $tdCol2->setAttribute('class', 'data1'); + + $textarea = $dom->createElement('textarea'); + $textarea->setAttribute('id', $specs['id']); + $textarea->setAttribute('name', $specs['id']); + + if (isset($specs['value']['disabled']) && $specs['value']['disabled']) { + $textarea->setAttribute('disabled', 'disabled'); + } + + if (isset($specs['value']['readonly']) && $specs['value']['readonly']) { + $textarea->setAttribute('readonly', 'readonly'); + } + + if (isset($specs['value']['cols'])) { + $textarea->setAttribute('cols', (string)$specs['value']['cols']); + } + + if (isset($specs['value']['rows'])) { + $textarea->setAttribute('rows', (string)$specs['value']['rows']); + } - $tdCol2->appendChild($select); + if (isset($specs['value']['content'])) { + $textarea->appendChild($dom->createTextNode($specs['value']['content'])); } + $tdCol2->appendChild($textarea); + $tr->appendChild($tdCol1); $tr->appendChild($tdCol2); @@ -650,8 +816,8 @@ public static function buildTrail(\DOMDocument $dom, array $subjects = []): \DOM foreach ($subjects as $subject) { $subTrail = match ($subject) { - TrailSubject::Role => TrailBuilder::buildTrailFor(TrailSubject::Role, $dom), TrailSubject::Server => self::buildTrailForServer($dom), + default => TrailBuilder::buildTrailFor($subject, $dom), }; $trTrail->appendChild($subTrail); diff --git a/src/WebsiteComponents/TrailBuilder.php b/src/WebsiteComponents/TrailBuilder.php index 6b2b40171..3a28c140f 100644 --- a/src/WebsiteComponents/TrailBuilder.php +++ b/src/WebsiteComponents/TrailBuilder.php @@ -20,6 +20,7 @@ public static function buildTrailFor(TrailSubject $subject, \DOMDocument $dom): $iconUrl = match ($subject) { TrailSubject::Role => Config::getIcon('Roles'), TrailSubject::Server => Config::getIcon('Servers'), + TrailSubject::Tablespace => Config::getIcon('Tablespaces'), }; $spanIcon = $dom->createElement('span'); @@ -48,6 +49,7 @@ private static function buildHelpLinkFor(TrailSubject $subject, \DOMDocument $do $helpUrlParam = match ($subject) { TrailSubject::Role => 'pg.role', TrailSubject::Server => 'pg.server', + TrailSubject::Tablespace => 'pg.tablespace', }; return WebsiteComponents::buildHelpLink( @@ -71,6 +73,8 @@ private static function buildLabelTextFor(TrailSubject $subject): string } } elseif ($subject === TrailSubject::Role) { return RequestParameter::getString('rolename') ?? ''; + } elseif ($subject === TrailSubject::Tablespace) { + return RequestParameter::getString('tablespace') ?? ''; } return ''; @@ -79,7 +83,12 @@ private static function buildLabelTextFor(TrailSubject $subject): string private static function buildLinkFor(TrailSubject $subject, \DOMDocument $dom): \DOMElement { $a = $dom->createElement('a'); - $a->setAttribute('href', self::buildUrlFor($subject)); + $url = self::buildUrlFor($subject); + + if (!is_null($url)) { + $a->setAttribute('href', $url); + } + $a->setAttribute('title', self::buildLinkTitleFor($subject)); return $a; @@ -90,16 +99,18 @@ private static function buildLinkTitleFor(TrailSubject $subject): string return match ($subject) { TrailSubject::Role => _('Role'), TrailSubject::Server => _('Server'), + TrailSubject::Tablespace => _('Tablespace'), }; } - private static function buildUrlFor(TrailSubject $subject): string + private static function buildUrlFor(TrailSubject $subject): ?string { $serverId = RequestParameter::getString('server') ?? ''; $script = match ($subject) { TrailSubject::Role => 'roles.php', TrailSubject::Server => 'all_db.php', + TrailSubject::Tablespace => 'tablespaces.php', }; $scriptParams = match ($subject) { TrailSubject::Role => [ @@ -110,8 +121,16 @@ private static function buildUrlFor(TrailSubject $subject): string TrailSubject::Server => [ 'server' => $serverId, ], + TrailSubject::Tablespace => [ + 'server' => $serverId, + 'tablespace' => RequestParameter::getString('tablespace') ?? '', + ], }; + if ($subject === TrailSubject::Tablespace) { + return null; + } + return $script . '?' . http_build_query($scriptParams); } } diff --git a/tablespaces.php b/tablespaces.php index 21f755eb2..f538dc5fc 100644 --- a/tablespaces.php +++ b/tablespaces.php @@ -1,356 +1,10 @@ printTrail('tablespace'); - $misc->printTitle($lang['stralter'], 'pg.tablespace.alter'); - $misc->printMsg($msg); - - // Fetch tablespace info - $tablespace = $data->getTablespace($_REQUEST['tablespace']); - // Fetch all users - $users = $data->getUsers(); - - if ($tablespace->recordCount() > 0) { - if (!isset($_POST['name'])) { - $_POST['name'] = $tablespace->fields['spcname']; - } - if (!isset($_POST['owner'])) { - $_POST['owner'] = $tablespace->fields['spcowner']; - } - if (!isset($_POST['comment'])) { - $_POST['comment'] = ($data->hasSharedComments()) ? $tablespace->fields['spccomment'] : ''; - } - - echo "
\n"; - echo $misc->form; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - if ($data->hasSharedComments()) { - echo "\n"; - echo "\n"; - } - echo "
{$lang['strname']}"; - echo "maxNameLen}\" value=\"", - htmlspecialchars($_POST['name']), "\" />
{$lang['strowner']}
{$lang['strcomment']}"; - echo "
\n"; - echo "

\n"; - echo "\n"; - echo "\n"; - echo "

\n"; - echo "
\n"; - } else { - echo "

{$lang['strnodata']}

\n"; - } -} - - /** - * Function to save after altering a tablespace - */ -function doSaveAlter() -{ - global $data, $lang; - - // Check data - if (trim($_POST['name']) == '') { - doAlter($lang['strtablespaceneedsname']); - } else { - $status = $data->alterTablespace($_POST['tablespace'], $_POST['name'], $_POST['owner'], $_POST['comment']); - if ($status == 0) { - // If tablespace has been renamed, need to change to the new name - if ($_POST['tablespace'] != $_POST['name']) { - // Jump them to the new table name - $_REQUEST['tablespace'] = $_POST['name']; - } - doDefault($lang['strtablespacealtered']); - } else { - doAlter($lang['strtablespacealteredbad']); - } - } -} - - /** - * Show confirmation of drop and perform actual drop - */ -function doDrop($confirm) -{ - global $data, $misc; - global $lang; - - if ($confirm) { - $misc->printTrail('tablespace'); - $misc->printTitle($lang['strdrop'], 'pg.tablespace.drop'); - - echo "

", sprintf($lang['strconfdroptablespace'], $misc->printVal($_REQUEST['tablespace'])), "

\n"; - - echo "
\n"; - echo $misc->form; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - } else { - $status = $data->droptablespace($_REQUEST['tablespace']); - if ($status == 0) { - doDefault($lang['strtablespacedropped']); - } else { - doDefault($lang['strtablespacedroppedbad']); - } - } -} - - /** - * Displays a screen where they can enter a new tablespace - */ -function doCreate($msg = '') -{ - global $data, $misc, $spcname; - global $lang; - - $server_info = $misc->getServerInfo(); - - if (!isset($_POST['formSpcname'])) { - $_POST['formSpcname'] = ''; - } - if (!isset($_POST['formOwner'])) { - $_POST['formOwner'] = $server_info['username']; - } - if (!isset($_POST['formLoc'])) { - $_POST['formLoc'] = ''; - } - if (!isset($_POST['formComment'])) { - $_POST['formComment'] = ''; - } - - // Fetch all users - $users = $data->getUsers(); - - $misc->printTrail('server'); - $misc->printTitle($lang['strcreatetablespace'], 'pg.tablespace.create'); - $misc->printMsg($msg); - - echo "
\n"; - echo $misc->form; - echo "\n"; - echo "\t\n\t\t\n"; - echo "\t\t\n\t\n"; - echo "\t\n\t\t\n"; - echo "\t\t\n\t\n"; - echo "\t\n\t\t\n"; - echo "\t\t\n\t\n"; - // Comments (if available) - if ($data->hasSharedComments()) { - echo "\t\n\t\t\n"; - echo "\t\t\n\t\n"; - } - echo "
{$lang['strname']}maxNameLen}\" value=\"", htmlspecialchars($_POST['formSpcname']), "\" />
{$lang['strowner']}
{$lang['strlocation']}
{$lang['strcomment']}
\n"; - echo "

\n"; - echo "\n"; - echo "

\n"; - echo "
\n"; -} - - /** - * Actually creates the new tablespace in the cluster - */ -function doSaveCreate() -{ - global $data; - global $lang; - - // Check data - if (trim($_POST['formSpcname']) == '') { - doCreate($lang['strtablespaceneedsname']); - } elseif (trim($_POST['formLoc']) == '') { - doCreate($lang['strtablespaceneedsloc']); - } else { - // Default comment to blank if it isn't set - if (!isset($_POST['formComment'])) { - $_POST['formComment'] = null; - } - - $status = $data->createTablespace($_POST['formSpcname'], $_POST['formOwner'], $_POST['formLoc'], $_POST['formComment']); - if ($status == 0) { - doDefault($lang['strtablespacecreated']); - } else { - doCreate($lang['strtablespacecreatedbad']); - } - } -} - - /** - * Show default list of tablespaces in the cluster - */ -function doDefault($msg = '') -{ - global $data, $misc; - global $lang; - - $misc->printTrail('server'); - $misc->printTabs('server', 'tablespaces'); - $misc->printMsg($msg); - - $tablespaces = $data->getTablespaces(); - - $columns = array( - 'database' => array( - 'title' => $lang['strname'], - 'field' => field('spcname') - ), - 'owner' => array( - 'title' => $lang['strowner'], - 'field' => field('spcowner') - ), - 'location' => array( - 'title' => $lang['strlocation'], - 'field' => field('spclocation') - ), - 'actions' => array( - 'title' => $lang['stractions'] - ) - ); - - if ($data->hasSharedComments()) { - $columns['comment'] = array( - 'title' => $lang['strcomment'], - 'field' => field('spccomment'), - ); - } - - - - $actions = array( - 'alter' => array( - 'content' => $lang['stralter'], - 'attr' => array ( - 'href' => array ( - 'url' => 'tablespaces.php', - 'urlvars' => array ( - 'action' => 'edit', - 'tablespace' => field('spcname') - ) - ) - ) - ), - 'drop' => array( - 'content' => $lang['strdrop'], - 'attr' => array ( - 'href' => array ( - 'url' => 'tablespaces.php', - 'urlvars' => array ( - 'action' => 'confirm_drop', - 'tablespace' => field('spcname') - ) - ) - ) - ), - 'privileges' => array( - 'content' => $lang['strprivileges'], - 'attr' => array ( - 'href' => array ( - 'url' => 'privileges.php', - 'urlvars' => array ( - 'subject' => 'tablespace', - 'tablespace' => field('spcname') - ) - ) - ) - ) - ); - - $misc->printTable($tablespaces, $columns, $actions, 'tablespaces-tablespaces', $lang['strnotablespaces']); - - $misc->printNavLinks(array ('create' => array ( - 'attr' => array ( - 'href' => array ( - 'url' => 'tablespaces.php', - 'urlvars' => array ( - 'action' => 'create', - 'server' => $_REQUEST['server'] - ) - ) - ), - 'content' => $lang['strcreatetablespace'] - )), 'tablespaces-tablespaces', get_defined_vars()); -} - - $misc->printHeader($lang['strtablespaces']); - $misc->printBody(); - -switch ($action) { - case 'save_create': - if (isset($_REQUEST['cancel'])) { - doDefault(); - } else { - doSaveCreate(); - } - break; - case 'create': - doCreate(); - break; - case 'drop': - if (isset($_REQUEST['cancel'])) { - doDefault(); - } else { - doDrop(false); - } - break; - case 'confirm_drop': - doDrop(true); - break; - case 'save_edit': - if (isset($_REQUEST['cancel'])) { - doDefault(); - } else { - doSaveAlter(); - } - break; - case 'edit': - doAlter(); - break; - default: - doDefault(); - break; -} - - $misc->printFooter(); +$website = new Tablespaces(); +echo $website->buildHtmlString(); diff --git a/themes/default/global.css b/themes/default/global.css index 18ea15d93..b4cf9f6dd 100644 --- a/themes/default/global.css +++ b/themes/default/global.css @@ -41,6 +41,15 @@ h3 { font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; font-weight: bold; } + +input[type=text], input[type=password], input[type=number], input[type=datetime-local], textarea, select { + box-sizing: border-box; +} + +table.form-table input, table.form-table select, table.form-table textarea { + width: 100%; +} + table.error {background-color: #E6E6CC} table.error td {background-color: #E6E6CC} table.navbar {background-color: #E6E6CC}