blob: e067611419398b0fd2292403ce4819f9c5f49746 [file] [log] [blame]
prai9d445962018-07-27 13:27:43 +05301<!--
2~ Copyright 2018-present Open Networking Foundation
3~
4~ Licensed under the Apache License, Version 2.0 (the "License");
5~ you may not use this file except in compliance with the License.
6~ You may obtain a copy of the License at
7~
8~ http://www.apache.org/licenses/LICENSE-2.0
9~
10~ Unless required by applicable law or agreed to in writing, software
11~ distributed under the License is distributed on an "AS IS" BASIS,
12~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13~ See the License for the specific language governing permissions and
14~ limitations under the License.
15-->
16<div id="ov-intent" xmlns="http://www.w3.org/1999/html">
Sean Condon95fb5742019-04-02 12:16:55 +010017 <onos-loading [theme]="'light'" [running]="loadingIconShown"></onos-loading>
prai9d445962018-07-27 13:27:43 +053018 <div class="tabular-header">
19 <onos-flash id="intentActionFlash" message="{{ intentActionMsg }}"></onos-flash>
20 <onos-confirm message="{{ warnMsg }}" (chosen)="dOk($event)"></onos-confirm>
21 <h2>
22 Intents ({{tableData.length}} total)
23 </h2>
24 <div class="ctrl-btns">
25 <div class="refresh" (click)="toggleRefresh()">
26 <!-- See icon.theme.css for the defintions of the classes active and refresh-->
27 <onos-icon classes="{{ autoRefresh?'active refresh':'refresh' }}" iconId="refresh" iconSize="42" toolTip="{{ autoRefreshTip }}"></onos-icon>
28 </div>
29 <div class="separator"></div>
30 <span *ngIf="brief" (click)="briefToggle()">
31 <div>
32 <onos-icon classes="{{'active-rect'}}" iconId="plus" iconSize="42" toolTip="{{detailTip}}">
33 </onos-icon>
34 </div>
35 </span>
36 <span *ngIf="!brief" (click)="briefToggle()">
37 <div>
38 <onos-icon classes="{{'active-rect'}}" iconId="minus" iconSize="42" toolTip="{{briefTip}}">
39 </onos-icon>
40 </div>
41 </span>
42 <div class="separator"></div>
Sean Condon4e55c802019-12-03 22:13:34 +000043 <div routerLink="/topo2" [queryParams]="{ intentId: selId, appId: intentData.appId, appName: intentData.appName, intentType: intentData.type }" routerLinkActive="active">
44 <onos-icon classes="{{!!selId ? 'active-rect' :undefined}}" iconId="topo" iconSize="42" toolTip="{{ topoTip }}"></onos-icon>
prai9d445962018-07-27 13:27:43 +053045 </div>
46 <div (click)="!!selId && intentState() === 'Withdrawn' ? confirmAction(IntentActionEnum.RESUBMIT):''">
47 <onos-icon classes="{{!!selId && intentState() === 'Withdrawn' ? 'active-rect' :undefined}}" iconId="play" iconSize="42"
48 toolTip="{{ resubmitTip }}"></onos-icon>
49 </div>
50 <div (click)="!!selId && intentState() === 'Installed' ? confirmAction(IntentActionEnum.WITHDRAWN):''">
51 <onos-icon classes="{{!!selId && intentState() === 'Installed' ? 'active-rect' :undefined}}" iconId="stop" iconSize="42"
52 toolTip="{{ deactivateTip }}"></onos-icon>
53 </div>
54 <div (click)="!!selId && intentState() === 'Withdrawn' ? confirmAction(IntentActionEnum.PURGE):''">
55 <onos-icon classes="{{!!selId && intentState() === 'Withdrawn' ? 'active-rect' :undefined}}" iconId="garbage" iconSize="42"
56 toolTip="{{ purgeTip }}"></onos-icon>
57 </div>
58 <div (click)="isHavingWithdrawn() ? confirmAction(IntentActionEnum.PURGEWITHDRAWN):''">
59 <onos-icon classes="{{isHavingWithdrawn() ? 'active-rect' :undefined}}" iconId="garbage" iconSize="47" toolTip="{{ purgeAllTip }}"></onos-icon>
60 </div>
61 </div>
62 </div>
63
64 <div class="summary-list">
65 <div class="table-header">
66 <table onosTableResize>
67 <tr>
68 <td colId="appId" (click)="onSort('appId')">Application ID
69 <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('appId')"></onos-icon>
70 </td>
71 <td colId="key" (click)="onSort('key')">Key
72 <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('key')"></onos-icon>
73 </td>
74 <td colId="type" (click)="onSort('type')">Type
75 <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('type')"></onos-icon>
76 </td>
77 <td colId="priority" (click)="onSort('priority')">Priority
78 <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('priority')"></onos-icon>
79 </td>
80 <td colId="state" (click)="onSort('state')">State
81 <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('state')"></onos-icon>
82 </td>
83 </tr>
84 </table>
85 </div>
86 <div class="table-body">
87 <table onosTableResize id-prop="key">
88 <tr class="table-body" *ngIf="tableData.length === 0" class="no-data">
89 <td colspan="5">{{ annots.noRowsMsg }}</td>
90 </tr>
91 <ng-template ngFor let-intent [ngForOf]="tableData">
92 <tr (click)="selectCallback($event, intent)" [ngClass]="{selected: intent.key === selId, 'data-change': isChanged(intent.key)}">
93 <td>{{intent.appId}}</td>
94 <td>{{intent.key}}</td>
95 <td>{{intent.type}}</td>
96 <td>{{intent.priority}}</td>
97 <td>{{intent.state}}</td>
98 </tr>
99 <tr (click)="selectCallback($event, intent)" [hidden]="brief" [ngClass]="{selected: intent.key === selId, 'data-change': isChanged(intent.key)}">
100 <td class="resources" colspan="5">{{ intent.resources }}</td>
101 </tr>
102 <tr (click)="selectCallback($event, intent)" [hidden]="brief" [ngClass]="{selected: intent.key === selId, 'data-change': isChanged(intent.key)}">
103 <td class="details" colspan="5">{{ intent.details }}</td>
104 </tr>
105 </ng-template>
106 </table>
107 </div>
108 </div>
Sean Condon95fb5742019-04-02 12:16:55 +0100109</div>