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

Application services tab #1237

Merged
merged 36 commits into from
Sep 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
c2534d8
Duplicate application service tab as a base for service catalogue
KlapTrap Aug 22, 2017
bfdbd23
Add seperate cards for service catalogue and service tabs
KlapTrap Aug 22, 2017
82b8b41
Fetch and display service instances on application service tab
KlapTrap Aug 22, 2017
71f836f
Ensure both application service tab and service catalogue tab are usi…
KlapTrap Aug 22, 2017
a5512d1
Add relevent fields to services tab cards
KlapTrap Aug 23, 2017
ef6788d
Update service card and properly unbind service instance
KlapTrap Aug 23, 2017
4b07049
Add all management command to the service instance tab
KlapTrap Aug 23, 2017
64a1b81
Manage instance now restricts the instance page by service type
KlapTrap Aug 23, 2017
f4ffbe3
Fix binding filtering and rename service catalogue directives
KlapTrap Aug 24, 2017
cb7e25b
Tidy up i18n and error messages in service and service catalogue pages
KlapTrap Aug 24, 2017
bb1899a
Show friendly message when filtering instances via service catalogue …
KlapTrap Aug 24, 2017
8b7e89e
Changed the application Services tab to Service Instance
KlapTrap Aug 24, 2017
86e2fec
Fixed application services filter clear link click handler
KlapTrap Aug 24, 2017
dbc37c4
Add service count to app summary page and move detach from the action…
KlapTrap Aug 24, 2017
f3b934c
Changed app summary service count string to be inline with surroundin…
KlapTrap Aug 24, 2017
c7d7d3c
Added a couple of comment to services module
KlapTrap Aug 24, 2017
f2713ad
Fixed service card test
KlapTrap Aug 24, 2017
c2385b5
Removed unused manage services module
KlapTrap Aug 24, 2017
ca2191a
Add/fix tests for service tabs
KlapTrap Aug 25, 2017
3ea4f3b
Comvert callback to promise
KlapTrap Aug 25, 2017
c4953bf
Merge branch 'master' into application-services-tab
KlapTrap Aug 25, 2017
3c015d8
Fixed e2e tests
KlapTrap Aug 29, 2017
b916f3c
Merge branch 'master' into application-services-tab
KlapTrap Aug 29, 2017
6f0b4f6
Linting
KlapTrap Aug 29, 2017
a2967dc
Fixed linting and unit tests
KlapTrap Sep 6, 2017
531e483
Merge branch 'master' into application-services-tab
KlapTrap Sep 11, 2017
f9c3fc4
Translated all the things and fixed minor styling issues after PR review
KlapTrap Sep 11, 2017
7875705
Merge branch 'master' into application-services-tab
KlapTrap Sep 12, 2017
6ca40e8
Fixed linting failures from master
KlapTrap Sep 12, 2017
790df8e
Merge remote-tracking branch 'origin/master' into application-service…
nwmac Sep 12, 2017
1f6f744
Merge remote-tracking branch 'origin/master' into application-service…
nwmac Sep 13, 2017
1b8ff97
Fix lint issues
nwmac Sep 13, 2017
72f616e
Merge remote-tracking branch 'origin/master' into application-service…
nwmac Sep 14, 2017
bf94e14
Fixes for failing e2e tests
nwmac Sep 15, 2017
86463a7
Fix localisation of catalogue
nwmac Sep 15, 2017
666b54b
Small fixes
richard-cox Sep 15, 2017
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<span ng-if="galleryCardCtrl.cardData.titleTranslate" class="gallery-card-title" translate>{{ galleryCardCtrl.cardData.titleTranslate }}</span>
<actions-menu class="gallery-card-actions" ng-if="galleryCardCtrl.cardActions"
actions="galleryCardCtrl.cardActions" action-target="galleryCardCtrl.cardData"
enable-button-mode="true"
menu-position="{{galleryCardCtrl.actionsPosition}}">
</actions-menu>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
*/
function init() {
$scope.$watch(function () {
return vm.inputOptions.length;
return vm.inputOptions ? vm.inputOptions.length : 0;
}, function (length) {
if (length === 1) {
vm.setValue(vm.inputOptions[0]);
Expand Down
8 changes: 8 additions & 0 deletions components/cloud-foundry/frontend/i18n/en_GB/overrides.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@
"summary-panel": {
"org-label": "Organisation"
}
},
"services": {
"messages": {
"view-catalogue-link": "service catalogue"
}
},
"service-catalogue": {
"label": "Service Catalogue"
}
}
}
Expand Down
95 changes: 91 additions & 4 deletions components/cloud-foundry/frontend/i18n/en_US/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"ssh-restart-warning": "Note: Enabling or disabling SSH Access will restart all application instances.",
"ssh-no-edit": "Note: SSH Access for this application can not be modified as the Space is set to disallow all SSH access."
},
"app-instances-actions" :{
"app-instances-actions": {
"terminate": "Terminate"
},
"terminate-instance": {
Expand Down Expand Up @@ -113,6 +113,7 @@
"org-label": "[[@:organization]]",
"space-label": "[[@:space]]",
"edit-button": "Edit",
"service-count": "Services",
"edit-dialog": {
"title": "Edit App",
"name-label": "Application Name",
Expand Down Expand Up @@ -183,7 +184,93 @@
"scroll-button": "Scroll To Bottom"
},
"services": {
"label": "Services",
"label": "Service Instances",
"labels": {
"type": "Type",
"description": "Description",
"created-date": "Date created",
"env-variables": "Show environment variables"
},
"messages": {
"no-services": "This application has no bound service instances.",
"view-catalogue": "To view the available services for this application, please visit the",
"view-catalogue-link": "service catalog",
"no-services-search": "No services instances found matching your search.",
"currently-viewing-1": "You are currently viewing {{ type }} instances.",
"click-here": "Click here",
"currently-viewing-2": "to view all types."
},
"types": {
"show": "Show",
"all": "All Types"
},
"card": {
"version": "Version",
"attached": "Attached",
"cannot-bind": "This service cannot be bound to an Application",
"actions": {
"detach": "Detach"
}
},
"unbind": {
"title": "Detach Service",
"description": "Are you sure you want to detach {{name}}?",
"error-message": "There was a problem detaching this service. Please try again. If this error persists, please contact the Administrator.",
"button": {
"yes": "Detach",
"no": "@:buttons.cancel"
},
"error": "Some applications failed to detach from the service instance",
"success": "Service instance successfully detached"
},
"delete": {
"title": "Delete Service",
"description": "Are you sure you want to delete {{name}}?",
"error-message": "There was a problem deleting this service. Please try again. If this error persists, please contact the Administrator.",
"button": {
"yes": "Delete",
"no": "@:buttons.cancel"
},
"success": "Service instance successfully deleted"
},
"view-envs": {
"title": "{{instanceName}}: Variables"
},
"add": {
"title": "Add Service to {{ appName }}",
"back-to-services": "Back to Services",
"add": "Add Service Instance",
"create": {
"title": "Create New Instance",
"name-label": "Name",
"name-error-required": "Name is required",
"name-error-unique": "Name must be unique",
"name-error-pattern": "Name contains invalid pattern",
"plan-label": "Plan",
"plan-placeholder": "Select a Plan"
},
"existing": {
"title": "Choose Existing Instance",
"name-label": "Name",
"plan-label": "Plan",
"apps-label": "Apps Attached"
},
"notifications": {
"success": "The '{{ service }}' service has been successfully attached to application '{{ appName }}'",
"failure-create": "There was a problem creating the instance. Please try again. If this error persists, please contact the administrator.",
"failure-bind": "There was a problem binding the service instance to the application. Please try again. If this error persists, please contact the administrator."
},
"acknowledge": {
"info": "A best practice for persisting the binding of this service to your application is to update your application's manifest file.",
"add-to-manifest": "Add to Manifest"
}
}
},
"service-catalogue": {
"label": "Service Catalog",
"messages": {
"no-services": "There are no services available for this endpoint. Please contact your Administrator to add services so you can bind them to your applications."
},
"categories": {
"show": "Show",
"attached": "Attached Service Instances",
Expand Down Expand Up @@ -303,7 +390,7 @@
"empty": "No events available",
"error": "An error occurred retrieving events",
"detail": "Event Detail",
"labels":{
"labels": {
"timestamp": "Timestamp",
"type": "Type",
"actor-name": "Actor Name",
Expand Down Expand Up @@ -360,4 +447,4 @@
}
}
}
}
}
15 changes: 7 additions & 8 deletions components/cloud-foundry/frontend/src/model/space.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,10 @@
* @public
*/
function updateRoutesCount(cnsiGuid, guid, count) {
var promise = $q.resolve({data: {total_results: count}});
var promise = $q.resolve({ data: { total_results: count } });
if (!count) {
promise = apiManager.retrieve('cloud-foundry.api.Spaces')
.ListAllRoutesForSpace(guid, {'results-per-page': 1}, modelUtils.makeHttpConfig(cnsiGuid));
.ListAllRoutesForSpace(guid, { 'results-per-page': 1 }, modelUtils.makeHttpConfig(cnsiGuid));
}
return promise.then(function (response) {
_.set(model, 'spaces.' + cnsiGuid + '.' + guid + '.details.totalRoutes', response.data.total_results);
Expand All @@ -461,10 +461,10 @@
* @public
*/
function updateServiceInstanceCount(cnsiGuid, guid, count) {
var promise = $q.resolve({data: {total_results: count}});
var promise = $q.resolve({ data: { total_results: count } });
if (!count) {
promise = apiManager.retrieve('cloud-foundry.api.Spaces')
.ListAllServiceInstancesForSpace(guid, {'results-per-page': 1}, modelUtils.makeHttpConfig(cnsiGuid));
.ListAllServiceInstancesForSpace(guid, { 'results-per-page': 1 }, modelUtils.makeHttpConfig(cnsiGuid));
}
return promise.then(function (response) {
_.set(model, 'spaces.' + cnsiGuid + '.' + guid + '.details.totalServiceInstances', response.data.total_results);
Expand All @@ -484,10 +484,10 @@
* @public
*/
function updateServiceCount(cnsiGuid, guid, count) {
var promise = $q.resolve({data: {total_results: count}});
var promise = $q.resolve({ data: { total_results: count } });
if (!count) {
promise = apiManager.retrieve('cloud-foundry.api.Spaces')
.ListAllServicesForSpace(guid, {'results-per-page': 1}, modelUtils.makeHttpConfig(cnsiGuid));
.ListAllServicesForSpace(guid, { 'results-per-page': 1 }, modelUtils.makeHttpConfig(cnsiGuid));
}
return promise.then(function (response) {
_.set(model, 'spaces.' + cnsiGuid + '.' + guid + '.details.totalServices', response.data.total_results);
Expand Down Expand Up @@ -732,8 +732,7 @@
var updateData = {
allow_ssh: enabled
};
return spaceApi.UpdateSpace(spaceGuid, updateData, null,
modelUtils.makeHttpConfig(cnsiGuid)).then(function (response) {
return spaceApi.UpdateSpace(spaceGuid, updateData, null, modelUtils.makeHttpConfig(cnsiGuid)).then(function (response) {
// Refresh the space itself
return getSpaceDetails(cnsiGuid, response.data);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
'cloud-foundry.view.applications.application.summary',
'cloud-foundry.view.applications.application.log-stream',
'cloud-foundry.view.applications.application.services',
'cloud-foundry.view.applications.application.service-catalogue',
'cloud-foundry.view.applications.application.variables',
'cloud-foundry.view.applications.application.events'
])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import 'services/services',
'service-catalogue/service-catalogue',
'summary/summary',
'log-stream/cf-log-viewer',
'variables/variables';
Expand Down Expand Up @@ -47,7 +48,7 @@
cursor: pointer;
}
}

}

.application-header {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
'use strict';

angular
.module('cloud-foundry.view.applications.application.log-stream',
[
'cloud-foundry.view.applications.application.log-stream.cfLogViewer',
'cloud-foundry.view.applications.application.log-stream.cfLogViewerReize'
])
.module('cloud-foundry.view.applications.application.log-stream', [
'cloud-foundry.view.applications.application.log-stream.cfLogViewer',
'cloud-foundry.view.applications.application.log-stream.cfLogViewerReize'])
.config(registerRoute)
.run(registerAppTab);

Expand All @@ -25,7 +23,7 @@
hide: false,
uiSref: 'cf.applications.application.log-stream',
uiSrefParam: function () {
return {guid: $stateParams.guid};
return { guid: $stateParams.guid };
},
label: 'app.app-info.app-tabs.log-stream.label'
});
Expand Down
Loading