From 972ad7551868f0f31522b51156407b55b3e90bdf Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Thu, 30 May 2019 09:58:21 +0800 Subject: [PATCH 1/4] =?UTF-8?q?vnc=E6=B7=BB=E5=8A=A0containers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/myshixuns_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index add6511c..1029c37d 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -357,7 +357,8 @@ class MyshixunsController < ApplicationController host = Redmine::Configuration['tomcat_php'] begin uri = "#{shixun_tomcat}/bridge/vnc/getvnc" - params = {tpiID:@myshixun.id} + shixun = myshixun.shixun + params = {tpiID: @myshixun.id, :containers => "#{Base64.urlsafe_encode64(container_limit(shixun.mirror_repositories))}"} res = uri_exec uri, params if res && res['code'].to_i != 0 raise("实训云平台繁忙(繁忙等级:99)") From 0ddf6a7efda6b9edf40abc7e0f118cfa3e466ee6 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Thu, 30 May 2019 10:01:53 +0800 Subject: [PATCH 2/4] =?UTF-8?q?vnc=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/myshixuns_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 1029c37d..e9f412ab 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -4,7 +4,7 @@ class MyshixunsController < ApplicationController skip_before_filter :verify_authenticity_token, :only => [:training_task_status, :close_webssh, :code_runinng_message, :vnc] before_filter :require_login, :except => [:training_task_status, :close_webssh, :code_runinng_message, :vnc] before_filter :check_authentication, :except => [:training_task_status, :close_webssh, :mul_test_home, :mul_test_user, - :mul_test_myshixun, :mul_test_shixun, :mul_test_start, :code_runinng_message] + :mul_test_myshixun, :mul_test_shixun, :mul_test_start, :code_runinng_message, :vnc] before_filter :find_myshixun, :only => [:show, :myshixun_reset, :open_webssh, :sync_reset_time, :destroy, :search_file_list, :vnc] DCODES = %W(2 3 4 5 6 7 8 9 a b c f e f g h i j k l m n o p q r s t u v w x y z) From 03843caf39c84e4c54befcfc5a242b1d9df0f14d Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Thu, 30 May 2019 10:17:55 +0800 Subject: [PATCH 3/4] 500 --- app/controllers/myshixuns_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index e9f412ab..802bb8b9 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -357,7 +357,7 @@ class MyshixunsController < ApplicationController host = Redmine::Configuration['tomcat_php'] begin uri = "#{shixun_tomcat}/bridge/vnc/getvnc" - shixun = myshixun.shixun + shixun = @myshixun.shixun params = {tpiID: @myshixun.id, :containers => "#{Base64.urlsafe_encode64(container_limit(shixun.mirror_repositories))}"} res = uri_exec uri, params if res && res['code'].to_i != 0 From 89acf0b0cd991ace8fb8598a6c7ccce6746d5c1e Mon Sep 17 00:00:00 2001 From: p31729568 Date: Thu, 30 May 2019 10:51:39 +0800 Subject: [PATCH 4/4] modify school manager statistic text --- .../schools/_contrast_search_form.html.erb | 11 ++++------- .../managements/schools/_data_contrast_list.html.erb | 4 ++-- .../managements/schools/_data_grow_list.html.erb | 4 ++-- config/locales/school_daily_reports/zh.yml | 2 +- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/app/views/managements/schools/_contrast_search_form.html.erb b/app/views/managements/schools/_contrast_search_form.html.erb index 4d24a810..9597a9c7 100644 --- a/app/views/managements/schools/_contrast_search_form.html.erb +++ b/app/views/managements/schools/_contrast_search_form.html.erb @@ -26,13 +26,10 @@
<%= hidden_field_tag :data_type, params[:data_type] || 'grow' %> - <% if params[:data_type] == 'contrast' %> - 时间对比 - 新增数据 - <% else %> - 时间对比 - 新增数据 - <% end %> + 时段对比 + 数据变化
<%= text_field_tag :keyword, params[:keyword], placeholder: '请输入单位名称或者ID关键字进行搜索', diff --git a/app/views/managements/schools/_data_contrast_list.html.erb b/app/views/managements/schools/_data_contrast_list.html.erb index d77d4b70..83f7a11b 100644 --- a/app/views/managements/schools/_data_contrast_list.html.erb +++ b/app/views/managements/schools/_data_contrast_list.html.erb @@ -21,8 +21,8 @@ 序号 ID 单位名称 - 时段一
<%= "(#{params[:begin_date]}至#{params[:end_date]})" %> - 时段二
<%= "(#{params[:other_begin_date]}至#{params[:other_end_date]})" %> + 时段一
<%= "(#{params[:begin_date]} 05:00至#{params[:end_date]} 05:00)" %> + 时段二
<%= "(#{params[:other_begin_date]} 05:00至#{params[:other_end_date]} 05:00)" %> <%= sort_tag('变化情况', name: 'percentage', path: school_data_contrast_managements_path) %>
( 新 增 数 | 新增百分比) diff --git a/app/views/managements/schools/_data_grow_list.html.erb b/app/views/managements/schools/_data_grow_list.html.erb index 27a1ccf3..8f502979 100644 --- a/app/views/managements/schools/_data_grow_list.html.erb +++ b/app/views/managements/schools/_data_grow_list.html.erb @@ -9,7 +9,7 @@ 新增教师<%= @grow_summary.teacher_increase_count || 0 %>人, 新增学生<%= @grow_summary.student_increase_count || 0 %>人, 新增课堂<%= @grow_summary.course_increase_count || 0 %>个, - 新增实训<%= @grow_summary.shixun_increase_count || 0 %>个, + 新增实训作业<%= @grow_summary.shixun_increase_count || 0 %>个, 活跃用户<%= @grow_summary.active_user_count || 0 %>个 @@ -22,7 +22,7 @@ - + diff --git a/config/locales/school_daily_reports/zh.yml b/config/locales/school_daily_reports/zh.yml index 57caf343..2db8a429 100644 --- a/config/locales/school_daily_reports/zh.yml +++ b/config/locales/school_daily_reports/zh.yml @@ -3,5 +3,5 @@ zh: teacher_increase_count: 新增教师 student_increase_count: 新增学生 course_increase_count: 新增课堂 - shixun_increase_count: 新增实训 + shixun_increase_count: 新增实训作业 active_user_count: 活跃用户 \ No newline at end of file
<%= sort_tag('新增教师', name: 'teacher_increase_count', path: school_data_grow_managements_path) %> <%= sort_tag('新增学生', name: 'student_increase_count', path: school_data_grow_managements_path) %> <%= sort_tag('新增课堂', name: 'course_increase_count', path: school_data_grow_managements_path) %><%= sort_tag('新增实训', name: 'shixun_increase_count', path: school_data_grow_managements_path) %><%= sort_tag('新增实训作业', name: 'shixun_increase_count', path: school_data_grow_managements_path) %> <%= sort_tag('活跃用户', name: 'active_user_count', path: school_data_grow_managements_path) %>