Remove unused dns views
This commit is contained in:
@@ -1,46 +0,0 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1>DNS Management</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 grid-item">
|
||||
<div class="grid-item-content">
|
||||
<div class="grid-item-top">
|
||||
<big>Certificate</big>
|
||||
</div>
|
||||
<div class="grid-item-bottom text-right">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">
|
||||
<input type="file" id="idCertificate" style="display:none"/>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button" onclick="getElementById('idCertificate').click();">Certificate</button>
|
||||
</span>
|
||||
<input type="text" class="form-control" ng-model="certificateFileName" onclick="getElementById('idCertificate').click();" style="cursor: pointer;"/>
|
||||
<span class="input-group-addon">
|
||||
<i class="fa fa-upload" onclick="getElementById('idCertificate').click();"></i>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<input type="file" id="idKey" style="display:none"/>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button" onclick="getElementById('idKey').click();">Key</button>
|
||||
</span>
|
||||
<input type="text" class="form-control" ng-model="keyFileName" onclick="getElementById('idKey').click();" style="cursor: pointer;"/>
|
||||
<span class="input-group-addon">
|
||||
<i class="fa fa-upload" onclick="getElementById('idKey').click();"></i>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<button class="btn btn-outline btn-success" ng-click="setCertificate()">Upload Certificate</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,35 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('Application').controller('DnsController', ['$scope', '$location', 'Client', function ($scope, $location, Client) {
|
||||
Client.onReady(function () { if (!Client.getUserInfo().admin) $location.path('/'); });
|
||||
|
||||
$scope.certificateFile = null;
|
||||
$scope.certificateFileName = '';
|
||||
$scope.keyFile = null;
|
||||
$scope.keyFileName = '';
|
||||
|
||||
document.getElementById('idCertificate').onchange = function (event) {
|
||||
$scope.$apply(function () {
|
||||
$scope.certificateFile = event.target.files[0];
|
||||
$scope.certificateFileName = event.target.files[0].name;
|
||||
});
|
||||
};
|
||||
|
||||
document.getElementById('idKey').onchange = function (event) {
|
||||
$scope.$apply(function () {
|
||||
$scope.keyFile = event.target.files[0];
|
||||
$scope.keyFileName = event.target.files[0].name;
|
||||
});
|
||||
};
|
||||
|
||||
$scope.setCertificate = function () {
|
||||
if (!$scope.certificateFile) return console.log('Certificate not set');
|
||||
if (!$scope.keyFile) return console.log('Key not set');
|
||||
|
||||
Client.setCertificate($scope.certificateFile, $scope.keyFile, function (error) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
window.setTimeout(window.location.reload.bind(window.location, true), 3000);
|
||||
});
|
||||
};
|
||||
}]);
|
||||
Reference in New Issue
Block a user