You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by pa...@apache.org on 2017/01/10 05:07:52 UTC

ambari git commit: AMBARI-19420. Import from local file system doesn't work if the same file is selected again. (Padma Priya via pallavkul)

Repository: ambari
Updated Branches:
  refs/heads/trunk 3f886882b -> 96aaf1dbb


AMBARI-19420. Import from local file system doesn't work if the same file is selected again. (Padma Priya via pallavkul)


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

Branch: refs/heads/trunk
Commit: 96aaf1dbb1a1d8a1d416736e5ae7f5b4cf81bc1a
Parents: 3f88688
Author: pallavkul <pa...@gmail.com>
Authored: Tue Jan 10 10:36:23 2017 +0530
Committer: pallavkul <pa...@gmail.com>
Committed: Tue Jan 10 10:36:23 2017 +0530

----------------------------------------------------------------------
 .../resources/ui/app/components/file-picker.js  | 32 ++++++++++++++++++++
 1 file changed, 32 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/96aaf1db/contrib/views/wfmanager/src/main/resources/ui/app/components/file-picker.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/file-picker.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/file-picker.js
new file mode 100644
index 0000000..d9729fe
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/file-picker.js
@@ -0,0 +1,32 @@
+/*
+*    Licensed to the Apache Software Foundation (ASF) under one or more
+*    contributor license agreements.  See the NOTICE file distributed with
+*    this work for additional information regarding copyright ownership.
+*    The ASF licenses this file to You under the Apache License, Version 2.0
+*    (the "License"); you may not use this file except in compliance with
+*    the License.  You may obtain a copy of the License at
+*
+*        http://www.apache.org/licenses/LICENSE-2.0
+*
+*    Unless required by applicable law or agreed to in writing, software
+*    distributed under the License is distributed on an "AS IS" BASIS,
+*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*    See the License for the specific language governing permissions and
+*    limitations under the License.
+*/
+
+import Ember from 'ember';
+import FilePicker from 'ember-cli-file-picker/components/file-picker';
+
+export default FilePicker.extend({
+  filesAreValid: function(files) {
+   // do something with the files and add errors:
+   // this.get('errors').addObject('wrong file type');
+   //return false;
+    return true;
+  },
+  click : function(event){
+      this.$('.file-picker__input').val(null);//this is done so that opening the same file would call the callbacks.s
+      this._super(event);
+  }
+});