ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject git commit: AMBARI-5724. View: Pig bug fixes and ui cleanup. (jaimin)
Date Fri, 09 May 2014 23:10:00 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.6.0 b8e87081a -> 7fbf6b732


AMBARI-5724. View: Pig bug fixes and ui cleanup. (jaimin)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7fbf6b73
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7fbf6b73
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7fbf6b73

Branch: refs/heads/branch-1.6.0
Commit: 7fbf6b732cb77d0cce7bff4c0f4e5f6b4f506bef
Parents: b8e8708
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Fri May 9 16:08:43 2014 -0700
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Fri May 9 16:09:36 2014 -0700

----------------------------------------------------------------------
 .../src/main/resources/ui/pig-web/app/styles/style.less  | 10 ++++++++++
 .../resources/ui/pig-web/app/templates/pig/history.hbs   |  4 ++++
 .../ui/pig-web/app/templates/pig/modal/createScript.hbs  |  7 +++++--
 .../ui/pig-web/app/templates/pig/scriptList.hbs          |  9 ++++++---
 .../main/resources/ui/pig-web/app/templates/pig/udfs.hbs |  4 ++++
 .../src/main/resources/ui/pig-web/app/translations.js    | 11 +++++++++--
 .../ui/pig-web/app/views/pig/modal/createScript.js       |  5 +++++
 .../pig/src/main/resources/ui/pig-web/config.coffee      |  2 +-
 8 files changed, 44 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7fbf6b73/contrib/views/pig/src/main/resources/ui/pig-web/app/styles/style.less
----------------------------------------------------------------------
diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/styles/style.less b/contrib/views/pig/src/main/resources/ui/pig-web/app/styles/style.less
index 9871a9a..bdde28a 100644
--- a/contrib/views/pig/src/main/resources/ui/pig-web/app/styles/style.less
+++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/styles/style.less
@@ -293,3 +293,13 @@ a.list-group-item.active{
   .base-transition(border-color 200ms linear, background-color 200ms linear;);
 }
 
