mirror of https://github.com/portainer/portainer
feat(edge-stacks): add refresh to edit stack page (#3835)
parent
42e7db0ae7
commit
2260107811
|
@ -66,6 +66,9 @@ angular.module('portainer.edge', []).config(function config($stateRegistryProvid
|
|||
component: 'editEdgeStackView',
|
||||
},
|
||||
},
|
||||
params: {
|
||||
tab: 0,
|
||||
},
|
||||
};
|
||||
|
||||
$stateRegistryProvider.register(edge);
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<rd-header>
|
||||
<rd-header-title title-text="Edit Edge stack"></rd-header-title>
|
||||
<rd-header-title title-text="Edit Edge stack">
|
||||
<a data-toggle="tooltip" title="Refresh" ui-sref="edge.stacks.edit({stackId:$ctrl.stack.Id, tab: $ctrl.state.activeTab})" ui-sref-opts="{reload: true}">
|
||||
<i class="fa fa-sync" aria-hidden="true"></i>
|
||||
</a>
|
||||
</rd-header-title>
|
||||
<rd-header-content> <a ui-sref="edge.stacks">Edge Stacks</a> > {{ $ctrl.stack.Name }} </rd-header-content>
|
||||
</rd-header>
|
||||
|
||||
|
@ -7,8 +11,7 @@
|
|||
<div class="col-sm-12">
|
||||
<rd-widget>
|
||||
<rd-widget-body classes="no-padding">
|
||||
|
||||
<uib-tabset active="state.activeTab" justified="true" type="pills">
|
||||
<uib-tabset active="$ctrl.state.activeTab" justified="true" type="pills">
|
||||
<uib-tab index="0" classes="btn-sm">
|
||||
<uib-tab-heading> <i class="fa fa-layer-group space-right" aria-hidden="true"></i> Stack</uib-tab-heading>
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ class EditEdgeStackViewController {
|
|||
|
||||
this.state = {
|
||||
actionInProgress: false,
|
||||
activeTab: 0,
|
||||
};
|
||||
|
||||
this.deployStack = this.deployStack.bind(this);
|
||||
|
@ -24,7 +25,8 @@ class EditEdgeStackViewController {
|
|||
}
|
||||
|
||||
async $onInit() {
|
||||
const { stackId } = this.$state.params;
|
||||
const { stackId, tab } = this.$state.params;
|
||||
this.state.activeTab = tab;
|
||||
try {
|
||||
const [edgeGroups, model, file] = await Promise.all([this.EdgeGroupService.groups(), this.EdgeStackService.stack(stackId), this.EdgeStackService.stackFile(stackId)]);
|
||||
this.edgeGroups = edgeGroups;
|
||||
|
|
Loading…
Reference in New Issue