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

Do not show binding parameters on the overview page #2326

Merged
merged 1 commit into from
Oct 23, 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
1 change: 1 addition & 0 deletions app/scripts/directives/serviceInstanceBindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ angular.module('openshiftConsole').component('serviceInstanceBindings', {
],
controllerAs: '$ctrl',
bindings: {
isOverview: '<?',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe call this showParameters and flip the logic?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can but isOverview is already used in the sub-component (serviceBinding) so this is really just a pass thru to that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm OK with it then

showHeader: '<?',
project: '<',
bindings: '<',
Expand Down
23 changes: 9 additions & 14 deletions app/styles/_components.less
Original file line number Diff line number Diff line change
Expand Up @@ -200,35 +200,30 @@ code.command {
margin-left: 20px;
}
.service-binding-parameters {
margin-left: 20px;
> a {
border-left: 1px solid @color-pf-black-300;
padding: 0 10px;
margin-top: 5px;

&:first-of-type {
border-left: 0;
}
> form {
margin-top: 5px;
}
.parameters-heading {
color: @color-pf-black-500;
text-transform: uppercase;
}
.parameter-title {
font-weight: 700;
text-align: right;
.hide-show-link {
font-size: @font-size-base;
margin-left: 5px;
}
}

.service-binding-actions {
font-size: 13px;
font-weight: 400;
margin-top: 5px;

> a {
border-left: 1px solid @color-pf-black-300;
padding: 0 10px;

&:first-of-type {
border-left: 0;
padding-left: 0;
padding-right: 5px;
}
}
}
Expand Down
13 changes: 0 additions & 13 deletions app/styles/_core.less
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,6 @@
.config-parameters-form {
margin-top: 5px;

.control-label {
padding-right: 0;
word-break: break-word;
}

form {
margin-top: 10px;
}

.form-group {
margin-bottom: 0;
}

.hide-show-link {
font-size: @font-size-base;
margin-left: 5px;
Expand Down
6 changes: 3 additions & 3 deletions app/views/directives/_service-binding.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ <h3>
View Secret
</a>
</div>
<div class="service-binding-parameters" ng-if="$ctrl.bindParameterSchema.properties">
<span class="parameters-heading">Parameters</span>
<a href="" ng-click="$ctrl.toggleShowParameterValues()" role="button">
<div class="service-binding-parameters" ng-if="!$ctrl.isOverview && $ctrl.bindParameterSchema.properties">
<span class="component-label">Parameters</span>
<a href="" class="hide-show-link" ng-click="$ctrl.toggleShowParameterValues()" role="button">
{{$ctrl.showParameterValues ? 'Hide Values' : 'Reveal Values'}}
</a>
<form name="ctrl.parametersForm">
Expand Down
1 change: 1 addition & 0 deletions app/views/directives/service-instance-bindings.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<h3 ng-if="$ctrl.showHeader">Bindings</h3>
<service-binding
ng-repeat="binding in $ctrl.bindings track by (binding | uid)"
is-overview="$ctrl.isOverview"
namespace="binding.metadata.namespace"
binding="binding"
ref-api-object="$ctrl.serviceInstance">
Expand Down
1 change: 1 addition & 0 deletions app/views/overview/_service-instance-row.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ <h3>
<div ng-if="row.isBindable || (row.bindings | size)">
<div class="section-title">Bindings</div>
<service-instance-bindings
is-overview="true"
project="row.state.project"
bindings="row.bindings"
service-instance="row.apiObject"
Expand Down
1 change: 1 addition & 0 deletions dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -10450,6 +10450,7 @@ templateUrl: "views/directives/resource-service-bindings.html"
controller: [ "$filter", "APIService", "BindingService", ServiceInstanceBindings ],
controllerAs: "$ctrl",
bindings: {
isOverview: "<?",
showHeader: "<?",
project: "<",
bindings: "<",
Expand Down
10 changes: 5 additions & 5 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -5679,9 +5679,9 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"View Secret\n" +
"</a>\n" +
"</div>\n" +
"<div class=\"service-binding-parameters\" ng-if=\"$ctrl.bindParameterSchema.properties\">\n" +
"<span class=\"parameters-heading\">Parameters</span>\n" +
"<a href=\"\" ng-click=\"$ctrl.toggleShowParameterValues()\" role=\"button\">\n" +
"<div class=\"service-binding-parameters\" ng-if=\"!$ctrl.isOverview && $ctrl.bindParameterSchema.properties\">\n" +
"<span class=\"component-label\">Parameters</span>\n" +
"<a href=\"\" class=\"hide-show-link\" ng-click=\"$ctrl.toggleShowParameterValues()\" role=\"button\">\n" +
"{{$ctrl.showParameterValues ? 'Hide Values' : 'Reveal Values'}}\n" +
"</a>\n" +
"<form name=\"ctrl.parametersForm\">\n" +
Expand Down Expand Up @@ -9227,7 +9227,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
$templateCache.put('views/directives/service-instance-bindings.html',
"<div ng-if=\"$ctrl.bindable || ($ctrl.bindings | size)\">\n" +
"<h3 ng-if=\"$ctrl.showHeader\">Bindings</h3>\n" +
"<service-binding ng-repeat=\"binding in $ctrl.bindings track by (binding | uid)\" namespace=\"binding.metadata.namespace\" binding=\"binding\" ref-api-object=\"$ctrl.serviceInstance\">\n" +
"<service-binding ng-repeat=\"binding in $ctrl.bindings track by (binding | uid)\" is-overview=\"$ctrl.isOverview\" namespace=\"binding.metadata.namespace\" binding=\"binding\" ref-api-object=\"$ctrl.serviceInstance\">\n" +
"</service-binding>\n" +
"<div ng-if=\"$ctrl.bindable\">\n" +
"<a href=\"\" ng-click=\"$ctrl.createBinding()\" role=\"button\">\n" +
Expand Down Expand Up @@ -12642,7 +12642,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"</div>\n" +
"<div ng-if=\"row.isBindable || (row.bindings | size)\">\n" +
"<div class=\"section-title\">Bindings</div>\n" +
"<service-instance-bindings project=\"row.state.project\" bindings=\"row.bindings\" service-instance=\"row.apiObject\" service-class=\"row.serviceClass\" service-plan=\"row.servicePlan\">\n" +
"<service-instance-bindings is-overview=\"true\" project=\"row.state.project\" bindings=\"row.bindings\" service-instance=\"row.apiObject\" service-class=\"row.serviceClass\" service-plan=\"row.servicePlan\">\n" +
"</service-instance-bindings>\n" +
"</div>\n" +
"</div>\n" +
Expand Down
19 changes: 7 additions & 12 deletions dist/styles/main.css

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