mirror of
https://github.com/bitwarden/web
synced 2026-01-20 09:23:52 +00:00
cross navigation for event subject ids
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
.module('bit.organization')
|
||||
|
||||
.controller('organizationCollectionsController', function ($scope, $state, apiService, $uibModal, cipherService, $filter,
|
||||
toastr, $analytics) {
|
||||
toastr, $analytics, $uibModalStack) {
|
||||
$scope.collections = [];
|
||||
$scope.loading = true;
|
||||
$scope.$on('$viewContentLoaded', function () {
|
||||
@@ -96,6 +96,12 @@
|
||||
apiService.collections.listOrganization({ orgId: $state.params.orgId }, function (list) {
|
||||
$scope.collections = cipherService.decryptCollections(list.Data, $state.params.orgId, true);
|
||||
$scope.loading = false;
|
||||
|
||||
if ($state.params.search) {
|
||||
$uibModalStack.dismissAll();
|
||||
$scope.filterSearch = $state.params.search;
|
||||
$('#filterSearch').focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.module('bit.organization')
|
||||
|
||||
.controller('organizationEventsController', function ($scope, $state, apiService, $uibModal, $filter,
|
||||
toastr, $analytics, constants, eventService) {
|
||||
toastr, $analytics, constants, eventService, $compile, $sce) {
|
||||
$scope.events = [];
|
||||
$scope.orgUsers = [];
|
||||
$scope.loading = true;
|
||||
@@ -77,8 +77,9 @@
|
||||
for (i = 0; i < list.Data.length; i++) {
|
||||
var userId = list.Data[i].ActingUserId || list.Data[i].UserId;
|
||||
var eventInfo = eventService.getEventInfo(list.Data[i]);
|
||||
var htmlMessage = $compile('<span>' + eventInfo.message + '</span>')($scope);
|
||||
events.push({
|
||||
message: eventInfo.message,
|
||||
message: $sce.trustAsHtml(htmlMessage[0].outerHTML),
|
||||
appIcon: eventInfo.appIcon,
|
||||
appName: eventInfo.appName,
|
||||
userId: userId,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.module('bit.organization')
|
||||
|
||||
.controller('organizationGroupsController', function ($scope, $state, apiService, $uibModal, $filter,
|
||||
toastr, $analytics) {
|
||||
toastr, $analytics, $uibModalStack) {
|
||||
$scope.groups = [];
|
||||
$scope.loading = true;
|
||||
$scope.$on('$viewContentLoaded', function () {
|
||||
@@ -88,6 +88,12 @@
|
||||
}
|
||||
$scope.groups = groups;
|
||||
$scope.loading = false;
|
||||
|
||||
if ($state.params.search) {
|
||||
$uibModalStack.dismissAll();
|
||||
$scope.filterSearch = $state.params.search;
|
||||
$('#filterSearch').focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.module('bit.organization')
|
||||
|
||||
.controller('organizationPeopleController', function ($scope, $state, $uibModal, cryptoService, apiService, authService,
|
||||
toastr, $analytics) {
|
||||
toastr, $analytics, $filter, $uibModalStack) {
|
||||
$scope.users = [];
|
||||
$scope.useGroups = false;
|
||||
$scope.useEvents = false;
|
||||
@@ -143,6 +143,20 @@
|
||||
}
|
||||
|
||||
$scope.users = users;
|
||||
|
||||
if ($state.params.search) {
|
||||
$uibModalStack.dismissAll();
|
||||
$scope.filterSearch = $state.params.search;
|
||||
$('#filterSearch').focus();
|
||||
}
|
||||
|
||||
if ($state.params.viewEvents) {
|
||||
$uibModalStack.dismissAll();
|
||||
var user = $filter('filter')($scope.users, { id: $state.params.viewEvents });
|
||||
if (user && user.length) {
|
||||
$scope.events(user[0]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.module('bit.organization')
|
||||
|
||||
.controller('organizationPeopleEventsController', function ($scope, apiService, $uibModalInstance,
|
||||
orgUser, $analytics, eventService, orgId) {
|
||||
orgUser, $analytics, eventService, orgId, $compile, $sce) {
|
||||
$analytics.eventTrack('organizationPeopleEventsController', { category: 'Modal' });
|
||||
$scope.email = orgUser.email;
|
||||
$scope.events = [];
|
||||
@@ -50,8 +50,9 @@
|
||||
var events = [];
|
||||
for (var i = 0; i < list.Data.length; i++) {
|
||||
var eventInfo = eventService.getEventInfo(list.Data[i]);
|
||||
var htmlMessage = $compile('<span>' + eventInfo.message + '</span>')($scope);
|
||||
events.push({
|
||||
message: eventInfo.message,
|
||||
message: $sce.trustAsHtml(htmlMessage[0].outerHTML),
|
||||
appIcon: eventInfo.appIcon,
|
||||
appName: eventInfo.appName,
|
||||
date: list.Data[i].Date,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.module('bit.organization')
|
||||
|
||||
.controller('organizationVaultController', function ($scope, apiService, cipherService, $analytics, $q, $state,
|
||||
$localStorage, $uibModal, $filter, authService) {
|
||||
$localStorage, $uibModal, $filter, authService, $filter, $uibModalStack) {
|
||||
$scope.ciphers = [];
|
||||
$scope.collections = [];
|
||||
$scope.loading = true;
|
||||
@@ -47,6 +47,20 @@
|
||||
|
||||
$q.all([collectionPromise, cipherPromise]).then(function () {
|
||||
$scope.loading = false;
|
||||
|
||||
if ($state.params.search) {
|
||||
$uibModalStack.dismissAll();
|
||||
$scope.$emit('setSearchVaultText', $state.params.search);
|
||||
$('#search').focus();
|
||||
}
|
||||
|
||||
if ($state.params.viewEvents) {
|
||||
$uibModalStack.dismissAll();
|
||||
var cipher = $filter('filter')($scope.ciphers, { id: $state.params.viewEvents });
|
||||
if (cipher && cipher.length) {
|
||||
$scope.viewEvents(cipher[0]);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<div class="box-filters hidden-xs">
|
||||
<div class="form-group form-group-sm has-feedback has-feedback-left">
|
||||
<input type="text" id="search" class="form-control" placeholder="Search collections..."
|
||||
<input type="text" id="filterSearch" class="form-control" placeholder="Search collections..."
|
||||
style="width: 200px;" ng-model="filterSearch">
|
||||
<span class="fa fa-search form-control-feedback text-muted" aria-hidden="true"></span>
|
||||
</div>
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Timestamp</th>
|
||||
<th>User</th>
|
||||
<th><span class="sr-only">App</span></th>
|
||||
<th>User</th>
|
||||
<th>Event</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -43,14 +43,14 @@
|
||||
<td style="width: 210px; min-width: 100px;">
|
||||
{{event.date | date:'medium'}}
|
||||
</td>
|
||||
<td style="width: 150px; min-width: 100px;">
|
||||
{{event.userName}}
|
||||
</td>
|
||||
<td style="width: 20px;" class="text-center">
|
||||
<i class="text-muted fa fa-lg {{event.appIcon}}" title="{{event.appName}}, {{event.ip}}"></i>
|
||||
</td>
|
||||
<td style="width: 150px; min-width: 100px;">
|
||||
{{event.userName}}
|
||||
</td>
|
||||
<td>
|
||||
{{event.message}}
|
||||
<div ng-bind-html="event.message"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<div class="box-filters hidden-xs">
|
||||
<div class="form-group form-group-sm has-feedback has-feedback-left">
|
||||
<input type="text" id="search" class="form-control" placeholder="Search groups..."
|
||||
<input type="text" id="filterSearch" class="form-control" placeholder="Search groups..."
|
||||
style="width: 200px;" ng-model="filterSearch">
|
||||
<span class="fa fa-search form-control-feedback text-muted" aria-hidden="true"></span>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<div class="box-filters hidden-xs">
|
||||
<div class="form-group form-group-sm has-feedback has-feedback-left">
|
||||
<input type="text" id="search" class="form-control" placeholder="Search people..."
|
||||
<input type="text" id="filterSearch" class="form-control" placeholder="Search people..."
|
||||
style="width: 200px;" ng-model="filterSearch">
|
||||
<span class="fa fa-search form-control-feedback text-muted" aria-hidden="true"></span>
|
||||
</div>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<i class="text-muted fa fa-lg {{event.appIcon}}" title="{{event.appName}}, {{event.ip}}"></i>
|
||||
</td>
|
||||
<td>
|
||||
{{event.message}}
|
||||
<div ng-bind-html="event.message"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Timestamp</th>
|
||||
<th>User</th>
|
||||
<th><span class="sr-only">App</span></th>
|
||||
<th>User</th>
|
||||
<th>Event</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -35,12 +35,12 @@
|
||||
<td style="width: 210px; min-width: 100px;">
|
||||
{{event.date | date:'medium'}}
|
||||
</td>
|
||||
<td style="width: 150px; min-width: 100px;">
|
||||
{{event.userName}}
|
||||
</td>
|
||||
<td style="width: 20px;" class="text-center">
|
||||
<i class="text-muted fa fa-lg {{event.appIcon}}" title="{{event.appName}}, {{event.ip}}"></i>
|
||||
</td>
|
||||
<td style="width: 150px; min-width: 100px;">
|
||||
{{event.userName}}
|
||||
</td>
|
||||
<td>
|
||||
{{event.message}}
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user