def get_all_hosts(request, name, stage): envs = environs_helper.get_all_env_stages(request, name) stages, env = common.get_all_stages(envs, stage) progress = deploys_helper.update_progress(request, name, stage) agents_wrapper = agent_report.gen_agent_by_deploy(progress, env['deployId'], TOTAL_HOST_REPORT) title = "All hosts" return render(request, 'environs/env_hosts.html', { "env": env, "stages": stages, "agents_wrapper": agents_wrapper, "title": title, })
def get_unknown_hosts(request, name, stage): envs = environs_helper.get_all_env_stages(request, name) stages, env = common.get_all_stages(envs, stage) progress = deploys_helper.update_progress(request, name, stage) agents_wrapper = agent_report.gen_agent_by_deploy(progress, env['deployId'], UNKNOWN_HOST_REPORT) title = "Unknow hosts" return render( request, 'environs/env_hosts.html', { "env": env, "stages": stages, "agents_wrapper": agents_wrapper, "title": title, })
def get_failed_hosts(request, name, stage): envs = environs_helper.get_all_env_stages(request, name) stages, env = common.get_all_stages(envs, stage) progress = deploys_helper.update_progress(request, name, stage) agents_wrapper = agent_report.gen_agent_by_deploy(progress, env['deployId'], FAILED_HOST_REPORT) title = "Failed Hosts" return render( request, 'environs/env_hosts.html', { "env": env, "stages": stages, "agents_wrapper": agents_wrapper, "title": title, "is_retryable": True })
def get_failed_hosts(request, name, stage): envs = environs_helper.get_all_env_stages(request, name) stages, env = common.get_all_stages(envs, stage) progress = deploys_helper.update_progress(request, name, stage) agents_wrapper = agent_report.gen_agent_by_deploy(progress, env['deployId'], FAILED_HOST_REPORT) failed_hosts = [agent['hostId'] for agent in agents_wrapper[env['deployId']]] host_ids = ",".join(failed_hosts) title = "Failed Hosts" return render(request, 'environs/env_hosts.html', { "env": env, "stages": stages, "agents_wrapper": agents_wrapper, "title": title, "is_retryable": True, "host_ids": host_ids, "pinterest": IS_PINTEREST, })
def get_hosts_by_deploy(request, name, stage, deploy_id): hostStageString = request.GET.get('hostStage') if hostStageString is None: hostStage = TOTAL_ALIVE_HOST_REPORT else: hostStage = hostStageString envs = environs_helper.get_all_env_stages(request, name) stages, env = common.get_all_stages(envs, stage) progress = deploys_helper.update_progress(request, name, stage) agents_wrapper = agent_report.gen_agent_by_deploy(progress, deploy_id, ALIVE_STAGE_HOST_REPORT, hostStage) title = "All hosts with deploy " + deploy_id return render(request, 'environs/env_hosts.html', { "env": env, "stages": stages, "agents_wrapper": agents_wrapper, "title": title, })
def get_hosts_by_deploy(request, name, stage, deploy_id): hostStageString = request.GET.get('hostStage') if hostStageString is None: hostStage = TOTAL_ALIVE_HOST_REPORT else: hostStage = hostStageString envs = environs_helper.get_all_env_stages(request, name) stages, env = common.get_all_stages(envs, stage) progress = deploys_helper.update_progress(request, name, stage) agents_wrapper = agent_report.gen_agent_by_deploy(progress, deploy_id, ALIVE_STAGE_HOST_REPORT, hostStage) title = "All hosts with deploy " + deploy_id return render( request, 'environs/env_hosts.html', { "env": env, "stages": stages, "agents_wrapper": agents_wrapper, "title": title, })
def get_failed_hosts(request, name, stage): envs = environs_helper.get_all_env_stages(request, name) stages, env = common.get_all_stages(envs, stage) progress = deploys_helper.update_progress(request, name, stage) agents_wrapper = agent_report.gen_agent_by_deploy(progress, env['deployId'], FAILED_HOST_REPORT) failed_hosts = [ agent['hostId'] for agent in agents_wrapper[env['deployId']] ] host_ids = ",".join(failed_hosts) title = "Failed Hosts" return render( request, 'environs/env_hosts.html', { "env": env, "stages": stages, "agents_wrapper": agents_wrapper, "title": title, "is_retryable": True, "host_ids": host_ids, "pinterest": IS_PINTEREST, })