mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
feat(kubectl-shell): page state refreshes in k8s endpoint do not close shell EE-1628 (#5685)
* converting all kubernetes view reload to partial state heirarchy refresh * updated helm and kube kustom templates headers to use the reusable k8s page header component
This commit is contained in:
parent
d4f581a596
commit
7d40a83d03
20 changed files with 34 additions and 38 deletions
|
@ -21,7 +21,7 @@ export default class HelmAddRepositoryController {
|
|||
try {
|
||||
await this.HelmService.addHelmRepository(this.EndpointProvider.currentEndpoint().Id, { url: this.state.repository });
|
||||
this.Notifications.success('Helm repository added successfully');
|
||||
this.$state.reload();
|
||||
this.$state.reload(this.$state.current);
|
||||
} catch (err) {
|
||||
this.Notifications.error('Installation error', err);
|
||||
} finally {
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
<rd-header id="view-top">
|
||||
<rd-header-title title-text="Helm">
|
||||
<a data-toggle="tooltip" title="Refresh" ui-sref="kubernetes.templates.helm" ui-sref-opts="{reload: true}">
|
||||
<i class="fa fa-sync" aria-hidden="true"></i>
|
||||
</a>
|
||||
</rd-header-title>
|
||||
<rd-header-content>Charts</rd-header-content>
|
||||
</rd-header>
|
||||
<kubernetes-view-header title="Helm" state="kubernetes.templates.helm" view-ready="true">
|
||||
Charts
|
||||
</kubernetes-view-header>
|
||||
|
||||
<information-panel title-text="Information" ng-if="!$ctrl.state.chart">
|
||||
<span class="small text-muted">
|
||||
|
|
|
@ -10,6 +10,12 @@ export default class KubectlShellController {
|
|||
this.EndpointProvider = EndpointProvider;
|
||||
this.LocalStorage = LocalStorage;
|
||||
this.Notifications = Notifications;
|
||||
|
||||
$window.onbeforeunload = () => {
|
||||
if (this.state.shell.connected) {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<rd-header ng-if="$ctrl.viewReady">
|
||||
<rd-header-title title-text="{{ $ctrl.title }}">
|
||||
<a data-toggle="tooltip" title="refresh the view" ui-sref="{{ $ctrl.state }}" ui-sref-opts="{reload: true}" ng-if="$ctrl.viewReady">
|
||||
<a data-toggle="tooltip" title="refresh the view" ui-sref="{{ $ctrl.state }}" ui-sref-opts="{reload: $ctrl.state}" ng-if="$ctrl.viewReady">
|
||||
<i class="fa fa-sm fa-sync" aria-hidden="true" data-cy="component-refreshTableButton"></i>
|
||||
</a>
|
||||
</rd-header-title>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue