Add roles to user
[portal.git] / ecomp-portal-FE-common / client / app / views / role / role_list.html
1 <!--
2   ============LICENSE_START==========================================
3   ONAP Portal
4   ===================================================================
5   Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6   ===================================================================
7  
8   Unless otherwise specified, all software contained herein is licensed
9   under the Apache License, Version 2.0 (the "License");
10   you may not use this software except in compliance with the License.
11   You may obtain a copy of the License at
12  
13               http://www.apache.org/licenses/LICENSE-2.0
14  
15   Unless required by applicable law or agreed to in writing, software
16   distributed under the License is distributed on an "AS IS" BASIS,
17   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18   See the License for the specific language governing permissions and
19   limitations under the License.
20  
21   Unless otherwise specified, all documentation contained herein is licensed
22   under the Creative Commons License, Attribution 4.0 Intl. (the "License");
23   you may not use this documentation except in compliance with the License.
24   You may obtain a copy of the License at
25  
26               https://creativecommons.org/licenses/by/4.0/
27  
28   Unless required by applicable law or agreed to in writing, documentation
29   distributed under the License is distributed on an "AS IS" BASIS,
30   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31   See the License for the specific language governing permissions and
32   limitations under the License.
33  
34   ============LICENSE_END============================================
35  
36   
37   -->
38   <style>
39   .property-label{
40   text-align: right;
41   }
42   </style>
43 <div class="w-ecomp-admins-page-main">
44         <div class="admins-home-container" id="page-content">
45                 <div id="title" class="w-ecomp-main-view-title">
46                         <h1 class="heading-page" >Roles</h1>
47                 </div>
48                 <div class="admins-table">
49                 
50                 <!-- Centralized Apps -->
51                 <div class="table-dropdown" ng-if="apps.selectedCentralizedApp">
52                         <select id="dropdown1" name="dropdown1" b2b-dropdown ng-change="getRolesForSelectedCentralizedApp(apps.selectedCentralizedApp);" 
53                                                 ng-model="apps.selectedCentralizedApp">
54                         <option b2b-dropdown-list option-repeat="item in centralizedApps" value="{{item.appId}}">{{item.appName}}</option>
55                      </select>
56                 </div>
57                 
58                 <br/>
59                 
60                         <div id="button-create-role" align="left" class="admins-table-btn-create" >
61                                 <button id="button-create-role" ng-click="addRoleModalPopup(apps.selectedCentralizedApp)" class = "btn btn-alt btn-small">Create</button>
62                                 <button id="button-sync-role"  ng-show="syncRolesApplied" ng-click="syncRolesFromExternalAuthSystem(apps.selectedCentralizedApp)" class = "btn btn-alt btn-small"><i class="icon-arrows-update-refresh-syncL" aria-hidden="true"></i>&nbsp;Sync Roles</button>
63                                 <button id="button-bulk-upload" ng-show="syncRolesApplied" ng-click="openBulkUploadRolesAndFunctionsModal(apps.selectedCentralizedApp)" class = "btn btn-alt btn-small"><i class="icon-arrows-upload" aria-hidden="true"></i>&nbsp;Bulk Upload</button>
64                         </div>
65                         <br>
66                           <div class="property-label">
67                                         <span ID="required" style="color: Red;font-size: 210%;" visible="false"> *</span>-----Indicates Global Roles    </div>
68                         <div b2b-table table-data="availableRoles"  search-string="searchString" class="b2b-table-div">
69                         <span class="ecomp-spinner" ng-show="showSpinner"></span>
70                         <table>
71                             <thead b2b-table-row type="header">
72                                 <tr>
73                                     <th b2b-table-header key="name" sortable="true" default-sort="a" id="col1">Name</th>
74                                     <th b2b-table-header key="priority" sortable="true" id="col2">Priority</th>
75                                     <th b2b-table-header id="col3" sortable="false">Active</th>
76                                     <th b2b-table-header id="col4" sortable="false">Edit</th>
77                                     <th ng-if="apps.selectedCentralizedApp != 1" b2b-table-header id="col4" sortable="false">Delete</th>
78                                 </tr>
79                             </thead>
80                             <tbody b2b-table-row type="body" row-repeat="rowData in availableRoles">
81                                 <tr>
82                                    <!--  <td b2b-table-body id="rowheader_t1_{{$index}}" headers="col1" ng-bind="rowData['name']"></td> -->
83                                    <td b2b-table-body>
84                                                                 <span  ng-if="rowData.name.indexOf('global_')!=-1" id="required" style="color: Red;font-size: 180%;" visible="false"> *</span>
85                                                                 <span>{{rowData.name}}</span>
86                                                                 </td>
87                                     <td b2b-table-body ng-bind="rowData['priority']"></td>
88                                     <td b2b-table-body headers="rowheader_t1_{{$index}} col3" >
89                                         <div >
90                                                                 <label class="btn-switch-label" tabindex="0" role="option">
91                                                                                 <input type="checkbox" id="{{$index}}-button-toggle-role" b2b-switches ng-model="rowData.active" ng-click="toggleRole(apps.selectedCentralizedApp, rowData.active,rowData);">
92                                                                     </label> 
93                                                         </div>
94                                     </td>
95                                     <td b2b-table-body id="{{$index}}-button-edit-role" class="icon-misc-pen" ng-click="editRoleModalPopup(apps.selectedCentralizedApp, rowData)"></td>
96                                     <td ng-if="apps.selectedCentralizedApp != 1"  b2b-table-body class="icon-misc-trash" ng-click="removeRole(apps.selectedCentralizedApp, rowData)"></td>    
97                                 </tr>
98                             </tbody>
99                         </table>
100                     </div>
101                     
102                     <a id="manage-role" ng-click="fnManageRoleFunctions()" href="roleFunctions">Manage Role Functions</a><br><br>
103                     
104                 </div>
105         </div>
106 </div>
107
108