ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pallav...@apache.org
Subject ambari git commit: AMBARI-16726. Hive View : Upload table still shows file name after the upload is done (Nitiraj Rathore via pallavkul)
Date Fri, 20 May 2016 11:27:23 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 40ccef06b -> c2c5cb3f5


AMBARI-16726. Hive View : Upload table still shows file name after the upload is done (Nitiraj
Rathore via pallavkul)


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

Branch: refs/heads/trunk
Commit: c2c5cb3f59c4efd25acb51cb89791bf7d4a4c699
Parents: 40ccef0
Author: Pallav Kulshreshtha <pallav.kul@gmail.com>
Authored: Fri May 20 16:57:07 2016 +0530
Committer: Pallav Kulshreshtha <pallav.kul@gmail.com>
Committed: Fri May 20 16:57:07 2016 +0530

----------------------------------------------------------------------
 .../resources/ui/hive-web/app/components/file-upload.js  | 11 ++++++++++-
 .../ui/hive-web/app/controllers/upload-table.js          |  1 -
 .../resources/ui/hive-web/app/templates/upload-table.hbs |  4 ++--
 3 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c2c5cb3f/contrib/views/hive/src/main/resources/ui/hive-web/app/components/file-upload.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/components/file-upload.js
b/contrib/views/hive/src/main/resources/ui/hive-web/app/components/file-upload.js
index 1cd05ae..5dc7746 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/components/file-upload.js
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/components/file-upload.js
@@ -19,7 +19,16 @@
 import EmberUploader from 'ember-uploader';
 
 export default EmberUploader.FileField.extend({
+  onChangeUploadFiles : function(){
+    if(!this.get("uploadFiles")){
+      // files were cleared by the controller so clear here as well.
+      this.set("files");
+      this.set("value");
+    }
+  }.observes("uploadFiles"),
   filesDidChange: function(files) {
-    this.sendAction('filesUploaded',files); // sends this action to controller.
+    if( files ) {
+      this.sendAction('filesUploaded', files); // sends this action to controller.
+    }
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/c2c5cb3f/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/upload-table.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/upload-table.js
b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/upload-table.js
index f08aa18..b780c2e 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/upload-table.js
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/upload-table.js
@@ -712,7 +712,6 @@ export default Ember.Controller.extend({
     },
     filesUploaded: function (files) {
       console.log("upload-table.js : uploaded new files : ", files);
-
       this.clearFields();
 
       this.set('files', files);

http://git-wip-us.apache.org/repos/asf/ambari/blob/c2c5cb3f/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/upload-table.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/upload-table.hbs
b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/upload-table.hbs
index 0fffed4..ffe6b8e 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/upload-table.hbs
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/upload-table.hbs
@@ -72,7 +72,7 @@
 
         {{#if isLocalUpload }}
           <td class="data-upload-form-label"><label>{{t "hive.ui.selectFromLocal"}}</label></td>
-          <td class="data-upload-form-field">{{file-upload  filesUploaded="filesUploaded"}}</td>
+          <td class="data-upload-form-field">{{file-upload  filesUploaded="filesUploaded"
 uploadFiles=files}}</td>
         {{else}}
           <td class="data-upload-form-label"><label>{{t "hive.ui.hdfsPath"}}</label></td>
           <td class="data-upload-form-field" id="hdfs-param">{{input type="text" class="form-control"
placeholder="Enter full HDFS path" value=hdfsPath }}
@@ -177,4 +177,4 @@
       </div>
     {{/if}}
   </div>
-</div>
\ No newline at end of file
+</div>


Mime
View raw message