adding orchestration type to service models view
[vid.git] / vid-app-common / src / main / webapp / app / vid / scripts / view-models / serviceModels.htm
index c0a8ee5..06fc7f6 100755 (executable)
@@ -2,7 +2,7 @@
   ============LICENSE_START=======================================================\r
   VID\r
   ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+  Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.\r
   ================================================================================\r
   Licensed under the Apache License, Version 2.0 (the "License");\r
   you may not use this file except in compliance with the License.\r
   limitations under the License.\r
   ============LICENSE_END=========================================================\r
   -->\r
-\r
 <link rel="stylesheet" type="text/css" href="app/vid/styles/serviceModels.css" />\r
+<div popup-window class="popupContents" ngx-show="{{popup.isTablePopUpVisible}}" ng-cloak>\r
+       <div ng-include="'app/vid/scripts/view-models/previousVersionDialog.htm'"/>\r
+</div>\r
 <div popup-window class="popupContents" ngx-show="{{popup.isVisible}}" ng-cloak>\r
        <div ng-include="'app/vid/scripts/view-models/creationDialog.htm'"/>\r
 </div>\r
                        <img src="app/vid/images/spinner.gif"></img>\r
                        </span>\r
                        <span class="statusLine" ng-class="{true:'progVisible', false:'progHidden'}[isProgressVisible]">\r
-                       <label>Status:</label><span class="status"><span ng-show="error"><font color='red'><b>Error: </b></font></span>{{status}}</span>\r
+                       <label>Status:</label><span class="status"><span ng-show="error"><font color='red'><b>Error: </b></font></span>{{status}} <br/>\r
+                       <button ng-show="error" class="btn btn-danger" ng-click="showReportWindow()" ng-if="isShowErrorReport()">create report</button>\r
+                       </span>\r
                </span>\r
        <br><br>\r
 \r
        <div class="fn-ebz-container">\r
                         Filter:\r
-                         <input class="fn-ebz-text" type="text" ng-model="searchString" size="20" style="width: 250px;">\r
+                         <input class="fn-ebz-text" data-tests-id="browseFilter" type="text" ng-model="searchString" size="20" style="width: 250px;">\r
        </div>\r
 \r
        <h1 class="heading1" style="margin-top:20px;">Browse SDC Service Models</h1>\r
        <div style="margin-top:30px" ng-init="getServiceModels();">\r
-               \r
-               <table att-table table-data="services" view-per-page="viewPerPage" current-page="currentPage" search-category="searchCategory" search-string="searchString" total-page="totalPage">\r
+               <table data-tests-id="serviceModelsTable" id="sdcModelsTable" att-table table-data="services" view-per-page="viewPerPage" current-page="currentPage" search-category="searchCategory" search-string="searchString" total-page="totalPage">\r
                    <thead  att-table-row type="header">\r
                                <tr>\r
                                        <th att-table-header key="action">Action</th>\r
                                        <th att-table-header key="uuid">UUID</th>\r
+                                       <th ng-if="isShowOrchestrationType()" att-table-header key="orchestrationType">Orchestration Type</th>\r
                                        <th att-table-header key="invariantUUID">Invariant UUID</th>\r
                                        <th att-table-header default-sort="A" key="name">Name</th>\r
                            <th att-table-header key="version">Version</th>\r
                            <th att-table-header key="distributionStatus">Distribution Status</th>\r
                            <th att-table-header key="lastUpdaterUserId">Last Updated By</th>\r
                            <th att-table-header key="toscaModelUrl">Tosca Model</th>\r
+                                       <th att-table-header key="actions">Action</th>\r
                        </tr>\r
                    </thead>\r
