diff --git a/app/templates/gulpfile.js b/app/templates/gulpfile.js index 8e790bea..0f4fd33b 100644 --- a/app/templates/gulpfile.js +++ b/app/templates/gulpfile.js @@ -24,7 +24,7 @@ var options = { }; gulp.task('jshint', function() { - gulp.src('ui/app/**/*.js') + gulp.src(['ui/app/**/*.js', '!ui/app/bower_components/**/*.js', '!ui/app/scripts/vendor/**/*.js']) .pipe(jshint()) .pipe(jshint.reporter('default')); }); @@ -38,7 +38,7 @@ gulp.task('less', function() { // Concatenate & Minify JS gulp.task('scripts', function() { - return gulp.src('./ui/app/**/*.js') + return gulp.src(['./ui/app/**/*.js', '!ui/app/bower_components/**/*.js', '!ui/app/scripts/vendor/**/*.js']) .pipe(concat('all.js')) .pipe(gulp.dest('dist')) .pipe(rename('all.min.js')) @@ -77,7 +77,7 @@ gulp.task('server', function() { var app = connect() .use(connect.static('ui/app')) .use('/v1', proxy(url.parse('http://' + options.mlHost + ':' + options.mlPort + '/v1'))); - http.createServer(app).listen(options.appPort, 'localhost'); + http.createServer(app).listen(options.appPort); }); // Default Task diff --git a/app/templates/ui/app/common/services/mlrest.js b/app/templates/ui/app/common/services/mlrest.js index ef2e8651..16adc995 100644 --- a/app/templates/ui/app/common/services/mlrest.js +++ b/app/templates/ui/app/common/services/mlrest.js @@ -147,15 +147,19 @@ createSearchContext: function(options) { return new SearchContext(options, $q, $http); }, - getDocument: function(uri) { + getDocument: function(uri, options) { var d = $q.defer(); + if (options === undefined || options === null) { + options = {}; + } + angular.extend(options, { + format: 'json', + uri: uri + }); $http.get( '/v1/documents', { - params: { - format: 'json', - uri: uri - } + params: options }) .success( function(data) { diff --git a/app/templates/ui/app/detail/detail-ctrl.js b/app/templates/ui/app/detail/detail-ctrl.js index 3ab73c78..dd8fe157 100644 --- a/app/templates/ui/app/detail/detail-ctrl.js +++ b/app/templates/ui/app/detail/detail-ctrl.js @@ -9,8 +9,9 @@ detail: {} }; - mlRest.getDocument(uri, { format: 'json' }).then(function(data) { + mlRest.getDocument(uri, { transform: 'detail' }).then(function(data) { model.detail = data; + var z=0; }); angular.extend($scope, { diff --git a/app/templates/ui/app/detail/detail.html b/app/templates/ui/app/detail/detail.html index 29282372..abb2336a 100644 --- a/app/templates/ui/app/detail/detail.html +++ b/app/templates/ui/app/detail/detail.html @@ -1,86 +1,4 @@ -
Comments
-Comment by {{comment.username}}
-on {{comment.dateTime}}
- {{comment.msg}} -