|
2 | 2 | 'use strict';
|
3 | 3 |
|
4 | 4 | angular.module('app.event')
|
5 |
| - .controller('Event', function ($ExceptionlessClient, $scope, $state, $stateParams, $timeout, $window, billingService, clipboard, errorService, eventService, filterService, hotkeys, linkService, notificationService, projectService, simpleErrorService, urlService, translateService) { |
| 5 | + .controller('Event', function ($ExceptionlessClient, $scope, $state, $stateParams, $timeout, $window, billingService, clipboard, dialogService, errorService, eventService, filterService, hotkeys, linkService, notificationService, projectService, simpleErrorService, urlService, translateService) { |
6 | 6 | var vm = this;
|
7 | 7 |
|
8 | 8 | function activateSessionEventsTab() {
|
|
312 | 312 | }
|
313 | 313 |
|
314 | 314 | vm.event = response.data.plain();
|
315 |
| - vm.event_json = angular.toJson(vm.event); |
| 315 | + vm.event_json = angular.toJson(vm.event, true); |
316 | 316 | vm.sessionEvents.relativeTo = vm.event.date;
|
317 | 317 | vm.errorData = getErrorData(vm.event);
|
318 | 318 | vm.errorType = getErrorType(vm.event);
|
|
428 | 428 | return projectService.promoteTab(vm.project.id, tabName).then(onSuccess, onFailure);
|
429 | 429 | }
|
430 | 430 |
|
| 431 | + function viewJSON() { |
| 432 | + function onSuccess() { |
| 433 | + $ExceptionlessClient.createFeatureUsage(vm._source + '.viewJSON.success') |
| 434 | + .setProperty('id', vm._eventId) |
| 435 | + .submit(); |
| 436 | + } |
| 437 | + |
| 438 | + function onFailure() { |
| 439 | + $ExceptionlessClient.createFeatureUsage(vm._source + '.viewJSON.error') |
| 440 | + .setProperty('id', vm._eventId) |
| 441 | + .submit(); |
| 442 | + } |
| 443 | + |
| 444 | + $ExceptionlessClient.createFeatureUsage(vm._source + '.viewJSON') |
| 445 | + .setProperty('id', vm._eventId) |
| 446 | + .submit(); |
| 447 | + |
| 448 | + return dialogService.viewJSON(vm.event_json).then(onSuccess, onFailure) |
| 449 | + } |
| 450 | + |
431 | 451 | function updateIsAccordionVisible() {
|
432 | 452 | vm.isAccordionVisible = $window.innerWidth < 768;
|
433 | 453 | }
|
|
535 | 555 | hideSessionStartTime: true
|
536 | 556 | };
|
537 | 557 | vm.sessionEventsTabActivated = false;
|
| 558 | + vm.viewJSON = viewJSON; |
538 | 559 | vm.tabs = [];
|
539 | 560 |
|
540 | 561 | return getEvent().then(getProject).then(function () {
|
|
0 commit comments