diff --git a/src/plugins/cloud-foundry/api/service/service.api.js b/src/plugins/cloud-foundry/api/service/service.api.js index 0611339c37..bd24c7bd52 100644 --- a/src/plugins/cloud-foundry/api/service/service.api.js +++ b/src/plugins/cloud-foundry/api/service/service.api.js @@ -38,7 +38,7 @@ * @function all * @memberof cloud-foundry.api.service * @description Retrieve all the services from cloud foundry. - * @returns {promise} + * @returns {promise} a promise object * @public */ all: function () { @@ -50,7 +50,7 @@ * @memberof cloud-foundry.api.service * @description Retrieve summary of service with given app id * @param {string} guid - the service id - * @returns {promise} + * @returns {promise} a promise object * @public */ summary: function (guid) { diff --git a/src/plugins/cloud-foundry/cloud-foundry.scss b/src/plugins/cloud-foundry/cloud-foundry.scss index beb3426efe..a669f5e46a 100644 --- a/src/plugins/cloud-foundry/cloud-foundry.scss +++ b/src/plugins/cloud-foundry/cloud-foundry.scss @@ -1,7 +1,73 @@ +@import "view/applications/applications"; +// TODO may need to move these rule out to helio-ui-theme .action-bar { height: $hpe-unit-space * 3; line-height: $hpe-unit-space * 3; vertical-align: middle; margin-top: $hpe-unit-space; + padding-left: $hpe-unit-space; + padding-right: $hpe-unit-space; + + .action-target-name { + display: inline-block; + font-size: $hpe-unit-space - 3px; + margin-left: $hpe-unit-space * .75; + } + + .action-target-state { + color: $brand-primary; + display: inline-block; + font-size: $hpe-unit-space + 3px; + } + + .btn { + margin-left: $hpe-unit-space / 3; + } +} + +table.table { + > thead > tr > th, + > tbody > tr:not([table-inline-message]) > td, + > tfoot > tr > td { + + .icon-link { + color: $text-color; + text-decoration: none; + + &:hover, + &:active { + color: $link-color; + text-decoration: none; + } + } + + .helion-icon { + line-height: 0; + font-size: $hpe-unit-space; + vertical-align: middle; + } + } +} + +.action-header { + + &.panel-heading { + line-height: 1; + padding-top: $hpe-unit-space * 1.1; + padding-bottom: $hpe-unit-space * .5; + } + + .btn { + line-height: 1; + text-transform: capitalize; + + * { + line-height: 0; + } + + .helion-icon { + margin-right: $hpe-unit-space / 3 + } + } } diff --git a/src/plugins/cloud-foundry/model/application/application.model.js b/src/plugins/cloud-foundry/model/application/application.model.js index a904445613..288fb93372 100644 --- a/src/plugins/cloud-foundry/model/application/application.model.js +++ b/src/plugins/cloud-foundry/model/application/application.model.js @@ -96,7 +96,7 @@ * @memberof cloud-foundry.model.application * @description get summary of an application at the model layer * @param {string} guid - the application id - * @returns {promise} + * @returns {promise} a promise object * @public */ getAppSummary: function (guid) { diff --git a/src/plugins/cloud-foundry/view/applications/application/application.html b/src/plugins/cloud-foundry/view/applications/application/application.html index 4eb467d029..6baaf078ea 100644 --- a/src/plugins/cloud-foundry/view/applications/application/application.html +++ b/src/plugins/cloud-foundry/view/applications/application/application.html @@ -1,17 +1,25 @@
- {{ appCtrl.model.application.summary.state }} - {{ appCtrl.model.application.summary.name }} + + + + {{ appCtrl.model.application.summary.name }}
- - -
@@ -30,4 +38,8 @@ -
+
+
+ +
+
diff --git a/src/plugins/cloud-foundry/view/applications/application/application.module.js b/src/plugins/cloud-foundry/view/applications/application/application.module.js index 8cc8525357..09348d36df 100644 --- a/src/plugins/cloud-foundry/view/applications/application/application.module.js +++ b/src/plugins/cloud-foundry/view/applications/application/application.module.js @@ -44,6 +44,18 @@ angular.extend(ApplicationController.prototype, { init: function () { this.model.getAppSummary(this.id); + }, + + launch: function () { + this.model.launch(this.id); + }, + + restart: function () { + this.model.restart(this.id); + }, + + stop: function () { + this.model.stop(this.id); } }); diff --git a/src/plugins/cloud-foundry/view/applications/application/application.scss b/src/plugins/cloud-foundry/view/applications/application/application.scss new file mode 100644 index 0000000000..4e4f851a63 --- /dev/null +++ b/src/plugins/cloud-foundry/view/applications/application/application.scss @@ -0,0 +1 @@ +@import "summary/summary"; diff --git a/src/plugins/cloud-foundry/view/applications/application/summary/summary.html b/src/plugins/cloud-foundry/view/applications/application/summary/summary.html index b9ef2a7390..a20eb0ea6f 100644 --- a/src/plugins/cloud-foundry/view/applications/application/summary/summary.html +++ b/src/plugins/cloud-foundry/view/applications/application/summary/summary.html @@ -1,50 +1,129 @@ -
-
Summary
- -
+
+
+ Summary + + + Edit + +
-
-
Services
-
    -
  • - {{ service }} -
  • -
-
+
+
+
+
MEMORY UTILIZATION
+
0 / {{ appCtrl.model.application.summary.memory }} MB
+ +
INSTANCES
+
{{ appCtrl.model.application.summary.running_instances }} / {{ appCtrl.model.application.summary.instances }}
+ +
DISK QUOTA
+
0 / {{ appCtrl.model.application.summary.disk_quota }} MB
+ +
STATE
+
+
MODIFIED
+
+
+
+
+
+
BUILDPACK
+
{{ appCtrl.model.application.summary.buildpack }}
-
-
Routes
-
    -
  • - {{ route }} -
  • -
+
CF TARGET
+
+ +
CF LOGIN
+
+
+
+
+
+ +
+
+ Service Instances + + + Add service + +
+
+ + + + + + + + + + + + + + + + + +
NameServicePlanENV.VARIABLES
{{ service.name }}{{ service.service_plan.service.label }}{{ service.service_plan.name }} + +
+
+
+
+ Routes + + + Add routes + +
+
+ + + + + + + + + + + + + +
RouteActions
{{ route.host + '.' + route.domain.name + '/' + route.path }}
+
+
-
-
Instances
- +
+
+ Instances + + + Add instances + +
+
+ + + + + + + + + + + + + + + + +
IndexStatus
{{ $index }}{{ instance.name }}
+
diff --git a/src/plugins/cloud-foundry/view/applications/application/summary/summary.scss b/src/plugins/cloud-foundry/view/applications/application/summary/summary.scss new file mode 100644 index 0000000000..a7c777504d --- /dev/null +++ b/src/plugins/cloud-foundry/view/applications/application/summary/summary.scss @@ -0,0 +1,8 @@ +.application-details .summary .data-body { + padding: $hpe-unit-space * .75 $hpe-unit-space; + + .dl-horizontal > * { + margin-bottom: $hpe-unit-space * .5; + margin-left: auto; + } +} diff --git a/src/plugins/cloud-foundry/view/applications/applications.scss b/src/plugins/cloud-foundry/view/applications/applications.scss new file mode 100644 index 0000000000..e91ee0ce6f --- /dev/null +++ b/src/plugins/cloud-foundry/view/applications/applications.scss @@ -0,0 +1 @@ +@import "application/application"; diff --git a/src/plugins/cloud-foundry/view/applications/list/gallery-view/application-gallery-card/application-gallery-card.directive.js b/src/plugins/cloud-foundry/view/applications/list/gallery-view/application-gallery-card/application-gallery-card.directive.js index 3ba39edae8..5296fc8e88 100644 --- a/src/plugins/cloud-foundry/view/applications/list/gallery-view/application-gallery-card/application-gallery-card.directive.js +++ b/src/plugins/cloud-foundry/view/applications/list/gallery-view/application-gallery-card/application-gallery-card.directive.js @@ -19,16 +19,14 @@ }; } - ApplicationGalleryCardController.$inject = ['$state']; + ApplicationGalleryCardController.$inject = [ + '$state' + ]; function ApplicationGalleryCardController($state) { this.$state = $state; this.cardData = { - title: this.app.entity.name, - status: { - description: this.app.entity.state === 'STARTED' ? '' : this.app.entity.state, - classes: this.app.entity.state === 'STARTED' ? '' : 'warning' - } + title: this.app.entity.name }; } diff --git a/src/plugins/cloud-foundry/view/applications/list/gallery-view/application-gallery-card/application-gallery-card.html b/src/plugins/cloud-foundry/view/applications/list/gallery-view/application-gallery-card/application-gallery-card.html index c788a955ca..8673b51d10 100644 --- a/src/plugins/cloud-foundry/view/applications/list/gallery-view/application-gallery-card/application-gallery-card.html +++ b/src/plugins/cloud-foundry/view/applications/list/gallery-view/application-gallery-card/application-gallery-card.html @@ -1,14 +1,15 @@ - GUID: {{applicationGalleryCardCtrl.app.metadata.guid}} -
- Created: -
- Updated: -
- Allocated Memory: {{applicationGalleryCardCtrl.app.entity.memory}} MB -
- Allocated Disk Space: {{applicationGalleryCardCtrl.app.entity.disk_quota}} MB -
- App Instances: {{applicationGalleryCardCtrl.app.entity.instances}} +
+
Memory Utilization
+
{{applicationGalleryCardCtrl.app.entity.memory}} MB
+
Instances
+
{{applicationGalleryCardCtrl.app.entity.instances}}
+
Disk Quota
+
{{applicationGalleryCardCtrl.app.entity.disk_quota}}
+
State
+
{{applicationGalleryCardCtrl.app.entity.state}}
+
Modified
+
{{applicationGalleryCardCtrl.app.metadata.updated_at | date : 'M/d/yy h:mm:ss a'}}
+