mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
Merge pull request #58 from marshmalien/fix/ux/activity-stream
[UX] Add read-only CodeMirror to Activity Stream modal
This commit is contained in:
commit
c246709200
@ -1,5 +1,5 @@
|
||||
export default
|
||||
function ShowDetail($filter, Find) {
|
||||
function ShowDetail($filter, Find, ParseTypeChange, ParseVariableString) {
|
||||
return function (params, scope) {
|
||||
|
||||
var activity_id = params.activity_id,
|
||||
@ -20,6 +20,13 @@ export default
|
||||
scope.operation = activity.description;
|
||||
scope.header = "Event " + activity.id;
|
||||
|
||||
scope.variables = ParseVariableString(scope.changes);
|
||||
scope.parseType = 'json';
|
||||
ParseTypeChange({ scope: scope,
|
||||
field_id: 'activity-stream-changes',
|
||||
readOnly: true });
|
||||
scope.parseTypeChange('parseType', 'variables');
|
||||
|
||||
// Open the modal
|
||||
$('#stream-detail-modal').modal({
|
||||
show: true,
|
||||
@ -35,4 +42,4 @@ export default
|
||||
};
|
||||
}
|
||||
|
||||
ShowDetail.$inject = ['$filter', 'Find'];
|
||||
ShowDetail.$inject = ['$filter', 'Find', 'ParseTypeChange', 'ParseVariableString'];
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
.StreamDetail-rowTitle {
|
||||
color: @default-interface-txt;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.StreamDetail-inlineRowTitle {
|
||||
|
@ -1,29 +1,36 @@
|
||||
<div id="stream-detail-modal" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="Modal-content modal-content">
|
||||
<div class="Modal-header">
|
||||
<div class="Modal-title" id="detail-header" ng-bind-html="header"></div>
|
||||
<div class="Modal-exitHolder">
|
||||
<button class="close Modal-exit" data-target="#stream-detail-modal" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times-circle"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Modal-body" id="detail-body">
|
||||
<div ng-show="user" class="StreamDetail-inlineRow">
|
||||
<div class="StreamDetail-rowTitle StreamDetail-inlineRowTitle" translate>INITIATED BY</div>
|
||||
<div class="StreamDetail-inlineRowData" ng-bind="user"></div>
|
||||
</div>
|
||||
<div ng-show="operation" class="StreamDetail-inlineRow">
|
||||
<div class="StreamDetail-rowTitle StreamDetail-inlineRowTitle" translate>ACTION</div>
|
||||
<div class="StreamDetail-inlineRowData StreamDetail-actions" ng-bind-html="operation"></div>
|
||||
</div>
|
||||
<div ng-show="changes">
|
||||
<div class="StreamDetail-rowTitle StreamDetail-changesRowTitle" translate>CHANGES</div>
|
||||
<pre class="StreamDetail-changes">{{ changes | json : spacing}}</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Modal-footer">
|
||||
<a href="#" data-target="#stream-detail-modal" data-dismiss="modal" id="action_cancel_btn" class="btn btn-default StreamDetail-actionButton">OK</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="Modal-content modal-content">
|
||||
<div class="Modal-header">
|
||||
<div class="Modal-title" id="detail-header" ng-bind-html="header"></div>
|
||||
<div class="Modal-exitHolder">
|
||||
<button class="close Modal-exit" data-target="#stream-detail-modal" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times-circle"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Modal-body" id="detail-body">
|
||||
<div ng-show="user" class="StreamDetail-inlineRow">
|
||||
<div class="StreamDetail-rowTitle StreamDetail-inlineRowTitle" translate>INITIATED BY</div>
|
||||
<div class="StreamDetail-inlineRowData" ng-bind="user"></div>
|
||||
</div>
|
||||
<div ng-show="operation" class="StreamDetail-inlineRow">
|
||||
<div class="StreamDetail-rowTitle StreamDetail-inlineRowTitle" translate>ACTION</div>
|
||||
<div class="StreamDetail-inlineRowData StreamDetail-actions" ng-bind-html="operation"></div>
|
||||
</div>
|
||||
<div ng-show="changes">
|
||||
<div class="StreamDetail-rowTitle StreamDetail-changesRowTitle" translate>CHANGES</div>
|
||||
<textarea
|
||||
rows="6"
|
||||
ng-model="changes"
|
||||
name="changes"
|
||||
class="form-control Form-textArea Form-textAreaLabel Form-formGroup--fullWidth"
|
||||
id="activity-stream-changes"
|
||||
disabled="disabled">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Modal-footer">
|
||||
<a href="#" data-target="#stream-detail-modal" data-dismiss="modal" id="action_cancel_btn" class="btn btn-default StreamDetail-actionButton">OK</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -18,7 +18,6 @@ export default ['i18n', function(i18n) {
|
||||
selectInstructions: '',
|
||||
index: false,
|
||||
hover: true,
|
||||
"class": "table-condensed",
|
||||
toolbarAuxAction: "<stream-dropdown-nav></stream-dropdown-nav>",
|
||||
|
||||
fields: {
|
||||
|
Loading…
Reference in New Issue
Block a user