Skip to content

Commit

Permalink
DEV Modal Updates
Browse files Browse the repository at this point in the history
Modal styling and html
  • Loading branch information
cdcabrera committed Oct 5, 2017
1 parent bdf9e60 commit aee5168
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 86 deletions.
78 changes: 23 additions & 55 deletions app/views/directives/edit-environment-from.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,65 +88,33 @@
<div class="dialog-title">
<h3>Value Details</h3>
</div>
<div class="dialog-body">
<div class="modal-body">
<h4>{{$ctrl.overlayPaneEntryDetails.metadata.name}}
<small class="muted">- {{$ctrl.overlayPaneEntryDetails.kind | humanizeKind : true}}</small></h4>

<div ng-if="$ctrl.overlayPaneEntryDetails.kind === 'ConfigMap'">
<h4>{{$ctrl.overlayPaneEntryDetails.metadata.name}} <small class="muted">- Config Map</small></h4>

<div ng-if="!($ctrl.overlayPaneEntryDetails.data | hashSize)" class="empty-state-message text-center">
The config map has no items.
</div>

<div ng-if="$ctrl.overlayPaneEntryDetails.data | hashSize" class="table-responsive scroll-shadows-horizontal">
<table class="table table-bordered table-bordered-columns config-map-table key-value-table">
<tbody>
<tr ng-repeat="(prop, value) in $ctrl.overlayPaneEntryDetails.data">
<td class="key">{{prop}}</td>
<td class="value">
<truncate-long-text
content="value"
limit="1024"
newline-limit="20"
expandable="true">
</truncate-long-text>
</td>
</tr>
</tbody>
</table>
</div>
<annotations annotations="$ctrl.overlayPaneEntryDetails.metadata.annotations"></annotations>
<div ng-if="!($ctrl.overlayPaneEntryDetails.data | hashSize)" class="empty-state-message text-center">
The {{$ctrl.overlayPaneEntryDetails.kind | humanizeKind : true}} has no items.
</div>

<div ng-if="$ctrl.overlayPaneEntryDetails.kind === 'Secret'">
<h4>{{$ctrl.overlayPaneEntryDetails.metadata.name}} <small class="muted">- Secret</small></h4>

<div ng-repeat="(secretDataName, secretData) in $ctrl.decodedSecretData" class="image-source-item">
<div ng-switch="secretDataName">
<div ng-switch-when=".dockercfg">
<ng-include src=" 'views/_config-file-params.html' "></ng-include>
</div>
<div ng-if="$ctrl.overlayPaneEntryDetails.data | hashSize" class="table-responsive scroll-shadows-horizontal">
<table class="table table-bordered table-bordered-columns config-map-table key-value-table">
<tbody>
<tr ng-repeat="(prop, value) in $ctrl.overlayPaneEntryDetails.data">
<td class="key">{{prop}}</td>
<td class="value">
<truncate-long-text
ng-if="$ctrl.overlayPaneEntryDetails.kind === 'ConfigMap'"
content="value"
limit="1024"
newline-limit="20"
expandable="true">
</truncate-long-text>

<div ng-switch-when=".dockerconfigjson">
<ng-include src=" 'views/_config-file-params.html' "></ng-include>
</div>

<div ng-switch-default>
<dt ng-attr-title="{{secretDataName}}">{{secretDataName}}</dt>
<dd ng-if="$ctrl.showSecret">
<copy-to-clipboard
clipboard-text="secretData"
multiline="secretData | isMultiline : true"
display-wide="true">
</copy-to-clipboard>
<div ng-if="$ctrl.decodedSecretData.$$nonprintable[secretDataName]" class="help-block">
This secret value contains non-printable characters and is displayed as a Base64-encoded string.
</div>
</dd>
<dd ng-if="!$ctrl.showSecret">*****</dd>
</div>

