diff --git a/openstack_dashboard/dashboards/project/data_processing/cluster_templates/templates/data_processing.cluster_templates/cluster_node_groups_template.html b/openstack_dashboard/dashboards/project/data_processing/cluster_templates/templates/data_processing.cluster_templates/cluster_node_groups_template.html
index 38039700e14..4f1bd5872e7 100644
--- a/openstack_dashboard/dashboards/project/data_processing/cluster_templates/templates/data_processing.cluster_templates/cluster_node_groups_template.html
+++ b/openstack_dashboard/dashboards/project/data_processing/cluster_templates/templates/data_processing.cluster_templates/cluster_node_groups_template.html
@@ -39,7 +39,7 @@
var ids = [];
$(".data-template-row").each(function () {
var id = parseInt($(this).attr("id_attr"));
- if (!!id) {
+ if (!isNaN(id)) {
ids.push(id);
}
});
@@ -54,7 +54,7 @@
replace(/\$template_id/g, template_id).
replace(/\$node_count/g, node_count).
replace(/\$template_name/g, template_name);
- $("#header_row").after(tmp);
+ $("#groups_table").find("tr:last").after(tmp);
if (!deletable) {
$("#delete_btn_" + id).remove();
$("#group_name_" + id).prop('readonly', true);
@@ -108,7 +108,7 @@