Skip to content

layout handling #4

@zyro23

Description

@zyro23

Task List

  • Steps to reproduce provided
  • Stacktrace (if present) provided
  • Example that reproduces the problem uploaded to Github
  • Full description of the issue provided (see below)

Steps to Reproduce

  1. set quartz.monitor.layout: main
  2. go to /quartz
  3. check result

Expected Behaviour

the layout should default to main (at least according to the readme). it does not (needed setting the layout to main explicitly).

loading the list view, the javascript (i.e. jquery) pulled in via applications' main layout should load before the quartz-monitor javascript kicks in.

Actual Behaviour

the response for the list view looks somewhat like this:

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>Quartz Jobs</title>
    <script type="text/javascript" src="/assets/schwartz-monitor-main.js?compile=false" ></script>
    <script type="text/javascript" src="/assets/schwartz-monitor.js?compile=false" ></script>
    <link rel="stylesheet" href="/assets/schwartz-monitor-main.css?compile=false" />
    <link rel="stylesheet" href="/assets/schwartz-monitor.css?compile=false" />
    <script type="text/javascript" src="/assets/jquery.countdown.js?compile=false" ></script>
    <script type="text/javascript" src="/assets/jquery.color.js?compile=false" ></script>
    <link rel="stylesheet" href="/assets/jquery.countdown.css?compile=false" />
    <script type="text/javascript" src="/assets/jquery.clock.js?compile=false" ></script>
    <link rel="stylesheet" href="/assets/jquery.clock.css?compile=false" />
</head>
<body>

<!DOCTYPE html>
<html>
    <head>
        <%-- application head (no quartz monitor related assets) here --%>
    </head>
    <body>
        <%-- application body with quartz list table here --%>
    </body>
</html>

</body>
</html>

that is not just invalid markup, it also loads the quartz-monitor javascripts before the applications' , so jQuery is not defined and application asset loading breaks too (e.g. main navbar not working properly).

i can only guess that this here is too late (should maybe moved to to the top of the head)? https://github.com/robertoschwald/grails-schwartz-monitor/blob/2.0.2/plugin/grails-app/views/quartz/list.gsp#L20

Environment Information

  • Operating System: win x64
  • GORM Version: 6.1.11
  • Grails Version (if using Grails): 3.3.9
  • JDK Version: oracle 8u131

Example Application

  • needed? can reference one..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions