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