mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-05-06 15:15:33 +02:00
feat(systems): examination data manage menu item in admin control panel
This commit is contained in:
@@ -1262,10 +1262,14 @@
|
||||
DATABASE_BACKUP: 'Database backup files',
|
||||
TRANS_EDIT: 'Translate strings editor',
|
||||
COMMANDS_EXECUTE: 'Server commands execute',
|
||||
EXAMINATION_MANAGE: 'Examination data manage',
|
||||
SELECT_FILE: 'Select file, please',
|
||||
BTN_RUN_COMMAND: 'Run',
|
||||
CUSTOM_COMMAND: 'Type command line and rut it:',
|
||||
CONFIG_LOADING: 'Loading file, please wait ...',
|
||||
CURR_EXAMINATION_CONFIG: 'Current examination config: <small>./config/env/torrents.js</small>',
|
||||
BTN_INIT_EXAMINATION_DATA: 'Init examination data',
|
||||
BTN_CURR_EXAMINATION_STATUS: 'Curr examination status',
|
||||
|
||||
CONFIG_CHANGED_CONFIRM_CANCEL: 'Cancel',
|
||||
CONFIG_CHANGED_CONFIRM_SAVE: 'Save',
|
||||
@@ -1275,7 +1279,9 @@
|
||||
CONFIG_SAVE_FAILED: 'Configure save failed',
|
||||
|
||||
DESC_CONFIG: ':warning: This is the system configuration file of **meanTorrent**. If you know what you are doing, you can modify them. Otherwise, don\'t change it arbitrarily. Incorrect settings may cause the system to not work properly. You can also consult the related system maintenance personnel before modification.',
|
||||
DESC_COMMAND: ':warning: The following commands are used to maintain **meanTorrent**. If you don\'t understand their functions, please don\'t execute arbitrarily. Erroneous execution will make the server unable to work normally. You can also consult the related system maintenance personnel before execution.'
|
||||
DESC_COMMAND: ':warning: The following commands are used to maintain **meanTorrent**. If you don\'t understand their functions, please don\'t execute arbitrarily. Erroneous execution will make the server unable to work normally. You can also consult the related system maintenance personnel before execution.',
|
||||
DESC_INIT_EXAMINATION_DATA: 'Before you restart a new examination, you must init the user`s examination data, this is a dangerous operate.',
|
||||
DESC_CURR_EXAMINATION_STATUS: 'The status of current examination, you can look at the user`s completion statistical info, if the examination is over, you can ban the unfinished user`s account.'
|
||||
},
|
||||
|
||||
//shell command
|
||||
@@ -1561,7 +1567,7 @@
|
||||
|
||||
SITE_NOTICE: {
|
||||
GLOBAL_SALES_NOTICE: '### IMPORTANT NOTICE: \n :radio: **Happy new year 2018**, **{{site_name}}** global sale is coming, sales value is <span class="sale_key">**{{sale_value}}**</span>, sales start at **{{sale_start_at | date: "yyyy-MM-dd HH:mm"}}** and continued <span class="sale_key">**{{sale_days}}**</span> days and end at **{{sale_end_at | date: "yyyy-MM-dd HH:mm"}}**, Thank you for all the help and support you have been giving us all the time!',
|
||||
EXAMINATION_NOTICE: '### IMPORTANT NOTICE: \n :radio: **{{site_name}}** will take a new incremental examination from **{{examination_start_at | date: "yyyy-MM-dd HH:mm"}}** to **{{examination_end_at | date: "yyyy-MM-dd HH:mm"}}**, Incremental data requirements: upload **{{data_upload | bytes:2}}**, download **{{data_download | bytes:2}}**, score **{{data_score}}**, Please arrange your own time and hope to pass the exam smoothly. All VIP users are exempt from this examination, The unfinished user account will be banned.'
|
||||
EXAMINATION_NOTICE: '### IMPORTANT NOTICE: \n :radio: **{{site_name}}** will take a new incremental examination from **{{examination_start_at | date: "yyyy-MM-dd HH:mm"}}** to **{{examination_end_at | date: "yyyy-MM-dd HH:mm"}}**, Incremental data requirements: upload **{{data_upload | bytes:2}}**, download **{{data_download | bytes:2}}**, score **{{data_score}}**, Please arrange your own time and hope to pass the exam smoothly. All VIP users are exempt, The unfinished user account will be banned.'
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1262,10 +1262,14 @@
|
||||
DATABASE_BACKUP: '数据库备份文件',
|
||||
TRANS_EDIT: '多语言字符串在线编辑',
|
||||
COMMANDS_EXECUTE: '服务器命令在线执行',
|
||||
EXAMINATION_MANAGE: '考核数据管理',
|
||||
SELECT_FILE: '请选择文件',
|
||||
BTN_RUN_COMMAND: '执行',
|
||||
CUSTOM_COMMAND: '输入命令行并执行:',
|
||||
CONFIG_LOADING: '正在装载文件, 请稍候 ...',
|
||||
CURR_EXAMINATION_CONFIG: '当前考核配置: <small>./config/env/torrents.js</small>',
|
||||
BTN_INIT_EXAMINATION_DATA: '初始化用户的考核数据',
|
||||
BTN_CURR_EXAMINATION_STATUS: '当前考核的数据状态',
|
||||
|
||||
CONFIG_CHANGED_CONFIRM_CANCEL: '取消',
|
||||
CONFIG_CHANGED_CONFIRM_SAVE: '保存',
|
||||
@@ -1275,7 +1279,9 @@
|
||||
CONFIG_SAVE_FAILED: '系统配置保存失败',
|
||||
|
||||
DESC_CONFIG: ':warning: 这是 **meantorrent** 的系统配置文件, 如果您知道你在干什么, 您可以修改它们, 否则不要随便改动, 不正确的设置可能会导致系统不能正常工作. 您也可以在修改前咨询相关系统维护人员.',
|
||||
DESC_COMMAND: ':warning: 下面的命令用来维护 **meanTorrent**, 如果你不明白它们的作用,请不要随意的执行,错误的执行将使服务器不能正常的工作. 您也可以在执行前咨询相关系统维护人员.'
|
||||
DESC_COMMAND: ':warning: 下面的命令用来维护 **meanTorrent**, 如果你不明白它们的作用,请不要随意的执行,错误的执行将使服务器不能正常的工作. 您也可以在执行前咨询相关系统维护人员.',
|
||||
DESC_INIT_EXAMINATION_DATA: '在您重新开启一次新的考核之前, 您必须初始化所有用户帐户的考核数据, 请注意这是一个危险的操作, 请谨慎对待哦!',
|
||||
DESC_CURR_EXAMINATION_STATUS: '当前考核的进展状态, 您可以查看用户的完成情况统计信息, 如果考核已经结束, 您可以根据这些统计信息对未完成任务的帐户进行禁止.'
|
||||
},
|
||||
|
||||
//shell command
|
||||
@@ -1561,7 +1567,7 @@
|
||||
|
||||
SITE_NOTICE: {
|
||||
GLOBAL_SALES_NOTICE: '### 重要通知! \n :radio: **新年快乐 2018**, **{{site_name}}** 新年促销活动已准备就绪, 促销活动类型为 <span class="sale_key">**{{sale_value}}**</span> , 活动将开始于 **{{sale_start_at | date: "yyyy-MM-dd HH:mm"}}** 并持续 <span class="sale_key">**{{sale_days}}**</span> 天, 结束于 **{{sale_end_at | date: "yyyy-MM-dd HH:mm"}}**, 并感谢所有会员用户一直以来给予我们的帮助与支持!',
|
||||
EXAMINATION_NOTICE: '### 重要通知!: \n :radio: **{{site_name}}** 将从 **{{examination_start_at | date: "yyyy-MM-dd HH:mm"}}** 到 **{{examination_end_at | date: "yyyy-MM-dd HH:mm"}}** 进行一次新的增量考试, 增量数据要求: 上传 **{{data_upload | bytes:2}}**, 下载 **{{data_download | bytes:2}}**, 积分 **{{data_score}}**, 请各位会员安排好自已的时间,并祝您顺利通过这次考试. 所有vip用户可免于此次考试, 考试未达标的用户帐号将会被禁止.'
|
||||
EXAMINATION_NOTICE: '### 重要通知!: \n :radio: **{{site_name}}** 将从 **{{examination_start_at | date: "yyyy-MM-dd HH:mm"}}** 到 **{{examination_end_at | date: "yyyy-MM-dd HH:mm"}}** 进行一次新的增量考核, 增量数据要求: 上传 **{{data_upload | bytes:2}}**, 下载 **{{data_download | bytes:2}}**, 积分 **{{data_score}}**, 请各位会员安排好自已的时间,并祝您顺利通过这次考核. 所有vip用户免考, 考核未达标的用户帐号将会被禁止.'
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
url: '/trans',
|
||||
templateUrl: '/modules/systems/client/views/trans.client.view.html'
|
||||
})
|
||||
.state('admin.systems.examination', {
|
||||
url: '/examination',
|
||||
templateUrl: '/modules/systems/client/views/examination.client.view.html'
|
||||
})
|
||||
.state('admin.systems.commands', {
|
||||
url: '/commands',
|
||||
templateUrl: '/modules/systems/client/views/commands.client.view.html'
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
vm.user = Authentication.user;
|
||||
vm.selectedFilename = 'null';
|
||||
vm.shellCommandConfig = MeanTorrentConfig.meanTorrentConfig.shellCommand;
|
||||
vm.examinationConfig = MeanTorrentConfig.meanTorrentConfig.examination;
|
||||
|
||||
/**
|
||||
* cmOption
|
||||
@@ -277,5 +278,8 @@
|
||||
}
|
||||
};
|
||||
|
||||
vm.getCurrExaminationConfig = function () {
|
||||
return JSON.stringify(vm.examinationConfig);
|
||||
};
|
||||
}
|
||||
}());
|
||||
|
||||
@@ -21,6 +21,20 @@
|
||||
padding: 10px 15px 5px;
|
||||
background-color: @alert-warning-bg;
|
||||
}
|
||||
.panel-config {
|
||||
border-bottom: solid 1px #ddd;
|
||||
padding: 10px 15px 5px;
|
||||
background-color: #fafbfc;
|
||||
small {
|
||||
color: #aaa;
|
||||
}
|
||||
.config-tree {
|
||||
padding: 5px 15px;
|
||||
background-color: @alert-warning-bg;
|
||||
border: solid 1px @alert-warning-border;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
.panel-loading {
|
||||
text-align: center;
|
||||
color: #888;
|
||||
@@ -120,3 +134,16 @@
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.examination-panel {
|
||||
.panel-body {
|
||||
padding: 15px;
|
||||
.op-desc {
|
||||
color: #555;
|
||||
}
|
||||
.fa {
|
||||
color: @mt-base-color;
|
||||
font-size: 4em;
|
||||
}
|
||||
}
|
||||
}
|
||||
31
modules/systems/client/views/examination.client.view.html
Normal file
31
modules/systems/client/views/examination.client.view.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<div class="panel panel-default system-panel examination-panel" ng-controller="SystemConfigController as vm">
|
||||
<div class="panel-heading">{{'SYSTEMS.EXAMINATION_MANAGE' | translate}}</div>
|
||||
<div class="panel-config">
|
||||
<p translate="SYSTEMS.CURR_EXAMINATION_CONFIG"></p>
|
||||
<div class="config-tree margin-left-20">
|
||||
<json-tree object="vm.examinationConfig"></json-tree>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row" style="display: table">
|
||||
<div class="col-xs-6 text-center">
|
||||
<p><i class="fa fa-database" aria-hidden="true"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-6 text-center">
|
||||
<p><i class="fa fa-signal" aria-hidden="true"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-6 text-center">
|
||||
<p class="op-desc"><span translate="SYSTEMS.DESC_INIT_EXAMINATION_DATA"></span></p>
|
||||
</div>
|
||||
<div class="col-xs-6 text-center">
|
||||
<p class="op-desc"><span translate="SYSTEMS.DESC_CURR_EXAMINATION_STATUS"></span></p>
|
||||
</div>
|
||||
<div class="col-xs-6 text-center">
|
||||
<button class="btn btn-success">{{'SYSTEMS.BTN_INIT_EXAMINATION_DATA' | translate}}</button>
|
||||
</div>
|
||||
<div class="col-xs-6 text-center">
|
||||
<button class="btn btn-success">{{'SYSTEMS.BTN_CURR_EXAMINATION_STATUS' | translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -10,6 +10,8 @@
|
||||
ui-sref-active="active">{{'SYSTEMS.TRANS_EDIT' | translate}}</a>
|
||||
<a ui-sref="admin.systems.templates" class="list-group-item"
|
||||
ui-sref-active="active">{{'SYSTEMS.TEMPLATES_EDIT' | translate}}</a>
|
||||
<a ui-sref="admin.systems.examination" class="list-group-item divider"
|
||||
ui-sref-active="active">{{'SYSTEMS.EXAMINATION_MANAGE' | translate}}</a>
|
||||
<a ui-sref="admin.systems.backup" class="list-group-item divider"
|
||||
ui-sref-active="active">{{'SYSTEMS.DATABASE_BACKUP' | translate}}</a>
|
||||
<a ui-sref="admin.systems.commands" class="list-group-item divider"
|
||||
|
||||
Reference in New Issue
Block a user