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

Use consistent icons #2517

Merged
merged 5 commits into from
Jun 28, 2018
Merged
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<div class="app-metadata__two-cols">
<app-metadata-item icon="touch_app" label="App State">{{ appSvc.app.entity.state }}</app-metadata-item>
<app-metadata-item icon="card_travel" label="Package State">{{ appSvc.app.entity.package_state }}</app-metadata-item>
<app-metadata-item icon="developer_board" label="Services">{{(applicationService.appSummary$| async)?.entity?.entity.services?.length || '0' }}</app-metadata-item>
<app-metadata-item icon="http" label="Routes">{{(applicationService.appSummary$| async)?.entity?.entity?.routes?.length || '0' }}</app-metadata-item>
<app-metadata-item icon="service" iconFont="stratos-icons" label="Services">{{(applicationService.appSummary$| async)?.entity?.entity.services?.length || '0' }}</app-metadata-item>
<app-metadata-item icon="network_route" iconFont="stratos-icons" label="Routes">{{(applicationService.appSummary$| async)?.entity?.entity?.routes?.length || '0' }}</app-metadata-item>
<app-metadata-item icon="developer_mode" label="SSH Enabled">{{ sshStatus$ | async }}</app-metadata-item>
</div>
</div>
Expand All @@ -47,7 +47,7 @@
<a [routerLink]="['/cloud-foundry/' + appSvc.cf?.guid]" matTooltip="CF API URL: {{ getFullApiUrl(appSvc.cf) }}">{{ appSvc.cf?.name}}</a>
</app-metadata-item>
<ng-container *ngIf="applicationService.appOrg$ | async as appOrg">
<app-metadata-item icon="location_city" label="Organization">
<app-metadata-item iconFont="stratos-icons" icon="organization" label="Organization">
<a [routerLink]="['/cloud-foundry/' + appSvc.cf?.guid + '/organizations/' + appOrg.metadata.guid]">{{ appOrg.entity.name }}</a>
</app-metadata-item>
<app-metadata-item *ngIf="applicationService.appSpace$ | async as appSpace" icon="language" label="Space">
Expand Down Expand Up @@ -87,7 +87,7 @@
{{(applicationService.applicationStratProject$| async)?.deploySource.url}}
</div>
</app-metadata-item>
<app-metadata-item *ngSwitchCase="'github'" icon="code" label="GitHub">
<app-metadata-item *ngSwitchCase="'github'" iconFont="stratos-icons" icon="github" label="GitHub">
<a href="{{ deploySource.url }}/commit/{{ deploySource.commit }}"
rel="noopener noreferrer" target="_blank">
{{ deploySource.commit | slice:0:8 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<app-card-number-metric icon="content_copy" label="App Instances" value="{{ (cfSpaceService.appInstances$ | async) }}" limit="{{ (cfSpaceService.quotaDefinition$ | async)?.entity.app_instance_limit}}"></app-card-number-metric>
</app-tile>
<app-tile>
<app-card-number-metric link="/cloud-foundry/{{cfSpaceService.cfGuid}}/organizations/{{cfSpaceService.orgGuid}}/spaces/{{cfSpaceService.spaceGuid}}/service-instances" icon="extension" label="Service Instances" value="{{ (cfSpaceService.serviceInstances$ | async)?.length }}"
<app-card-number-metric link="/cloud-foundry/{{cfSpaceService.cfGuid}}/organizations/{{cfSpaceService.orgGuid}}/spaces/{{cfSpaceService.spaceGuid}}/service-instances"iconFont="stratos-icons" icon="service" label="Service Instances" value="{{ (cfSpaceService.serviceInstances$ | async)?.length }}"
limit="{{ (cfSpaceService.quotaDefinition$ | async)?.entity.total_services }}"></app-card-number-metric>
</app-tile>
</app-tile-group>
Expand All @@ -28,7 +28,7 @@
<app-card-number-metric link="/cloud-foundry/{{cfSpaceService.cfGuid}}/organizations/{{cfSpaceService.orgGuid}}/spaces/{{cfSpaceService.spaceGuid}}/users" icon="person" label="Users" labelSingular="User" value="{{(cfSpaceService.allSpaceUsers.entities$ | async)?.length}}"></app-card-number-metric>
</app-tile>
<app-tile>
<app-card-number-metric link="/cloud-foundry/{{cfSpaceService.cfGuid}}/organizations/{{cfSpaceService.orgGuid}}/spaces/{{cfSpaceService.spaceGuid}}/routes" icon="language" label="Routes" value="{{ (cfSpaceService.routes$ | async)?.length }}" limit="{{ (cfSpaceService.quotaDefinition$ | async)?.entity.total_routes}}"></app-card-number-metric>
<app-card-number-metric link="/cloud-foundry/{{cfSpaceService.cfGuid}}/organizations/{{cfSpaceService.orgGuid}}/spaces/{{cfSpaceService.spaceGuid}}/routes" iconFont="stratos-icons" icon="network_route" label="Routes" value="{{ (cfSpaceService.routes$ | async)?.length }}" limit="{{ (cfSpaceService.quotaDefinition$ | async)?.entity.total_routes}}"></app-card-number-metric>
</app-tile>
</app-tile-group>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<app-tile-group>
<app-tile>
<app-card-number-metric link="/cloud-foundry/{{cfOrgService.cfGuid}}/organizations/{{cfOrgService.orgGuid}}/spaces" icon="apps" label="Spaces" labelSingular="Space" value="{{ (cfOrgService.spaces$ | async)?.length }}"></app-card-number-metric>
<app-card-number-metric link="/cloud-foundry/{{cfOrgService.cfGuid}}/organizations/{{cfOrgService.orgGuid}}/spaces" icon="language" label="Spaces" labelSingular="Space" value="{{ (cfOrgService.spaces$ | async)?.length }}"></app-card-number-metric>
</app-tile>
<app-tile>
<app-card-number-metric [link]="appLink" icon="apps" label="Applications" labelSingular="Application" value="{{ (cfOrgService.apps$ | async)?.length }}"></app-card-number-metric>
Expand All @@ -27,13 +27,13 @@
<app-card-number-metric icon="memory" label="Memory Usage" units="mb" value="{{ (cfOrgService.totalMem$ | async) }}" limit="{{ (cfOrgService.quotaDefinition$ | async)?.memory_limit }}"></app-card-number-metric>
</app-tile>
<app-tile>
<app-card-number-metric icon="language" label="Routes" value="{{ (cfOrgService.routes$ | async)?.length }}" limit="{{ (cfOrgService.quotaDefinition$ | async)?.total_routes}}"></app-card-number-metric>
<app-card-number-metric iconFont="stratos-icons" icon="network_route" label="Routes" value="{{ (cfOrgService.routes$ | async)?.length }}" limit="{{ (cfOrgService.quotaDefinition$ | async)?.total_routes}}"></app-card-number-metric>
</app-tile>
<app-tile>
<app-card-number-metric icon="domain" label="Private Domains" value="{{ (cfOrgService.privateDomains$ | async)?.length }}" limit="{{ (cfOrgService.quotaDefinition$ | async)?.total_private_domains}}"></app-card-number-metric>
</app-tile>
<app-tile>
<app-card-number-metric icon="extension" label="Service Instances" value="{{ (cfOrgService.serviceInstances$ | async)?.length }}" limit="{{ (cfOrgService.quotaDefinition$ | async)?.total_services }}"></app-card-number-metric>
<app-card-number-metric iconFont="stratos-icons" icon="service" label="Service Instances" value="{{ (cfOrgService.serviceInstances$ | async)?.length }}" limit="{{ (cfOrgService.quotaDefinition$ | async)?.total_services }}"></app-card-number-metric>
</app-tile>
</app-tile-group>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<app-card-number-metric [link]="appLink" icon="apps" label="Applications" labelSingular="Application" value="{{ (cfEndpointService.allApps$ | async)?.length }}"></app-card-number-metric>
</app-tile>
<app-tile>
<app-card-number-metric link="/cloud-foundry/{{cfEndpointService.cfGuid}}/organizations" icon="domain" label="Orgs" labelSingular="Org" value="{{ (cfEndpointService.orgs$ | async)?.length }}"></app-card-number-metric>
<app-card-number-metric link="/cloud-foundry/{{cfEndpointService.cfGuid}}/organizations" iconFont="stratos-icons" icon="organization" label="Orgs" labelSingular="Org" value="{{ (cfEndpointService.orgs$ | async)?.length }}"></app-card-number-metric>
</app-tile>
<app-tile>
<app-card-number-metric link="/cloud-foundry/{{cfEndpointService.cfGuid}}/users" icon="person" label="Users" labelSingular="User" value="{{ (cfEndpointService.users$ | async)?.length }}"></app-card-number-metric>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,14 @@ export class DashboardBaseComponent implements OnInit, OnDestroy, AfterContentIn
},
{
text: 'Services',
matIcon: 'library_books',
matIcon: 'service',
matIconFont: 'stratos-icons',
link: '/services'
},
{
text: 'Cloud Foundry',
matIcon: 'cloud',
matIcon: 'cloud_foundry',
matIconFont: 'stratos-icons',
link: '/cloud-foundry'
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<ul class="side-nav__items">
<li *ngFor="let tab of tabs">
<a *ngIf="!tab.hidden || !(tab.hidden | async)" class="side-nav__item" [routerLink]="[tab.link]" [routerLinkActive]="['side-nav__item--active']">
<mat-icon>{{ tab.matIcon }}</mat-icon> {{ tab.text }}
<mat-icon [fontSet]="tab.matIconFont">{{ tab.matIcon }}</mat-icon> {{ tab.text }}
</a>
</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ $side-nav-header-spacing: $side-nav-padding-h / 2 + $side-nav-mat-icon-width + $
text-decoration: none;
mat-icon {
margin-right: $side-nav-mat-icon-padding-right;
text-align: center;
}
}
&__logo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const SIDENAV_COPYRIGHT = new InjectionToken<string>('Optional copyright
export interface SideNavItem {
text: string;
matIcon: string;
matIconFont?: string;
link: string;
hidden?: Observable<boolean>;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<app-card-number-metric [link]="serviceInstancesLink" icon="library_books" label="Instances" labelSingular="Instance" value="{{ (instances$ | async)?.length }}"></app-card-number-metric>
</app-tile>
<app-tile>
<app-card-number-metric icon="domain" label="Service Plans" labelSingular="Service Plan" value="{{ ( servicePlans$ | async)?.length }}"></app-card-number-metric>
<app-card-number-metric icon="products" iconFont="stratos-icons" label="Service Plans" labelSingular="Service Plan" value="{{ ( servicePlans$ | async)?.length }}"></app-card-number-metric>
</app-tile>
</app-tile-group>
<app-tile-group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
<div class="app-metadata__two-cols">
<app-metadata-item icon="title" label="Description">{{ (description$ | async) }}</app-metadata-item>
<app-metadata-item icon="link" label="Instance Address">{{ apiUrl }}</app-metadata-item>
<!--
<app-metadata-item icon="developer_mode" label="CF Interactions">N/A</app-metadata-item>
-->
<app-metadata-item icon="memory" label="CF API Version">{{ (cfEndpointService.info$ | async)?.entity.entity.api_version }}</app-metadata-item>
<app-metadata-item icon="info_outline" label="CF API Version">{{ (cfEndpointService.info$ | async)?.entity.entity.api_version }}</app-metadata-item>
</div>
<div class="app-metadata__two-cols">
<app-metadata-item icon="person" label="Account Username">{{ (cfEndpointService.endpoint$ | async )?.entity.user.name }}</app-metadata-item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="number-metric-card">
<mat-card class="number-metric-card__container">
<app-card-status [status$]="status$"></app-card-status>
<mat-icon *ngIf="icon" class="number-metric-card__icon">{{ icon }}</mat-icon>
<mat-icon *ngIf="icon" [fontSet]="iconFont" class="number-metric-card__icon">{{ icon }}</mat-icon>
<div>
<div class="number-metric-card__value" *ngIf="(status$ | async) as status">
<span [ngClass]="{'text-danger': status === 'error', 'text-warning': status === 'warning'}">{{ formattedValue }}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { CardStatus } from '../../application-state/application-state.service';
export class CardNumberMetricComponent implements OnInit, OnChanges {

@Input() icon: string;
@Input() iconFont: string;
@Input() label: string;
@Input() labelSingular: string;
@Input() limit: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="metadata-item">
<mat-icon *ngIf="icon && !tooltip" class="metadata-item__icon" [ngClass]="{'metadata-item__icon_spacer': (icon === '-')}">{{ icon }}</mat-icon>
<mat-icon *ngIf="icon && tooltip" matTooltip="{{ tooltip }}" class="metadata-item__icon" [ngClass]="{'metadata-item__icon_spacer': (icon === '-')}">{{ icon }}</mat-icon>
<mat-icon *ngIf="icon && !tooltip" class="metadata-item__icon" [fontSet]="iconFont" [ngClass]="{'metadata-item__icon_spacer': (icon === '-')}">{{ icon }}</mat-icon>
<mat-icon *ngIf="icon && tooltip" matTooltip="{{ tooltip }}" [fontSet]="iconFont" class="metadata-item__icon" [ngClass]="{'metadata-item__icon_spacer': (icon === '-')}">{{ icon }}</mat-icon>
<div class="metadata-item__content">
<div class="metadata-item__label">{{ label }}</div>
<div class="metadata-item__value">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export class MetadataItemComponent implements OnInit {

@Input('icon') private icon: string;

@Input('iconFont') private iconFont: string;

@Input('label') private label: string;

@Input('tooltip') private tooltip: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class='service-icon' [ngClass]="{'service-icon__padding': addMenuPadding}">
<mat-icon *ngIf="!image">cloud_circle</mat-icon>
<mat-icon *ngIf="!image" fontSet="stratos-icons">service</mat-icon>
<img [src]="image | safeImg" *ngIf="image" (error)="imageLoadError()">
</div>
21 changes: 21 additions & 0 deletions src/frontend/assets/fonts/stratos/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 SUSE Linux

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Binary file not shown.
Loading