From 81b61d6ccb2670c4066a62fe6697a56914fe5291 Mon Sep 17 00:00:00 2001 From: Aaron Newton Date: Wed, 2 Feb 2011 14:40:43 -0800 Subject: [PATCH] HUE-417. Beeswax views with big white bar at the bottom This was a change with how SplitView calculates its target size. Previously we always filled the window, but to allow SplitView to nest for multi-split layouts we had to switch to measuring the parent element of the splitview element. This introduced this sizing problem. The new requirement is that the splitview has to be the root element or, if not, the parent of the splitview needs to have a SizeTo filter to configure its height. This happens in our code often when we have a div.view in the root. The simple fix, when possible, is to also make this div the splitview element. I've adjusted this in all our current usages. --- .../src/beeswax/templates/describe_table.mako | 222 +++++++++-------- .../src/beeswax/templates/execute.mako | 2 +- .../src/beeswax/templates/explain.mako | 38 ++- .../src/beeswax/templates/watch_results.mako | 234 +++++++++--------- .../src/beeswax/templates/watch_wait.mako | 98 ++++---- apps/jobsub/src/jobsub/templates/edit.html | 83 +++---- apps/jobsub/src/jobsub/templates/list.html | 100 ++++---- ext/thirdparty/js/widgets.hash | 2 +- 8 files changed, 385 insertions(+), 394 deletions(-) diff --git a/apps/beeswax/src/beeswax/templates/describe_table.mako b/apps/beeswax/src/beeswax/templates/describe_table.mako index 807ac379c78..7b36716e3df 100644 --- a/apps/beeswax/src/beeswax/templates/describe_table.mako +++ b/apps/beeswax/src/beeswax/templates/describe_table.mako @@ -16,122 +16,124 @@ <%namespace name="wrappers" file="header_footer.mako" /> <%namespace name="comps" file="beeswax_components.mako" /> ${wrappers.head("Beeswax Table Metadata: " + table.tableName, section='tables')} -
- <%def name="column_table(cols)"> -
- - +<%def name="column_table(cols)"> +
+
+ + + + + + + + + % for column in cols: - - - + + + - - - % for column in cols: - - - - - - % endfor - -
NameTypeComment
NameTypeComment${ column.name }${ column.type }${ column.comment or "" }
${ column.name }${ column.type }${ column.comment or "" }
-
- + % endfor + + +
+ -
-
-

${table.tableName}

-
-
- % if table.parameters.get("comment", False): -
Description
-
${ table.parameters.get("comment") }
- % endif -
Actions
-
-
    -
  • Import Data -
    -
    -
    -
    - Note that loading data will move data from its location into the table's storage location. -
    - ## Any existing data will be erased! -
    Overwrite existing data ?
    - ##Path (on HDFS) of files to load. - ${comps.field(load_form["path"], title_klass='bw-pathLabel', attrs=dict( - klass='bw-loadPath', - data_filters="OverText", - alt='/user/data'))} -
    - Choose File - -
    - - % for pf in load_form.partition_columns: - ${comps.field(load_form[pf], render_default=True)} - % endfor - ## This table is partitioned. Therefore, - ## you must specify what partition - ## this data corresponds to. -
    -
    -
    -
  • -
  • Browse Data
  • -
  • Drop Table
  • -
  • View File Location
  • -
-
-
-
+
+
+

${table.tableName}

+
+
+ % if table.parameters.get("comment", False): +
Description
+
${ table.parameters.get("comment") }
+ % endif +
Actions
+
+
    +
  • Import Data +
    +
    +
    +
    + Note that loading data will move data from its location into the table's storage location. +
    + ## Any existing data will be erased! +
    Overwrite existing data ?
    + ##Path (on HDFS) of files to load. + ${comps.field(load_form["path"], title_klass='bw-pathLabel', attrs=dict( + klass='bw-loadPath', + data_filters="OverText", + alt='/user/data'))} +
    + Choose File + +
    + + % for pf in load_form.partition_columns: + ${comps.field(load_form[pf], render_default=True)} + % endfor + ## This table is partitioned. Therefore, + ## you must specify what partition + ## this data corresponds to. +
    +
    +
    +
  • +
  • Browse Data
  • +
  • Drop Table
  • +
  • View File Location
  • +
