mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 20:30:46 -03:30
Merge pull request #4887 from chrismeyersfsu/fix-4785
conditional stdout resize tooltip text
This commit is contained in:
commit
a804c8ad96
@ -6,6 +6,9 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
||||
// download stdout tooltip text
|
||||
$scope.standardOutTooltip = i18n._('Download Output');
|
||||
|
||||
// stdout full screen toggle tooltip text
|
||||
$scope.toggleStdoutFullscreenTooltip = i18n._("Expand Output");
|
||||
|
||||
// this allows you to manage the timing of rest-call based events as
|
||||
// filters are updated. see processPage for more info
|
||||
var currentContext = 1;
|
||||
@ -152,6 +155,12 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
||||
$scope.stdoutFullScreen = false;
|
||||
$scope.toggleStdoutFullscreen = function() {
|
||||
$scope.stdoutFullScreen = !$scope.stdoutFullScreen;
|
||||
|
||||
if ($scope.stdoutFullScreen === true) {
|
||||
$scope.toggleStdoutFullscreenTooltip = i18n._("Collapse Output");
|
||||
} else if ($scope.stdoutFullScreen === false) {
|
||||
$scope.toggleStdoutFullscreenTooltip = i18n._("Expand Output");
|
||||
}
|
||||
};
|
||||
|
||||
$scope.deleteJob = function() {
|
||||
|
||||
@ -476,7 +476,8 @@
|
||||
|
||||
<!-- FULL-SCREEN TOGGLE ACTION -->
|
||||
<button class="StandardOut-actionButton"
|
||||
aw-tool-tip="Toggle Output"
|
||||
aw-tool-tip="{{ toggleStdoutFullscreenTooltip }}"
|
||||
data-tip-watch="toggleStdoutFullscreenTooltip"
|
||||
data-placement="top"
|
||||
ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}"
|
||||
ng-click="toggleStdoutFullscreen()">
|
||||
|
||||
@ -107,7 +107,7 @@
|
||||
<div class="StandardOut-panelHeader">
|
||||
<div class="StandardOut-panelHeaderText">STANDARD OUT</div>
|
||||
<div class="StandardOut-panelHeaderActions">
|
||||
<button class="StandardOut-actionButton" aw-tool-tip="Toggle Output" data-placement="top" ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}"ng-click="toggleStdoutFullscreen()">
|
||||
<button class="StandardOut-actionButton" aw-tool-tip="{{ toggleStdoutFullscreenTooltip }}" data-tip-watch="toggleStdoutFullscreenTooltip" data-placement="top" ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}" ng-click="toggleStdoutFullscreen()">
|
||||
<i class="fa fa-arrows-alt"></i>
|
||||
</button>
|
||||
<a href="/api/v1/ad_hoc_commands/{{ job.id }}/stdout?format=txt_download">
|
||||
|
||||
@ -130,7 +130,7 @@
|
||||
<div class="StandardOut-panelHeader">
|
||||
<div class="StandardOut-panelHeaderText">STANDARD OUT</div>
|
||||
<div class="StandardOut-panelHeaderActions">
|
||||
<button class="StandardOut-actionButton" aw-tool-tip="Toggle Output" data-placement="top" ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}"ng-click="toggleStdoutFullscreen()">
|
||||
<button class="StandardOut-actionButton" aw-tool-tip="{{ toggleStdoutFullscreenTooltip }}" data-tip-watch="toggleStdoutFullscreenTooltip" data-placement="top" ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}"ng-click="toggleStdoutFullscreen()">
|
||||
<i class="fa fa-arrows-alt"></i>
|
||||
</button>
|
||||
<a href="/api/v1/inventory_updates/{{ job.id }}/stdout?format=txt_download">
|
||||
|
||||
@ -71,7 +71,7 @@
|
||||
<div class="StandardOut-panelHeader">
|
||||
<div class="StandardOut-panelHeaderText">STANDARD OUT</div>
|
||||
<div class="StandardOut-panelHeaderActions">
|
||||
<button class="StandardOut-actionButton" aw-tool-tip="Toggle Output" data-placement="top" ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}"ng-click="toggleStdoutFullscreen()">
|
||||
<button class="StandardOut-actionButton" aw-tool-tip="{{ toggleStdoutFullscreenTooltip }}" data-tip-watch="toggleStdoutFullscreenTooltip" data-placement="top" ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}"ng-click="toggleStdoutFullscreen()">
|
||||
<i class="fa fa-arrows-alt"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
<div class="StandardOut-panelHeader">
|
||||
<div class="StandardOut-panelHeaderText">STANDARD OUT</div>
|
||||
<div class="StandardOut-panelHeaderActions">
|
||||
<button class="StandardOut-actionButton" aw-tool-tip="Toggle Output" data-placement="top" ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}"ng-click="toggleStdoutFullscreen()">
|
||||
<button class="StandardOut-actionButton" aw-tool-tip="{{ toggleStdoutFullscreenTooltip }}" data-tip-watch="toggleStdoutFullscreenTooltip" data-placement="top" ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}"ng-click="toggleStdoutFullscreen()">
|
||||
<i class="fa fa-arrows-alt"></i>
|
||||
</button>
|
||||
<a href="/api/v1/project_updates/{{ job.id }}/stdout?format=txt_download">
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
export function JobStdoutController ($rootScope, $scope, $state, $stateParams,
|
||||
ClearScope, GetBasePath, Rest, ProcessErrors, Empty, GetChoices, LookUpName,
|
||||
ParseTypeChange, ParseVariableString, RelaunchJob, DeleteJob, Wait) {
|
||||
ParseTypeChange, ParseVariableString, RelaunchJob, DeleteJob, Wait, i18n) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -22,6 +22,7 @@ export function JobStdoutController ($rootScope, $scope, $state, $stateParams,
|
||||
// This scope variable controls whether or not the left panel is shown and the right panel
|
||||
// is expanded to take up the full screen
|
||||
$scope.stdoutFullScreen = false;
|
||||
$scope.toggleStdoutFullscreenTooltip = i18n._("Expand Output");
|
||||
|
||||
// Listen for job status updates that may come across via sockets. We need to check the payload
|
||||
// to see whethere the updated job is the one that we're currently looking at.
|
||||
@ -227,6 +228,13 @@ export function JobStdoutController ($rootScope, $scope, $state, $stateParams,
|
||||
// Click binding for the expand/collapse button on the standard out log
|
||||
$scope.toggleStdoutFullscreen = function() {
|
||||
$scope.stdoutFullScreen = !$scope.stdoutFullScreen;
|
||||
|
||||
if ($scope.stdoutFullScreen === true) {
|
||||
$scope.toggleStdoutFullscreenTooltip = i18n._("Collapse Output");
|
||||
} else if ($scope.stdoutFullScreen === false) {
|
||||
$scope.toggleStdoutFullscreenTooltip = i18n._("Expand Output");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
$scope.deleteJob = function() {
|
||||
@ -259,4 +267,4 @@ export function JobStdoutController ($rootScope, $scope, $state, $stateParams,
|
||||
JobStdoutController.$inject = [ '$rootScope', '$scope', '$state',
|
||||
'$stateParams', 'ClearScope', 'GetBasePath', 'Rest', 'ProcessErrors',
|
||||
'Empty', 'GetChoices', 'LookUpName', 'ParseTypeChange',
|
||||
'ParseVariableString', 'RelaunchJob', 'DeleteJob', 'Wait'];
|
||||
'ParseVariableString', 'RelaunchJob', 'DeleteJob', 'Wait', 'i18n'];
|
||||
|
||||
@ -9,6 +9,7 @@ export default ['workflowData',
|
||||
'WorkflowService',
|
||||
'count',
|
||||
'$state',
|
||||
'i18n',
|
||||
function(workflowData,
|
||||
workflowResultsService,
|
||||
workflowDataOptions,
|
||||
@ -19,7 +20,8 @@ export default ['workflowData',
|
||||
ParseVariableString,
|
||||
WorkflowService,
|
||||
count,
|
||||
$state
|
||||
$state,
|
||||
i18n
|
||||
) {
|
||||
|
||||
var getTowerLinks = function() {
|
||||
@ -64,6 +66,9 @@ export default ['workflowData',
|
||||
$scope.count = count.val;
|
||||
$scope.showManualControls = false;
|
||||
|
||||
// stdout full screen toggle tooltip text
|
||||
$scope.toggleStdoutFullscreenTooltip = i18n._("Expand Output");
|
||||
|
||||
// turn related api browser routes into tower routes
|
||||
getTowerLinks();
|
||||
|
||||
@ -103,6 +108,12 @@ export default ['workflowData',
|
||||
|
||||
$scope.toggleStdoutFullscreen = function() {
|
||||
$scope.stdoutFullScreen = !$scope.stdoutFullScreen;
|
||||
|
||||
if ($scope.stdoutFullScreen === true) {
|
||||
$scope.toggleStdoutFullscreenTooltip = i18n._("Collapse Output");
|
||||
} else if ($scope.stdoutFullScreen === false) {
|
||||
$scope.toggleStdoutFullscreenTooltip = i18n._("Expand Output");
|
||||
}
|
||||
};
|
||||
|
||||
$scope.deleteJob = function() {
|
||||
|
||||
@ -219,7 +219,8 @@
|
||||
|
||||
<!-- FULL-SCREEN TOGGLE ACTION -->
|
||||
<button class="StandardOut-actionButton"
|
||||
aw-tool-tip="Toggle Output"
|
||||
aw-tool-tip="{{ toggleStdoutFullscreenTooltip }}"
|
||||
data-tip-watch="toggleStdoutFullscreenTooltip"
|
||||
data-placement="top"
|
||||
ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}"
|
||||
ng-click="toggleStdoutFullscreen()">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user