Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
fix(upgrade): update <template> to <ng-template>
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuawilson committed Apr 3, 2017
1 parent 99ae25d commit 8374fcc
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 67 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<span [ngSwitch]="status" class="hide-ng-leave status-icon" title="build status {{status}}">
<template ngSwitchCase="Complete"><i class="fa fa-check-circle text-success"></i></template>
<template ngSwitchCase="Failed"><i class="fa fa-times-circle text-danger"></i></template>
<ng-template ngSwitchCase="Complete"><i class="fa fa-check-circle text-success"></i></ng-template>
<ng-template ngSwitchCase="Failed"><i class="fa fa-times-circle text-danger"></i></ng-template>

<!--
<template ngSwitchCase="Failed"><span class="fa fa-times text-danger" aria-hidden="true"></span></template>
<template ngSwitchCase="Complete"><span class="fa fa-check text-success" aria-hidden="true"></span></template>
<ng-template ngSwitchCase="Failed"><span class="fa fa-times text-danger" aria-hidden="true"></span></ng-template>
<ng-template ngSwitchCase="Complete"><span class="fa fa-check text-success" aria-hidden="true"></span></ng-template>
-->
<template ngSwitchCase="Completed"><span class="fa fa-check text-success" aria-hidden="true"></span></template>
<template ngSwitchCase="Cancelled"><span class="fa fa-ban text-muted" aria-hidden="true"></span></template>
<template ngSwitchCase="Active"><span class="fa fa-refresh" aria-hidden="true"></span></template>
<template ngSwitchCase="Error"><span class="fa fa-times text-danger" aria-hidden="true"></span></template>
<template ngSwitchCase="New"><span class="spinner spinner-xs spinner-inline" aria-hidden="true"></span></template>
<template ngSwitchCase="Pending"><span class="spinner spinner-xs spinner-inline" aria-hidden="true"></span></template>
<template ngSwitchCase="Running"><span class="fa fa-refresh" aria-hidden="true"></span></template>
<template ngSwitchCase="Succeeded"><span class="fa fa-check text-success" aria-hidden="true"></span></template>
<template ngSwitchCase="Bound"><span class="fa fa-check text-success" aria-hidden="true"></span></template>
<template ngSwitchCase="Terminating"><span class="fa fa-times text-danger" aria-hidden="true"></span></template>
<template ngSwitchCase="Terminated"><span class="fa fa-times text-danger" aria-hidden="true"></span></template>
<template ngSwitchCase="Unknown"><span class="fa fa-question text-danger" aria-hidden="true"></span></template>
<ng-template ngSwitchCase="Completed"><span class="fa fa-check text-success" aria-hidden="true"></span></ng-template>
<ng-template ngSwitchCase="Cancelled"><span class="fa fa-ban text-muted" aria-hidden="true"></span></ng-template>
<ng-template ngSwitchCase="Active"><span class="fa fa-refresh" aria-hidden="true"></span></ng-template>
<ng-template ngSwitchCase="Error"><span class="fa fa-times text-danger" aria-hidden="true"></span></ng-template>
<ng-template ngSwitchCase="New"><span class="spinner spinner-xs spinner-inline" aria-hidden="true"></span></ng-template>
<ng-template ngSwitchCase="Pending"><span class="spinner spinner-xs spinner-inline" aria-hidden="true"></span></ng-template>
<ng-template ngSwitchCase="Running"><span class="fa fa-refresh" aria-hidden="true"></span></ng-template>
<ng-template ngSwitchCase="Succeeded"><span class="fa fa-check text-success" aria-hidden="true"></span></ng-template>
<ng-template ngSwitchCase="Bound"><span class="fa fa-check text-success" aria-hidden="true"></span></ng-template>
<ng-template ngSwitchCase="Terminating"><span class="fa fa-times text-danger" aria-hidden="true"></span></ng-template>
<ng-template ngSwitchCase="Terminated"><span class="fa fa-times text-danger" aria-hidden="true"></span></ng-template>
<ng-template ngSwitchCase="Unknown"><span class="fa fa-question text-danger" aria-hidden="true"></span></ng-template>

<!-- Container Runtime States -->
<template ngSwitchDefault><span class="pficon-warning-triangle-o"></span></template>
<ng-template ngSwitchDefault><span class="pficon-warning-triangle-o"></span></ng-template>
</span>
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<span [ngSwitch]="phase" title="pod status: {{phase}}">
<template ngSwitchCase="Ready"><span class="pficon-running"></span></template>
<template ngSwitchCase="Running"><span class="pficon-restart"></span></template>
<template ngSwitchCase="Completed"><span class="pficon-ok"></span></template>
<template ngSwitchCase="Succeeded"><span class="pficon-ok"></span></template>
<template ngSwitchCase="Failed"><span class="pficon-error-circle-o"></span></template>
<template ngSwitchCase="Pending"><i class="fa fa-download" aria-hidden="true"></i></template>
<template ngSwitchCase="Terminating"><i class="fa fa-times text-danger" aria-hidden="true"></i></template>
<ng-template ngSwitchCase="Ready"><span class="pficon-running"></span></ng-template>
<ng-template ngSwitchCase="Running"><span class="pficon-restart"></span></ng-template>
<ng-template ngSwitchCase="Completed"><span class="pficon-ok"></span></ng-template>
<ng-template ngSwitchCase="Succeeded"><span class="pficon-ok"></span></ng-template>
<ng-template ngSwitchCase="Failed"><span class="pficon-error-circle-o"></span></ng-template>
<ng-template ngSwitchCase="Pending"><i class="fa fa-download" aria-hidden="true"></i></ng-template>
<ng-template ngSwitchCase="Terminating"><i class="fa fa-times text-danger" aria-hidden="true"></i></ng-template>

