falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peeyu...@apache.org
Subject [01/16] falcon git commit: FALCON-2118 Proposal for new UI changes
Date Mon, 22 Aug 2016 04:47:54 GMT
Repository: falcon
Updated Branches:
  refs/heads/0.10-refactored-ui 01a303e3b -> 76dc2e183


http://git-wip-us.apache.org/repos/asf/falcon/blob/76dc2e18/falcon-ui/app/test/controllers/feed/FeedLocationControllerSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/feed/FeedLocationControllerSpec.js b/falcon-ui/app/test/controllers/feed/FeedLocationControllerSpec.js
index 8c584af..cc1320f 100644
--- a/falcon-ui/app/test/controllers/feed/FeedLocationControllerSpec.js
+++ b/falcon-ui/app/test/controllers/feed/FeedLocationControllerSpec.js
@@ -31,8 +31,7 @@
            active: true,
            locations: [
              {type: 'data', path: '/'},
-             {type: 'stats', path: '/'},
-             {type: 'meta', path: '/'}
+             {type: 'stats', path: '/'}
            ]
          },
          catalog: {

http://git-wip-us.apache.org/repos/asf/falcon/blob/76dc2e18/falcon-ui/app/test/controllers/feed/FeedRootCtrlSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/feed/FeedRootCtrlSpec.js b/falcon-ui/app/test/controllers/feed/FeedRootCtrlSpec.js
index 8514435..1ed2f58 100644
--- a/falcon-ui/app/test/controllers/feed/FeedRootCtrlSpec.js
+++ b/falcon-ui/app/test/controllers/feed/FeedRootCtrlSpec.js
@@ -26,11 +26,14 @@
     var controllerProvider;
     var falconServiceMock;
 
-    beforeEach(module('app.controllers.feed', 'dateHelper'));
+    beforeEach(module('app.controllers.feed', 'dateHelper', 'routeHelper'));
 
-    beforeEach(inject(function($q, $rootScope, $controller, DateHelper) {
+    beforeEach(inject(function($q, $rootScope, $controller, DateHelper, RouteHelper) {
       scope = $rootScope.$new();
       scope.models = {};
+      scope.$parent = $rootScope.$new();
+      scope.$parent.models = {};
+      scope.$parent.models.feedModel = undefined;
       entityFactoryMock = jasmine.createSpyObj('EntityFactory', ['newEntity']);
       serializerMock = jasmine.createSpyObj('EntitySerializer', ['preDeserialize']);
       falconServiceMock = jasmine.createSpyObj('Falcon', ['postUpdateEntity', 'postSubmitEntity', 'logRequest', 'logResponse']);
@@ -39,12 +42,14 @@
       controller = $controller('FeedController', {
         $scope: scope,
         $state: {
-          $current:{
+          current:{
             name: 'main.forms.feed.general'
           },
           go: angular.noop
         },
-        Falcon: falconServiceMock
+        Falcon: falconServiceMock,
+        FeedModel: {feed : {}},
+        datasourcesList: []
       });
     }));
 
@@ -75,7 +80,7 @@
     describe('loadOrCreateEntity()', function() {
       it('Should deserialize the entity if the xml is found on the scope', function() {
 
-        controller = createController();
+        controller = createController({name: 'FeedName'});
         var createdFeed =  {};
         var deserialzedFeed =  {};
         var feedModel = {name: 'FeedName'};
@@ -93,13 +98,12 @@
       });
 
       it('Should not deserialize the entity if the xml is not found on the scope', function() {
-        controller = createController();
+        controller = createController(undefined);
         var createdFeed =  {};
         var deserialzedFeed =  {};
         serializerMock.preDeserialize.andReturn(deserialzedFeed);
         entityFactoryMock.newEntity.andReturn(createdFeed);
 
-
         var feed = scope.loadOrCreateEntity();
 
         expect(serializerMock.preDeserialize).not.toHaveBeenCalled();
@@ -108,13 +112,13 @@
       });
 
       it('Should clear the feedModel from the scope', function() {
-        controller = createController();
+        controller = createController(undefined);
         entityFactoryMock.newEntity.andReturn({});
         scope.models.feedModel = {};
 
         scope.loadOrCreateEntity();
 
-        expect(scope.models.feedModel).toBe(null);
+        expect(scope.$parent.models.feedModel).toBe(null);
       });
 
 
@@ -139,7 +143,6 @@
 
         scope.saveEntity();
 
-        expect(scope.editingMode).toBe(false);
         expect(falconServiceMock.postSubmitEntity).not.toHaveBeenCalled();
         expect(falconServiceMock.postUpdateEntity).toHaveBeenCalledWith('<?xml version="1.0" encoding="UTF-8" standalone="yes"?><feed><clusters><cluster></cluster></clusters></feed>', 'feed', 'FeedOne');
       });
@@ -162,25 +165,26 @@
 
         scope.saveEntity();
 
-        expect(scope.cloningMode).toBe(false);
         expect(falconServiceMock.postSubmitEntity).toHaveBeenCalledWith('<?xml version="1.0" encoding="UTF-8" standalone="yes"?><feed><clusters><cluster></cluster></clusters></feed>', 'feed');
         expect(falconServiceMock.postUpdateEntity).not.toHaveBeenCalled();
       });
 
     });
 
-    function createController() {
+    function createController(feedModel) {
       return controllerProvider('FeedController', {
         $scope: scope,
         $state: {
-          $current:{
+          current:{
             name: 'main.forms.feed.general'
           },
           go: angular.noop
         },
         Falcon: {},
         EntityFactory: entityFactoryMock,
-        EntitySerializer: serializerMock
+        EntitySerializer: serializerMock,
+        FeedModel: feedModel,
+        datasourcesList: []
       });
     }
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/76dc2e18/falcon-ui/app/test/controllers/feed/FeedSummaryControllerSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/feed/FeedSummaryControllerSpec.js b/falcon-ui/app/test/controllers/feed/FeedSummaryControllerSpec.js
index 90d3fb9..f514792 100644
--- a/falcon-ui/app/test/controllers/feed/FeedSummaryControllerSpec.js
+++ b/falcon-ui/app/test/controllers/feed/FeedSummaryControllerSpec.js
@@ -21,9 +21,9 @@
   var controller;
 
   describe('FeedSummaryController', function () {
-    beforeEach(module('app.controllers.feed'));
+    beforeEach(module('app.controllers.feed','dateHelper'));
 
-    beforeEach(inject(function($q, $rootScope, $controller) {
+    beforeEach(inject(function($q, $rootScope, $controller, DateHelper) {
       scope = $rootScope.$new();
       scope.feed = {};
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/76dc2e18/falcon-ui/app/test/controllers/process/ProcessClustersCtrlSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/process/ProcessClustersCtrlSpec.js b/falcon-ui/app/test/controllers/process/ProcessClustersCtrlSpec.js
index a6b4d58..f760e0c 100644
--- a/falcon-ui/app/test/controllers/process/ProcessClustersCtrlSpec.js
+++ b/falcon-ui/app/test/controllers/process/ProcessClustersCtrlSpec.js
@@ -21,9 +21,9 @@
   var controller;
 
   describe('ProcessClustersCtrl', function () {
-    beforeEach(module('app.controllers.process'));
+    beforeEach(module('app.controllers.process', 'dateHelper'));
 
-    beforeEach(inject(function($q, $rootScope, $controller) {
+    beforeEach(inject(function($q, $rootScope, $controller, DateHelper) {
       scope = $rootScope.$new();
       scope.process = {};
       controller = $controller('ProcessClustersCtrl', {
@@ -36,7 +36,7 @@
       it('Should add date format', function() {
         scope.init();
 
-        expect(scope.dateFormat).toBe('MM/dd/yyyy');
+        expect(scope.dateFormat).not.toBe(null);
       });
     });
 
@@ -52,7 +52,7 @@
 
         scope.openDatePicker(eventMock, container);
 
-        expect(scope.dateFormat).toBe('MM/dd/yyyy');
+        expect(scope.dateFormat).not.toBe(null);
       });
     });
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/76dc2e18/falcon-ui/app/test/controllers/process/ProcessGeneralInformationCtrlSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/process/ProcessGeneralInformationCtrlSpec.js b/falcon-ui/app/test/controllers/process/ProcessGeneralInformationCtrlSpec.js
index 6008456..df148c1 100644
--- a/falcon-ui/app/test/controllers/process/ProcessGeneralInformationCtrlSpec.js
+++ b/falcon-ui/app/test/controllers/process/ProcessGeneralInformationCtrlSpec.js
@@ -22,9 +22,9 @@
 
 
   describe('ProcessGeneralInformationCtrl', function () {
-    beforeEach(module('app.controllers.process'));
+    beforeEach(module('app.controllers.process', 'dateHelper'));
 
-    beforeEach(inject(function($q, $rootScope, $controller) {
+    beforeEach(inject(function($q, $rootScope, $controller, DateHelper) {
       scope = $rootScope.$new();
       scope.entityType = 'process';
       scope.process = {
@@ -32,7 +32,9 @@
       };
 
       controller = $controller('ProcessGeneralInformationCtrl', {
-        $scope: scope
+        $scope: scope,
+        clustersList: [],
+        feedsList: []
       });
     }));
 
@@ -79,33 +81,4 @@
     });
   })
 
-  describe('Versions', function() {
-    it('Should display the oozie versions when oozie workflow is selected', function() {
-      var expectedVersions = ['3.1.3-incubating', '3.2.0-incubating', '3.3.0', '3.3.1', '3.3.2', '4.0.0', '4.0.1'];
-      scope.process.workflow = {engine: 'oozie'};
-
-      scope.selectWorkflow();
-
-      expect(scope.versions).toEqual(expectedVersions);
-    });
-
-    it('Should display the pig versions when pig workflow is selected', function() {
-      var expectedVersions = ['pig-0.10.0', 'pig-0.10.1', 'pig-0.11.0', 'pig-0.11.1', 'pig-0.12.0', 'pig-0.12.1', 'pig-0.13.0', 'pig-0.8.0', 'pig-0.8.1', ' pig-0.9.0', ' pig-0.9.1', 'pig-0.9.2'];
-      scope.process.workflow = {engine: 'pig'};
-
-      scope.selectWorkflow();
-
-      expect(scope.versions).toEqual(expectedVersions);
-    });
-
-    it('Should display the hive versions when hive workflow is selected', function() {
-      var expectedVersions = ['hive-0.10.0', 'hive-0.11.0', 'hive-0.12.0', 'hive-0.13.0', 'hive-0.13.1', 'hive-0.6.0', 'hive-0.7.0', 'hive-0.8.0', 'hive-0.8.1', 'hive-0.9.0'];
-      scope.process.workflow = {engine: 'hive'};
-
-      scope.selectWorkflow();
-
-      expect(scope.versions).toEqual(expectedVersions);
-    });
-  });
-
-})();
\ No newline at end of file
+})();

http://git-wip-us.apache.org/repos/asf/falcon/blob/76dc2e18/falcon-ui/app/test/controllers/process/ProcessRootCtrlSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/process/ProcessRootCtrlSpec.js b/falcon-ui/app/test/controllers/process/ProcessRootCtrlSpec.js
index 78cf26a..0eec39b 100644
--- a/falcon-ui/app/test/controllers/process/ProcessRootCtrlSpec.js
+++ b/falcon-ui/app/test/controllers/process/ProcessRootCtrlSpec.js
@@ -22,14 +22,21 @@
   var controllerProvider;
   var entityFactoryMock;
   var serializerMock;
+  var falconServiceMock;
 
   describe('ProcessRootCtrl', function () {
 
-    beforeEach(module('app.controllers.process'));
+    beforeEach(module('app.controllers.process','dateHelper','routeHelper'));
+
+    beforeEach(inject(function($q, $rootScope, $controller, DateHelper, RouteHelper) {
+      falconServiceMock = jasmine.createSpyObj('Falcon', ['postUpdateEntity', 'postSubmitEntity', 'logRequest', 'logResponse']);
 
-    beforeEach(inject(function($q, $rootScope, $controller) {
       scope = $rootScope.$new();
       scope.models = {};
+      scope.$parent = $rootScope.$new();
+      scope.$parent.models = {};
+      scope.process = {};
+      scope.entityType = 'process';
       controllerProvider = $controller;
       entityFactoryMock = jasmine.createSpyObj('EntityFactory', ['newEntity']);
       serializerMock = jasmine.createSpyObj('EntitySerializer', ['preDeserialize']);
@@ -37,13 +44,15 @@
       controller = $controller('ProcessRootCtrl', {
         $scope: scope,
         $state: {
-          $current:{
+          current:{
             name: 'forms.process.general'
           },
           go: angular.noop
         },
         EntityFactory: entityFactoryMock,
-        EntitySerializer: serializerMock
+        EntitySerializer: serializerMock,
+        Falcon: falconServiceMock,
+        ProcessModel : undefined
       });
     }));
 
@@ -52,10 +61,11 @@
       expect(scope.entityType).toBe('process');
     });
 
-    it('Should be initialized properly', function() {
-      scope.init();
-
-      expect(scope.editXmlDisabled).toBe(true);
+    describe('init', function() {
+      it('Should be initialized properly', function() {
+        scope.init();
+        expect(scope.editXmlDisabled).toBe(true);
+      });
     });
 
     it('Should toggle editXmlDisable value to true', function() {
@@ -76,7 +86,7 @@
 
     it('Should deserialize the entity if the xml is found on the scope', function() {
 
-      controller = createController();
+      controller = createController({name: 'ProcessName'});
       var createdProcess =  {};
       var deserialzedProcess =  {};
       var processModel = {name: 'ProcessName'};
@@ -92,7 +102,7 @@
     });
 
     it('Should not deserialize the entity if the xml is not found on the scope', function() {
-      controller = createController();
+      controller = createController(undefined);
       var createdProcess =  {};
       var deserialzedProcess =  {};
       serializerMock.preDeserialize.andReturn(deserialzedProcess);
@@ -106,29 +116,70 @@
     });
 
     it('Should clear the processModel from the scope', function() {
-      controller = createController();
+      controller = createController({name: 'ProcessName'});
       entityFactoryMock.newEntity.andReturn({});
       scope.models.processModel = {};
 
       scope.loadOrCreateEntity();
 
-      expect(scope.models.processModel).toBe(null);
+      expect(scope.$parent.models.processModel).toBe(null);
+    });
+
+
+    describe('saveEntity', function() {
+      it('Should save the update the entity if in edit mode', function() {
+        falconServiceMock.postUpdateEntity.andReturn(successResponse({}));
+        scope.editingMode = true;//---this line doesnt work
+        scope.$parent.cloningMode = false;
+        scope.process = { name:  'ProcessOne'};
+        scope.xml = '<process/>';
+
+        scope.saveEntity();
+
+        expect(falconServiceMock.postSubmitEntity).not.toHaveBeenCalled();
+        expect(falconServiceMock.postUpdateEntity).toHaveBeenCalledWith('<?xml version="1.0" encoding="UTF-8" standalone="yes"?><process/>', 'process', 'ProcessOne');
+      });
+
+      it('Should save the update the entity if in cloning mode', function() {
+        falconServiceMock.postSubmitEntity.andReturn(successResponse({}));
+        scope.cloningMode = true;//---this line doesnt work
+        scope.$parent.cloningMode = true;
+        scope.process = { name:  'ProcessOne'};
+        scope.xml = '<process/>';
+
+        scope.saveEntity();
+
+        expect(falconServiceMock.postSubmitEntity).toHaveBeenCalledWith('<?xml version="1.0" encoding="UTF-8" standalone="yes"?><process/>', 'process');
+        expect(falconServiceMock.postUpdateEntity).not.toHaveBeenCalled();
+      });
+
     });
 
+    function successResponse(value) {
+      var fakePromise = {};
+      fakePromise.success = function(callback) {
+        callback(value);
+        return fakePromise;
+      };
+      fakePromise.error = angular.noop;
+      return fakePromise;
+    }
+
 
   });
 
-  function createController() {
+  function createController(processModel) {
     return controllerProvider('ProcessRootCtrl', {
       $scope: scope,
       $state: {
-        $current:{
+        current:{
           name: 'forms.process.general'
         },
         go: angular.noop
       },
       EntityFactory: entityFactoryMock,
-      EntitySerializer: serializerMock
+      EntitySerializer: serializerMock,
+      ProcessModel : processModel
     });
   }
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/76dc2e18/falcon-ui/app/test/controllers/process/ProcessSummaryCtrlSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/process/ProcessSummaryCtrlSpec.js b/falcon-ui/app/test/controllers/process/ProcessSummaryCtrlSpec.js
index a8ee968..ce3a3b2 100644
--- a/falcon-ui/app/test/controllers/process/ProcessSummaryCtrlSpec.js
+++ b/falcon-ui/app/test/controllers/process/ProcessSummaryCtrlSpec.js
@@ -17,72 +17,11 @@
  */
 (function () {
   'use strict';
-  var scope, controller, falconServiceMock;
+  var scope, controller;
 
   describe('ProcessSummaryCtrl', function () {
     beforeEach(module('app.controllers.process'));
 
-    beforeEach(inject(function($q, $rootScope, $controller) {
-      falconServiceMock = jasmine.createSpyObj('Falcon', ['postUpdateEntity', 'postSubmitEntity', 'logRequest', 'logResponse']);
-
-      scope = $rootScope.$new();
-      scope.process = {};
-      scope.entityType = 'process';
-      controller = $controller('ProcessSummaryCtrl', {
-        $scope: scope,
-        Falcon: falconServiceMock,
-        $state: {
-          $current:{
-            name: 'main.forms.feed.general'
-          },
-          go: angular.noop
-        }
-      });
-    }));
-
-
-    describe('saveEntity', function() {
-      it('Should save the update the entity if in edit mode', function() {
-        falconServiceMock.postUpdateEntity.andReturn(successResponse({}));
-        scope.editingMode = true;//---this line doesnt work
-        scope.$parent.cloningMode = false;
-        scope.process = { name:  'ProcessOne'};
-        scope.xml = '<process/>';
-
-        scope.saveEntity();
-
-        expect(scope.editingMode).toBe(false);
-        expect(falconServiceMock.postSubmitEntity).not.toHaveBeenCalled();
-        expect(falconServiceMock.postUpdateEntity).toHaveBeenCalledWith('<?xml version="1.0" encoding="UTF-8" standalone="yes"?><process/>', 'process', 'ProcessOne');
-      });
-
-      it('Should save the update the entity if in cloning mode', function() {
-        falconServiceMock.postSubmitEntity.andReturn(successResponse({}));
-        scope.cloningMode = true;//---this line doesnt work
-        scope.$parent.cloningMode = true;
-        scope.process = { name:  'ProcessOne'};
-        scope.xml = '<process/>';
-
-        scope.saveEntity();
-
-        expect(scope.cloningMode).toBe(false);
-        expect(falconServiceMock.postSubmitEntity).toHaveBeenCalledWith('<?xml version="1.0" encoding="UTF-8" standalone="yes"?><process/>', 'process');
-        expect(falconServiceMock.postUpdateEntity).not.toHaveBeenCalled();
-      });
-
-    });
-
-    function successResponse(value) {
-      var fakePromise = {};
-      fakePromise.success = function(callback) {
-        callback(value);
-        return fakePromise;
-      };
-      fakePromise.error = angular.noop;
-      return fakePromise;
-    }
-
-
   });
 
-})();
\ No newline at end of file
+})();

http://git-wip-us.apache.org/repos/asf/falcon/blob/76dc2e18/falcon-ui/app/test/e2e/protractor.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/e2e/protractor.js b/falcon-ui/app/test/e2e/protractor.js
index 6c2d97e..37d6e65 100644
--- a/falcon-ui/app/test/e2e/protractor.js
+++ b/falcon-ui/app/test/e2e/protractor.js
@@ -1,25 +1,7 @@
-/**
- * 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.
- */
-
 exports.config = {
   chromeDriver: '../../../node_modules/protractor/selenium/chromedriver',
 
   jasmineNodeOpts: {
     showColors: true
   }
-};
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/76dc2e18/falcon-ui/app/test/services/EntitySerializerSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/services/EntitySerializerSpec.js b/falcon-ui/app/test/services/EntitySerializerSpec.js
index 5f83225..74d69fa 100644
--- a/falcon-ui/app/test/services/EntitySerializerSpec.js
+++ b/falcon-ui/app/test/services/EntitySerializerSpec.js
@@ -136,9 +136,9 @@
 
         var feed = serializer.preDeserialize(feedModel, 'feed');
 
-        expect(feed.lateArrival.active).toBe(false);
+        expect(feed.lateArrival.active).toBe(true);
         expect(feed.lateArrival.cutOff.unit).toBe('hours');
-        expect(feed.lateArrival.cutOff.quantity).toBe(null);
+        expect(feed.lateArrival.cutOff.quantity).toBe(4);
       });
 
       it('Should copy availabilityFlag', function() {
@@ -160,7 +160,7 @@
 
         var feed = serializer.preDeserialize(feedModel, 'feed');
 
-        expect(feed.availabilityFlag).toBe(null);
+        expect(feed.availabilityFlag).toBe("_success");
       });
 
       it('Should copy custom properties', function() {
@@ -213,7 +213,7 @@
 
         var feed = serializer.preDeserialize(feedModel, 'feed');
 
-        expect(feed.properties.length).toBe(6);
+        expect(feed.properties.length).toBe(5);
         expect(feed.properties[0].key).toBe('queueName');
         expect(feed.properties[0].value).toBe('QueueName');
       });
@@ -232,31 +232,14 @@
 
         var feed = serializer.preDeserialize(feedModel, 'feed');
 
-        expect(feed.properties.length).toBe(6);
+        expect(feed.properties.length).toBe(5);
+
         expect(feed.properties[0].key).toBe('queueName');
-        expect(feed.properties[0].value).toBe('');
+        expect(feed.properties[0].value).toBe('default');
         expect(feed.properties[1].key).toBe('jobPriority');
         expect(feed.properties[1].value).toBe('MEDIUM');
       });
 
-      it('Should copy timeout as a Frequency Object', function() {
-        var feedModel = {
-          feed: {
-            properties: {property: [
-              {_name: 'queueName', _value: 'QueueName'},
-              {_name: 'timeout', _value: 'days(4)'}
-            ]}
-          }
-        };
-
-        var feed = serializer.preDeserialize(feedModel, 'feed');
-
-        expect(feed.properties.length).toBe(6);
-        expect(feed.properties[2].key).toBe('timeout');
-        expect(feed.properties[2].value.quantity).toBe('4');
-        expect(feed.properties[2].value.unit).toBe('days');
-      });
-
       it('Should copy file system locations', function() {
         var feedModel = {
           feed: {
@@ -270,7 +253,6 @@
         var feed = serializer.preDeserialize(feedModel, 'feed');
         var locations = feed.storage.fileSystem.locations;
 
-        expect(feed.storage.fileSystem.active).toBe(true);
         expect(locations.length).toBe(2);
         expect(locations[0].type).toBe('data');
         expect(locations[0].path).toBe('/none1');
@@ -281,55 +263,24 @@
       it('Should not copy file system locations if they are not defined and keep the defaults', function() {
         var feedModel = {
           feed: {
+            dataTransferType: 'hdfs',
           }
         };
 
         var feed = serializer.preDeserialize(feedModel, 'feed');
-        var locations = feed.storage.fileSystem.locations;
 
-        expect(feed.storage.fileSystem.active).toBe(false);
-        expect(locations.length).toBe(3);
-        expect(locations[0].type).toBe('data');
-        expect(locations[0].path).toBe('/');
-        expect(locations[1].type).toBe('stats');
-        expect(locations[1].path).toBe('/');
-        expect(locations[2].type).toBe('meta');
-        expect(locations[2].path).toBe('/');
-      });
-
-      it('Should set file system active flag as false if there are no locations are', function() {
-        var feedModel = {
-          feed: {}
-        };
-
-        var feed = serializer.preDeserialize(feedModel, 'feed');
-
-        expect(feed.storage.fileSystem.active).toBe(false);
+        expect(feed.storage.fileSystem.locations).toBe(null);
       });
 
-      it('Should copy catalog uri', function() {
+      it('Should not copy catalog uri if not present', function() {
         var feedModel = {
           feed: {
-            "table": {
-              _uri : 'table:uri'
-            }
+            dataTransferType: 'hive',
           }
         };
 
         var feed = serializer.preDeserialize(feedModel, 'feed');
 
-        expect(feed.storage.catalog.active).toBe(true);
-        expect(feed.storage.catalog.catalogTable.uri).toBe('table:uri');
-      });
-
-      it('Should not copy catalog uri if not present', function() {
-        var feedModel = {
-          feed: {}
-        };
-
-        var feed = serializer.preDeserialize(feedModel, 'feed');
-
-        expect(feed.storage.catalog.active).toBe(false);
         expect(feed.storage.catalog.catalogTable.uri).toBe(null);
       });
 
@@ -418,12 +369,12 @@
       it('Should copy clusters locations', function() {
         var feedModel = {
           feed: {
+            dataTransferType: 'hdfs',
             clusters: {cluster: [{_name: 'ClusterOne', _type: 'target',
               locations: {
                 location: [
-                  {_type: 'stats', _path: '/path1'},
-                  {_type: 'data', _path: '/path2'},
-                  {_type: 'tmp', _path: '/path3'}
+                  {_type: 'data', _path: '/path1'},
+                  {_type: 'stats', _path: '/path2'}
                 ]}
             }]}
           }
@@ -432,64 +383,45 @@
         var feed = serializer.preDeserialize(feedModel, 'feed');
         var locations = feed.clusters[0].storage.fileSystem.locations;
 
-        expect(feed.clusters[0].storage.fileSystem.active).toBe(true);
-        expect(locations.length).toBe(3);
-        expect(locations[0].type).toBe('stats');
+        expect(locations.length).toBe(2);
+        expect(locations[0].type).toBe('data');
         expect(locations[0].path).toBe('/path1');
-        expect(locations[1].type).toBe('data');
+        expect(locations[1].type).toBe('stats');
         expect(locations[1].path).toBe('/path2');
-        expect(locations[2].type).toBe('tmp');
-        expect(locations[2].path).toBe('/path3');
       });
 
       it('filesystem should be inactive if there are no locations', function() {
         var feedModel = {
           feed: {
-            clusters: {cluster: [{_name: 'ClusterOne', _type: 'target'}]}
+            dataTransferType: 'hdfs',
+            clusters: {cluster: [{_name: 'ClusterOne', _type: 'target',
+              locations: {
+                location: []}
+            }]}
           }
         };
 
         var feed = serializer.preDeserialize(feedModel, 'feed');
         var locations = feed.clusters[0].storage.fileSystem.locations;
-
-        expect(feed.clusters[0].storage.fileSystem.active).toBe(false);
-        expect(locations.length).toBe(3);
+        expect(locations.length).toBe(0);
       });
 
       it('Should copy catalog uri', function() {
         var feedModel = {
           feed: {
             clusters: {cluster: [{_name: 'ClusterOne', _type: 'target',
-              "table": {
+              table: {
                 _uri : 'table:uri'
               }
             }]}
           }
         };
 
-
         var feed = serializer.preDeserialize(feedModel, 'feed');
         var catalogStorage = feed.clusters[0].storage.catalog;
-
-        expect(catalogStorage.active).toBe(true);
         expect(catalogStorage.catalogTable.uri).toBe('table:uri');
       });
 
-      it('Should set catalog storage as inactive when not present in the xml', function() {
-        var feedModel = {
-          feed: {
-            clusters: {cluster: [{_name: 'ClusterOne', _type: 'target'}]}
-          }
-        };
-
-
-        var feed = serializer.preDeserialize(feedModel, 'feed');
-        var catalogStorage = feed.clusters[0].storage.catalog;
-
-        expect(catalogStorage.active).toBe(false);
-        expect(catalogStorage.catalogTable.uri).toBe(null);
-      });
-
       it('Should copy timezone', function() {
         var feedModel = {
           feed: {
@@ -705,7 +637,7 @@
           properties: [
             {key: 'queueName', value: null},
             {key: 'jobPriority', value: 'HIGH'},
-            {key: 'timeout', value: {quantity: null, unit: 'weeks'}}
+            {key: 'timeout', value: {quantity: 2, unit: 'months'}}
           ]
         };
 
@@ -715,6 +647,7 @@
             "<feed xmlns='uri:falcon:feed:0.1' name='FeedName'>" +
             "<properties>" +
             "<property name='jobPriority' value='HIGH'></property>" +
+            "<property name='timeout' value='months(2)'></property>" +
             "</properties>" +
             "</feed>"
         );
@@ -723,13 +656,13 @@
 
       it('Should transform locations properly if file system storage is active', function () {
         var feed = {name: 'FeedName',
+          dataTransferType: 'hdfs',
           storage: {
             fileSystem: {
               active: true,
               locations: [
                 {type: 'data', path: '/none1'},
-                {type: 'stats', path: '/none2'},
-                {type: 'meta', path: '/none3'}
+                {type: 'stats', path: '/none2'}
               ]
             }
           }
@@ -742,7 +675,6 @@
             "<locations>" +
             "<location type='data' path='/none1'></location>" +
             "<location type='stats' path='/none2'></location>" +
-            "<location type='meta' path='/none3'></location>" +
             "</locations>" +
             "</feed>"
         );
@@ -756,8 +688,7 @@
               active: false,
               locations: [
                 {type: 'data', path: '/none1'},
-                {type: 'stats', path: '/none2'},
-                {type: 'meta', path: '/none3'}
+                {type: 'stats', path: '/none2'}
               ]
             }
           }
@@ -773,6 +704,7 @@
 
       it('Should transform catalog properly if catalog storage is active', function () {
         var feed = {name: 'FeedName',
+          dataTransferType: 'hive',
           storage: {
             catalog: {
               active: true,
@@ -828,8 +760,7 @@
                   active: true,
                   locations: [
                     {type: 'data', path: '/none1'},
-                    {type: 'stats', path: '/none2'},
-                    {type: 'meta', path: '/none3'}
+                    {type: 'stats', path: '/none2'}
                   ]
                 },
                 catalog: {
@@ -848,8 +779,7 @@
                   active: true,
                   locations: [
                     {type: 'data', path: '/none4'},
-                    {type: 'stats', path: '/none5'},
-                    {type: 'meta', path: '/none6'}
+                    {type: 'stats', path: '/none5'}
                   ]
                 },
                 catalog: {
@@ -872,7 +802,6 @@
             "<locations>" +
             "<location type='data' path='/none1'></location>" +
             "<location type='stats' path='/none2'></location>" +
-            "<location type='meta' path='/none3'></location>" +
             "</locations>" +
             "<table uri='/primaryuri'/>" +
             "</cluster>" +
@@ -882,7 +811,6 @@
             "<locations>" +
             "<location type='data' path='/none4'></location>" +
             "<location type='stats' path='/none5'></location>" +
-            "<location type='meta' path='/none6'></location>" +
             "</locations>" +
             "<table uri='/secondaryuri'/>" +
             "</cluster>" +
@@ -1282,4 +1210,4 @@
     }
 
   });
-})();
\ No newline at end of file
+})();

http://git-wip-us.apache.org/repos/asf/falcon/blob/76dc2e18/falcon-ui/app/test/services/ValdationServiceSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/services/ValdationServiceSpec.js b/falcon-ui/app/test/services/ValdationServiceSpec.js
index bd43927..18f9f01 100644
--- a/falcon-ui/app/test/services/ValdationServiceSpec.js
+++ b/falcon-ui/app/test/services/ValdationServiceSpec.js
@@ -40,7 +40,7 @@
     describe('patterns', function () {
       it('Should return an object with the validation patterns', function () {
         expect(validationService.patterns).toBeDefined();
-        expect(validationService.patterns.name).toEqual(/^[a-zA-Z0-9-_]{1,60}$/);
+        expect(validationService.patterns.name).toEqual(/^[a-zA-Z][\-a-zA-Z0-9]{1,39}$/);
 
       });
     });

http://git-wip-us.apache.org/repos/asf/falcon/blob/76dc2e18/falcon-ui/express-data/mockData.js
----------------------------------------------------------------------
diff --git a/falcon-ui/express-data/mockData.js b/falcon-ui/express-data/mockData.js
index 1c52358..9457df8 100644
--- a/falcon-ui/express-data/mockData.js
+++ b/falcon-ui/express-data/mockData.js
@@ -118,6 +118,10 @@
       {"type":"process","name":"hive-databases-mirror-test","status":"SUBMITTED","tags":{"tag":["_falcon_mirroring_type=HIVE","runsOn=target"]}},
       {"type":"process","name":"hive-db-tables-mirror-test","status":"SUBMITTED","tags":{"tag":["_falcon_mirroring_type=HIVE","runsOn=source"]}},
       {"type":"process","name":"mirror4","status":"SUBMITTED","tags":{"tag":["_falcon_mirroring_type=HDFS","runsOn=source"]}}
+    ]},
+	datasource:{"entity":[
+	  {"type":"DATASOURCE","name":"testConn1","status":"SUBMITTED","tags":null},
+	  {"type":"DATASOURCE","name":"testConn2","status":"SUBMITTED","tags":null}
     ]}
   },
     definitions = {
@@ -281,8 +285,49 @@
 
         'hive-db-tables-mirror-test': "<?xml version='1.0' encoding='UTF-8' standalone='yes'?><process xmlns='uri:falcon:process:0.1' name='hive-db-tables-mirror-test'><tags>_falcon_mirroring_type=HIVE,runsOn=source</tags><clusters><cluster name='completeCluster'><validity start='2015-05-01T09:42:00.000Z' end='2016-04-09T09:04:00.000Z'/></cluster></clusters><parallel>1</parallel><order>LAST_ONLY</order><frequency>months(7)</frequency><timezone>GMT+00:00</timezone><properties><property name='oozie.wf.subworkflow.classpath.inheritance' value='true'></property><property name='distcpMaxMaps' value='111'></property><property name='distcpMapBandwidth' value='678'></property><property name='targetCluster' value='primaryCluster'></property><property name='sourceCluster' value='completeCluster'></property><property name='targetHiveServer2Uri' value='some/path/staging'></property><property name='sourceHiveServer2Uri' value='thrift://localhost:10000'></property><property name='sourceStagingPat
 h' value='/apps/falcon/backupCluster/staging'></property><property name='targetStagingPath' value='/apps/falcon/some/staging'></property><property name='targetNN' value='hdfs://sandbox.hortonworks.com:8020'></property><property name='sourceNN' value='hdfs://sandbox.hortonworks.com:8020'></property><property name='sourceServicePrincipal' value='hive'></property><property name='targetServicePrincipal' value='hive'></property><property name='targetMetastoreUri' value=''></property><property name='sourceMetastoreUri' value='thrift://localhost:9083'></property><property name='sourceTable' value='table1,table2,table3'></property><property name='sourceDatabase' value='database1'></property><property name='maxEvents' value='-10'></property><property name='replicationMaxMaps' value='52'></property><property name='clusterForJobRun' value='completeCluster'></property><property name='clusterForJobRunWriteEP' value='hdfs://sandbox.hortonworks.com:8020'></property><property name='drJobName' value
 ='hive-db-tables-mirror-test'></property><property name='drNotifyEmail' value='hive-tables@test.com'></property></properties><workflow name='falcon-dr-hive-workflow' engine='oozie' path='hdfs://node-1.example.com:8020/apps/falcon/recipe/hive-disaster-recovery/resources/runtime/hive-disaster-recovery-workflow.xml' lib=''/><retry policy='PERIODIC' delay='months(60)' attempts='15'/><ACL owner='ambari-qa' group='users' permission='0x755'/></process>"
 
-      }
-
+      },
+	  DATASOURCE: {
+		 testConn1 :
+			"<datasource xmlns='uri:falcon:datasource:0.1' colo='testColo' type='mysql' name='testConn1'>" +
+				"<interfaces>" +
+					"<interface type='readonly' endpoint='jdbc:mysql://localhost:3306/test'>" +
+						"<credential type='password-text'>" +
+							"<userName>user1</userName>" +
+							"<passwordText>password1</passwordText>" +
+						"</credential>" +
+					"</interface>" +
+					"<credential type='password-text'>" +
+						"<userName>user1</userName>" +
+						"<passwordText>password1</passwordText>" +
+					"</credential>" +
+				"</interfaces>" +
+				"<driver>" +
+					"<clazz>com.mysql.jdbc.Driver</clazz>" +
+					"<jar>abc</jar>" +
+				"</driver>" +
+				"<ACL owner='root' group='users' permission='0x755'/>" +
+			"</datasource>",
+		testConn2 :
+			"<datasource xmlns='uri:falcon:datasource:0.1' colo='testColo' type='mysql' name='testConn2'>" +
+				"<interfaces>" +
+					"<interface type='readonly' endpoint='jdbc:mysql://localhost:3306/test'>" +
+						"<credential type='password-text'>" +
+							"<userName>user1</userName>" +
+							"<passwordText>password1</passwordText>" +
+						"</credential>" +
+					"</interface>" +
+					"<credential type='password-text'>" +
+						"<userName>user1</userName>" +
+						"<passwordText>password1</passwordText>" +
+					"</credential>" +
+				"</interfaces>" +
+				"<driver>" +
+					"<clazz>com.mysql.jdbc.Driver</clazz>" +
+					"<jar>abc</jar>" +
+				"</driver>" +
+				"<ACL owner='root' group='users' permission='0x755'/>" +
+			"</datasource>"
+	  }
     },
     instancesList = {
       FEED: [
@@ -582,7 +627,8 @@
     },
     verticesDirection = [
       {"results":[{"_id":"2wm3-aqU-4u","_type":"edge","_outV":40108,"_inV":16,"_label":"owned-by"},{"_id":"2wm1-aqU-5o","_type":"edge","_outV":40108,"_inV":4,"_label":"runs-on"},{"_id":"2wm7-apq-5w","_type":"edge","_outV":40016,"_inV":40108,"_label":"input"},{"_id":"2wm5-aqU-5E","_type":"edge","_outV":40108,"_inV":40012,"_label":"output"},{"_id":"2wlZ-aqU-86","_type":"edge","_outV":40108,"_inV":32,"_label":"instance-of"}],"totalSize":5},
-      {"results":[{"timestamp":"2015-03-26T02:45Z","name":"ambari-qa","type":"user","_id":16,"_type":"vertex"},{"timestamp":"2015-03-26T02:42Z","name":"primaryCluster","type":"cluster-entity","_id":4,"_type":"vertex"},{"timestamp":"2015-03-26T20:21Z","name":"SampleFeed1\/yearno=2014\/monthno=11","type":"feed-instance","_id":40016,"_type":"vertex"},{"timestamp":"2015-03-26T20:21Z","name":"SampleFeed6\/yearno=2014\/monthno=11","type":"feed-instance","_id":40012,"_type":"vertex"},{"timestamp":"2015-03-26T02:46Z","name":"SampleProcess3","type":"process-entity","version":"1.0","_id":32,"_type":"vertex"}],"totalSize":5},
+     //{"results":[{"timestamp":"2015-03-26T02:45Z","name":"ambari-qa","type":"user","_id":16,"_type":"vertex"},{"timestamp":"2015-03-26T02:42Z","name":"primaryCluster","type":"cluster-entity","_id":4,"_type":"vertex"},{"timestamp":"2015-03-26T20:21Z","name":"SampleFeed1\/yearno=2014\/monthno=11","type":"feed-instance","_id":40016,"_type":"vertex"},{"timestamp":"2015-03-26T20:21Z","name":"SampleFeed6\/yearno=2014\/monthno=11","type":"feed-instance","_id":40012,"_type":"vertex"},{"timestamp":"2015-03-26T02:46Z","name":"SampleProcess3","type":"process-entity","version":"1.0","_id":32,"_type":"vertex"}],"totalSize":5},
+      {"results":[{"timestamp":"2015-03-26T02:45Z","name":"ambari-qa","type":"user","_id":16,"_type":"vertex"},{"timestamp":"2015-03-26T02:42Z","name":"primaryCluster","type":"cluster-entity","_id":4,"_type":"vertex"},{"timestamp":"2015-03-26T20:21Z","name":"SampleFeed1\/yearno=2014\/monthno=11","type":"feed-instance","_id":40016,"_type":"vertex"},{"timestamp":"2015-03-26T20:21Z","name":"SampleFeed6-654351354651351684vd5svdv65fv6s5v61vs616sd51vsxd61v6\/yearno=2014\/monthno=11","type":"feed-instance","_id":40012,"_type":"vertex"},{"timestamp":"2015-03-26T02:46Z","name":"SampleProcess3","type":"process-entity","version":"1.0","_id":32,"_type":"vertex"}],"totalSize":5},
       {"results":[{"_id":"2w9d-apm-4u","_type":"edge","_outV":40012,"_inV":16,"_label":"owned-by"},{"_id":"2w9b-apm-4S","_type":"edge","_outV":40012,"_inV":4,"_label":"stored-in"},{"_id":"2whH-aqo-5E","_type":"edge","_outV":40076,"_inV":40012,"_label":"output"},{"_id":"2wif-aqs-5E","_type":"edge","_outV":40080,"_inV":40012,"_label":"output"},{"_id":"2w9f-api-5E","_type":"edge","_outV":40008,"_inV":40012,"_label":"output"},{"_id":"2wiN-aqw-5E","_type":"edge","_outV":40084,"_inV":40012,"_label":"output"},{"_id":"2wa1-apu-5E","_type":"edge","_outV":40020,"_inV":40012,"_label":"output"},{"_id":"2wjl-aqA-5E","_type":"edge","_outV":40088,"_inV":40012,"_label":"output"},{"_id":"2waz-apy-5E","_type":"edge","_outV":40024,"_inV":40012,"_label":"output"},{"_id":"2wjT-aqE-5E","_type":"edge","_outV":40092,"_inV":40012,"_label":"output"},{"_id":"2wb7-apC-5E","_type":"edge","_outV":40028,"_inV":40012,"_label":"output"},{"_id":"2wkr-aqI-5E","_type":"edge","_outV":40096,"_inV":40012,"_label":"output
 "},{"_id":"2wbF-apG-5E","_type":"edge","_outV":40032,"_inV":40012,"_label":"output"},{"_id":"2wkZ-aqM-5E","_type":"edge","_outV":40100,"_inV":40012,"_label":"output"},{"_id":"2wcd-apK-5E","_type":"edge","_outV":40036,"_inV":40012,"_label":"output"},{"_id":"2wlx-aqQ-5E","_type":"edge","_outV":40104,"_inV":40012,"_label":"output"},{"_id":"2wcL-apO-5E","_type":"edge","_outV":40040,"_inV":40012,"_label":"output"},{"_id":"2wm5-aqU-5E","_type":"edge","_outV":40108,"_inV":40012,"_label":"output"},{"_id":"2wdj-apS-5E","_type":"edge","_outV":40044,"_inV":40012,"_label":"output"},{"_id":"2wdR-apW-5E","_type":"edge","_outV":40048,"_inV":40012,"_label":"output"},{"_id":"2wep-aq0-5E","_type":"edge","_outV":40052,"_inV":40012,"_label":"output"},{"_id":"2weX-aq4-5E","_type":"edge","_outV":40056,"_inV":40012,"_label":"output"},{"_id":"2wfv-aq8-5E","_type":"edge","_outV":40060,"_inV":40012,"_label":"output"},{"_id":"2wg3-aqc-5E","_type":"edge","_outV":40064,"_inV":40012,"_label":"output"},{"_id":"2w
 gB-aqg-5E","_type":"edge","_outV":40068,"_inV":40012,"_label":"output"},{"_id":"2wh9-aqk-5E","_type":"edge","_outV":40072,"_inV":40012,"_label":"output"},{"_id":"2w99-apm-86","_type":"edge","_outV":40012,"_inV":28,"_label":"instance-of"}],"totalSize":27},
       {"results":[{"_id":"2w9t-apq-4u","_type":"edge","_outV":40016,"_inV":16,"_label":"owned-by"},{"_id":"2w9r-apq-4S","_type":"edge","_outV":40016,"_inV":4,"_label":"stored-in"},{"_id":"2wih-apq-5w","_type":"edge","_outV":40016,"_inV":40080,"_label":"input"},{"_id":"2wiP-apq-5w","_type":"edge","_outV":40016,"_inV":40084,"_label":"input"},{"_id":"2wa3-apq-5w","_type":"edge","_outV":40016,"_inV":40020,"_label":"input"},{"_id":"2wjn-apq-5w","_type":"edge","_outV":40016,"_inV":40088,"_label":"input"},{"_id":"2waB-apq-5w","_type":"edge","_outV":40016,"_inV":40024,"_label":"input"},{"_id":"2w9v-apq-5w","_type":"edge","_outV":40016,"_inV":40008,"_label":"input"},{"_id":"2wjV-apq-5w","_type":"edge","_outV":40016,"_inV":40092,"_label":"input"},{"_id":"2wb9-apq-5w","_type":"edge","_outV":40016,"_inV":40028,"_label":"input"},{"_id":"2wkt-apq-5w","_type":"edge","_outV":40016,"_inV":40096,"_label":"input"},{"_id":"2wbH-apq-5w","_type":"edge","_outV":40016,"_inV":40032,"_label":"input"},{"_id":
 "2wl1-apq-5w","_type":"edge","_outV":40016,"_inV":40100,"_label":"input"},{"_id":"2wcf-apq-5w","_type":"edge","_outV":40016,"_inV":40036,"_label":"input"},{"_id":"2wlz-apq-5w","_type":"edge","_outV":40016,"_inV":40104,"_label":"input"},{"_id":"2wcN-apq-5w","_type":"edge","_outV":40016,"_inV":40040,"_label":"input"},{"_id":"2wm7-apq-5w","_type":"edge","_outV":40016,"_inV":40108,"_label":"input"},{"_id":"2wdl-apq-5w","_type":"edge","_outV":40016,"_inV":40044,"_label":"input"},{"_id":"2wdT-apq-5w","_type":"edge","_outV":40016,"_inV":40048,"_label":"input"},{"_id":"2wer-apq-5w","_type":"edge","_outV":40016,"_inV":40052,"_label":"input"},{"_id":"2weZ-apq-5w","_type":"edge","_outV":40016,"_inV":40056,"_label":"input"},{"_id":"2wfx-apq-5w","_type":"edge","_outV":40016,"_inV":40060,"_label":"input"},{"_id":"2wg5-apq-5w","_type":"edge","_outV":40016,"_inV":40064,"_label":"input"},{"_id":"2wgD-apq-5w","_type":"edge","_outV":40016,"_inV":40068,"_label":"input"},{"_id":"2whb-apq-5w","_type":"ed
 ge","_outV":40016,"_inV":40072,"_label":"input"},{"_id":"2whJ-apq-5w","_type":"edge","_outV":40016,"_inV":40076,"_label":"input"},{"_id":"2w9p-apq-86","_type":"edge","_outV":40016,"_inV":12,"_label":"instance-of"}],"totalSize":27}
     ],

http://git-wip-us.apache.org/repos/asf/falcon/blob/76dc2e18/falcon-ui/karma.conf.js
----------------------------------------------------------------------
diff --git a/falcon-ui/karma.conf.js b/falcon-ui/karma.conf.js
index 776249f..11189e8 100644
--- a/falcon-ui/karma.conf.js
+++ b/falcon-ui/karma.conf.js
@@ -1,21 +1,3 @@
-/**
- * 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.
- */
-
 // Karma configuration
 // Generated on Wed Sep 24 2014 21:15:41 GMT-0500 (CDT)
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/76dc2e18/falcon-ui/pom.xml
----------------------------------------------------------------------
diff --git a/falcon-ui/pom.xml b/falcon-ui/pom.xml
index bbb917c..f15af2b 100644
--- a/falcon-ui/pom.xml
+++ b/falcon-ui/pom.xml
@@ -15,8 +15,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.falcon</groupId>
@@ -33,7 +32,7 @@
       <plugin>
         <groupId>com.github.eirslett</groupId>
         <artifactId>frontend-maven-plugin</artifactId>
-        <version>0.0.23</version>
+        <version>0.0.14</version>
         <executions>
 
           <execution>
@@ -76,6 +75,27 @@
               <arguments>test</arguments>
             </configuration>
           </execution>
+
+	  <execution>
+            <id>grunt copy webapp</id>
+            <goals>
+              <goal>grunt</goal>
+            </goals>
+            <configuration>
+              <arguments>copy:webapp</arguments>
+            </configuration>
+          </execution>
+
+	  <execution>
+            <id>grunt copy ambariview</id>
+            <goals>
+              <goal>grunt</goal>
+            </goals>
+            <configuration>
+              <arguments>copy:ambariview</arguments>
+            </configuration>
+          </execution>
+
         </executions>
       </plugin>
 
@@ -84,7 +104,9 @@
         <artifactId>apache-rat-plugin</artifactId>
         <configuration>
           <excludes>
+            <exclude>.git*</exclude>
             <exclude>app/js/lib/**</exclude>
+            <exclude>app/css/*.css</exclude>
             <exclude>app/css/bootstrap/**</exclude>
             <exclude>app/test/lib/**</exclude>
             <exclude>app/css/fonts/**</exclude>
@@ -98,7 +120,6 @@
             <exclude>bower.json</exclude>
             <exclude>karma.conf.js</exclude>
             <exclude>bower.json</exclude>
-            <exclude>app/css/main.css</exclude>
 	    <exclude>app/css/img/**</exclude>
             <exclude>app/test/e2e/protractor.js</exclude>
             <exclude>app/js/directives/ng-tags-input.js</exclude>

http://git-wip-us.apache.org/repos/asf/falcon/blob/76dc2e18/falcon-ui/server.js
----------------------------------------------------------------------
diff --git a/falcon-ui/server.js b/falcon-ui/server.js
index 298e10a..7cd0ab0 100644
--- a/falcon-ui/server.js
+++ b/falcon-ui/server.js
@@ -23,7 +23,7 @@
     mockData = require('./express-data/mockData.js'),
     chartData = require('./express-data/chartData.js'),
     server = express(),
-    PORT = 3000;
+    PORT = process.env.PORT || 3000;
 
   server.use('/', express.static(__dirname + '/dist'));
   server.use(bodyParser());
@@ -152,6 +152,27 @@
     }
   });
 
+  server.get('/api/entities/status/:type/:name', function(req, res) {
+	var responseMessage = {
+          "status": "SUCCEEDED",
+          "message": "default/SUBMITTED\n",
+          "requestId": "default/2009721512@qtp-1933075111-15 - 96165552-6fec-46c5-9646-8b28887d09b0\n"
+        };
+	 res.json(200, responseMessage);
+  });
+
+  server.post('/api/entities/validate/:type', function (req, res) {
+    var type = req.params.type.toLowerCase(),
+	  text = req.text,
+      name = req.params.name,
+      responseMessage = {
+        "status": "SUCCEEDED",
+        "message": "default/Validated successfully (" + type + ") " + "\n",
+        "requestId": "default/546cbe05-2cb3-4e5c-8e7a-b1559d866c99\n"
+      };
+    res.json(200, responseMessage);
+  });
+
   server.post('/api/entities/submit/:type', function (req, res) {
     var type = req.params.type.toUpperCase(),
       text = req.text,
@@ -239,6 +260,8 @@
         "requestId": "falcon/default/13015853-8e40-4923-9d32-6d01053c31c6\n\n"
       },
       indexInArray = mockData.findByNameInList(type, name);
+
+	delete mockData.definitions[type.toUpperCase()][name];
     mockData.entitiesList[type].entity.splice(indexInArray, 1);
     res.json(200, responseMessage);
   });
@@ -474,7 +497,7 @@
         res.send(200, response);
       } else {
         res.send(404, response);
-      }
+      }cls
 
     } else {
       console.log('error');
@@ -508,6 +531,7 @@
   server.get('/api/admin/version', function(req, res) {
     setTimeout(function(){
       res.send(200, mockData.server);
+      //res.send(401);
     }, 3000);
   });
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/76dc2e18/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 8e836da..e468476 100644
--- a/pom.xml
+++ b/pom.xml
@@ -369,6 +369,7 @@
 
     <modules>
         <module>falcon-ui</module>
+        <module>falcon-ambari-view</module>
         <module>build-tools</module>
         <module>client</module>
         <module>cli</module>


Mime
View raw message