Project

General

Profile

Actions

Bug #10153

closed

Missing JS File during host group edit

Added by Holger Neubauer about 9 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
Difficulty:
easy
Triaged:
Fixed in Releases:
Found in Releases:

Description

JS file not loaded

Error during opening the Activation Keys Tab
Error Message:

Uncaught ReferenceError: update_interface_table is not defined

Workaround to get it working:

Edit the base layout and add the line to load the javascript file which is missing:

vim app/views/layouts/base.html.erb

<%= javascript_include_tag 'host_edit_interfaces', "data-turbolinks-track" => true %>

Example:

<!DOCTYPE html>
<!--[if lt IE 7]>      <html lang="<%= I18n.locale %>" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html lang="<%= I18n.locale %>" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html lang="<%= I18n.locale %>" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="<%= I18n.locale %>" class="no-js"> <!--<![endif]-->
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title><%= h(yield(:title) || "Foreman") %></title>
    <meta name="description" content="">
    <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"/>

    <%= favicon_link_tag "favicon.ico"%>

    <%= stylesheet_link_tag 'application', "data-turbolinks-track" => true %>
    <%= yield(:stylesheets) %>

    <%= csrf_meta_tags %>
    <%= javascript_include_tag 'application', "data-turbolinks-track" => true %>
    <%= javascript_include_tag 'host_edit_interfaces', "data-turbolinks-track" => true %>
    <%= yield(:javascripts) %>

Better solution would be to have an application.css file which includes the missing host_edit_interfaces.js from the katello-installer.
Seems the rake assets:precompile doesn't include this file.

Tested on: Version 1.8.0-RC3


Files

view_activation_key.png View view_activation_key.png 209 KB Holger Neubauer, 04/16/2015 02:23 AM

Related issues 2 (0 open2 closed)

Related to Foreman - Bug #14071: Missing host_edit_interfaces.js in taxonomy edit pageClosedOndřej Pražák03/07/2016Actions
Has duplicate Katello - Bug #10184: Katello 2.2 Activation Keys won't save in host groupsDuplicate04/17/2015Actions
Actions #1

Updated by Justin Sherrill about 9 years ago

  • Project changed from Katello to Foreman
  • Subject changed from Missing JS File during openning the activation keys tab to Missing JS File during host group edit
  • Category deleted (Installer)
  • translation missing: en.field_release changed from 23 to 28

This is actually a foreman issue and occurs regardless of the presences of katello or not.

update_interface_table() in the host_edit.js is being called when loading the new hostgroup form, yet is defined in host_edit_interfaces.js which is not loaded

Actions #2

Updated by The Foreman Bot about 9 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2310 added
  • Pull request deleted ()
Actions #3

Updated by Eric Helms almost 9 years ago

  • Has duplicate Bug #10184: Katello 2.2 Activation Keys won't save in host groups added
Actions #4

Updated by Eric Helms almost 9 years ago

Turns out this was also the cause of some deface breakages where we are adding a tab and some javascript to the hostgroup form (http://projects.theforeman.org/issues/10184)

Actions #5

Updated by Anonymous almost 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #6

Updated by Dominic Cleal almost 9 years ago

  • Category set to Web Interface
  • Assignee set to Anonymous
Actions #7

Updated by Ondřej Pražák about 8 years ago

  • Related to Bug #14071: Missing host_edit_interfaces.js in taxonomy edit page added
Actions

Also available in: Atom PDF