mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
feat(app): add ingress to app service form [EE-5569] (#9106)
This commit is contained in:
parent
8c16fbb8aa
commit
89c1d0e337
47 changed files with 1929 additions and 1181 deletions
|
@ -9,3 +9,14 @@
|
|||
.datatable-wide {
|
||||
width: 55px;
|
||||
}
|
||||
|
||||
.published-url-container {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 3fr;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.publish-url-link {
|
||||
width: min-content;
|
||||
}
|
||||
|
|
|
@ -328,7 +328,19 @@
|
|||
</kubernetes-applications-datatable>
|
||||
</span>
|
||||
<span ng-if="!item.KubernetesApplications">
|
||||
<kubernetes-applications-datatable-url ng-if="$ctrl.getPublishedUrl(item)" published-url="{{ $ctrl.getPublishedUrl(item) }}"></kubernetes-applications-datatable-url>
|
||||
<div class="published-url-container">
|
||||
<div>
|
||||
<div class="text-muted"> Published URL(s) </div>
|
||||
</div>
|
||||
<div>
|
||||
<div ng-repeat="url in $ctrl.getPublishedUrls(item)">
|
||||
<a ng-href="{{ url }}" target="_blank" class="publish-url-link vertical-center">
|
||||
<pr-icon icon="'external-link'"></pr-icon>
|
||||
{{ url }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<kubernetes-applications-datatable-details
|
||||
ng-if="$ctrl.hasConfigurationSecrets(item)"
|
||||
configurations="item.Configurations"
|
||||
|
|
|
@ -50,7 +50,7 @@ angular.module('portainer.docker').controller('KubernetesApplicationsDatatableCo
|
|||
};
|
||||
|
||||
this.isExpandable = function (item) {
|
||||
return item.KubernetesApplications || this.hasConfigurationSecrets(item) || !!this.getPublishedUrl(item).length;
|
||||
return item.KubernetesApplications || this.hasConfigurationSecrets(item) || !!this.getPublishedUrls(item).length;
|
||||
};
|
||||
|
||||
this.expandItem = function (item, expanded) {
|
||||
|
@ -100,7 +100,7 @@ angular.module('portainer.docker').controller('KubernetesApplicationsDatatableCo
|
|||
return !ctrl.isSystemNamespace(item) || ctrl.settings.showSystem;
|
||||
};
|
||||
|
||||
this.getPublishedUrl = function (item) {
|
||||
this.getPublishedUrls = function (item) {
|
||||
// Map all ingress rules in published ports to their respective URLs
|
||||
const ingressUrls = item.PublishedPorts.flatMap((pp) => pp.IngressRules)
|
||||
.filter(({ Host, IP }) => Host || IP)
|
||||
|
@ -119,7 +119,7 @@ angular.module('portainer.docker').controller('KubernetesApplicationsDatatableCo
|
|||
const publishedUrls = [...ingressUrls, ...loadBalancerURLs];
|
||||
|
||||
// Return the first URL - priority given to ingress urls, then services (load balancers)
|
||||
return publishedUrls.length > 0 ? publishedUrls[0] : '';
|
||||
return publishedUrls.length > 0 ? publishedUrls : '';
|
||||
};
|
||||
|
||||
this.hasConfigurationSecrets = function (item) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue