This repository has been archived by the owner on Mar 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from exceptionless/feature/fixed-in-version
Feature/fixed in version
- Loading branch information
Showing
19 changed files
with
162 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/components/stack-dialog/mark-fixed-dialog-controller.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
angular.module('exceptionless.stack-dialog') | ||
.controller('MarkFixedDialog', ['$ExceptionlessClient', '$uibModalInstance', function ($ExceptionlessClient, $uibModalInstance) { | ||
var source = 'app.stack-dialog.MarkFixedDialog'; | ||
var vm = this; | ||
|
||
function cancel() { | ||
$uibModalInstance.dismiss('cancel'); | ||
} | ||
|
||
function save(isValid) { | ||
if (isValid === false) { | ||
return; | ||
} | ||
|
||
$ExceptionlessClient.createFeatureUsage(source + '.save').setProperty('version', vm.data.version).submit(); | ||
$uibModalInstance.close(vm.data.version); | ||
} | ||
|
||
vm.cancel = cancel; | ||
vm.data = {}; | ||
vm.save = save; | ||
$ExceptionlessClient.submitFeatureUsage(source); | ||
}]); | ||
}()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<form name="markFixedForm" role="form" class="form-validation" autocomplete="on"> | ||
<div class="modal-header dialog-header-confirm"> | ||
<button type="button" role="button" class="close" ng-click="vm.cancel()">×</button> | ||
<h4 class="modal-title"> | ||
<span class="glyphicon glyphicon-check"></span> | ||
Mark Fixed | ||
</h4> | ||
</div> | ||
|
||
<div class="modal-body text-muted"> | ||
<p>Marks the stack as fixed. This will also prevent error occurrences from being displayed in the dashboard.</p> | ||
<p> | ||
<b>Optional:</b> Please enter the version in which the stack has been fixed. Any submitted occurrences with a lower version will | ||
not cause a regression. | ||
<a href="https://github.com/exceptionless/Exceptionless/wiki/Versioning" target="_blank" title="Versioning Documentation" aria-label="Versioning Documentation"> | ||
<i class="fa fa-fw fa-question-circle"></i> | ||
</a> | ||
</p> | ||
|
||
<div class="form-group"> | ||
<input id="version" name="version" type="text" class="form-control input-lg" placeholder="Optional Version (Example: 1.2.3)" | ||
ng-model="vm.data.version" | ||
semantic-version-validator | ||
autofocus /> | ||
|
||
<div class="error" ng-messages="markFixedForm.$error" ng-if="markFixedForm.$submitted || markFixedForm.version.$touched"> | ||
<small ng-message="semver">Invalid version.</small> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="modal-footer"> | ||
<button type="button" role="button" class="btn btn-default" ng-click="vm.cancel()">Cancel</button> | ||
<input type="submit" role="button" class="btn btn-primary" ng-click="vm.save(markFixedForm.$valid)" value="MARK FIXED" /> | ||
</div> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
angular.module('exceptionless.stack-dialog') | ||
.factory('stackDialogService', ['dialogs', function (dialogs) { | ||
function markFixed() { | ||
return dialogs.create('components/stack-dialog/mark-fixed-dialog.tpl.html', 'MarkFixedDialog as vm').result; | ||
} | ||
|
||
var service = { | ||
markFixed: markFixed | ||
}; | ||
|
||
return service; | ||
} | ||
]); | ||
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
angular.module('exceptionless.stack-dialog', [ | ||
'ui.bootstrap', | ||
|
||
'dialogs.main', | ||
'dialogs.default-translations', | ||
|
||
'exceptionless.autofocus', | ||
'exceptionless.validators' | ||
]); | ||
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
angular.module('exceptionless.validators') | ||
.directive('semanticVersionValidator', ['$timeout', '$q', 'searchService', function($timeout, $q, searchService) { | ||
return { | ||
restrict: 'A', | ||
require: 'ngModel', | ||
link: function(scope, element, attrs, ngModel) { | ||
ngModel.$validators.semver = function (modelValue, viewValue) { | ||
if (typeof viewValue !== 'string') { | ||
return undefined; | ||
} | ||
|
||
var version = viewValue.trim(); | ||
if (version.length === 0) { | ||
return undefined; | ||
} | ||
|
||
if (version.length > 256) { | ||
return false; | ||
} | ||
|
||
var regex = new RegExp('^v?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][a-zA-Z0-9-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][a-zA-Z0-9-]*))*))?(?:\\+([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?$'); | ||
return regex.test(version); | ||
}; | ||
} | ||
}; | ||
}]); | ||
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.