Initial OpenECOMP policy/engine commit
[policy/engine.git] / ecomp-sdk-app / src / main / webapp / app / fusion / scripts / view-models / profile-page / role.html
1 <!--
2   ================================================================================
3   eCOMP Portal SDK
4   ================================================================================
5   Copyright (C) 2017 AT&T Intellectual Property
6   ================================================================================
7   Licensed under the Apache License, Version 2.0 (the "License");
8   you may not use this file except in compliance with the License.
9   You may obtain a copy of the License at
10   
11        http://www.apache.org/licenses/LICENSE-2.0
12   
13   Unless required by applicable law or agreed to in writing, software
14   distributed under the License is distributed on an "AS IS" BASIS,
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   See the License for the specific language governing permissions and
17   limitations under the License.
18   ================================================================================
19   -->
20 <div>
21         <div class="bc-style" style="margin-left:-60px;">
22             <ul class="breadcrumb">
23                 <li><a href="welcome">Home</a></li>
24                 <li><a href="admin#/role_list">Roles</a></li>
25                 <li class="active">Role</li>
26             </ul>
27         </div>
28         <h1 class="heading1">Role Edit</h1>
29         <div ng-controller="roleController" >
30                 <br>
31              Please edit the role details below:&nbsp;<br>
32         
33                 <div class="fn-ebz-container" >
34                         <label class="fn-ebz-text-label"><sup><b>*</b></sup>Name:</label><BR>
35                         <input type="text" class="fn-ebz-text" ng-model="role.name"
36                                 maxlength="30" /> 
37                 </div>
38         
39                 <div class="fn-ebz-container" >
40                         <label class="fn-ebz-text-label">Priority:</label><BR>
41                         <input type="text" class="fn-ebz-text" ng-model="role.priority"
42                                 maxlength="30" /> 
43                 </div>
44                 
45                 <div align="left" >
46                         <button type="submit" ng-click="saveRole();" att-button
47                                 btn-type="primary" size="small">Save</button>
48                 </div>
49                 
50                 <br>
51                 <div class="pageTitle">
52                         <label>Role Functions</label>
53                         <a ng-click="addNewRoleFunctionModalPopup();" class="icon-add" size="small"></a>
54                 </div>
55         
56                 <table table-data="role.roleFunctions" att-table >
57                      <thead att-table-row type="header">
58                         <tr>
59                                 <th att-table-header sortable="false" align="left"  width="90%">Name</th>
60                                 <th att-table-header sortable="false"  width="10%">Remove?</th>
61                         </tr>
62                          </thead>
63                          <tbody att-table-row type="body" row-repeat="roleFunction in role.roleFunctions" style="max-height: 980px;" ><!-- background colors will alternate not properly with multiple tbody-->
64                           <tr>
65                             <td att-table-body width="90%" >{{ roleFunction.name }}</td>
66                             <td att-table-body width="10%">
67                                 <div ng-click="removeRoleFunction(roleFunction);" style="font-size:20px;"><a href="javascript:void(0)" class="icon-trash"></a></div>
68                              </td>
69                           </tr>
70                          </tbody>
71                 </table>
72                 <a href="admin#/role_function_list">Manage Role Functions</a><br><br>
73                 
74                 <div class="pageTitle">
75                         <label>Child Roles</label>
76                         <a ng-click="addNewChildRoleModalPopup();" class="icon-add" size="small"></a>
77                 </div>
78                 
79                 <table table-data="role.childRoles" att-table >
80                      <thead att-table-row type="header">
81                         <tr>
82                                 <th att-table-header sortable="false" align="left"  width="90%">Name</th>
83                                 <th att-table-header sortable="false"  width="10%">Remove?</th>
84                         </tr>
85                          </thead>
86                          <tbody att-table-row type="body" row-repeat="role in role.childRoles" style="max-height: 980px;" >
87                           <tr>
88                             <td att-table-body width="90%" >{{ role.name }}</td>
89                             <td att-table-body width="10%">
90                                 <div ng-click="removeChildRole(role);" style="font-size:20px;"><a href="javascript:void(0)" class="icon-trash"></a></div>
91                              </td>
92                           </tr>
93                          </tbody>
94                 </table>
95                 
96                 <div id="dialogChildRole" title="Select Child Roles">
97                   <table table-data="availableRoles" att-table>
98                         <thead att-table-row type="header">
99                                 <tr>
100                                         <th att-table-header sortable="false" width="10%"> </th>
101                                         <th att-table-header sortable="false" width="90%">Role</th>
102                                 </tr>
103                                 </thead>
104                                 <tbody att-table-row type="body" row-repeat="availableRole in availableRoles" style="max-height: 980px;" ><!-- background colors will alternate not properly with multiple tbody-->
105                                 <tr>
106                                 <td att-table-body width="10%">
107                                         <div ng-click="toggleChildRole(availableRole.selected,availableRole);">
108                                 <input type="checkbox" ng-model="availableRole.selected" att-toggle-main>
109                                 </div>
110                             </td>
111                             <td att-table-body width="90%">{{ availableRole.name }}</td>
112                             
113                           </tr>
114                           </tbody>
115                         </table>
116                 </div>
117         </div>
118 </div>