diff --git a/assets/javascripts/job_templates.js b/assets/javascripts/job_templates.js index 362a2f2b502..c611cd4902e 100644 --- a/assets/javascripts/job_templates.js +++ b/assets/javascripts/job_templates.js @@ -3,12 +3,6 @@ var job_group_id; var user_is_admin; var editor; -function setupJobTemplates(url, id) { - job_templates_url = url; - job_group_id = id; - $.ajax(url + '?group_id=' + id).done(loadJobTemplates); -} - function loadJobTemplates(data) { var mediagroups = {}; var groups = []; diff --git a/lib/OpenQA/WebAPI/Controller/Admin/JobTemplate.pm b/lib/OpenQA/WebAPI/Controller/Admin/JobTemplate.pm index 3e2ccdf6d86..242e73f3177 100644 --- a/lib/OpenQA/WebAPI/Controller/Admin/JobTemplate.pm +++ b/lib/OpenQA/WebAPI/Controller/Admin/JobTemplate.pm @@ -12,12 +12,9 @@ sub index { return $self->reply->not_found unless $group; my $yaml = $group->template; - my $force_yaml_editor - = defined $yaml || $schema->resultset('JobTemplates')->search({group_id => $group->id}, {rows => 1})->count == 0; $self->stash( group => $group, yaml_template => $yaml, - force_yaml_editor => $force_yaml_editor, ); my @machines = $schema->resultset('Machines')->search(undef, {order_by => 'name'}); diff --git a/templates/webapi/admin/job_template/index.html.ep b/templates/webapi/admin/job_template/index.html.ep index 9280263e119..f69d6615e61 100644 --- a/templates/webapi/admin/job_template/index.html.ep +++ b/templates/webapi/admin/job_template/index.html.ep @@ -6,41 +6,15 @@ % title 'Job templates for ' . $group->name; -% unless ($force_yaml_editor) { -