|
|
@@ -473,67 +473,6 @@ myApp.controller("firewall", ["$scope", "$http","NgTableParams","$timeout", func
|
|
|
}).catch(swal.noop);
|
|
|
}
|
|
|
|
|
|
- $scope.addToWhiteList= function(ip) {
|
|
|
- swal({
|
|
|
- title: "确认添加白名单吗?",
|
|
|
- text: "将"+ip+"添加到白名单",
|
|
|
- showCancelButton: true,
|
|
|
- confirmButtonColor: "#DD6B55",
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- animation: true,
|
|
|
- allowOutsideClick: false,
|
|
|
- showLoaderOnConfirm: true,
|
|
|
- preConfirm: function () {
|
|
|
- return new Promise(function (resolve, reject) {
|
|
|
- $http.post("/system/AddToWhiteList", {ip}, {
|
|
|
- 'Content-Type': 'application/x-www-form-urlencoded'
|
|
|
- }).then(function(res) {
|
|
|
- resolve(res.data);
|
|
|
- }, function() {
|
|
|
- reject("请求服务器失败!");
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- }).then(function (data) {
|
|
|
- if (data.Success) {
|
|
|
- swal("添加成功",'','success');
|
|
|
- } else {
|
|
|
- swal("添加失败",'','error');
|
|
|
- }
|
|
|
- }).catch(swal.noop);
|
|
|
- }
|
|
|
- $scope.addToBlackList = function(ip) {
|
|
|
- swal({
|
|
|
- title: "确认添加黑名单吗?",
|
|
|
- text: "将"+ip+"添加到黑名单",
|
|
|
- showCancelButton: true,
|
|
|
- confirmButtonColor: "#DD6B55",
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- animation: true,
|
|
|
- allowOutsideClick: false,
|
|
|
- showLoaderOnConfirm: true,
|
|
|
- preConfirm: function () {
|
|
|
- return new Promise(function (resolve, reject) {
|
|
|
- $http.post("/system/AddToBlackList", {ip}, {
|
|
|
- 'Content-Type': 'application/x-www-form-urlencoded'
|
|
|
- }).then(function(res) {
|
|
|
- resolve(res.data);
|
|
|
- }, function() {
|
|
|
- reject("请求服务器失败!");
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- }).then(function (data) {
|
|
|
- if (data.Success) {
|
|
|
- swal("添加成功",'','success');
|
|
|
- } else {
|
|
|
- swal("添加失败",'','error');
|
|
|
- }
|
|
|
- }).catch(swal.noop);
|
|
|
- }
|
|
|
-
|
|
|
$scope.detail= function(text) {
|
|
|
layer.open({
|
|
|
type: 1,
|
|
|
@@ -549,34 +488,4 @@ myApp.controller("sendbox", ["$scope", "$http", function ($scope, $http) {
|
|
|
$http.post("/system/sendbox").then(function (res) {
|
|
|
$scope.Mails = res.data;
|
|
|
});
|
|
|
- $scope.addToBlackList = function(ip) {
|
|
|
- swal({
|
|
|
- title: "确认添加黑名单吗?",
|
|
|
- text: "将"+ip+"添加到黑名单",
|
|
|
- showCancelButton: true,
|
|
|
- confirmButtonColor: "#DD6B55",
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- animation: true,
|
|
|
- allowOutsideClick: false,
|
|
|
- showLoaderOnConfirm: true,
|
|
|
- preConfirm: function () {
|
|
|
- return new Promise(function (resolve, reject) {
|
|
|
- $http.post("/system/AddToBlackList", {ip}, {
|
|
|
- 'Content-Type': 'application/x-www-form-urlencoded'
|
|
|
- }).then(function(res) {
|
|
|
- resolve(res.data);
|
|
|
- }, function() {
|
|
|
- reject("请求服务器失败!");
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- }).then(function (data) {
|
|
|
- if (data.Success) {
|
|
|
- swal("添加成功",'','success');
|
|
|
- } else {
|
|
|
- swal("添加失败",'','error');
|
|
|
- }
|
|
|
- }).catch(swal.noop);
|
|
|
- }
|
|
|
}]);
|