dev_shixuns
caishi 6 years ago
commit 8aaebf3f69

@ -1,7 +1,7 @@
# encoding: utf-8 # encoding: utf-8
class ChallengesController < ApplicationController class ChallengesController < ApplicationController
layout "base_shixun" layout "base_shixun"
before_filter :check_authentication before_filter :check_authentication, :except => [:index]
before_filter :find_shixun, :only => [:index, :new, :create, :destroy, :challenge_build, :update_evaluation, :add_choose_question, :new_choose_question, before_filter :find_shixun, :only => [:index, :new, :create, :destroy, :challenge_build, :update_evaluation, :add_choose_question, :new_choose_question,
:choose_type_show, :edit_choose_question, :update_choose_question, :destroy_challenge_choose] :choose_type_show, :edit_choose_question, :update_choose_question, :destroy_challenge_choose]
before_filter :find_challenge, :only => [:show, :edit, :update, :challenge_build, :index_up, :index_down, :destroy, :update_evaluation, :add_choose_question, before_filter :find_challenge, :only => [:show, :edit, :update, :challenge_build, :index_up, :index_down, :destroy, :update_evaluation, :add_choose_question,

@ -240,7 +240,7 @@ module ApplicationHelper
container = [] container = []
mirror_repositories.each do |mr| mirror_repositories.each do |mr|
if mr.name.present? if mr.name.present?
container << {:image => mr.name, :cpuLimit => mr.cpu_limit, :memoryLimit => "#{mr.memory_limit}M"} container << {:image => mr.name, :cpuLimit => mr.cpu_limit, :memoryLimit => "#{mr.memory_limit}M", :type => mr.try(:main_type) == "1" ? "main" : "sub"}
end end
end end
return container.to_json return container.to_json

Loading…
Cancel
Save