</div>
</div>
<span ng-if="$ctrl.overlayPaneEntryDetails.kind === 'Secret'">&#42;&#42;&#42;&#42;&#42;</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
Expand Down
37 changes: 6 additions & 31 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -6651,51 +6651,26 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<div class=\"dialog-title\">\n" +
"<h3>Value Details</h3>\n" +
"</div>\n" +
"<div class=\"dialog-body\">\n" +
"<div ng-if=\"$ctrl.overlayPaneEntryDetails.kind === 'ConfigMap'\">\n" +
"<h4>{{$ctrl.overlayPaneEntryDetails.metadata.name}} <small class=\"muted\">- Config Map</small></h4>\n" +
"<div class=\"modal-body\">\n" +
"<h4>{{$ctrl.overlayPaneEntryDetails.metadata.name}}\n" +
"<small class=\"muted\">- {{$ctrl.overlayPaneEntryDetails.kind | humanizeKind : true}}</small></h4>\n" +
"<div ng-if=\"!($ctrl.overlayPaneEntryDetails.data | hashSize)\" class=\"empty-state-message text-center\">\n" +
"The config map has no items.\n" +
"The {{$ctrl.overlayPaneEntryDetails.kind | humanizeKind : true}} has no items.\n" +
"</div>\n" +
"<div ng-if=\"$ctrl.overlayPaneEntryDetails.data | hashSize\" class=\"table-responsive scroll-shadows-horizontal\">\n" +
"<table class=\"table table-bordered table-bordered-columns config-map-table key-value-table\">\n" +
"<tbody>\n" +
"<tr ng-repeat=\"(prop, value) in $ctrl.overlayPaneEntryDetails.data\">\n" +
"<td class=\"key\">{{prop}}</td>\n" +
"<td class=\"value\">\n" +
"<truncate-long-text content=\"value\" limit=\"1024\" newline-limit=\"20\" expandable=\"true\">\n" +
"<truncate-long-text ng-if=\"$ctrl.overlayPaneEntryDetails.kind === 'ConfigMap'\" content=\"value\" limit=\"1024\" newline-limit=\"20\" expandable=\"true\">\n" +
"</truncate-long-text>\n" +
"<span ng-if=\"$ctrl.overlayPaneEntryDetails.kind === 'Secret'\">&#42;&#42;&#42;&#42;&#42;</span>\n" +
"</td>\n" +
"</tr>\n" +
"</tbody>\n" +
"</table>\n" +
"</div>\n" +
"<annotations annotations=\"$ctrl.overlayPaneEntryDetails.metadata.annotations\"></annotations>\n" +
"</div>\n" +
"<div ng-if=\"$ctrl.overlayPaneEntryDetails.kind === 'Secret'\">\n" +
"<h4>{{$ctrl.overlayPaneEntryDetails.metadata.name}} <small class=\"muted\">- Secret</small></h4>\n" +
"<div ng-repeat=\"(secretDataName, secretData) in $ctrl.decodedSecretData\" class=\"image-source-item\">\n" +
"<div ng-switch=\"secretDataName\">\n" +
"<div ng-switch-when=\".dockercfg\">\n" +
"<ng-include src=\" 'views/_config-file-params.html' \"></ng-include>\n" +
"</div>\n" +
"<div ng-switch-when=\".dockerconfigjson\">\n" +
"<ng-include src=\" 'views/_config-file-params.html' \"></ng-include>\n" +
"</div>\n" +
"<div ng-switch-default>\n" +
"<dt ng-attr-title=\"{{secretDataName}}\">{{secretDataName}}</dt>\n" +
"<dd ng-if=\"$ctrl.showSecret\">\n" +
"<copy-to-clipboard clipboard-text=\"secretData\" multiline=\"secretData | isMultiline : true\" display-wide=\"true\">\n" +
"</copy-to-clipboard>\n" +
"<div ng-if=\"$ctrl.decodedSecretData.$$nonprintable[secretDataName]\" class=\"help-block\">\n" +
"This secret value contains non-printable characters and is displayed as a Base64-encoded string.\n" +
"</div>\n" +
"</dd>\n" +
"<dd ng-if=\"!$ctrl.showSecret\">*****</dd>\n" +
"</div>\n" +
"</div>\n" +
"</div>\n" +
"</div>\n" +
"</div>\n" +
"<div class=\"modal-footer\">\n" +
"<button ng-click=\"$ctrl.closeOverlayPanel()\" type=\"button\" class=\"btn btn-primary pull-right\">Close</button>\n" +
Expand Down

0 comments on commit aee5168

Please sign in to comment.