|
|
@ -405,11 +405,7 @@ class ShixunsController < ApplicationController
|
|
|
|
# 超级管理员和运营人员才能保存 中间层服务器pod信息的配置
|
|
|
|
# 超级管理员和运营人员才能保存 中间层服务器pod信息的配置
|
|
|
|
if current_user.admin? || current_user.business?
|
|
|
|
if current_user.admin? || current_user.business?
|
|
|
|
@shixun.shixun_service_configs.destroy_all
|
|
|
|
@shixun.shixun_service_configs.destroy_all
|
|
|
|
ActionController::Parameters.permit_all_parameters = true
|
|
|
|
@shixun.shixun_service_configs.create!(service_config_params[:shixun_service_configs])
|
|
|
|
logger.info("##--;;;;---#{params[:shixun_service_configs]}")
|
|
|
|
|
|
|
|
params[:shixun_service_configs].each do |config|
|
|
|
|
|
|
|
|
@shixun.shixun_service_configs.create!(config)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
rescue Exception => e
|
|
|
|
rescue Exception => e
|
|
|
|
uid_logger_error(e.message)
|
|
|
|
uid_logger_error(e.message)
|
|
|
@ -745,6 +741,11 @@ private
|
|
|
|
params.require(:shixun_info).permit(:description, :evaluate_script)
|
|
|
|
params.require(:shixun_info).permit(:description, :evaluate_script)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def service_config_params
|
|
|
|
|
|
|
|
params.permit(shixun_service_configs: [:cpu_limit, :lower_cpu_limit, :memory_limit, :request_limit, :mirror_repository_id])
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def find_shixun
|
|
|
|
def find_shixun
|
|
|
|
@shixun = Shixun.find_by_identifier(params[:identifier])
|
|
|
|
@shixun = Shixun.find_by_identifier(params[:identifier])
|
|
|
|
if @shixun.blank?
|
|
|
|
if @shixun.blank?
|
|
|
|