aboutsummaryrefslogtreecommitdiffstats
path: root/ccsdk-app-overlay/src/main/webapp/app/ccsdk/inventory/inventory_blueprint_table.html
blob: 687c304a27d18e9f399213d6490978f02aa76879 (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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<div id="page-content">

	<h1 class="heading-page" id="blueprints">EOM Inventory > Blueprints</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">
    <span class="tooltip" b2b-tooltip>
            <a href="#" class="btn btn-alt btn-small tooltip-element" tabindex="0" role="button" data-placement="bottom" 
            aria-label="Help" ng-click="ecdapp.uploadBlueprintModalPopup()" aria-describedby="tooltiptextBtn">
            Create
            <span class="arrow"></span>
        	</a>
        	<!--  
			<button class="btn btn-alt btn-small tooltip-element" data-placement="right" 
				type="submit"
				ng-click="ecdapp.uploadBlueprintModalPopup();"> 
				Create
				<span class="arrow"></span>
			</button>-->
			<span class="tooltip-wrapper">
            <span class="tooltip-size-control">
                <span id="tooltiptextBtn" role="tooltip" aria-live="polite" aria-hidden="true" class="helpertext" tabindex="-1">  
                    <span class="popover-title">Upload a blueprint</span>  
                    <span class="popover-content">
                        <span>Click to open up a FORM to upload and create a new blueprint in inventory.</span>
                        <strong class="hidden-spoken hidden-desktop">Double tap to close help message.</strong>
                    </span>
                </span>
            </span>
        	</span>
    </span>
			<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 Blueprints" ng-model="ecdapp.searchBy"></input>
	         		<button tabindex="1" class="btn btn-small" title="Search" 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="blueprints-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 id="expandTableHeading0" b2b-table-header sortable="false" key="application" ng-click="ecdapp.sortTable('application')">Application</th>
							<th b2b-table-header sortable="false" key="component" ng-click="ecdapp.sortTable('component')">Component</th>
							<th b2b-table-header sortable="false" key="type_name" ng-click="ecdapp.sortTable('typeName')">Name</th>
							<th b2b-table-header sortable="false" key="type_version" ng-click="ecdapp.sortTable('typeVersion')">Version</th>
							<th b2b-table-header sortable="false" key="created_at" ng-click="ecdapp.sortTable('created')">Created Date</th>
							<th b2b-table-header sortable="false" key="deployment_ref">Deployments
								<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 Deployments" 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>
							    		Deployment Info is loading
								    </div>
								</div>
							</th>
							<!--
							<th b2b-table-header sortable="false" key="deployment_info" style="margin-left:-10px;">Deployments
								<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 Deployments" type="button" ng-click="ecdapp.updateTable()">
								<i class="icon-arrows-update&#45;refresh&#45;sync"></i>
								</button>
							</th>
							-->
							<th b2b-table-header sortable="false">Actions</th>
							<th b2b-table-header sortable="false" key="owner" ng-click="ecdapp.sortTable('owner')">Owner</th>
							<th b2b-table-header sortable="false" key="type_id" ng-click="ecdapp.sortTable('typeId')">ID</th>
						</tr>
					</thead>
					
		            <tbody b2b-table-row type="body" ng-repeat="rowData in ecdapp.tableData">
						<tr id="tr-rowData{{index}}" tabindex="0">
							<td b2b-table-body id="expandTable_t1_{{$index}}" headers="expandTableHeading0" 
								ng-bind="rowData.application"/>
							<td b2b-table-body
								ng-bind="rowData.component" />
							<td b2b-table-body
								ng-bind="rowData.typeName" />
							<td b2b-table-body
								ng-bind="rowData.typeVersion" />
							<td b2b-table-body
								ng-bind="rowData.created | date : 'MM-dd-yyyy HH:mm:ss Z'" />
							<td b2b-table-body ng-class="{'b2b-td-noLeftBorder' : rowData.expanded}" style="padding-right:0px;">
								<span>{{rowData.deployments.totalCount}}
								<i ng-if="rowData.deployments.totalCount != 0" class="pull-right" aria-label="{{rowData.expanded ? 'Collapse row ' + rowData.deployments : 'Expand row ' + rowData.deployments}}" 
								ng-class="{'icon-accordion-plus': !rowData.expanded, 'icon-accordion-minus' : rowData.expanded}" 
								ng-click="rowData.expanded=!rowData.expanded" b2b-accessibility-click="13,32" tabindex="0" role="button" aria-expanded="false" 
								title="click to view service information"></i>
								</span>
							</td>
							<td b2b-table-body >
								<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.viewBlueprintModalPopup(rowData);">
    												<i class="icon-people-preview ecd-icon-action"></i><a href="">View</a>
    											</div>		
    										</li>
    										<li>
    											<div ng-click="ecdapp.exportJson(rowData);">
    												<i class="icon-people-preview ecd-icon-action"></i><a href="">Export</a>
    											</div>		
    										</li>
    										<li>
												<div ng-show="rowData.canDeploy  && rowData.deployments.totalCount === 0" ng-click="ecdapp.updateBlueprintModalPopup(rowData);">
													<i class="icon-misc-trash ecd-icon-action"></i><a href="">Update</a>
												</div>		
											</li>
											<li>
												<div ng-show="rowData.canDeploy" ng-click="ecdapp.deployBlueprintModalPopup(rowData);">
													<i class="icon-datanetwork-cloudupload ecd-icon-action"></i><a href="">Deploy</a>
												</div>		
											</li>
											<li>
												<div ng-show="rowData.canDeploy  && rowData.deployments.totalCount === 0" ng-click="ecdapp.deleteBlueprintModalPopup(rowData);">
													<i class="icon-misc-trash ecd-icon-action"></i><a href="">Delete</a>
												</div>		
											</li>
										</ul>
								</div><!-- .btn-group -->
					     	</td>
							<td b2b-table-body 
								ng-bind="rowData.owner" />
							<td b2b-table-body
								ng-bind="rowData.typeId" />
						</tr>
				   		<tr ng-show="rowData.expanded">
                        	<td colspan="6" class="b2b-td-noTopBorder" headers="expandTable_t1_{{$index}}">
                            <p class="offscreen-text">Expanded Row details for {{rowData.deployments}}</p>
                            <ul>
                            	<li class="mar-top-30" ng-repeat="srvcData in rowData.deployments.items">
                            		<div> <span class="font-medium">{{$index+1}}</span> </div>    	
                            		<div class="b2b-leading-dots">
                            			<span class="font-medium">Deployment ID</span>
                            			<span class="pull-right" ng-bind="srvcData.serviceId"/>
                            		</div>
                            		<div class="b2b-leading-dots">
                            			<span class="font-medium">Created timestamp</span>
                            			<span class="pull-right" ng-bind="srvcData.created | date : 'MM-dd-yyyy HH:mm:ss Z'"" />                            		
                            		</div>
                            		<div class="b2b-leading-dots">
                            			<span class="font-medium">Modified timestamp</span>
                            			<span class="pull-right" ng-bind="srvcData.modified | date : 'MM-dd-yyyy HH:mm:ss Z'"" />                          		
                            		</div>
                            	</li>
                            	<br>
                            </ul>
                        	</td>
                    </tr>
					</tbody>
				</table>
			</div> 
		
		<div b2b-pagination="" total-pages="ecdapp.totalPages" 
						current-page="ecdapp.currentPageNum" click-handler="pageChangeHandler"
						role="navigation">
		</div>
							
		<div style="height: 10px;">
			<!-- space between page number and black footer -->
		</div>
		
	</div><!-- loading -->
	
</div><!-- page content -->