|
|
@ -474,11 +474,10 @@ class ShixunsController < ApplicationController
|
|
|
|
ShixunSchool.create!(arr)
|
|
|
|
ShixunSchool.create!(arr)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
# 超级管理员和运营人员才能保存 中间层服务器pod信息的配置
|
|
|
|
# 超级管理员和运营人员才能保存 中间层服务器pod信息的配置
|
|
|
|
#
|
|
|
|
# 如果镜像改动了,则也需要更改
|
|
|
|
logger.info("-------#shixun_service_configs:##{@shixun.shixun_service_configs.map(&:mirror_repository_id).sort}}")
|
|
|
|
mirror = @shixun.shixun_service_configs.map(&:mirror_repository_id).sort
|
|
|
|
logger.info("-------###{params[:shixun_service_configs].map{|c| c[:mirror_repository_id]}.sort}")
|
|
|
|
new_mirror = params[:shixun_service_configs].map{|c| c[:mirror_repository_id]}.sort
|
|
|
|
|
|
|
|
if current_user.admin? || current_user.business? || (mirror != new_mirror)
|
|
|
|
if current_user.admin? || current_user.business?
|
|
|
|
|
|
|
|
@shixun.shixun_service_configs.destroy_all
|
|
|
|
@shixun.shixun_service_configs.destroy_all
|
|
|
|
service_config_params[:shixun_service_configs].each do |config|
|
|
|
|
service_config_params[:shixun_service_configs].each do |config|
|
|
|
|
name = MirrorRepository.find_by_id(config[:mirror_repository_id])&.name
|
|
|
|
name = MirrorRepository.find_by_id(config[:mirror_repository_id])&.name
|
|
|
|