diff --git a/src/Form/Database.php b/src/Form/Database.php index 92dfdd4..fbff688 100644 --- a/src/Form/Database.php +++ b/src/Form/Database.php @@ -34,29 +34,13 @@ class Database implements FormInterface continue; } - $tableEntity = $adapter->schemaTable($databaseName, $tableName); + $tableEntity = $adapter->schemaTable($databaseName, $tableName); if ( $tableEntity ) { - #$fields = $entiy::resolveEntity()->fieldList(); - - foreach($tableEntity->columns as $col) { - //dump( $entity::field($col->name) ); -#======= -# $table = Table::repository() -# ->where(Table::field('name'), $table->tableName()) -# ->where(Table::field('schema'), $table->databaseName()) -# ->loadOne(); - -# if ( $table ) { -# $fields = $entity::resolveEntity()->fieldList(EntityResolver::KEY_COLUMN_NAME, true); - -# $alter = []; - -# foreach($fields as $field => $definition) { -# if ( $table->columns->filtersCollection(fn($e) => $e->name === $field)->count() === 0 ) { -# $alter[$field] = $definition; -# } -#>>>>>>> 7194a33bec884d745e838c8ac2693b353e95a3ce + foreach($tableEntity->columns as $field => $definition) { + # if ( $table->columns->filtersCollection(fn($e) => $e->name === $field)->count() === 0 ) { + # $alter[$field] = $definition; + #} } $alter =false; diff --git a/src/Lib/ConsoleControllerTrait.php b/src/Lib/ConsoleControllerTrait.php index bd748e5..e5c1c9f 100644 --- a/src/Lib/ConsoleControllerTrait.php +++ b/src/Lib/ConsoleControllerTrait.php @@ -13,6 +13,7 @@ use Picea; * @RouteParam("methods" => [ 'GET', 'POST', 'DELETE' ], "base" => "/~") * @Security('locked' => false) * @Taxus("dev") + * #Taxus("admin") */ trait ConsoleControllerTrait { diff --git a/view/lean-console/page/storage/database.phtml b/view/lean-console/page/storage/database.phtml index 596ad87..3d8ddcd 100644 --- a/view/lean-console/page/storage/database.phtml +++ b/view/lean-console/page/storage/database.phtml @@ -10,29 +10,29 @@ {% section "content" %}
-
-

{% _ 'database.header' %}

-
+ {% if $connections %} + {% foreach $connections as $connection %} + {% php $conf = $connection->getConfiguration(); %} -
- {% if $connections %} - -
{% _ 'database.connection' %}
-
{% _ 'database.adapter' %}
-
{% _ 'database.host' %}
-
{% _ 'database.name' %}
-
{% _ 'database.username' %}
-
+
+

{{ $connection->name }}

+
- {% foreach $connections as $connection %} - {% php $conf = $connection->getConfiguration(); %} +
+ +
{% _ 'database.connection' %}
+
{% _ 'database.adapter' %}
+
{% _ 'database.host' %}
+
{% _ 'database.name' %}
+
{% _ 'database.username' %}
+
-
{{ $connection->name }}
-
{{ $conf['adapter'] ?? null }}
-
{{ $conf['host'] ?? null }}:{{ $conf['port'] ?? null }}
-
{{ $conf['database'] ?? null }}
-
{{ $conf['username'] ?? null }}
+
+
{{ $conf['adapter'] ?? '-' }}
+
{{ $conf['host'] ?? '-' }}:{{ $conf['port'] ?? '-' }}
+
{{ $conf['database'] ?? '-' }}
+
{{ $conf['username'] ?? '-' }}
@@ -85,10 +85,9 @@ {% endif %} {% ui.endform %}
- - {% endforeach %} - {% endif %} -
+
+ {% endforeach %} + {% endif %}