Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/Docs-20260106-135315.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Docs
body: Add external table configuration details to source table_details
time: 2026-01-06T13:53:15.813385-05:00
custom:
Author: portalhacker
Issue: "572"
10 changes: 10 additions & 0 deletions src/app/components/table_details/table_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ <h6>Details</h6>
</dl>
</div>
</div>
<div class="detail-group" ng-if="hasData(external)">
<div class="detail-body">
<dl class="detail"
ng-repeat="item in external">
<dt class="detail-label">{{ item.name }}</dt>
<dd class="detail-value" ng-if="!item.isUrl">{{ item.value }}</dd>
<dd class="detail-value" ng-if="item.isUrl"><a ng-href="{{ item.value }}" target="_blank">{{ item.value }}</a></dd>
</dl>
</div>
</div>
</div>
</div>
</div>
Expand Down
46 changes: 46 additions & 0 deletions src/app/components/table_details/table_details.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ angular

scope.details = [];
scope.extended = [];
scope.external = [];
scope.exclude = scope.exclude || [];
scope.meta = null;
scope._show_expanded = false;
Expand Down Expand Up @@ -181,6 +182,50 @@ angular
return mapped;
}

function getExternalTablesInfo(external) {
if (!external || _.isEmpty(external)) {
return [];
}

var result = [];
_.each(external, function(value, key) {
if (value === null || value === undefined) {
return;
}

if (key === 'options' && typeof value === 'object') {
// Expand options into separate rows
_.each(value, function(optValue, optKey) {
if (optValue !== null && optValue !== undefined) {
result.push({
name: 'Option: ' + optKey,
value: String(optValue),
isUrl: false
});
}
});
} else if (typeof value === 'object') {
// For other objects, stringify them
var stringValue = JSON.stringify(value);
if (stringValue !== '{}' && stringValue !== '[]') {
result.push({
name: key,
value: stringValue,
isUrl: false
});
}
} else {
result.push({
name: key,
value: String(value),
isUrl: key === 'location' && typeof value === 'string' && value.match(/^https?:\/\//)
});
}
});

return result;
}

scope.$watch("model", function(nv, ov) {
var get_type = _.property(['metadata', 'type'])
var rel_type = get_type(nv);
Expand All @@ -190,6 +235,7 @@ angular

scope.details = getBaseStats(nv);
scope.extended = getExtendedStats(nv.stats);
scope.external = getExternalTablesInfo(nv.external);

if (scope.extras) {
var extrasToAdd = _.filter(scope.extras, function(extra) {
Expand Down