aboutsummaryrefslogtreecommitdiffstats
path: root/ccsdk-app-overlay/src/main/webapp/app/ccsdk/inventory/inventory_deployment_table.html
blob: 3e404b50ac99703b32fc748ba52acccd7f3f7da2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<div id="page-content">

	<h1 class="heading-page" id="deployments-page">EOM Inventory > Deployments</h1>

	<!-- show progress indicator -->
	<div ng-show="ecdapp.isDataLoading">
		<div class="span" style="margin-bottom:20px;">
			<i class="icon-spinner small" role="img" aria-label="Please wait while the content loads"></i>
			Please wait while the content loads.
		</div>
	</div>

	<div ng-hide="ecdapp.isDataLoading">
		<div id="button-search-row">
			<div style="float:right;">
				<div class="group">
					<button tabindex="-1" class="btn btn-small" title="Reset Filters" type="button" ng-click="ecdapp.loadTable()"><i class="icon-arrows-update&#45;refresh&#45;sync"></i></button>
					<input tabindex="0" class="btn btn-small" type="text" placeholder="Search Deployments" ng-model="ecdapp.searchBy"></input>
					<button tabindex="1" class="btn btn-small" type="button" ng-click="ecdapp.searchTable(ecdapp.searchBy)"><i class="icon-controls-magnifyingglass"></i></button>
				</div>
			</div>
		</div>

		<div ng-show="ecdapp.isRequestFailed">
			<span class="ecd-error-message">{{ecdapp.errMsg}}</span>
		</div>

		<div ng-hide="ecdapp.isRequestFailed">
			<div
					b2b-table
					id="deployments-table"
					class="b2b-table-div"
					table-data="ecdapp.tableData"
					current-page="ecdapp.currentPageIgnored"
					next-sort="ecdapp.nextSortIgnored">
				<table>
					<thead b2b-table-row type="header">
					<tr id="th-header-row">
						<th b2b-table-header sortable="false" key="serviceId" ng-click="ecdapp.sortTable('serviceId')">Service ID/Deployment Ref.</th>
						<th b2b-table-header sortable="false" key="created" ng-click="ecdapp.sortTable('created')">Created</th>
						<th b2b-table-header sortable="false" key="updated" ng-click="ecdapp.sortTable('modified')">Modified</th>
						<th b2b-table-header sortable="false" key="tenant" style="background-color:#dbefef;">Tenant
								<button style="margin-bottom:-5px; box-shadow:0 0 0 0 rgba(0, 0, 0, 0.15); min-width:0;" tabindex="1" class="btn btn-small" title="Refresh Tenant and Status" type="button" ng-click="ecdapp.updateTable()">
								<i class="icon-arrows-update&#45;refresh&#45;sync"></i>
								</button>
								<div ng-show="ecdapp.isSrvcDataLoading">
									<div class="span" style="margin-bottom:5px;">
							    		<i class="icon-spinner small" role="img" aria-label="Deployment Info is loading"></i>
							    		Tenant and Status Info loading
								    </div>
								</div>
						</th>
						<th b2b-table-header sortable="false" key="status" style="background-color:#dbefef;">Install Status</th>
						<th b2b-table-header sortable="false" style="background-color:#dbefef;">Actions</th>
					</tr>
					</thead>

					<tbody b2b-table-row type="body" row-repeat="rowData in ecdapp.tableData">
					<tr id="tr-rowData">
						<td b2b-table-body
							ng-bind="rowData.serviceId" 
							ng-class="{'td-error' : rowData.statusInfo === undefined}"/>
						<td b2b-table-body
							ng-bind="rowData.created | date : 'MM-dd-yyyy HH:mm:ss Z'"
							ng-class="{'td-error' : rowData.statusInfo === undefined}"/>
						<td b2b-table-body
							ng-bind="rowData.modified | date : 'MM-dd-yyyy HH:mm:ss Z'" 
							ng-class="{'td-error' : rowData.statusInfo === undefined}"/>
						<td b2b-table-body
							ng-bind="rowData.statusInfo.tenant_name"
							ng-class="{'td-error' : rowData.statusInfo === undefined}"/>
						<td b2b-table-body 
							ng-class="{'td-error' : rowData.statusInfo === undefined}">
							<img ng-src="{{rowData.statusInfo.statusImg}}" title="{{rowData.statusInfo.status}}" />
							</span>											
						</td>
						<td b2b-table-body ng-class="{'td-error' : rowData.statusInfo === undefined}">
							<div class="btn-group btn-actions" style="margin-bottom:0;box-shadow:none;">
									<button type="button" class="btn dropdown-toggle" data-toggle="dropdown" title="More Actions"><i class="icon-controls-moreapplications"></i></button>									
										<ul class="dropdown-menu">
    										<li>
    											<div ng-click="ecdapp.viewBlueprintDataModal(rowData);">
													<i class="icon-documents-document ecd-icon-action"></i><a href="">View blueprint</a>
												</div>
											</li>
											<li>
												<div ng-click="ecdapp.viewDeploymentInputsModalPopup(rowData);">
													<i class="icon-misc-operations ecd-icon-action"></i><a href="">View Inputs</a>
												</div>
											</li>
											<li>
												<div ng-click="ecdapp.viewDeploymentExecutionsModalPopup(rowData);">
													<i class="icon-people-preview ecd-icon-action"></i><a href="">View executions</a>
												</div>
											</li>
											<li>
												<div ng-show="rowData.canDeploy && rowData.statusInfo.status === 'completed'" ng-click="ecdapp.updateDeploymentModalPopup(rowData);">
													<i class="icon-misc-operations ecd-icon-action"></i><a href="">Update deployment</a>
												</div>
											</li>
											<li>
												<div ng-show="rowData.canDeploy" ng-click="ecdapp.deleteDeploymentModalPopup(rowData);">
													<i class="icon-misc-trash ecd-icon-action"></i><a href="">Undeploy</a>
												</div>
											</li>
											<li>
												<div ng-show="rowData.statusInfo.is_helm && rowData.statusInfo.helm_status && rowData.statusInfo.status === 'completed'" ng-click="ecdapp.checkHelmStatus(rowData);">
													<i class="icon-misc-operations ecd-icon-action"></i><a href="">Helm Status</a>
												</div>
											</li>
											<li>
												<div ng-show="rowData.canDeploy && rowData.statusInfo.is_helm && rowData.statusInfo.status === 'completed'" ng-click="ecdapp.upgradeDeploymentModalPopup(rowData);">
													<i class="icon-datanetwork-contentdelivery ecd-icon-action"></i><a href="#">Helm upgrade deployment</a>
												</div>
											</li>
											<li>
												<div ng-show="rowData.canDeploy && rowData.statusInfo.is_helm && rowData.statusInfo.status === 'completed'" ng-click="ecdapp.rollbackDeploymentModalPopup(rowData);">
													<i class="icon-datanetwork-software ecd-icon-action"></i><a href="#">Helm rollback deployment</a>
												</div>
											</li>
											<li>
												<div ng-show="rowData.canDeploy  && rowData.statusInfo === undefined" ng-click="ecdapp.deleteServiceModalPopup(rowData);">
													<i class="icon-misc-trash ecd-icon-action"></i><a href="">Delete Service</a>
												</div>		
											</li>
										</ul>
							</div><!-- .btn-group -->
						</td>
					</tr>
					</tbody>
				</table>
			</div>

			<div b2b-pagination="" total-pages="ecdapp.totalPages"
				 current-page="ecdapp.currentPageNum" click-handler="pageChangeHandler"
				 role="navigation">
			</div>

		</div>
	</div>

	<div style="height: 10px;">
		<!-- space between page number and black footer -->
	</div>

</div><!-- loading -->

</div><!-- page content -->