-                   <tbody att-table-row type="body" row-repeat="service in services">\r
-                       <tr>\r
-                               <td att-table-body ><button type=button ng-click="deployService(service)" att-button btn-type="primary" size="small">Deploy</button></td>\r
-                       <td att-table-body ng-bind="service['uuid']"></td>\r
-                       <td att-table-body ng-bind="service['invariantUUID']"></td>\r
-                       <td att-table-body ng-bind="service['name']"></td>\r
-                       <td att-table-body ng-bind="service['version']"></td>\r
-                       <td att-table-body ng-bind="service['category']"></td>\r
-                       <td att-table-body ng-bind="service['distributionStatus']"></td>\r
-                       <td att-table-body ng-bind="service['lastUpdaterUserId']"></td>\r
-                       <td att-table-body ng-bind="service['toscaModelUrl']"></td>\r
-                       </tr>     \r
-                   </tbody>      \r
+                       <tbody att-table-row type="body" row-repeat="service in services">\r
+                               <tr class="sdcServiceModel" data-tests-id="Browse_SDC_Service_Models-uuid-{{service['uuid']}}">\r
+                                       <td class="deploy" att-table-body ><button class="deploy-service-class" type=button data-tests-id="deploy-{{service['uuid']}}" ng-click="deployService(service)" att-button btn-type="{{deployButtonType}}" size="small">Deploy</button></td>\r
+                                       <td class="uuid" att-table-body ng-bind="service['uuid']"></td>\r
+                                       <td ng-if="isShowOrchestrationType()" class="orchestrationType" att-table-body ng-bind="service['orchestrationType']"></td>\r
+                                       <td class="invariantUUID" att-table-body data-tests-id="Invariant-{{service['invariantUUID']}}" ng-bind="service['invariantUUID']"></td>\r
+                                       <td class="name" att-table-body ng-bind="service['name']"></td>\r
+                                       <td class="version" att-table-body ng-bind="service['version']"></td>\r
+                                       <td class="category" att-table-body ng-bind="service['category']"></td>\r
+                                       <td class="distributionStatus" att-table-body ng-bind="service['distributionStatus']"></td>\r
+                                       <td class="lastUpdaterUserId" att-table-body ng-bind="service['lastUpdaterUserId']"></td>\r
+                                       <td class="toscaModelUrl" att-table-body ng-bind="service['toscaModelUrl']"></td>\r
+                                       <td class="PreviousVersion" att-table-body data-tests-id="PreviousVersion-{{service['invariantUUID']}}" ng-show="service.hasPreviousVersion"><button type=button ng-click="loadPreviousVersionData(service['invariantUUID'],service['name'],service['version'])" att-button btn-type="primary" size="small">Previous Versions</button></td>\r
+                                       <td class="hasPreviousVersion" att-table-body ng-show="!service.hasPreviousVersion">&nbsp;</td>\r
+                               </tr>\r
+                       </tbody>\r
                </table>\r
                <table width='100%'>\r
                        <tr>\r
                                        <td width='33%' valign='middle'>\r
                                                Jump to page:\r
                                        <input class="fn-ebz-text" type="text" ng-model="currentPage" size="5" style="width: 47px;">\r
-                                       Results per page: <span style="cursor: pointer" ng-click="viewPerPage = 10" ng-style="viewPerPage === 10 && {'textDecoration':'underline','text-color':'black'}">10</span> \r
-                                       | <span style="cursor: pointer" ng-click="viewPerPage = 25" ng-style="viewPerPage === 25 && {'textDecoration':'underline','text-color':'black'}">25</span> \r
-                                       | <span style="cursor: pointer" ng-click="viewPerPage = 50" ng-style="viewPerPage === 50 && {'textDecoration':'underline','text-color':'black'}">50</span> \r
+                                       Results per page: <span style="cursor: pointer" data-tests-id="view-per-page-10" ng-click="viewPerPage = 10" ng-style="viewPerPage === 10 && {'textDecoration':'underline','text-color':'black'}">10</span>\r
+                                       | <span style="cursor: pointer" data-tests-id="view-per-page-25" ng-click="viewPerPage = 25" ng-style="viewPerPage === 25 && {'textDecoration':'underline','text-color':'black'}">25</span>\r
+                                       | <span style="cursor: pointer" data-tests-id="view-per-page-50" ng-click="viewPerPage = 50" ng-style="viewPerPage === 50 && {'textDecoration':'underline','text-color':'black'}">50</span>\r
                                </td>\r
                                <td width='34%' align='right' valign='middle'>\r
                                        <span style="cursor: pointer" ng-if="currentPage<totalPage"><button att-button size="small" ng-click="nextPage();">next page &gt;</button></span>\r
                                        </td>\r
                        </tr>\r
                </table>\r
-               \r
+\r
        </div>\r
        </div>\r
 \r