From 1dfa7a3bf916e6187b91d63f0aa6fa6e3afda98a Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sat, 27 Jul 2019 10:06:31 +0800 Subject: [PATCH 01/19] =?UTF-8?q?=E8=B5=84=E6=BA=90=E9=99=90=E5=88=B6?= =?UTF-8?q?=E6=B2=A1=E5=80=BC=EF=BC=8C=E5=B0=B1=E4=BC=A0=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index af0158cfd..f01ad4b6b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -442,12 +442,18 @@ class ApplicationController < ActionController::Base shixun.shixun_service_configs.each do |config| mirror = config.mirror_repository if mirror.name.present? + # 资源限制没有就传默认值。 + cpu_limit = config.cpu_limit.presence || 1 + cpu_request = config.lower_cpu_limit.presence || 0.1 + memory_limit = config.memory_limit.presence || 1024 + request_limit = config.resource_limit.presence || 10 + resource_limit = config.resource_limit.presence || 10000 container << {:image => mirror.name, - :cpuLimit => config.cpu_limit, - :cpuRequest => config.lower_cpu_limit, - :memoryLimit => "#{config.memory_limit}M", - :memoryRequest => "#{config.request_limit}M", - :resourceLimit => "#{config.resource_limit}K", + :cpuLimit => cpu_limit, + :cpuRequest => cpu_request, + :memoryLimit => "#{memory_limit}M", + :memoryRequest => "#{request_limit}M", + :resourceLimit => "#{resource_limit}K", :type => mirror.try(:main_type) == "1" ? "main" : "sub"} end end From 8c393990f0210310eb288a6de4d03354d90753e9 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 27 Jul 2019 10:16:55 +0800 Subject: [PATCH 02/19] height 40 --- public/react/src/modules/courses/boards/BoardsNew.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/react/src/modules/courses/boards/BoardsNew.js b/public/react/src/modules/courses/boards/BoardsNew.js index 8d9db7c3f..03c5f84f8 100644 --- a/public/react/src/modules/courses/boards/BoardsNew.js +++ b/public/react/src/modules/courses/boards/BoardsNew.js @@ -297,6 +297,9 @@ class BoardsNew extends Component{ .courseForm .noBorder { border-bottom: none; } + .courseForm .ant-input-group > .ant-input:first-child, .ant-input-group-addon:first-child { + height: 40px; + } `}
-
{topicId==undefined?"新建":"编辑"}毕设选题
- this.props.history.goBack()} className="color-grey-6 fr font-16">返回 -
+
{topicId==undefined?"新建":"编辑"}毕设选题
+ this.props.history.goBack()} className="color-grey-6 fr font-16">返回 +是否确认删除 ?
:关闭后,
用户不能再开始挑战了是否确认关闭 ?
实训名称
- -简介
- -技术平台
- - -- 列表中没有? - 申请新建 -
- -新建申请已提交,请等待管理员的审核
-请在配置页面完成后续的评测脚本设置操作
*/} - -评测脚本
-原有脚本将被新的脚本覆盖,无法撤销
-是否确认执行覆盖操作
-评测脚本生成成功!
- 使用自定义模板,平台无法自动更新脚本,
- 请在关卡创建完后手动更新脚本中的必填参
- 数和以下2个数组元素:
- challengeProgramNames
- sourceClassNames
- 示例:有2个关卡的实训
- 各关卡的待编译文件为:
- src/step1/HelloWorld.java
- src/step2/Other.java
- 各关卡的编译后生成的执行文件为:
- step1.HelloWorld
- step2.Other
- 则数组元素更新如下:
- challengeProgramNames=("src/step1/
- HelloWorld.java" "src/step2/Other.java")
- sourceClassNames=("step1.HelloWorld
- " "step2.Other")
- 其它参数可按实际需求定制
-
实训名称
+ +执行命令不能为空
-程序最大执行时间
*/} - - {/* 秒*/} - - {/*Pod存活时间
- - 秒 - -命令行
-公开程度
-发布信息
- -服务配置
- { shixun_service_configs&&shixun_service_configs.map((item,key)=>{ - return( -{item.name}
-简介
+ +评测脚本
+原有脚本将被新的脚本覆盖,无法撤销
+是否确认执行覆盖操作
+评测脚本生成成功!
+ 使用自定义模板,平台无法自动更新脚本,
+ 请在关卡创建完后手动更新脚本中的必填参
+ 数和以下2个数组元素:
+ challengeProgramNames
+ sourceClassNames
+ 示例:有2个关卡的实训
+ 各关卡的待编译文件为:
+ src/step1/HelloWorld.java
+ src/step2/Other.java
+ 各关卡的编译后生成的执行文件为:
+ step1.HelloWorld
+ step2.Other
+ 则数组元素更新如下:
+ challengeProgramNames=("src/step1/
+ HelloWorld.java" "src/step2/Other.java")
+ sourceClassNames=("step1.HelloWorld
+ " "step2.Other")
+ 其它参数可按实际需求定制
+
执行命令不能为空
+程序最大执行时间
*/} + + {/* 秒*/} + + {/*Pod存活时间
+ + 秒 + +命令行
+公开程度
+发布信息
+ +- { - // this.props.identity<4&&this.props.status==0? - this.props.identity<5? -
:"" - } +服务配置
+ { shixun_service_configs&&shixun_service_configs.map((item,key)=>{ + return( +{item.name}
++ { + // this.props.identity<4&&this.props.status==0? + this.props.identity<5? +
:"" + } - + -- +
- {parseFloat(options.answer_percent ? options.answer_percent : 0 ).toFixed(2)*100} % + {options.answer_percent * 100}% { From 0a6e9189a23ad0e8e55192e34dfb26f9dcfabb00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 27 Jul 2019 11:32:17 +0800 Subject: [PATCH 12/19] =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/new/CoursesNew.js | 5 +++++ public/react/src/modules/user/account/AccountBasicEdit.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index 0114f564c..888f4c9e6 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -459,6 +459,11 @@ class CoursesNew extends Component { width: 280px; margin-left: 10px; } + + .construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder { + line-height: 28px; + z-index: 2000; + } `} diff --git a/public/react/src/modules/user/account/AccountBasicEdit.js b/public/react/src/modules/user/account/AccountBasicEdit.js index a4637c00e..44baf7778 100644 --- a/public/react/src/modules/user/account/AccountBasicEdit.js +++ b/public/react/src/modules/user/account/AccountBasicEdit.js @@ -668,7 +668,7 @@ class AccountBasic extends Component { }], })( -
-
-
- +
- {options.answer_percent * 100}% + {(options.answer_percent * 100).toFixed(1)}% { From d65bb1cb0366b1dc3ccfdd4ea816317d26c7bc3b Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sat, 27 Jul 2019 11:53:16 +0800 Subject: [PATCH 19/19] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=8F=AA=E6=9C=89=E7=AE=A1=E7=90=86=E5=91=98=E8=83=BD=E5=A4=9F?= =?UTF-8?q?=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/edu_settings_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/edu_settings_controller.rb b/app/controllers/edu_settings_controller.rb index 0d80cbf3d..6baf38e5b 100644 --- a/app/controllers/edu_settings_controller.rb +++ b/app/controllers/edu_settings_controller.rb @@ -1,5 +1,5 @@ class EduSettingsController < ApplicationController - # before_action :require_admin + before_action :require_admin before_action :set_edu_setting, only: [:show, :edit, :update, :destroy] # GET /edu_settings