Skip to content

Commit

Permalink
updates to error logic and message
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodshell Fleurinord committed Aug 22, 2023
1 parent e7b25b0 commit 576e750
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1028,11 +1028,10 @@ <h4 class="panel-title pull-left">Capacity</h4>
});

var selectedHostTypeObject = info.hostTypes.find(hostType => hostType.id === capacitySetting.selectedHostTypeValue);
console.log(selectedHostTypeObject)
var hostTypeRoadmapLink = "{{ host_type_roadmap_link }}"

if (selectedHostTypeObject.blessed_status === "DECOMMISSONING") {
globalNotificationBanner.error = "This cluster is currently using a decomissioning Instance Type. Please refer to " + hostTypeRoadmapLink + " for the recommended Instance Type.";
if (selectedHostTypeObject.blessed_status === "DECOMMISSONING" || selectedHostTypeObject.retired === true) {
globalNotificationBanner.error = "This cluster is currently using an unblessed Instance Type. Please refer to " + hostTypeRoadmapLink + " for the recommended Instance Type.";
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion deploy-board/deploy_board/webapp/env_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def get(self, request, name, stage=None):
host_type = hosttypes_helper.get_by_id(request, basic_cluster_info['hostType'])
host_type_blessed_status = host_type['blessed_status']
if host_type_blessed_status == "DECOMMISSONING":
messages.add_message(request, messages.ERROR, "This environment is currently using a cluster with a decomissioning Instance Type. Please refer to " + HOST_TYPE_ROADMAP_LINK + " for the recommended Instance Type")
messages.add_message(request, messages.ERROR, "This environment is currently using a cluster with an unblessed Instance Type. Please refer to " + HOST_TYPE_ROADMAP_LINK + " for the recommended Instance Type")

if not env['deployId']:
capacity_hosts = deploys_helper.get_missing_hosts(request, name, stage)
Expand Down

0 comments on commit 576e750

Please sign in to comment.