<template ngSwitchCase="ContainerCreating" class="spinner spinner-xs spinner-inline" aria-hidden="true"></template>
<template ngSwitchCase="CrashLoopBackOff" class="fa fa-times text-danger" aria-hidden="true"></template>
<template ngSwitchCase="ImagePullBackOff" class="fa fa-times text-danger" aria-hidden="true"></template>
<template ngSwitchCase="ImageInspectError" class="fa fa-times text-danger" aria-hidden="true"></template>
<template ngSwitchCase="ErrImagePull" class="fa fa-times text-danger" aria-hidden="true"></template>
<template ngSwitchCase="ErrImageNeverPull" class="fa fa-times text-danger" aria-hidden="true"></template>
<template ngSwitchCase="no matching container" class="fa fa-times text-danger" aria-hidden="true"></template>
<template ngSwitchCase="RegistryUnavailable" class="fa fa-times text-danger" aria-hidden="true"></template>
<template ngSwitchCase="RunContainerError" class="fa fa-times text-danger" aria-hidden="true"></template>
<template ngSwitchCase="KillContainerError" class="fa fa-times text-danger" aria-hidden="true"></template>
<template ngSwitchCase="VerifyNonRootError" class="fa fa-times text-danger" aria-hidden="true"></template>
<template ngSwitchCase="SetupNetworkError" class="fa fa-times text-danger" aria-hidden="true"></template>
<template ngSwitchCase="TeardownNetworkError" class="fa fa-times text-danger" aria-hidden="true"></template>
<template ngSwitchCase="DeadlineExceeded" class="fa fa-times text-danger" aria-hidden="true"></template>
<ng-template ngSwitchCase="ContainerCreating" class="spinner spinner-xs spinner-inline" aria-hidden="true"></ng-template>
<ng-template ngSwitchCase="CrashLoopBackOff" class="fa fa-times text-danger" aria-hidden="true"></ng-template>
<ng-template ngSwitchCase="ImagePullBackOff" class="fa fa-times text-danger" aria-hidden="true"></ng-template>
<ng-template ngSwitchCase="ImageInspectError" class="fa fa-times text-danger" aria-hidden="true"></ng-template>
<ng-template ngSwitchCase="ErrImagePull" class="fa fa-times text-danger" aria-hidden="true"></ng-template>
<ng-template ngSwitchCase="ErrImageNeverPull" class="fa fa-times text-danger" aria-hidden="true"></ng-template>
<ng-template ngSwitchCase="no matching container" class="fa fa-times text-danger" aria-hidden="true"></ng-template>
<ng-template ngSwitchCase="RegistryUnavailable" class="fa fa-times text-danger" aria-hidden="true"></ng-template>
<ng-template ngSwitchCase="RunContainerError" class="fa fa-times text-danger" aria-hidden="true"></ng-template>
<ng-template ngSwitchCase="KillContainerError" class="fa fa-times text-danger" aria-hidden="true"></ng-template>
<ng-template ngSwitchCase="VerifyNonRootError" class="fa fa-times text-danger" aria-hidden="true"></ng-template>
<ng-template ngSwitchCase="SetupNetworkError" class="fa fa-times text-danger" aria-hidden="true"></ng-template>
<ng-template ngSwitchCase="TeardownNetworkError" class="fa fa-times text-danger" aria-hidden="true"></ng-template>
<ng-template ngSwitchCase="DeadlineExceeded" class="fa fa-times text-danger" aria-hidden="true"></ng-template>

<template ngSwitchDefault><span class="pficon-warning-triangle-o"></span></template>
<ng-template ngSwitchDefault><span class="pficon-warning-triangle-o"></span></ng-template>
</span>
Original file line number Diff line number Diff line change
Expand Up @@ -8,59 +8,59 @@ <h2>{{e.environment.name}}</h2>
</small>