+
+
-
-
-
    - % if top_rows is not None: -
  • Sample
  • - % endif -
  • Columns
  • - % if len(table.partitionKeys) > 0: -
  • Partition Columns
  • - % endif -
-
    - % if top_rows is not None: -
  • - - + +
    +
    +
      + % if top_rows is not None: +
    • Sample
    • + % endif +
    • Columns
    • + % if len(table.partitionKeys) > 0: +
    • Partition Columns
    • + % endif +
    +
      + % if top_rows is not None: +
    • +
    + + + % for col in table.sd.cols: + + % endfor + + + + % for i, row in enumerate(top_rows): - % for col in table.sd.cols: - + % for item in row: + % endfor - - - % for i, row in enumerate(top_rows): - - % for item in row: - - % endfor - - % endfor - -
    ${col.name}
    ${col.name}${ item }
    ${ item }
    -
  • - % endif -
  • ${column_table(table.sd.cols)}
  • - % if len(table.partitionKeys) > 0: -
  • - ${column_table(table.partitionKeys)} - Show Partitions -
  • - % endif -
-
+ % endfor + + + + % endif +
  • ${column_table(table.sd.cols)}
  • + % if len(table.partitionKeys) > 0: +
  • + ${column_table(table.partitionKeys)} + Show Partitions +
  • + % endif + +
    +
    +
    + ${wrappers.foot()} diff --git a/apps/beeswax/src/beeswax/templates/execute.mako b/apps/beeswax/src/beeswax/templates/execute.mako index 6e45f68e315..85125dc6b20 100644 --- a/apps/beeswax/src/beeswax/templates/execute.mako +++ b/apps/beeswax/src/beeswax/templates/execute.mako @@ -92,7 +92,7 @@ ${wrappers.head('Hive Query', section='query')} % endif
    -
    +
    <% if form.settings.forms or form.file_resources.forms or form.functions.forms: diff --git a/apps/beeswax/src/beeswax/templates/explain.mako b/apps/beeswax/src/beeswax/templates/explain.mako index a2eea3032de..4ae57280067 100644 --- a/apps/beeswax/src/beeswax/templates/explain.mako +++ b/apps/beeswax/src/beeswax/templates/explain.mako @@ -17,27 +17,25 @@ <%namespace name="wrappers" file="header_footer.mako" /> <%namespace name="util" file="util.mako" /> ${wrappers.head('Query Explanation', section='saved queries')} -
    -
    -
    - ${util.render_query_context(query_context)} -
    -
    -
    -
      -
    • Explanation
    • -
    • Query
    • -
    +
    +
    + ${util.render_query_context(query_context)} +
    +
    +
    +
      +
    • Explanation
    • +
    • Query
    • +
    -
      -
    • -
      ${explanation}
      -
    • -
    • -
      ${query}
      -
    • -
    -
    +
      +
    • +
      ${explanation}
      +
    • +
    • +
      ${query}
      +
    • +
    diff --git a/apps/beeswax/src/beeswax/templates/watch_results.mako b/apps/beeswax/src/beeswax/templates/watch_results.mako index 3b573f795f8..a58f44ca18f 100644 --- a/apps/beeswax/src/beeswax/templates/watch_results.mako +++ b/apps/beeswax/src/beeswax/templates/watch_results.mako @@ -18,132 +18,130 @@ <%namespace name="comps" file="beeswax_components.mako" /> ${wrappers.head("Beeswax: Query Results", section='query')} -
    -
    -
    - ${util.render_query_context(query_context)} -
    - % if download_urls: - ## Download results -
    Actions
    -
    -
      -
    • Download as CSV -
    • Download as XLS -
    • Save - -
    • -
    -
    - % endif - <% - n_jobs = hadoop_jobs and len(hadoop_jobs) or 0 - mr_jobs = (n_jobs == 1) and "MR Job" or "MR Jobs" - %> -
    ${mr_jobs}
    +
    +
    + ${util.render_query_context(query_context)} +
    + % if download_urls: + ## Download results +
    Actions
      - % if n_jobs > 0: -

      This query launched ${n_jobs} ${mr_jobs}:

      - - % else: -

      No Hadoop jobs were launched in running this query.

      - % endif +
    • Download as CSV +
    • Download as XLS +
    • Save + +
    -
    -
    -
    -
    -
      -
    • - % if error: - Error - % else: - Results - % endif -
    • -
    • Query
    • -
    • Log
    • + % endif + <% + n_jobs = hadoop_jobs and len(hadoop_jobs) or 0 + mr_jobs = (n_jobs == 1) and "MR Job" or "MR Jobs" + %> +
      ${mr_jobs}
      +
      +
        + % if n_jobs > 0: +

        This query launched ${n_jobs} ${mr_jobs}:

        + + % else: +

        No Hadoop jobs were launched in running this query.

        + % endif
      +
      +
    +
    +
    +
    +
      +
    • + % if error: + Error + % else: + Results + % endif +
    • +
    • Query
    • +
    • Log
    • +
    -
      -
    • - % if error: -
      -

      Error!

      -
      ${error_message}
      -
      - % else: -
      - % if has_more: - [next] - % endif - % if start_row != 0: - [top] - % endif -
      - % if expected_first_row != start_row: -
      Warning: Page offset may have incremented since last view.
      +
        +
      • + % if error: +
        +

        Error!

        +
        ${error_message}
        +
        + % else: +
        + % if has_more: + [next] % endif - - - - - % for col in columns: - - % endfor - - - - % for i, row in enumerate(results): - - - % for item in row: - - % endfor - - % endfor - -
        -${col}
        ${start_row + i}${ item }
        + % if start_row != 0: + [top] + % endif +
        + % if expected_first_row != start_row: +
        Warning: Page offset may have incremented since last view.
        % endif -
      • -
      • -
        ${query.query}
        -
      • -
      • -
        ${log}
        -
      • -
      -
    + + + + + % for col in columns: + + % endfor + + + + % for i, row in enumerate(results): + + + % for item in row: + + % endfor + + % endfor + +
    -${col}
    ${start_row + i}${ item }
    + % endif + +
  • +
    ${query.query}
    +
  • +
  • +
    ${log}
    +
  • +
    diff --git a/apps/beeswax/src/beeswax/templates/watch_wait.mako b/apps/beeswax/src/beeswax/templates/watch_wait.mako index 96d5b9db520..bc4912cdbc1 100644 --- a/apps/beeswax/src/beeswax/templates/watch_wait.mako +++ b/apps/beeswax/src/beeswax/templates/watch_wait.mako @@ -19,58 +19,56 @@ ${wrappers.head("Beeswax: Waiting for query...", section='query')} -
    -
    -
    - ${util.render_query_context(query_context)} -
    - % if download_urls: -
    Downloads
    -
    - -
    - % endif - <% - n_jobs = hadoop_jobs and len(hadoop_jobs) or 0 - mr_jobs = (n_jobs == 1) and "MR Job" or "MR Jobs" - %> -
    ${mr_jobs}
    -
    -
      - % if n_jobs > 0: -

      This query launched ${n_jobs} ${mr_jobs}:

      - - % else: -

      No Hadoop jobs were launched in running this query.

      - % endif -
    -
    -
    -
    -
    -
    -
      -
    • Log
    • -
    • Query
    • +
      +
      + ${util.render_query_context(query_context)} +
      + % if download_urls: +
      Downloads
      +
      + - -
        -
      • -

        Server Log

        -
        ${log}
        -
      • -
      • -
        ${query.query}
        -
      • +
      + % endif + <% + n_jobs = hadoop_jobs and len(hadoop_jobs) or 0 + mr_jobs = (n_jobs == 1) and "MR Job" or "MR Jobs" + %> +
      ${mr_jobs}
      +
      +
        + % if n_jobs > 0: +

        This query launched ${n_jobs} ${mr_jobs}:

        + + % else: +

        No Hadoop jobs were launched in running this query.

        + % endif
      -
      + + +
      +
      +
      +
        +
      • Log
      • +
      • Query
      • +
      + +
        +
      • +

        Server Log

        +
        ${log}
        +
      • +
      • +
        ${query.query}
        +
      • +
      ${wrappers.foot()} diff --git a/apps/jobsub/src/jobsub/templates/edit.html b/apps/jobsub/src/jobsub/templates/edit.html index abf9478c531..cc70ef4b270 100644 --- a/apps/jobsub/src/jobsub/templates/edit.html +++ b/apps/jobsub/src/jobsub/templates/edit.html @@ -18,58 +18,55 @@ {% endcomment %} {% block title %}Job Design Editor{% endblock %} {% block content %} -
      - -
      -
      - {% include "types.html" %} -
      -
      - -

      Job Design Editor

      +
      +
      + {% include "types.html" %} +
      +
      + +

      Job Design Editor

      - {% if message %} -
      {{message}}
      - {% endif %} + {% if message %} +
      {{message}}
      + {% endif %} -

      Job Design Editor: {{form.name}} Job

      -
      +

      Job Design Editor: {{form.name}} Job

      + -
      -

      Tip: - Job Designs allow you to rudimentarily parameterize your jobs by using variables. - At submission time, you'll be prompted to specify the values of any variables - of the form $variable_name. - -

      +
      +
      $input
      Input for your job.
      +
      $output
      Output directory (must not already exist) for your job.
      +
      + --> +
      - -
      -
      {{ metadata_form.name.html_name }}
      -
      {{ metadata_form.name|safe }}
      + +
      +
      {{ metadata_form.name.html_name }}
      +
      {{ metadata_form.name|safe }}
      -
      {{ metadata_form.description.html_name }}
      -
      {{ metadata_form.description|safe }}
      +
      {{ metadata_form.description.html_name }}
      +
      {{ metadata_form.description|safe }}
      -
      - {{ form.render_edit }} -
      - - -
      - +
      + {{ form.render_edit }} +
      + +
      -
      +
      +
      {% endblock %} diff --git a/apps/jobsub/src/jobsub/templates/list.html b/apps/jobsub/src/jobsub/templates/list.html index 9c47e1122d6..50b52021264 100644 --- a/apps/jobsub/src/jobsub/templates/list.html +++ b/apps/jobsub/src/jobsub/templates/list.html @@ -18,59 +18,57 @@ {% endcomment %} {% block title %}Job Design List{% endblock %} {% block content %} -
      +

      Job Designer: Job Designs

      -
      -
      - {% include "types.html" %} -
      -
      -
      -
      - Filter By Owner: - - - -
      -
      - - - - - - - - - - - {% for jobdesign in jobdesigns %} - - - - - - - {% endfor %} - -
      OwnerNameLast Modified
      - {{ jobdesign.owner.username }} - - {{ jobdesign.name }} - - {{ jobdesign.last_modified|timesince }} ago - - options -
      +
      + {% include "types.html" %} +
      +
      +
      +
      + Filter By Owner: + + + +
      + + + + + + + + + + + {% for jobdesign in jobdesigns %} + + + + + + + {% endfor %} + +
      OwnerNameLast Modified
      + {{ jobdesign.owner.username }} + + {{ jobdesign.name }} + + {{ jobdesign.last_modified|timesince }} ago + + options +
      {% endblock %} diff --git a/ext/thirdparty/js/widgets.hash b/ext/thirdparty/js/widgets.hash index f73476d7c0e..0031ed224fa 100644 --- a/ext/thirdparty/js/widgets.hash +++ b/ext/thirdparty/js/widgets.hash @@ -1 +1 @@ -fc7f957aeec5726c8314d4fb2ba22ade5af62b6f +48b5bd3c49a9e01b4fcc38b0d5b22342e92c747d