summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/security/security.component.html
blob: 3310225940c7cd92d64ee8f3e0a7dc7a8afdba63 (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
<div class="stdForm">
        <br/>
        <div class="tab-content">
                <h3>Step {{stepNo}} - Report Security</h3>
        </div>
        <br/>
        <span class="ecomp-spinner" *ngIf="showSpinner"></span>     
        
        <div *ngIf="!showSpinner">
        <div class="tab-pane">
        <div class="field-group">
               
        
                
                        <table>
                                <tr>
                                <!-- <div class="column"> -->
                                        <td>
                                        <label class="left">Created By: </label>&nbsp;&nbsp;&nbsp;<label>{{reportSecurityInfo.createdUser}}</label>
                                        
                                        </td>
                                        <td>
                                        <label class="right">Created Date: </label>&nbsp;&nbsp;&nbsp;<label>{{reportSecurityInfo.createdDate}}</label>
                                        </td>
                                        <td>
                                        
                                        
                                        </td>
                                     
                                <!-- </div> -->
                        </tr>
                        <tr>
                                <!-- <div class="column"> -->
                                        <td>
                                        <label class="left">Last Updated By: </label>&nbsp;&nbsp;&nbsp;<label>{{reportSecurityInfo.updateUser}}</label>
                                        </td>
                                        <td>
                                        <label class="right">Last Updated: </label>&nbsp;&nbsp;&nbsp;<label>{{reportSecurityInfo.updatedDate}}</label>
                                        </td>
                                         
                                   
                                <!-- </div> -->
                        </tr>
                        <tr>
                                <td>
                                                <label for="reportType">Report Owner</label> <br/>
                                                <select  class="browser-default custom-select defaultFontSize"  required="required" placeholder="Select Report Type" [(ngModel)]="reportOwner"  value="{{reportSecurityInfo.createdUser}}">
                                                        <option  class="defaultFontSize" selected>Select Report Owner  </option>
                                                        <option  *ngFor="let reportOwner of reportOwnerList" class="defaultFontSize" value="{{reportOwner.name}}" >{{reportOwner.name}}</option>
                                                </select>    
                                </td>
                                <td>
                                                <label for="reportType">Public? (All users can run the report):</label> <br/>
                                                <select class="browser-default custom-select defaultFontSize"  required="required" placeholder="Select Report Type" [(ngModel)]="publicReport"  value="publicReport">
                                                        <option  class="defaultFontSize" value="YES" >YES</option>
                                                        <option  class="defaultFontSize" value="NO" >NO</option>
                                                </select>  
                                </td>
                        </tr>
                        </table>
                
                
                <br/>
                
                <table>
                        <tr>
                                <h4>Report Users</h4>
                        </tr>
                </table>
                
                <span class="ecomp-spinner" *ngIf="showUserListSpinner"></span>   

                <div *ngIf="!showUserListSpinner">
                        <table>
                                <tr>
                                        <th><label>No</label></th>
                                        <th><label>User Name</label></th>
                                        <th><label>Run Access</label></th>
                                        <th><label>Edit Access</label></th>
                                        <th><label>Remove</label></th>
                                </tr>
                                <tr *ngFor="let reportUser of reportUserList; let i = index;">
                                        <td>{{i+1}}</td>
                                        <td style="width: 700px;"> {{reportUser.name}}</td>
                                        <td>
                                                        <div class="onoffswitch" >
                                                                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch" disabled="disabled" Checked="true">
                                                                        <label class="onoffswitch-label" for="myonoffswitch">
                                                                            <span class="onoffswitch-inner"></span>
                                                                            <span class="onoffswitch-switch"></span>
                                                                        </label>
                                                                    </div>
                                        </td>
                                        <td>
                                                        <div class="onoffswitch">
                                                                        <input type="checkbox" name="reportUser{{i}}" class="onoffswitch-checkbox" id="reportUser{{i}}"  (change)="addUserEditAccess(reportUser.id, i)"  [(ngModel)]="userEditAccessArr[i]" Checked="userEditAccessArr[i]"> 
                                                                        <label class="onoffswitch-label" for="reportUser{{i}}">
                                                                            <span class="onoffswitch-inner"></span>
                                                                            <span class="onoffswitch-switch"></span>
                                                                        </label>
                                                                    </div>
                                        </td>
                                        <td><mat-icon aria-hidden="false" aria-label="delete" (click)="removeReportUser(reportUser.name)">delete</mat-icon></td>
                                </tr>
                        </table>
                </div>
                <div>
                        <table>
                        <tr>
                        <label for="reportType">Grant Access To:</label> <br/>
                        <select style="width: 95%" class="browser-default custom-select defaultFontSize"  required="required" placeholder="Select user" [(ngModel)]="reportUser"  value="reportUser">
                                <option  class="defaultFontSize" selected>Select User</option>
                                        <option  *ngFor="let reportOwner of reportOwnerList" class="defaultFontSize" value="{{reportOwner.name}}" >{{reportOwner.name}}</option>
                                        
                        </select>
                        </tr>
                        <br/>
                        <tr>
                        <button style="font-size: 17px;" class="btn btn-alt btn-small" (click)="addReportUser()" >Add</button>
                        </tr>  
                        </table>
                </div>
                
                <table>
                <tr>
                        <h4>Report Roles</h4>
                </tr>
                </table>
                <span class="ecomp-spinner" *ngIf="showRoleListSpinner"></span>   
                
                <div *ngIf="!showRoleListSpinner">
                        <table>
                                <tr>
                                        <th><label>No</label></th>
                                        <th><label>User Name</label></th>
                                        <th><label>Run Access</label></th>
                                        <th><label>Edit Access</label></th>
                                        <th><label>Remove</label></th>
                                </tr>
                                <tr *ngFor="let securityRole of reportSecurityRoles; let j = index;">
                                        <td>{{j+1}}</td>
                                        <td style="width: 700px;">{{securityRole.name}}</td>
                                        <td>
                                                        <div class="onoffswitch" >
                                                                        <input type="checkbox" name="onoffswitch2" class="onoffswitch-checkbox" id="myonoffswitch2" disabled="disabled" style="cursor: not-allowed;" checked>
                                                                        <label class="onoffswitch-label" for="myonoffswitch2">
                                                                            <span class="onoffswitch-inner"></span>
                                                                            <span class="onoffswitch-switch"></span>
                                                                        </label>
                                                                    </div>
                                        </td>
                                        <td>
                                                        <div class="onoffswitch">
                                                                        <input type="checkbox" name="securityRole{{j}}" class="onoffswitch-checkbox" id="securityRole{{j}}" (change)="addRoleEditAccess(securityRole.id, j)"  [(ngModel)]="addRoleEditAccessArr[j]" Checked="addRoleEditAccessArr[j]">
                                                                        <label class="onoffswitch-label" for="securityRole{{j}}">
                                                                            <span class="onoffswitch-inner"></span>
                                                                            <span class="onoffswitch-switch"></span>
                                                                        </label>
                                                                    </div>
                                        </td>
                                        <td><mat-icon aria-hidden="false" aria-label="delete" (click)="removeReportRole(securityRole.id)">delete</mat-icon></td>
                                </tr>
                        </table>
                </div>
                <div>
                        <table>
                                <tr>
                <label for="reportType">Grant Access To:</label> <br/>
                        <select style="width: 95%" class="browser-default custom-select defaultFontSize"  required="required" placeholder="Select Report Type" [(ngModel)]="reportRole"  value="reportRole">
                                <option  class="defaultFontSize" selected>Select Role  </option>
                                                <option  *ngFor="let reportRoles of reportRoleList" class="defaultFontSize" value="{{reportRoles.name}}" >{{reportRoles.name}}</option>
                                                
                        </select>
                                </tr>
                                <br/>
                                <tr>
                        <button style="font-size: 17px;" class="btn btn-alt btn-small" (click)="addReportRole()" >Add</button>
                                </tr>
                        </table>
                </div>
                
                <br/>  
                <button style="font-size: 17px;" class="btn btn-alt btn-small" (click)="saveSecurityTabData()" >Save</button>
          
        </div>

        </div>
        </div>
</div>