Skip to content

Commit

Permalink
HUE-21
Browse files Browse the repository at this point in the history
pulling HtmlTable parser sort fix
tabs! and a lint fix.
integrating behavior.js
adding overtext filter
Implementing OverText data filter everywhere.
updating widgets and more
adding art input behaviors
implementing ArtInput behavior across all apps
adding FitText filter
adding filter for art-buttons
fixing a typo in the SplitView html tests
fixing hidden state for overtext/artinput elements
adding behavior for sidebyside select
  • Loading branch information
anutron committed Jul 16, 2010
1 parent af03136 commit 6f7337b
Show file tree
Hide file tree
Showing 37 changed files with 441 additions and 1,031 deletions.
4 changes: 4 additions & 0 deletions apps/beeswax/src/beeswax/templates/beeswax_components.mako
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<%def name="field(
field,
render_default=False,
data_filters=None,
hidden=False,
notitle=False,
tag='input',
Expand Down Expand Up @@ -52,6 +53,9 @@
if not render_default:
attrs.setdefault('type', 'text')
if data_filters:
attrs.data_filters = data_filters
classes = []
if klass:
classes.append(klass)
Expand Down
9 changes: 6 additions & 3 deletions apps/beeswax/src/beeswax/templates/choose_file.mako
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ ${wrappers.head('Choose a File')}
<p>Enter the name of your new table and a file (compressed files are okay) to base this new table definition on.</p>
<dl class="clearfix">
${comps.field(file_form["name"], attrs=dict(
klass='overtext required bw-validate-name',
klass='required bw-validate-name',
data_filters="OverText",
alt='table_name',
),
help="Name of the new table. Table names must be globally unique. Table names tend to correspond as well to the directory where the data will be stored.",
Expand All @@ -42,13 +43,15 @@ ${wrappers.head('Choose a File')}
)
)}
${comps.field(file_form["comment"], attrs=dict(
klass='overtext bw-table-comment',
klass='bw-table-comment',
data_filters="OverText",
alt='Optional'
),
help="Use a table comment to describe your table. For example, you might mention the data's provenance, and any caveats users of this table should expect.")}

${comps.field(file_form["path"], attrs=dict(
klass='overtext required bw-validate-file',
klass='required bw-validate-file',
data_filters="OverText",
alt="/user/user_name/data_dir",
),
help="The HDFS path to the file that you would like to base this new table definition on. It can be compressed (gzip) or not.")}
Expand Down
20 changes: 12 additions & 8 deletions apps/beeswax/src/beeswax/templates/create_table_manually.mako
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ ${wrappers.head('Create a Table', toolbar=has_tables, section='new table')}
<p>Let's start with a name and description for where we'll store your data.</p>
<dl class="clearfix">
${comps.field(table_form["name"], attrs=dict(
klass='overtext required bw-validate-name',
klass='required bw-validate-name',
data_filters="OverText",
alt='table_name',
),
help="Name of the new table. Table names must be globally unique. Table names tend to correspond as well to the directory where the data will be stored.",
Expand All @@ -46,7 +47,8 @@ ${wrappers.head('Create a Table', toolbar=has_tables, section='new table')}
)
)}
${comps.field(table_form["comment"], attrs=dict(
klass='overtext bw-table-comment',
klass='bw-table-comment',
data_filters="OverText",
alt='Optional'
),
help="Use a table comment to describe your table. For example, you might mention the data's provenance, and any caveats users of this table should expect.")}
Expand Down Expand Up @@ -117,7 +119,8 @@ ${wrappers.head('Create a Table', toolbar=has_tables, section='new table')}
${comps.field(table_form["serde_name"],
help="Enter the Java Classname of your SerDe. <em>e.g.</em>, org.apache.hadoop.hive.contrib.serde2.RegexSerDe",
attrs=dict(
klass='overtext required',
klass='required',
data_filters="OverText",
alt='com.acme.hive.SerDe',
)
)}
Expand All @@ -128,7 +131,7 @@ ${wrappers.head('Create a Table', toolbar=has_tables, section='new table')}
${comps.field(table_form["serde_properties"],
help=help,
attrs=dict(
klass='overtext',
data_filters="OverText",
alt=r'"prop" = "value", "prop2" = "value2"'
)
)}
Expand Down Expand Up @@ -158,14 +161,14 @@ ${wrappers.head('Create a Table', toolbar=has_tables, section='new table')}
${comps.field(table_form["input_format_class"],
help="Java Class to read data",
attrs=dict(
klass='overtext',
data_filters="OverText",
alt='com.acme.data.MyInputFormat'
)
)}
${comps.field(table_form["output_format_class"],
help="Java Class used to write data",
attrs=dict(
klass='overtext',
data_filters="OverText",
alt='com.acme.data.MyOutputFormat'
)
)}
Expand All @@ -190,7 +193,8 @@ ${wrappers.head('Create a Table', toolbar=has_tables, section='new table')}
${comps.field(table_form["external_location"],
help="Enter the path (on HDFS) to your table's data location",
attrs=dict(
klass='overtext required',
klass='required',
data_filters="OverText",
alt='/user/user_name/data_dir'
)
)}<a class="ccs-choose_file ccs-art_button" data-icon-styles="{'width': 16, 'height': 16, 'top': 3, 'left': 6 }" data-chooseFor="table-external_location">Choose File</a>
Expand All @@ -208,7 +212,7 @@ ${wrappers.head('Create a Table', toolbar=has_tables, section='new table')}
<%def name="render_column(form, is_partition_form=False)">
<div class="bw-column">
<dt class="bw-column_header bw-inactive">
<input name="${form["column_name"].html_name | n}" value="${form["column_name"].data or ''}" class="overtext required bw-column_name" alt="Column Name"/>
<input name="${form["column_name"].html_name | n}" value="${form["column_name"].data or ''}" class="required bw-column_name" alt="Column Name" data-filters="OverText"/>
<p class="ccs-help_text" data-help-direction="1">
Column name must be single words that start
with a letter or a digit.
Expand Down
3 changes: 2 additions & 1 deletion apps/beeswax/src/beeswax/templates/describe_table.mako
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ ${wrappers.head("Beeswax Table Metadata: " + table.tableName, section='tables')}
<div class="bw-overwriteLabel">Overwrite existing data ? <input type="checkbox" name="overwrite" class="bw-overwriteCheckbox"/></div>
##Path (on HDFS) of files to load.
${comps.field(load_form["path"], title_klass='bw-pathLabel', attrs=dict(
klass='overtext bw-loadPath',
klass='bw-loadPath',
data_filters="OverText",
alt='/user/data'))}
<div class="ccs-button_bar">
<a class="ccs-choose_file ccs-art_button"
Expand Down
12 changes: 6 additions & 6 deletions apps/beeswax/src/beeswax/templates/execute.mako
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</ul>
</dt>
<dd class="bw-query_bottom default" style="height: auto;">
<textarea class="overtext bw-query-field ccs-simple-posteditor"
<textarea class="bw-query-field ccs-simple-posteditor" data-filters="OverText"
alt="Example: SELECT * FROM tablename" name="${form.query["query"].html_name | n}">${extract_field_data(form.query["query"]) or ''}</textarea>
% if len(form.query["query"].errors):
<div class="validation-advice">
Expand Down Expand Up @@ -112,7 +112,7 @@ ${wrappers.head('Hive Query', section='query')}
% endif
${comps.field(f['key'], attrs=dict(
alt="mapred.reduce.tasks",
klass="overtext"
data_filters="OverText"
))}
<div class="bw-query_settings_delete">
${comps.field(f['_deleted'], tag="button", button_text="x", notitle=True, attrs=dict(
Expand All @@ -123,7 +123,7 @@ ${wrappers.head('Hive Query', section='query')}

${comps.field(f['value'], attrs=dict(
alt="1",
klass="overtext"
data_filters="OverText",
))}
${comps.field(f['_exists'], hidden=True)}
% endfor
Expand Down Expand Up @@ -151,7 +151,7 @@ ${wrappers.head('Hive Query', section='query')}

${comps.field(f['path'], attrs=dict(
alt="/user/foo/udf.jar",
klass="overtext"
data_filters="OverText",
))}
<div class="ccs-button_subbar_below clearfix">
<a class="ccs-art_button ccs-choose_file" data-chooseFor="${f['path'].html_name | n}" data-icon-styles="{'width':16, 'height':16, 'top':2}">Choose a File</a>
Expand All @@ -174,7 +174,7 @@ ${wrappers.head('Hive Query', section='query')}

${comps.field(f['name'], attrs=dict(
alt="myFunction",
klass="overtext"
data_filters="OverText",
))}
<div class="bw-query_settings_delete">
${comps.field(f['_deleted'], tag="button", button_text="x", notitle=True, attrs=dict(
Expand All @@ -185,7 +185,7 @@ ${wrappers.head('Hive Query', section='query')}

${comps.field(f['class_name'], attrs=dict(
alt="com.acme.example",
klass="overtext"
data_filters="OverText",
))}
${comps.field(f['_exists'], hidden=True)}
% endfor
Expand Down
4 changes: 2 additions & 2 deletions apps/beeswax/src/beeswax/templates/watch_results.mako
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ${wrappers.head("Beeswax: Query Results", section='query')}
<label for="id_save_target_0">In a new table</label>
</div>
${comps.field(save_form['target_table'], notitle=True, klass="target", attrs=dict(
klass="overtext",
data_filters="OverText",
alt="table_name"
))}
<div>
Expand All @@ -48,7 +48,7 @@ ${wrappers.head("Beeswax: Query Results", section='query')}
</div>
<div class="target">
${comps.field(save_form['target_dir'], notitle=True, attrs=dict(
klass="overtext",
data_filters="OverText",
alt="/user/dir"
))}
<a class="ccs-art_button ccs-choose_file" data-icon-styles="{'width': 16, 'height': 16, 'top': 1, 'left': 4 }" data-chooseFor="target_dir">Choose File</a>
Expand Down
2 changes: 1 addition & 1 deletion apps/beeswax/static/js/Source/Beeswax/CCS.Beeswax.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ ART.Sheet.define('splitview.bw-editor', {
if (!container.get('html').contains('ccs-select-with-other')) return;
container.getElements('.ccs-select-with-other').each(function(el) {
//get the 'other' input
var other = el.getElement('input').set('alt', 'Enter a custom value').addClass('overtext required');
var other = el.getElement('input').set('alt', 'Enter a custom value').addClass('required').addDataFilter('OverText');
//create hint text
var ot = new OverText(other);
//get the select input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ CCS.FileViewer = new Class({
this.addEvents({
load: function(){
//Set width of input fields to width of biggest value that could be required, using totalBytes span as guide
$(this).getElements("input.overtext").setStyle('width', $(this).getElement('.totalBytes').getWidth());
$(this).getElements("input[data-filter*=OverText]").setStyle('width', $(this).getElement('.totalBytes').getWidth());
//Set events on anchors to edit and cancel changes to byte values
$(this).getElement('.fv-editBytes').addEvent('click', function() {
$(this).getElement('.fv-navChange').show();
Expand Down
2 changes: 1 addition & 1 deletion apps/filebrowser/src/filebrowser/templates/display.mako
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<div class="fv-navChange ccs-hidden">
<span class="fv-bold">Enter Bytes</span><a class="ccs-inline fv-cancelChangeBytes" title="Cancel Entry"></a><p/>
<form class="fv-changeBytesForm" action="${url('filebrowser.views.view', path=path_enc)}" method="GET">
<input class="overtext" alt="${view['offset'] + 1}" name="begin"/>-<input class="overtext" alt="${view['end']}" name="end"><p/>
<input data-filters="OverText" alt="${view['offset'] + 1}" name="begin"/>-<input data-filters="OverText" alt="${view['end']}" name="end"><p/>
% if view['mode']:
<input type="hidden" name="mode" value="${view['mode']}"/><br/>
% endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ from django.template.defaultfilters import urlencode, stringformat, filesizeform
<td class="fb-name">
<div class="fb-name-container">
% if "dir" == file['type']:
<a class="fb-item fb-dir jframe_ignore" href="${url('filebrowser.views.'+view, path=path_enc)}?file_filter=${file_filter}">${display_name}</a>
<a data-filters="FitText" class="fb-item fb-dir jframe_ignore" href="${url('filebrowser.views.'+view, path=path_enc)}?file_filter=${file_filter}">${display_name}</a>
% else:
<a class="fb-item fb-file jframe_ignore" target="FileViewer" href="${url('filebrowser.views.'+view, path=path_enc)}?file_filter=${file_filter}">${display_name}</a>
<a data-filters="FitText" class="fb-item fb-file jframe_ignore" target="FileViewer" href="${url('filebrowser.views.'+view, path=path_enc)}?file_filter=${file_filter}">${display_name}</a>
% endif
% if ".." != file['name']:
<ul class="fb-item-actions context-menu">
Expand Down
Loading

0 comments on commit 6f7337b

Please sign in to comment.