-
Notifications
You must be signed in to change notification settings - Fork 134
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
Application services tab #1237
Application services tab #1237
Conversation
…ng the cirrect cards
* master: Ensure we wait for $translate onReady before initialising landing page language options
* master: Pre-sort service instances in cloud foundry space instances table (#1233) Remove package-lock.json - to be added back in another pr Add sass source maps into the dev build of the frontend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit tests need fixing - most are being excluded by an fdescribe.
class="message-box message-box-no-bg"> | ||
<p> | ||
<img src="/images/services/App_services_72.png" /> | ||
<h3 translate>There are no services available for this endpoint. Please contact your Administrator to add services so you can bind them to your applications.</h3> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String needs to be pulled out and replaced with translation key
|
||
<div class="service-catalogue-card__meta-split"> | ||
<div class="service-catalogue-card__meta-left"> | ||
Description |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we pull out for translation
app.app-info.app-tabs.services.card.cannot-bind | ||
<div class="service-catalogue-card__meta-split"> | ||
<div class="service-catalogue-card__meta-left"> | ||
Date created |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we pull out for translation
ng-if="serviceCardCtrl.allowAddOnly && serviceCardCtrl.numAttached > 0"> | ||
{{ serviceCardCtrl.numAttached }} <span translate>app.app-info.app-tabs.services.card.attached</span> | ||
<div class="service-catalogue-card__meta-right"> | ||
{{ ::serviceCardCtrl.service.metadata.created_at | amDateFormat:'MMM Do YYYY HH:mm:ss' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check with Rich - I think we have a pattern for the date formatting that will switch MM/dd vs dd/MM depending on locale.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass it through a filter titled 'momentDateFormat'. It'll use the L - LTS format with some magic to ensure it updates on change of locale.
</div> | ||
<div class="service-catalogue-card__meta-split"> | ||
<a ng-click="serviceCardCtrl.viewEnvVariables(serviceCardCtrl.service)"> | ||
Show environment variables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we pull out for translation
<img src="/images/services/App_services_72.png" /> | ||
<div ng-if="!applicationServicesCtrl.search.$ && !applicationServicesCtrl.isFiltered()"> | ||
<h3> | ||
This application has no bound service instances. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we pull out for translation
This application has no bound service instances. | ||
</h3> | ||
<h3> | ||
To view the avaliable services for this application, please visit the <a ui-sref="cf.applications.application.service-catalogue">service catalogue</a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we pull out for translation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the colour on these look a bit out as well. See styles applications-empty, applications-msg and applications-cta for more info (create a space and then in app wall filter by it.. or create a space, disable ssh, create an app in space and then go to app tab ssh)
Part of me also thinks we shouldn't show this part when the user does not have permissions to add/bind the services. Leaving both this and the catalogue as very read only
</div> | ||
<div ng-if="applicationServicesCtrl.isFiltered()"> | ||
<h3 translate> | ||
No services instances found matching your search. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we pull out for translation
@@ -15,7 +15,7 @@ | |||
var Q = require('q'); | |||
var _ = require('lodash'); | |||
|
|||
describe('CF - Manage Organizations and Spaces', function () { | |||
fdescribe('CF - Manage Organizations and Spaces', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've got an fdescribe - so all the tests bar 1 are being skipped - I think there are quite a few failures when you undo this.
<div class="service-catalogue-card"> | ||
<div class="service-catalogue-card__meta"> | ||
<div class="service-catalogue-card__meta-split"> | ||
<div class="service-catalogue-card__meta-left"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think service-catalogue-card__meta-left needs some right padding... or right needs some left padding. Squishing the window leads to label and value right next to each other
<bounce-spinner classes="bounce-spinner-sm"></bounce-spinner> | ||
</div> | ||
<div class="cluster-gallery-card-container"> | ||
<service-card class="cluster-gallery-card-parent" ng-repeat="service in boundServices = (applicationServicesCtrl.services | filter:applicationServicesCtrl.showInstance | filter:applicationServicesCtrl.search) track by service.metadata.guid" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first and last service cards have respectively left and right padding. We don't show these on other card layouts. Squishing and expanding all works fine.
ng-if="serviceCardCtrl.allowAddOnly && serviceCardCtrl.numAttached > 0"> | ||
{{ serviceCardCtrl.numAttached }} <span translate>app.app-info.app-tabs.services.card.attached</span> | ||
<div class="service-catalogue-card__meta-right"> | ||
{{ ::serviceCardCtrl.service.metadata.created_at | amDateFormat:'MMM Do YYYY HH:mm:ss' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass it through a filter titled 'momentDateFormat'. It'll use the L - LTS format with some magic to ensure it updates on change of locale.
<service-card service="service" app="applicationServicesCtrl.appModel.application" | ||
cnsi-guid="applicationServicesCtrl.cnsiGuid"></service-card> | ||
</div> | ||
<div class="service-manage-message" ng-if="applicationServicesCtrl.managingType">You are currently viewing <b>{{::applicationServicesCtrl.managingType}}</b> instances. <a ng-click="applicationServicesCtrl.filterType = applicationServicesCtrl.ALL_FILTER">Click here</a> to view all types.</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another one for translating. Will need to pull out the from the translation and pass in the type. So maybe something like..
<div translate translate-values"{{ applicationServicesCtrl }}">key1</div> <a translate>key2</a>
"key1": "You are currently viewing {managingType}. " "key2": "View all types"
@@ -11,3 +10,8 @@ | |||
display: flex; | |||
align-items: stretch; | |||
} | |||
|
|||
.service-manage-message { | |||
margin-bottom: 19px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can these be console-unit-size?
|
||
.service-manage-message { | ||
margin-bottom: 19px; | ||
margin-left: 10px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should go if we lose the left/right padding from the edge cards
@@ -0,0 +1,112 @@ | |||
(function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this spec1 file needed?
@@ -264,56 +260,6 @@ | |||
}); | |||
}); | |||
}); | |||
|
|||
it('should contain the service that was created', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to have both these e2e tests live in the new services world
(function () { | ||
'use strict'; | ||
|
||
fdescribe('service-card directive', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fdescribe
* master: (33 commits) Updated post-flight script in response to feedback Add issue_template and cf push log docs Fix incorrect caching and reset behaviour of app wall filters - Ensure that when we reset dodgy cluster/org values we also reset org/space - Previously we were showing filter by 'all' for org/space but still applying filter containing valid org/space guid - Reset fixed by not entering dodgy state Fix create app commit button text Fix the title of the manage users dialog - When managing a single user the user's name was missing from the title - Ensure async task dialog also includes translate-values just like detail view Add readme for deploy/uaa Temporary fix for gulp-sourcemaps Two minor fixes - Ensure we clear any invlaid locale from local storage - Token expired warning now covers the entire endpoint dashboard table again Fix another typo Changes in response to feedback Rename cnap headers to cap (#1235) Add context labels to CI tasks Fix e2e #2 E2E fix Workaround for chome bug - Tripple click on endpoint dashboard endpoint url lead to selection of icon as well "https://api.10.84.93.96.nip.io:8443 Update helm chart to use mariaDB Fix unit tests Fix unit tests Undo helm changes, as these will be done in a different PR Add support for mysql ...
* master: Fix console-unit-tests Fix SQLite version table Ensure we check for missing test dependencies if running in localDevBuild
- Element tag ending - Translation for no service instances - Filter service instances by text - Spacing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @nwmac I pushed one final commit, otherwise looks grand
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Created two new tabs on the applications page 'Service Instances' and 'Services Catalogue'.
Services Catalogue tab is mostly the same as the previous service tab but with the ability to unbind services removed. You can add and manage service instance from this page. The manage service link takes you to the new service tab with a type filter applied.
Service Instances tab is a new list of service instances. This tab will allow you to unbind, search for and filter service instances.
Removed service instance table from the application summary page.
Added service instance count to application summary page.