One Hat Cyber Team
  • Dir : ~/www/server/panel/BTPanel/static/amd/
  • Edit File: config.js
    \n\t\t\t\t
    ', success: function () { var _tips = $('textarea[name=recipient_textarea]'); var msg = ''; if (!$.isEmptyObject(currentItem['mail']['data']['receive'])) { msg = currentItem['mail']['data']['receive'] ? currentItem['mail']['data']['receive'].join('\n') : ''; } _tips.html(msg); if (_tips.val() == '') $('.reci_tips.placeholder').show(); $('.placeholder').click(function () { $(this).hide().siblings('textarea').focus(); }); _tips.focus(function () { $('.reci_tips.placeholder').hide(); }); _tips.blur(function () { _tips.val() == '' ? $('.reci_tips.placeholder').show() : $('.reci_tips.placeholder').hide(); }); }, yes: function (config) { return __awaiter(_this, void 0, void 0, function () { var close, reci_, rdata; return __generator(this, function (_a) { switch (_a.label) { case 0: close = config.close; reci_ = $('textarea[name=recipient_textarea]').val(); return [4, this.$request('setMsgConfigmail', { mails: reci_ })]; case 1: rdata = _a.sent(); rdata.status && close(); return [2]; } }); }); }, }); return [2]; } }); }); }); $('.configEdit').click(function (ev) { return __awaiter(_this, void 0, void 0, function () { var _type; return __generator(this, function (_a) { _type = $(ev.currentTarget).parents('tr').data('name'); this.setAlertConfigType(_type); return [2]; }); }); }); $('.alertTest').click(function (ev) { return __awaiter(_this, void 0, void 0, function () { var _type; return __generator(this, function (_a) { switch (_a.label) { case 0: _type = $(ev.currentTarget).parents('tr').data('name'); return [4, this.$request(['config/get_msg_fun', 'Testing Send, Please wait...'], { fun_name: 'push_data', module_name: _type, msg: 'Testing Send' })]; case 1: _a.sent(); return [2]; } }); }); }); $('.replaceWx').click(function () { _this.setAlertConfigType('wx_account'); }); $('.uninstall_alert').click(function (ev) { return __awaiter(_this, void 0, void 0, function () { var _type, rdata, _a; return __generator(this, function (_b) { switch (_b.label) { case 0: _type = $(ev.currentTarget).parents('tr').data('name'); return [ 4, this.$confirm({ title: 'Delete ' + info[_type].title + ' module', msg: 'After deleting the ' + info[_type].title + ' module, it will not be able to send panel alert messages, should I continue?', }), ]; case 1: _b.sent(); return [4, this.$request(['config/uninstall_msg_module&name=' + _type, 'Delete ' + info[_type].title + ' alert module'])]; case 2: rdata = _b.sent(); _a = rdata.status; if (!_a) return [3, 4]; return [4, this.alertConfigTable()]; case 3: _a = _b.sent(); _b.label = 4; case 4: _a; return [2]; } }); }); }); }; Config.prototype.alertLogsTable = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { $('#alertLog').empty(); bt_tools.table({ el: '#alertLog', load: 'Getting the alarm log list', url: '/push?action=get_push_logs', default: 'The alarm log is empty', dataFilter: function (res) { return { data: res.data }; }, column: [ { fid: 'log', title: 'Title', type: 'text', }, { fid: 'addtime', title: 'Time', type: 'text', }, ], tootls: [ { type: 'page', positon: ['right', 'bottom'], pageParam: 'p', page: 1, numberParam: 'limit', number: 20, numberList: [10, 20, 50, 100, 200], numberStatus: true, jump: true, }, ], }); return [2]; }); }); }; return Config; })(public_1.default); exports.Config = Config; });