Skip to content

Commit

Permalink
Styling of services tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelly Domico committed Mar 24, 2016
1 parent bed16b4 commit d001825
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
@import "services/services";
@import "summary/summary";
Original file line number Diff line number Diff line change
@@ -1,8 +1,36 @@
<h1 ui-view="title">Application Services for {{ applicationServicesCtrl.appModel.application.summary.name }}</h1>

<ul ng-repeat="service in applicationServicesCtrl.model.data.resources track by service.metadata.guid">
<li><strong>{{service.entity.label}} (v{{service.entity.version}}):</strong> {{service.entity.description}}</li>

</ul>


<div class="panel panel-default"
ng-repeat="service in applicationServicesCtrl.model.data.resources track by service.metadata.guid">
<div class="panel-body service-panel">
<div class="col-md-6 service-text">
<i class="helion-icon helion-icon-4x helion-icon-Service_business service-icon"></i>
<div>
<h4 class="font-semi-bold">{{ ::service.entity.label }}</h4>
<p>
{{ ::service.entity.description }}. Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat.
</p>
</div>
</div>
<div class="col-md-6 service-metadata">
<dl>
<dt>Version</dt>
<dd>{{ ::service.entity.version }}</dd>
<dt>Category</dt>
<dd>Data and Analytics / Graph</dd>
<dt class="service-attached">1 Attached</dt>
</dl>
<div class="service-actions">
<actions-menu actions="applicationServicesCtrl.serviceActions"
action-target="service" menu-icon="helion-icon helion-icon-More"
menu-position="actions-menu-right">
</actions-menu>
<button class="btn btn-sm btn-link">
Add Service
<i class="helion-icon helion-icon-Plus"></i>
</button>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
});
}


ApplicationServicesController.$inject = [
'app.model.modelManager',
'$stateParams'
Expand All @@ -34,9 +33,27 @@
*/
function ApplicationServicesController(modelManager, $stateParams) {
this.model = modelManager.retrieve('cloud-foundry.model.service');
this.id = $stateParams.guid;
this.model.all()
this.appModel = modelManager.retrieve('cloud-foundry.model.application');
this.id = $stateParams.guid;
this.model.all();
this.serviceActions = [
{
name: 'Detach',
execute: function (target) {
/* eslint-disable */
alert('Detach ' + target.entity.label);
/* eslint-enable */
}
},
{
name: 'Manage Services',
execute: function (target) {
/* eslint-disable */
alert('Manage services for ' + target.entity.label);
/* eslint-enable */
}
}
];
}

angular.extend(ApplicationServicesController.prototype, {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
.service-panel {
display: flex;
align-items: stretch;
}

.service-text {
display: flex;
}

.service-icon {
display: block;
padding: $hpe-unit-space * 1.5;
padding-left: 0;
}

.service-metadata {
display: flex;
padding-left: $hpe-unit-space;

dt {
text-transform: uppercase;

&:not(:first-of-type) {
margin-top: $hpe-unit-space / 2;
}
}

.service-actions {
display: flex;
flex-direction: column;
margin-left: auto;
text-align: right;

.btn-link {
margin-top: auto;
padding-right: 0;

&:hover,
&:focus,
&:active {
text-decoration: none;
}

.helion-icon {
font-weight: $hpe-font-weight-semibold;
}
}
}

.service-attached:before {
font-family: 'helion-icons';
content: '\e916';
margin-right: 5px;
}
}

0 comments on commit d001825

Please sign in to comment.