Skip to content

Commit

Permalink
SqlSource display field
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioannis committed Sep 16, 2025
1 parent 4972cbd commit 3050872
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
msgid "controller.SqlProvisioners"
msgstr "{0,plural,=1{SQL Provisioner} other{SQL Provisioners}}"

msgid "display.SqlSource"
msgstr "{0} Source"

msgid "enumeration.SqlSourceTableModeEnum.FL"
msgstr "Flat"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class SqlSourcesTable extends Table {
use \App\Lib\Traits\LabeledLogTrait;
use \App\Lib\Traits\PermissionsTrait;
use \App\Lib\Traits\PrimaryLinkTrait;
use \App\Lib\Traits\QueryModificationTrait;
use \App\Lib\Traits\TabTrait;
use \App\Lib\Traits\TableMetaTrait;
use \App\Lib\Traits\ValidationTrait;
Expand Down Expand Up @@ -106,6 +107,16 @@ public function initialize(array $config): void {

$this->setPrimaryLink(['external_identity_source_id']);
$this->setRequiresCO(true);

$this->setEditContains([
'Servers' => ['SqlServers'],
'ExternalIdentitySources',
]);

$this->setViewContains([
'Servers' => ['SqlServers'],
'ExternalIdentitySources',
]);

$this->setAutoViewVars([
'addressTypes' => [
Expand Down Expand Up @@ -230,6 +241,18 @@ protected function getChanges(
return false;
}

/**
* Table specific logic to generate a display field.
*
* @since COmanage Registry v5.2.0
* @param \SqlConnector\Model\Entity\SqlSource $entity Entity to generate display field for
* @return string Display field
*/
public function generateDisplayField(\SqlConnector\Model\Entity\SqlSource $entity): string {
return __d('sql_connector', 'display.SqlSource', [$entity->external_identity_source->description]);
}


/**
* Obtain the set of changed records from the source database.
*
Expand Down

0 comments on commit 3050872

Please sign in to comment.