Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve linebreaks in broker error messages #542

Merged
merged 1 commit into from
Oct 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion dist/less/order-service.less
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
margin-top: 5px;
}
.sub-title {
color: @color-pf-black-600;
font-size: 20px;
font-weight: 600;
color: @color-pf-black-600;
}
}
.order-service-description-block {
Expand Down Expand Up @@ -171,6 +171,9 @@
}
.sub-title {
margin: 0 0 10px 0;
.error-message {
white-space: pre-line;
}
}
.success-check {
color: @color-pf-green-400;
Expand Down
5 changes: 4 additions & 1 deletion dist/origin-web-catalogs.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/origin-web-catalogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ webpackJsonp([ 0, 1 ], [ function(e, t) {
}, function(e, t) {
e.exports = '<div class="order-service-config">\n <div class="config-top">\n <select-plan available-plans="$ctrl.orderedPlans" selected-plan="$ctrl.selectedPlan" on-plan-select="$ctrl.selectPlan"></select-plan>\n </div>\n</div>\n';
}, function(e, t) {
e.exports = '<div class="order-service-config">\n <div ng-if="!$ctrl.error">\n <div ng-if="!$ctrl.orderComplete">\n <div class="results-status">\n <span class="fa fa-clock-o text-muted" aria-hidden="true"></span>\n <span class="sr-only">Pending</span>\n <div class="results-message">\n <h3>\n <strong>{{$ctrl.serviceClass.name}}</strong> is being provisioned in <strong>{{$ctrl.projectDisplayName}}</strong>.\n </h3>\n <p class="results-message-details">\n <span ng-if="$ctrl.binding">The binding will be created after the service has been provisioned.</span>\n This may take several minutes.\n </p>\n </div>\n </div>\n <p><a ng-href="{{$ctrl.selectedProject | projectUrl : $ctrl.baseProjectUrl}}">Continue to the project overview</a> to check the status of your service.</p>\n </div>\n </div>\n <div class="results-failure" ng-if="$ctrl.error">\n <div class="results-status">\n <span class="pficon pficon-error-circle-o text-danger" aria-hidden="true"></span>\n <span class="sr-only">Error</span>\n <div class="results-message">\n <h3>\n <strong>{{$ctrl.serviceClass.name}}</strong> failed to provision in <strong>{{$ctrl.projectDisplayName}}</strong>.\n </h3>\n </div>\n </div>\n <div class="sub-title">\n <span ng-if="$ctrl.error.message">\n {{$ctrl.error.message}}\n </span>\n <span ng-if="!$ctrl.error.message">\n An error occurred provisioning the service.\n </span>\n </div>\n </div>\n <div ng-if="$ctrl.orderComplete">\n <div class="results-status">\n <span class="pficon pficon-ok" aria-hidden="true"></span>\n <span class="sr-only">Success</span>\n <div class="results-message">\n <h3>\n <strong>{{$ctrl.serviceClass.name}}</strong> has been added to <strong>{{$ctrl.projectDisplayName}}</strong> successfully.\n </h3>\n </div>\n </div>\n </div>\n <div ng-if="$ctrl.orderComplete && $ctrl.binding">\n <bind-results error="$ctrl.bindError"\n binding="$ctrl.binding"\n secret-href="$ctrl.selectedProject | secretUrl : $ctrl.baseProjectUrl : $ctrl.binding.spec.secretName"\n service-to-bind="$ctrl.serviceInstance.metadata.name"\n bind-type="{{$ctrl.bindType}}"\n application-to-bind="$ctrl.appToBind.metadata.name"\n show-pod-presets="$ctrl.showPodPresets">\n </bind-results>\n <p><a ng-href="{{$ctrl.selectedProject | projectUrl : $ctrl.baseProjectUrl}}">Continue to the project overview</a>.</p>\n </div>\n <div ng-if="$ctrl.orderComplete && $ctrl.bindType === \'none\'">\n <p><a ng-href="{{$ctrl.selectedProject | projectUrl : $ctrl.baseProjectUrl}}">Continue to the project overview</a> to bind this service to your application. Binding this service creates a secret containing the information necessary for your application to use the service.</p>\n </div>\n <div ng-if="$ctrl.serviceClass.resource.externalMetadata.documentationUrl || $ctrl.serviceClass.resource.externalMetadata.supportUrl || (!$ctrl.error && $ctrl.serviceInstance.status.dashboardURL)">\n <p class="or" ng-if="!$ctrl.error">- or -</p>\n <p>Browse resources for {{$ctrl.serviceClass.name}}:</p>\n <ul class="list-inline">\n <li ng-if="$ctrl.serviceClass.resource.externalMetadata.documentationUrl">\n <a ng-href="{{$ctrl.serviceClass.resource.externalMetadata.documentationUrl}}" target="_blank">Documentation <i class="fa fa-external-link" aria-hidden="true"></i></a>\n </li>\n <li ng-if="$ctrl.serviceClass.resource.externalMetadata.supportUrl">\n <a ng-href="{{$ctrl.serviceClass.resource.externalMetadata.supportUrl}}" target="_blank">Support <i class="fa fa-external-link" aria-hidden="true"></i></a>\n </li>\n <li ng-if="!$ctrl.error && $ctrl.serviceInstance.status.dashboardURL">\n <a ng-href="{{$ctrl.serviceInstance.status.dashboardURL}}" target="_blank">Service Dashboard <i class="fa fa-external-link" aria-hidden="true"></i></a>\n </li>\n </ul>\n </div>\n</div>\n';
e.exports = '<div class="order-service-config">\n <div ng-if="!$ctrl.error">\n <div ng-if="!$ctrl.orderComplete">\n <div class="results-status">\n <span class="fa fa-clock-o text-muted" aria-hidden="true"></span>\n <span class="sr-only">Pending</span>\n <div class="results-message">\n <h3>\n <strong>{{$ctrl.serviceClass.name}}</strong> is being provisioned in <strong>{{$ctrl.projectDisplayName}}</strong>.\n </h3>\n <p class="results-message-details">\n <span ng-if="$ctrl.binding">The binding will be created after the service has been provisioned.</span>\n This may take several minutes.\n </p>\n </div>\n </div>\n <p><a ng-href="{{$ctrl.selectedProject | projectUrl : $ctrl.baseProjectUrl}}">Continue to the project overview</a> to check the status of your service.</p>\n </div>\n </div>\n <div class="results-failure" ng-if="$ctrl.error">\n <div class="results-status">\n <span class="pficon pficon-error-circle-o text-danger" aria-hidden="true"></span>\n <span class="sr-only">Error</span>\n <div class="results-message">\n <h3>\n <strong>{{$ctrl.serviceClass.name}}</strong> failed to provision in <strong>{{$ctrl.projectDisplayName}}</strong>.\n </h3>\n </div>\n </div>\n <div class="sub-title">\n <span ng-if="$ctrl.error.message" class="error-message">{{$ctrl.error.message}}</span>\n <span ng-if="!$ctrl.error.message" class="error-message">An error occurred provisioning the service.</span>\n </div>\n </div>\n <div ng-if="$ctrl.orderComplete">\n <div class="results-status">\n <span class="pficon pficon-ok" aria-hidden="true"></span>\n <span class="sr-only">Success</span>\n <div class="results-message">\n <h3>\n <strong>{{$ctrl.serviceClass.name}}</strong> has been added to <strong>{{$ctrl.projectDisplayName}}</strong> successfully.\n </h3>\n </div>\n </div>\n </div>\n <div ng-if="$ctrl.orderComplete && $ctrl.binding">\n <bind-results error="$ctrl.bindError"\n binding="$ctrl.binding"\n secret-href="$ctrl.selectedProject | secretUrl : $ctrl.baseProjectUrl : $ctrl.binding.spec.secretName"\n service-to-bind="$ctrl.serviceInstance.metadata.name"\n bind-type="{{$ctrl.bindType}}"\n application-to-bind="$ctrl.appToBind.metadata.name"\n show-pod-presets="$ctrl.showPodPresets">\n </bind-results>\n <p><a ng-href="{{$ctrl.selectedProject | projectUrl : $ctrl.baseProjectUrl}}">Continue to the project overview</a>.</p>\n </div>\n <div ng-if="$ctrl.orderComplete && $ctrl.bindType === \'none\'">\n <p><a ng-href="{{$ctrl.selectedProject | projectUrl : $ctrl.baseProjectUrl}}">Continue to the project overview</a> to bind this service to your application. Binding this service creates a secret containing the information necessary for your application to use the service.</p>\n </div>\n <div ng-if="$ctrl.serviceClass.resource.externalMetadata.documentationUrl || $ctrl.serviceClass.resource.externalMetadata.supportUrl || (!$ctrl.error && $ctrl.serviceInstance.status.dashboardURL)">\n <p class="or" ng-if="!$ctrl.error">- or -</p>\n <p>Browse resources for {{$ctrl.serviceClass.name}}:</p>\n <ul class="list-inline">\n <li ng-if="$ctrl.serviceClass.resource.externalMetadata.documentationUrl">\n <a ng-href="{{$ctrl.serviceClass.resource.externalMetadata.documentationUrl}}" target="_blank">Documentation <i class="fa fa-external-link" aria-hidden="true"></i></a>\n </li>\n <li ng-if="$ctrl.serviceClass.resource.externalMetadata.supportUrl">\n <a ng-href="{{$ctrl.serviceClass.resource.externalMetadata.supportUrl}}" target="_blank">Support <i class="fa fa-external-link" aria-hidden="true"></i></a>\n </li>\n <li ng-if="!$ctrl.error && $ctrl.serviceInstance.status.dashboardURL">\n <a ng-href="{{$ctrl.serviceInstance.status.dashboardURL}}" target="_blank">Service Dashboard <i class="fa fa-external-link" aria-hidden="true"></i></a>\n </li>\n </ul>\n </div>\n</div>\n';
}, function(e, t) {
e.exports = '<div class="order-service-config">\n <div class="config-top">\n <form name="$ctrl.forms.orderConfigureForm" class="config-form">\n <catalog-parameters\n ng-if="$ctrl.parameterSchema.properties"\n model="$ctrl.parameterData"\n parameter-schema="$ctrl.parameterSchema"\n parameter-form-definition="$ctrl.parameterFormDefinition">\n </catalog-parameters>\n </form>\n <div ng-if="$ctrl.error" class="has-error">\n <span class="help-block">{{$ctrl.error}}</span>\n </div>\n </div>\n</div>\n';
}, function(e, t) {
Expand Down
8 changes: 2 additions & 6 deletions src/components/order-service/order-service-results.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,8 @@ <h3>
</div>
</div>
<div class="sub-title">
<span ng-if="$ctrl.error.message">
{{$ctrl.error.message}}
</span>
<span ng-if="!$ctrl.error.message">
An error occurred provisioning the service.
</span>
<span ng-if="$ctrl.error.message" class="error-message">{{$ctrl.error.message}}</span>
<span ng-if="!$ctrl.error.message" class="error-message">An error occurred provisioning the service.</span>
</div>
</div>
<div ng-if="$ctrl.orderComplete">
Expand Down
5 changes: 4 additions & 1 deletion src/styles/order-service.less
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
margin-top: 5px;
}
.sub-title {
color: @color-pf-black-600;
font-size: 20px;
font-weight: 600;
color: @color-pf-black-600;
}
}
.order-service-description-block {
Expand Down Expand Up @@ -171,6 +171,9 @@
}
.sub-title {
margin: 0 0 10px 0;
.error-message {
white-space: pre-line;
}
}
.success-check {
color: @color-pf-green-400;
Expand Down