ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gna...@apache.org
Subject ambari git commit: AMBARI-18045. Pig view - Pig script creation fails. (gauravn7)
Date Wed, 10 Aug 2016 11:56:32 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 24606caa7 -> d3af1851b


AMBARI-18045. Pig view - Pig script creation fails. (gauravn7)


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

Branch: refs/heads/branch-2.4
Commit: d3af1851be0d0ea5dac5b79b29398441ac55c4a4
Parents: 24606ca
Author: Gaurav Nagar <gnagar@hortonworks.com>
Authored: Wed Aug 10 17:25:27 2016 +0530
Committer: Gaurav Nagar <gnagar@hortonworks.com>
Committed: Wed Aug 10 17:26:11 2016 +0530

----------------------------------------------------------------------
 .../src/main/resources/ui/pig-web/app/initialize.js  | 15 +++++++++++++++
 .../resources/ui/pig-web/app/models/pig_script.js    |  2 +-
 2 files changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d3af1851/contrib/views/pig/src/main/resources/ui/pig-web/app/initialize.js
----------------------------------------------------------------------
diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/initialize.js b/contrib/views/pig/src/main/resources/ui/pig-web/app/initialize.js
index abd72f1..38ee093 100644
--- a/contrib/views/pig/src/main/resources/ui/pig-web/app/initialize.js
+++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/initialize.js
@@ -64,6 +64,21 @@ App.IsodateTransform = DS.Transform.extend({
   },
   serialize: function (deserialized) {
     if (deserialized) {
+      return moment(deserialized).format('x');
+    }
+    return deserialized;
+  }
+});
+
+App.ScriptdateTransform = DS.Transform.extend({
+  deserialize: function (serialized) {
+    if (serialized) {
+      return moment(serialized).toDate();
+    }
+    return serialized;
+  },
+  serialize: function (deserialized) {
+    if (deserialized) {
       return moment(deserialized).utc().format('YYYY-MM-DDTHH:mm:ss') + 'Z';
     }
     return deserialized;

http://git-wip-us.apache.org/repos/asf/ambari/blob/d3af1851/contrib/views/pig/src/main/resources/ui/pig-web/app/models/pig_script.js
----------------------------------------------------------------------
diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/models/pig_script.js b/contrib/views/pig/src/main/resources/ui/pig-web/app/models/pig_script.js
index 641180f..54abb75 100644
--- a/contrib/views/pig/src/main/resources/ui/pig-web/app/models/pig_script.js
+++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/models/pig_script.js
@@ -21,7 +21,7 @@ var App = require('app');
 App.Script = DS.Model.extend({
   title:DS.attr('string'),
   pigScript:DS.belongsTo('file', { async: true }),
-  dateCreated:DS.attr('isodate', { defaultValue: moment()}),
+  dateCreated:DS.attr('scriptdate', { defaultValue: moment()}),
   templetonArguments:DS.attr('string'),
   pythonScript:DS.attr('string'),
   owner:DS.attr('string'),


Mime
View raw message