+.empty-table-footer {
+  text-align: center;
+  font-size: 13pt;
+  color: #666666;
+}
+
+.panel-heading {
+  font-size: 1.1em;
+  font-weight: bold;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/7fbf6b73/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/history.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/history.hbs
b/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/history.hbs
index a1d5aae..3e5e51b 100644
--- a/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/history.hbs
+++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/history.hbs
@@ -43,4 +43,8 @@
     {{/each}}
     </tbody>
   </table>
+
+  {{#unless content}}
+    <div class="panel-footer empty-table-footer">{{t 'job.noJobs'}}</div>
+  {{/unless}}
 </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/7fbf6b73/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/modal/createScript.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/modal/createScript.hbs
b/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/modal/createScript.hbs
index 6e536e9..0d8d459 100644
--- a/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/modal/createScript.hbs
+++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/modal/createScript.hbs
@@ -22,11 +22,14 @@
 </div>
 <div class="modal-body">
 <div class="form-group">
+  {{#if error}}
+    <div class="alert alert-danger">{{error}}</div>
+  {{/if}}
     <label for="exampleInputEmail1">{{t 'scripts.title'}}</label>
-    {{input class="form-control" placeholderTranslation="udfs.modal.udf_name" valueBinding="content.title"}}
+    {{input class="form-control" placeholderTranslation="scripts.modal.script_title_placeholder"
valueBinding="content.title"}}
   </div>
   <div class="form-group">
-    <label for="exampleInputPassword1">{{t 'common.path'}}</label>
+    <label for="exampleInputPassword1">{{t 'scripts.path'}}</label>
     {{input class="form-control" placeholderTranslation="scripts.modal.file_path_placeholder"
valueBinding="filePath"}}
     <small class="pull-right help-block">{{t 'scripts.modal.file_path_hint'}}</small>
   </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/7fbf6b73/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/scriptList.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/scriptList.hbs
b/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/scriptList.hbs
index fdba0a6..cff2a54 100644
--- a/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/scriptList.hbs
+++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/scriptList.hbs
@@ -30,9 +30,9 @@
         <th></th> 
       </tr>
     </thead>
-    <tbody> 
+    <tbody>
     {{#each content}}
-      <tr> 
+      <tr>
 
         <td class="first">{{#link-to 'pig.scriptEdit' this.id}}
           {{#if this.isNew}}
@@ -43,7 +43,7 @@
           {{/unless}}
         {{/link-to}}</td>
         <td><span class="date">{{showDate this.dateCreated 'YYYY-MM-DD HH:mm'}}</span></td>
-        <td> 
+        <td>
           {{#unless this.isNew}}
             <a>{{t 'common.history'}}</a> - <a>{{t 'common.clone'}}</a>
- <a href="#" {{action "deletescript" this}}>{{t 'common.delete'}}</a>
           {{/unless}}
@@ -52,6 +52,9 @@
     {{/each}}
     </tbody>
   </table>
+  {{#unless content}}
+    <div class="panel-footer empty-table-footer">{{t 'scripts.noScripts'}}</div>
+  {{/unless}}
 </div>
 
 {{outlet modal}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/7fbf6b73/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/udfs.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/udfs.hbs b/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/udfs.hbs
index 1ecd6be..1042d94 100644
--- a/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/udfs.hbs
+++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/udfs.hbs
@@ -42,4 +42,8 @@
     {{/each}}
     </tbody>
   </table>
+
+  {{#unless content}}
+    <div class="panel-footer empty-table-footer">{{t 'udfs.noUDFs'}}</div>
+  {{/unless}}
 </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/7fbf6b73/contrib/views/pig/src/main/resources/ui/pig-web/app/translations.js
----------------------------------------------------------------------
diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/translations.js b/contrib/views/pig/src/main/resources/ui/pig-web/app/translations.js
index 6efff8e..8d2a3b6 100644
--- a/contrib/views/pig/src/main/resources/ui/pig-web/app/translations.js
+++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/translations.js
@@ -34,13 +34,18 @@ Ember.I18n.translations = {
   'scripts':{
     'scripts':"Scripts",
     'newscript': "New Script",
-    'title': "Title",
+    'title': "Name",
+    'path': "Script HDFS Location (optional)",
+    'noScripts': "No scripts to display",
     'modal':{
-      'create_script':'Create script',
+      'create_script':'New Script',
+      'script_title_placeholder': 'Script name',
       'file_path_placeholder':'Full path to script file',
       'file_path_hint':'Leave empty to create file automatically.',
       'file_path_hint':'Leave empty to create file automatically.',
 
+      'error_empty_title':'Title can not be empty!',
+
       'confirm_delete':'Confirm Delete',
       'confirm_delete_massage':'Are you sure you want to delete {{title}} script?'
     },
@@ -71,6 +76,7 @@ Ember.I18n.translations = {
     'job_status':'Job status: ',
     'status':'Status',
     'started':'Started',
+    'noJobs': "No jobs to display",
     'alert':{
       'job_started' :'Job started!',
       'job_killed' :'{{title}} job killed!',
@@ -95,6 +101,7 @@ Ember.I18n.translations = {
     'tooltips':{
       'path':'Path of this script file on HDFS',
     },
+    'noUDFs': "No UDFs to display",
     'alert':{
       'udf_created':'{{name}} created!',
       'udf_deleted':'{{name}} deleted!',

http://git-wip-us.apache.org/repos/asf/ambari/blob/7fbf6b73/contrib/views/pig/src/main/resources/ui/pig-web/app/views/pig/modal/createScript.js
----------------------------------------------------------------------
diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/views/pig/modal/createScript.js
b/contrib/views/pig/src/main/resources/ui/pig-web/app/views/pig/modal/createScript.js
index cf4e412..becf47e 100644
--- a/contrib/views/pig/src/main/resources/ui/pig-web/app/views/pig/modal/createScript.js
+++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/views/pig/modal/createScript.js
@@ -22,6 +22,11 @@ App.CreateScriptView = App.PigModalView.extend({
   templateName: 'pig/modal/createScript',
   actions:{
     create: function(script) {
+      var title = this.controller.get('title');
+      if (!title) {
+        this.controller.set('error', Em.I18n.t('scripts.modal.error_empty_title'))
+        return;
+      }
       var filePath = this.controller.get('filePath');
       $(this.get('element')).find('.modal').modal('hide');
       return this.controller.send('confirmcreate',script,filePath);

http://git-wip-us.apache.org/repos/asf/ambari/blob/7fbf6b73/contrib/views/pig/src/main/resources/ui/pig-web/config.coffee
----------------------------------------------------------------------
diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/config.coffee b/contrib/views/pig/src/main/resources/ui/pig-web/config.coffee
index 867a9ee..432b902 100644
--- a/contrib/views/pig/src/main/resources/ui/pig-web/config.coffee
+++ b/contrib/views/pig/src/main/resources/ui/pig-web/config.coffee
@@ -42,7 +42,7 @@ exports.config =
 
 
   paths:
-    public: '/usr/lib/ambari-server/web/pig'
+    public: '/usr/lib/ambari-server/web/views-debug/PIG/PIG_1/'
 
   overrides:
     production:


Mime
View raw message