Commit d9498da1 by Vishal Kadam

HDPDGI-45: Merged HDPDGI-45 to master and fixed conflicts

parent beb788a8
...@@ -13,8 +13,8 @@ module.exports = function(grunt) { ...@@ -13,8 +13,8 @@ module.exports = function(grunt) {
livereload: 35729 livereload: 35729
}, },
js: { js: {
files: ['public/**/*.js', '!public/lib/**', '!public/dist/**'], files: ['public/**/*.js', '!public/lib/**', '!public/dist/**', '!public/js/app.min.js'],
tasks: ['shell','copy:mainjs'] tasks: ['shell', 'copy:mainjs']
}, },
html: { html: {
files: ['public/**/*.html'], files: ['public/**/*.html'],
...@@ -31,14 +31,14 @@ module.exports = function(grunt) { ...@@ -31,14 +31,14 @@ module.exports = function(grunt) {
}, },
jshint: { jshint: {
all: { all: {
src: ['gruntfile.js', 'package.json', 'server.js', 'server/**/*.js', 'public/**/*.js', '!public/lib/**', '!public/dist/**'], src: ['gruntfile.js', 'package.json', 'server.js', 'server/**/*.js', 'public/**/*.js', '!public/lib/**', '!public/dist/**', '!public/**/app.min.js'],
options: { options: {
jshintrc: true jshintrc: true
} }
} }
}, },
concurrent: { concurrent: {
tasks: ['watch','proxitserver'], tasks: ['watch', 'proxitserver'],
options: { options: {
logConcurrentOutput: true logConcurrentOutput: true
} }
...@@ -109,35 +109,34 @@ module.exports = function(grunt) { ...@@ -109,35 +109,34 @@ module.exports = function(grunt) {
} }
}, },
copy: { copy: {
dist: { dist: {
expand: true, expand: true,
cwd: 'public/', cwd: 'public/',
src: '**', src: '**',
dest: 'dist', dest: 'dist',
}, },
mainjs:{ mainjs: {
expand: true, expand: true,
cwd: 'public/', cwd: 'public/',
src: 'js/app.min.js', src: 'js/app.min.js',
dest: 'dist/js/', dest: 'dist/js/',
flatten: true, flatten: true,
filter :'isFile' filter: 'isFile'
} }
}, },
clean: ['dist'], clean: ['public/lib', 'dist'],
proxit: { proxit: {
dev: { dev: {
options: { options: {
'port': 3010, 'port': 3010,
'verbose': true, 'verbose': true,
'hosts': [{ 'hosts': [{
'hostnames': ['*'], 'hostnames': ['*'],
'routes': { 'routes': {
'/': 'dist', '/': 'dist',
'/api':'http://162.249.6.39:21000/api' '/api': 'http://162.249.6.39:21000/api'
} }
} }]
]
} }
} }
} }
...@@ -146,8 +145,8 @@ module.exports = function(grunt) { ...@@ -146,8 +145,8 @@ module.exports = function(grunt) {
require('load-grunt-tasks')(grunt); require('load-grunt-tasks')(grunt);
grunt.registerTask('default', ['devUpdate', 'bower', 'jshint', 'jsbeautifier:default']); grunt.registerTask('default', ['devUpdate', 'bower', 'jshint', 'jsbeautifier:default']);
grunt.registerTask('server', ['jshint','build','concurrent']); grunt.registerTask('server', ['jshint', 'build', 'concurrent']);
grunt.registerTask('build', ['clean','bower','copy:dist','minify','copy:mainjs']); grunt.registerTask('build', ['clean', 'bower', 'copy:dist', 'minify', 'copy:mainjs']);
grunt.registerTask('minify', 'Minify the all js', function() { grunt.registerTask('minify', 'Minify the all js', function() {
var done = this.async(); var done = this.async();
...@@ -156,7 +155,7 @@ module.exports = function(grunt) { ...@@ -156,7 +155,7 @@ module.exports = function(grunt) {
}); });
grunt.loadNpmTasks('proxit'); grunt.loadNpmTasks('proxit');
grunt.registerTask('proxitserver', 'Proxit', function() { grunt.registerTask('proxitserver', 'Proxit', function() {
var done = this.async(); var done = this.async();
grunt.task.run(['proxit:dev']); grunt.task.run(['proxit:dev']);
done(); done();
}); });
......
{ {
"name": "dgc-metadata", "name": "dgc-metadata",
"description": "DGC Metadata", "description": "DGC Metadata",
"version": "1.0.0-SNAPSHOT", "version": "1.0.0-SNAPSHOT",
"private": true, "private": true,
"bin": "server.js", "bin": "server.js",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/hortonworks/metadata" "url": "https://github.com/hortonworks/metadata"
}, },
"engines": { "engines": {
"node": "0.10.x", "node": "0.10.x",
"npm": "1.3.x" "npm": "1.3.x"
}, },
"keywords": [ "keywords": [
"DGC", "DGC",
"HortonWorks" "HortonWorks"
], ],
"scripts": { "scripts": {
"postinstall": "node node_modules/bower/bin/bower install" "postinstall": "node node_modules/bower/bin/bower install"
}, },
"dependencies": { "dependencies": {
"body-parser": "^1.2.0", "body-parser": "^1.2.0",
"bower": "~1.3.1", "bower": "~1.3.1",
"compression": "^1.0.2", "compression": "^1.0.2",
"consolidate": "~0.10.0", "consolidate": "~0.10.0",
"cookie-parser": "^1.0.1", "cookie-parser": "^1.0.1",
"cookies": "~0.4.0", "cookies": "~0.4.0",
"express": "~4.2.0", "express": "~4.2.0",
"express-load": "^1.1.14", "express-load": "^1.1.14",
"forever": "~0.11.1", "forever": "~0.11.1",
"lodash": "~2.4.1", "lodash": "~2.4.1",
"method-override": "^1.0.0", "method-override": "^1.0.0",
"morgan": "^1.0.1", "morgan": "^1.0.1",
"path-extra": "~0.1.1", "path-extra": "~0.1.1",
"proxit": "^0.6.0", "proxit": "^0.6.0",
"q": "~1.0.1", "q": "~1.0.1",
"rc": "~0.3.4", "rc": "~0.3.4",
"serve-favicon": "^2.0.0", "serve-favicon": "^2.0.0",
"static-favicon": "^2.0.0-alpha", "static-favicon": "^2.0.0-alpha",
"superagent": "^0.20.0", "superagent": "^0.20.0",
"swig": "~1.3.2", "swig": "~1.3.2",
"view-helpers": "~0.1.4", "view-helpers": "~0.1.4",
"grunt-contrib-clean": "~0.6.0" "grunt-contrib-clean": "~0.6.0"
}, },
"devDependencies": { "devDependencies": {
"git-rev": "^0.2.1", "git-rev": "^0.2.1",
"grunt": "~0.4.2", "grunt": "~0.4.2",
"grunt-bower-task": "~0.4.0", "grunt-bower-task": "~0.4.0",
"grunt-cli": "~0.1.11", "grunt-cli": "~0.1.11",
"grunt-concurrent": "^1.0.0", "grunt-concurrent": "^1.0.0",
"grunt-contrib-compress": "^0.13.0", "grunt-contrib-compress": "^0.13.0",
"grunt-contrib-jshint": "^0.11.0", "grunt-contrib-jshint": "^0.11.0",
"grunt-contrib-watch": "^0.6.0", "grunt-contrib-watch": "^0.6.0",
"grunt-dev-update": "^1.0.2", "grunt-dev-update": "^1.0.2",
"grunt-jsbeautifier": "^0.2.6", "grunt-jsbeautifier": "^0.2.6",
"grunt-nodemon": "^0.4.0", "grunt-nodemon": "^0.4.0",
"grunt-shell": "^1.1.1", "grunt-shell": "^1.1.1",
"load-grunt-tasks": "^3.1.0", "load-grunt-tasks": "^3.1.0",
"grunt-nginx": "~0.2.2", "grunt-nginx": "~0.2.2",
"grunt-contrib-copy": "~0.8.0", "grunt-contrib-copy": "~0.8.0",
"grunt-contrib-clean": "~0.6.0", "grunt-contrib-clean": "~0.6.0",
"proxit": "~0.6.4" "proxit": "~0.6.4"
} }
} }
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</header> </header>
<div class="content"> <div class="content">
<div data-ng-include="'/modules/notification/views/notifications.html'"></div> <div data-ng-include="'/modules/notification/views/notifications.html'"></div>
<div data-ui-view></div> <div data-ui-view class="container"></div>
</div> </div>
<footer class="footer navbar-bottom"> <footer class="footer navbar-bottom">
<div class="container"> <div class="container">
...@@ -65,7 +65,6 @@ ...@@ -65,7 +65,6 @@
<script src="lib/angular-ui-utils/ui-utils.js"></script> <script src="lib/angular-ui-utils/ui-utils.js"></script>
<script src="lib/lodash/lodash.js"></script> <script src="lib/lodash/lodash.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<script src="http://cpettitt.github.io/project/dagre-d3/latest/dagre-d3.js"></script>
<script src="js/app.min.js"></script> <script src="js/app.min.js"></script>
</body> </body>
......
...@@ -57,8 +57,10 @@ angular.module('dgc').factory('lodash', ['$window', ...@@ -57,8 +57,10 @@ angular.module('dgc').factory('lodash', ['$window',
NotificationService.error(err); NotificationService.error(err);
}); });
} else { } else {
errors.timeout = false; if (errors) {
NotificationService.error(errors); errors.timeout = false;
NotificationService.error(errors);
}
} }
$rootScope.$on('$stateChangeStart', function() { $rootScope.$on('$stateChangeStart', function() {
d3.selectAll('.d3-tip').remove(); d3.selectAll('.d3-tip').remove();
......
...@@ -67,7 +67,7 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio ...@@ -67,7 +67,7 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
$scope.$watch('currentPage + itemsPerPage', function() { $scope.$watch('currentPage + itemsPerPage', function() {
var begin = (($scope.currentPage - 1) * $scope.itemsPerPage), var begin = (($scope.currentPage - 1) * $scope.itemsPerPage),
end = begin + $scope.itemsPerPage; end = begin + $scope.itemsPerPage;
if ($scope.transformedResults)$scope.filteredResults = $scope.transformedResults.slice(begin, end); if ($scope.transformedResults) $scope.filteredResults = $scope.transformedResults.slice(begin, end);
$scope.pageCount = function() { $scope.pageCount = function() {
return Math.ceil($scope.resultCount / $scope.itemsPerPage); return Math.ceil($scope.resultCount / $scope.itemsPerPage);
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment