Add enableSshSupport option to support tickets

This commit is contained in:
Johannes Zellner
2020-10-05 15:20:07 +02:00
parent 2fe86f9b8a
commit 41e8bcd02f
3 changed files with 25 additions and 7 deletions

View File

@@ -44,6 +44,11 @@
<label>Email</label> <small> (Subscription email is {{ subscription.email }}) </small>
<input type="text" class="form-control" name="email" placeholder="If needed, provide an email address different from above to reach you" ng-model="feedback.altEmail" ng-maxlength="512" ng-minlength="1" ng-required="feedback.type === 'email_error'">
</div>
<div class="form-group">
<label class="control-label">
<input type="checkbox" ng-model="feedback.enableSshSupport"> Allow support engineers to connect to this server via SSH
</label>
</div>
<button type="submit" class="btn btn-primary pull-right" ng-disabled="feedbackForm.$invalid || feedback.busy"><i class="fa fa-circle-notch fa-spin" ng-show="feedback.busy"></i> Submit</button>
<span ng-show="feedback.error" class="text-danger text-bold">{{feedback.error}}</span>
<span ng-show="feedback.result" class="text-success text-bold">{{feedback.result.message}}</span>

View File

@@ -15,6 +15,7 @@ angular.module('Application').controller('SupportController', ['$scope', '$locat
error: null,
result: null,
busy: false,
enableSshSupport: false,
subject: '',
type: 'app_error',
description: '',
@@ -26,6 +27,7 @@ angular.module('Application').controller('SupportController', ['$scope', '$locat
$scope.subscription = null;
function resetFeedback() {
$scope.feedback.enableSshSupport = false;
$scope.feedback.subject = '';
$scope.feedback.description = '';
$scope.feedback.type = 'app_error';
@@ -41,7 +43,16 @@ angular.module('Application').controller('SupportController', ['$scope', '$locat
$scope.feedback.result = null;
$scope.feedback.error = null;
Client.createTicket($scope.feedback.type, $scope.feedback.subject, $scope.feedback.description, $scope.feedback.appId, $scope.feedback.altEmail, function (error, result) {
var data = {
enableSshSupport: $scope.feedback.enableSshSupport,
subject: $scope.feedback.subject,
description: $scope.feedback.description,
type: $scope.feedback.type,
appId: $scope.feedback.appId,
altEmail: $scope.feedback.altEmail
};
Client.createTicket(data, function (error, result) {
if (error) {
$scope.feedback.error = error.message;
} else {