From 61b46f4aadf725cccf2178e45bcbae6e44f5cb2c Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 27 Apr 2017 16:24:29 +0800 Subject: [PATCH] =?UTF-8?q?codeMirror=E9=AB=98=E5=BA=A6=EF=BC=8C=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=AE=9E=E8=AE=ADjson=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/challenges_controller.rb | 2 +- app/views/games/_file_edit_form.html.erb | 4 ++-- app/views/games/_game_show.html.erb | 5 +++-- app/views/games/show.html.erb | 4 ++-- app/views/shixuns/_monitor_tip.html.erb | 2 +- public/stylesheets/css/taskstyle.css | 1 + 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb index 962508f26..0036f4838 100644 --- a/app/controllers/challenges_controller.rb +++ b/app/controllers/challenges_controller.rb @@ -116,7 +116,7 @@ class ChallengesController < ApplicationController end # 向jenkins端发送请求,构建pipeline片段,实时返回结果 jenkins_shixuns = Redmine::Configuration['jenkins_shixuns'] - params = {:challengeStage => "#{@challenge.position}", :challengeType => "#{@challenge.evaluation_way.to_i}", :challengeProgramName => "#{@challenge.path}", :trainingID => "#{@shixun.id}"} + params = {:challengeStage => "#{@challenge.position}", :challengeType => "#{@challenge.evaluation_way.to_i}", :challengeProgramName => "#{@challenge.exec_path}", :trainingID => "#{@shixun.id}"} uri = URI("#{jenkins_shixuns}/jenkins-exec/game/generatePipelineScriptForChallenge") res = uri_exec uri, {challengeInfo: params.to_json} if res['code'] == 0 diff --git a/app/views/games/_file_edit_form.html.erb b/app/views/games/_file_edit_form.html.erb index 86e257180..cbd3dab09 100644 --- a/app/views/games/_file_edit_form.html.erb +++ b/app/views/games/_file_edit_form.html.erb @@ -65,7 +65,7 @@ editor_CodeMirror.setSize("auto","auto"); editor_CodeMirror.refresh(); var h = $("#games_repository_contents").height() - $("#top_repository").height() - 10; - $(".CodeMirror-scroll").css("min-height", h); - $(".CodeMirror-scroll").css("max-height", h); + $("#file_entry_content").find(".CodeMirror-scroll").css("min-height", h); + $("#file_entry_content").find(".CodeMirror-scroll").css("max-height", h); }); \ No newline at end of file diff --git a/app/views/games/_game_show.html.erb b/app/views/games/_game_show.html.erb index 5f0f5dfe0..0eb1ec83f 100644 --- a/app/views/games/_game_show.html.erb +++ b/app/views/games/_game_show.html.erb @@ -46,7 +46,7 @@