diff --git a/awx/ui/client/features/output/index.controller.js b/awx/ui/client/features/output/index.controller.js index 04aa59aaf9..63d17d0e32 100644 --- a/awx/ui/client/features/output/index.controller.js +++ b/awx/ui/client/features/output/index.controller.js @@ -237,6 +237,12 @@ function handleSummaryEvent (data) { stream.setFinalCounter(data.final_counter); } +function reloadState (params) { + params.isPanelExpanded = vm.isPanelExpanded; + + return $state.transitionTo($state.current, params, { inherit: false, location: 'replace' }); +} + function OutputIndexController ( _$compile_, _$q_, @@ -250,6 +256,7 @@ function OutputIndexController ( _stream_, $filter, strings, + $stateParams, ) { $compile = _$compile_; $q = _$q_; @@ -269,7 +276,10 @@ function OutputIndexController ( vm.title = $filter('sanitize')(resource.model.get('name')); vm.strings = strings; vm.resource = resource; - vm.isPanelExpanded = false; + + const { isPanelExpanded } = $stateParams; + vm.reloadState = reloadState; + vm.isPanelExpanded = isPanelExpanded; vm.togglePanelExpand = togglePanelExpand; // Stdout Navigation @@ -325,6 +335,7 @@ OutputIndexController.$inject = [ 'OutputStreamService', '$filter', 'OutputStrings', + '$stateParams', ]; module.exports = OutputIndexController; diff --git a/awx/ui/client/features/output/index.js b/awx/ui/client/features/output/index.js index 6d990772ca..7f8813a28b 100644 --- a/awx/ui/client/features/output/index.js +++ b/awx/ui/client/features/output/index.js @@ -191,6 +191,7 @@ function JobsRun ($stateRegistry, $filter, strings) { ncyBreadcrumb, params: { handleErrors: true, + isPanelExpanded: false, }, data: { activityStream: false, diff --git a/awx/ui/client/features/output/index.view.html b/awx/ui/client/features/output/index.view.html index fa973ec40d..bdf7b307c5 100644 --- a/awx/ui/client/features/output/index.view.html +++ b/awx/ui/client/features/output/index.view.html @@ -1,7 +1,7 @@