Add enableSshSupport option to support tickets
This commit is contained in:
+8
-6
@@ -1594,13 +1594,15 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Client.prototype.createTicket = function (type, subject, description, appId /* optional */, altEmail /* optional */, callback) {
|
Client.prototype.createTicket = function (ticket, callback) {
|
||||||
|
// just to be eplicit here
|
||||||
var data = {
|
var data = {
|
||||||
type: type,
|
enableSshSupport: !!ticket.enableSshSupport,
|
||||||
subject: subject,
|
type: ticket.type,
|
||||||
description: description,
|
subject: ticket.subject,
|
||||||
appId: appId || undefined,
|
description: ticket.description,
|
||||||
altEmail: altEmail || undefined
|
appId: ticket.appId || undefined,
|
||||||
|
altEmail: ticket.altEmail || undefined
|
||||||
};
|
};
|
||||||
|
|
||||||
post('/api/v1/support/ticket', data, null, function (error, data, status) {
|
post('/api/v1/support/ticket', data, null, function (error, data, status) {
|
||||||
|
|||||||
@@ -44,6 +44,11 @@
|
|||||||
<label>Email</label> <small> (Subscription email is {{ subscription.email }}) </small>
|
<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'">
|
<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>
|
||||||
|
<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>
|
<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.error" class="text-danger text-bold">{{feedback.error}}</span>
|
||||||
<span ng-show="feedback.result" class="text-success text-bold">{{feedback.result.message}}</span>
|
<span ng-show="feedback.result" class="text-success text-bold">{{feedback.result.message}}</span>
|
||||||
|
|||||||
+12
-1
@@ -15,6 +15,7 @@ angular.module('Application').controller('SupportController', ['$scope', '$locat
|
|||||||
error: null,
|
error: null,
|
||||||
result: null,
|
result: null,
|
||||||
busy: false,
|
busy: false,
|
||||||
|
enableSshSupport: false,
|
||||||
subject: '',
|
subject: '',
|
||||||
type: 'app_error',
|
type: 'app_error',
|
||||||
description: '',
|
description: '',
|
||||||
@@ -26,6 +27,7 @@ angular.module('Application').controller('SupportController', ['$scope', '$locat
|
|||||||
$scope.subscription = null;
|
$scope.subscription = null;
|
||||||
|
|
||||||
function resetFeedback() {
|
function resetFeedback() {
|
||||||
|
$scope.feedback.enableSshSupport = false;
|
||||||
$scope.feedback.subject = '';
|
$scope.feedback.subject = '';
|
||||||
$scope.feedback.description = '';
|
$scope.feedback.description = '';
|
||||||
$scope.feedback.type = 'app_error';
|
$scope.feedback.type = 'app_error';
|
||||||
@@ -41,7 +43,16 @@ angular.module('Application').controller('SupportController', ['$scope', '$locat
|
|||||||
$scope.feedback.result = null;
|
$scope.feedback.result = null;
|
||||||
$scope.feedback.error = 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) {
|
if (error) {
|
||||||
$scope.feedback.error = error.message;
|
$scope.feedback.error = error.message;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user