Closed mukulashokjoshi closed 7 years ago
Hi @mukulashokjoshi it seems like you're using the latest Kitto but have generated a dashboard using an older installer.
See: https://github.com/kittoframework/kitto/wiki/Upgrading-Guide#layout about this issue.
What you have to do:
In /dashboards/layout.html.eex
(which is the default layout) change <%= template %>
to <%= @template %>
.
Let me know if this did the trick.
@Zorbash thanks very much
Your suggestion worked and the template has been ingested successfully!
And yes was looking at the installer code and it showed an @ against the template, but i thought it must be getting replaced when generating the kitto app.
Will now start customising kitto!
Environment
Built with: Elixir 1.3.4 and OTP 18.3.4.4
node: v6.9.2 npm: 3.10.9
ubuntu 16.10 Yakkety Yak
[info] Starting assets watcher at: 127.0.0.1:8080 [info] Starting Kitto server, listening on ....:4003
[info] GET / [info] Sent 301 in 6ms [info] GET /dashboards/sample [error] Ranch listener Kitto.Router.HTTP had connection process started with :cowboy_protocol:start_link/4 at #PID<0.297.0> exit with reason: {{%CompileError{description : "undefined function template/0", file: "../dashboards/layout.html.eex", line: 16}, [{Kernel, :<>, 2, [file: 'expanding macro']}, {:elixir_compiler_0, :FILE, 1, [file: 'dashboards/layout.html.eex', line: 1]}, {Kernel, : <>, 2, [file: 'expanding macro']}, {:elixir_compiler_0, :FILE, 1, [file: 'dashboards/layout.html.eex', line: 1]}]}, {Kitto.Router, :call, [%Plug.Conn{adapter: {Plug.Adapters.Cowboy.Conn, :...}, assigns: %{}, before_send: [], body_params: %Plug.Conn.Unfetched{aspect: :body_params}, cookies: %Plug.Conn.Unfetched{aspect: :cookies}, halted: false, host: "...", method: "GET", owner: #PID<0.297.0>, params: %Plug.Conn.Unfetched{aspect: :params}, path_info: ["dashboards", "sample"], path_params: %{}, peer: {{, , , }, 58932}, port: 4003, private: %{}, query_params: %Plug.Conn.Unfetched{aspect: :query_params}, query_string: "", remote_ip: {, , , }, req_cookies: %Plug.Conn.Unfetched{aspect: :cookies}, req_headers: [{"host", "...:4003"}, {"connection", "keep-alive"}, {"upgrade-insecure-requests", "1"}, {"user- agent", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36"}, {"accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8"}, {"accept-encoding", "gzip, deflate, sdch"}, {"accept-language", "en-US,en;q=0.8"}, {"cookie", "_ga=GA1.1.216201135.1482994200"}], request_path: "/dashboards/sample", resp_body: nil, resp_cookies: %{}, resp_headers: [{"cache-control", "max-age=0, private, must-revalidate"}], scheme: :http, script_name: [], secret_key_base: nil, state: :unset, status: nil}, []]}}