From 6197699b7cf89258429e6a2bfb1171aa0bc5340b Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 27 Apr 2017 14:18:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=B0=E7=89=88ajax?= =?UTF-8?q?=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/css/bigdata-common.css | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/public/stylesheets/css/bigdata-common.css b/public/stylesheets/css/bigdata-common.css index 932e5de0d..4647f5aff 100644 --- a/public/stylesheets/css/bigdata-common.css +++ b/public/stylesheets/css/bigdata-common.css @@ -129,4 +129,27 @@ a:hover.task-btn-ver{background:#5f7cab;} .break_word_firefox{white-space: pre-wrap !important;word-break: break-all;} .pr {position:relative;} +/***** Ajax indicator ******/ +#ajax-indicator { + position: absolute; /* fixed not supported by IE */ + background-color:#eee; + border: 1px solid #bbb; + top:35%; + left:40%; + width:20%; + font-weight:bold; + text-align:center; + padding:0.6em; + z-index:100; + opacity: 0.5; +} +html>body #ajax-indicator { position: fixed; } + +#ajax-indicator span { + background-position: 0% 40%; + background-repeat: no-repeat; + background-image: url(/images/loading.gif); + padding-left: 26px; + vertical-align: bottom; +} From 01a6f9f894a781dc86889a5e92be8e91766be10a Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 27 Apr 2017 14:33:09 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8F=91=E5=B8=83=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=8F=AF=E8=BF=90=E8=A1=8C=E6=96=87=E4=BB=B6=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/challenges_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb index 92f9d61cf..962508f26 100644 --- a/app/controllers/challenges_controller.rb +++ b/app/controllers/challenges_controller.rb @@ -42,7 +42,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