<alm-tree-list #treeList [listTemplate]="treeListTemplate" [nodes]="e.kinds" [options]="options" [showExpander]="false">
<template #treeListTemplate let-node="node" let-index="index">
<ng-template #treeListTemplate let-node="node" let-index="index">
<div [ngSwitch]="node.parent?.data?.kind?.path?.toLowerCase()">
<div *ngSwitchCase="'configmaps'" class="environment-listing">
<alm-tree-list-item [node]="node" [template]="treeListItemTemplate">
<template #treeListItemTemplate>
<ng-template #treeListItemTemplate>
<fabric8-configmaps-list [configmaps]="node.data.data | async" [loading]="node.data.loading | async" [prefix]="'namespaces/' + e.environment.namespaceName + '/configmaps'"></fabric8-configmaps-list>
</template>
</ng-template>
</alm-tree-list-item>
</div>
<div *ngSwitchCase="'deployments'" class="environment-listing">
<alm-tree-list-item [node]="node" [template]="treeListItemTemplate">
<template #treeListItemTemplate>
<ng-template #treeListItemTemplate>
<fabric8-deployments-list [runtimeDeployments]="node.data.data | async" [loading]="node.data.loading | async" [prefix]="'namespaces/' + e.environment.namespaceName + '/deployments'"></fabric8-deployments-list>
</template>
</ng-template>
</alm-tree-list-item>
</div>
<div *ngSwitchCase="'events'" class="environment-listing">
<alm-tree-list-item [node]="node" [template]="treeListItemTemplate">
<template #treeListItemTemplate>
<ng-template #treeListItemTemplate>
<fabric8-events-list [events]="node.data.data | async" [loading]="node.data.loading | async" [prefix]="'namespaces/' + e.environment.namespaceName + '/events'"></fabric8-events-list>
</template>
</ng-template>
</alm-tree-list-item>
</div>
<div *ngSwitchCase="'pods'" class="environment-listing">
<alm-tree-list-item [node]="node" [template]="treeListItemTemplate">
<template #treeListItemTemplate>
<ng-template #treeListItemTemplate>
<fabric8-pods-list [pods]="node.data.data | async" [loading]="node.data.loading | async" [prefix]="'namespaces/' + e.environment.namespaceName + '/pods'"></fabric8-pods-list>
</template>
</ng-template>
</alm-tree-list-item>
</div>
<div *ngSwitchCase="'replicasets'" class="environment-listing">
<alm-tree-list-item [node]="node" [template]="treeListItemTemplate">
<template #treeListItemTemplate>
<ng-template #treeListItemTemplate>
<fabric8-replicasets-list [runtimeReplicaSets]="node.data.data | async" [loading]="node.data.loading | async" [prefix]="'namespaces/' + e.environment.namespaceName + '/replicaSets'"></fabric8-replicasets-list>
</template>
</ng-template>
</alm-tree-list-item>
</div>
<div *ngSwitchCase="'services'" class="environment-listing">
<alm-tree-list-item [node]="node" [template]="treeListItemTemplate">
<template #treeListItemTemplate>
<ng-template #treeListItemTemplate>
<fabric8-services-list [services]="node.data.data | async" [loading]="node.data.loading | async" [prefix]="'namespaces/' + e.environment.namespaceName + '/services'"></fabric8-services-list>
</template>
</ng-template>
</alm-tree-list-item>
</div>
<div *ngSwitchDefault>
<alm-tree-list-item [node]="node" [template]="treeListItemTemplate">
<template #treeListItemTemplate>
<ng-template #treeListItemTemplate>
<span title="{{node.data.subTitle}}">{{ node.data.title | async }}</span>
</template>
</ng-template>
</alm-tree-list-item>
</div>
</div>
</template>
</ng-template>
</alm-tree-list>
</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions src/app/kubernetes/ui/event/list/list.event.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
<div class='list-view-pf-main-info'>
<div class='list-view-pf-left'>
<span [ngSwitch]="event?.resource?.type">
<template [ngSwitchCase]="'Normal'">
<ng-template [ngSwitchCase]="'Normal'">
<span class="pficon-info" title="Normal event"></span>
</template>
<template [ngSwitchCase]="'Warning'">
</ng-template>
<ng-template [ngSwitchCase]="'Warning'">
<span class="pficon-warning-triangle-o" title="Warning event"></span>
</template>
<template ngSwitchDefault>
</ng-template>
<ng-template ngSwitchDefault>
<span class=" pficon-error-circle-o" title="Unknown event type: {{event?.resource?.type}}"></span>
</template>
</ng-template>
</span>
</div>
<div class='list-view-pf-body'>
Expand Down
12 changes: 6 additions & 6 deletions src/app/kubernetes/ui/event/view/view.event.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<span class="pull-right">created {{event.creationTimestamp | amTimeAgo}}</span>
<h2 class="card-pf-title">
<span [ngSwitch]="event?.resource?.type">
<template [ngSwitchCase]="'Normal'">
<ng-template [ngSwitchCase]="'Normal'">
<span class="pficon-info" title="Normal event"></span>
</template>
<template [ngSwitchCase]="'Warning'">
</ng-template>
<ng-template [ngSwitchCase]="'Warning'">
<span class="pficon-warning-triangle-o" title="Warning event"></span>
</template>
<template ngSwitchDefault>
</ng-template>
<ng-template ngSwitchDefault>
<span class=" pficon-error-circle-o" title="Unknown event type: {{event?.resource?.type}}"></span>
</template>
</ng-template>
</span>
&nbsp;
{{event.name}}
Expand Down

0 comments on commit 8374fcc

Please sign in to comment.