Updated yeoman  generator to support external ng-xos-lib
Updateding Custom Views:
- ceilometerDashboard
- contentProvider
- dashboardManager
- developer
- diagnostic
- hpc
- mCordTopology
- openVPN
- serviceGrid
- subscribers
- syncNotifier
- tenant
- truckroll

Change-Id: I8bdebf70d3b72ceca8ec04565213efa60bc0b8d3
diff --git a/views/ngXosViews/ceilometerDashboard/bower.json b/views/ngXosViews/ceilometerDashboard/bower.json
index a3caa9f..41c67d3 100644
--- a/views/ngXosViews/ceilometerDashboard/bower.json
+++ b/views/ngXosViews/ceilometerDashboard/bower.json
@@ -15,7 +15,6 @@
     "tests"
   ],
   "dependencies": {
-    "angular-animate": "1.4.7",n
     "ui.bootstrap": "0.14.3"
   },
   "devDependencies": {
@@ -24,11 +23,14 @@
     "angular": "1.4.7",
     "angular-ui-router": "0.2.15",
     "angular-cookies": "1.4.7",
+    "angular-animate": "1.4.7",
     "angular-resource": "1.4.7",
     "lodash": "~4.11.1",
     "bootstrap-css": "3.3.6",
     "angular-chart.js": "~0.10.2",
-    "d3": "~3.5.17"
+    "d3": "~3.5.17",
+    "angular-recursion": "~1.0.5",
+    "ng-xos-lib": "opencord/ng-xos-lib#~1.0.0"
   },
   "overrides": {
     "ui.bootstrap": {
diff --git a/views/ngXosViews/ceilometerDashboard/gulp/build.js b/views/ngXosViews/ceilometerDashboard/gulp/build.js
index cfb07e2..4608dff 100644
--- a/views/ngXosViews/ceilometerDashboard/gulp/build.js
+++ b/views/ngXosViews/ceilometerDashboard/gulp/build.js
@@ -41,7 +41,9 @@
     return del(
       [
         options.dashboards + 'xosCeilometerDashboard.html',
-        options.static + 'css/xosCeilometerDashboard.css'
+        options.static + 'css/xosCeilometerDashboard.css',
+        options.static + 'images/ceilometerDashboard-icon.png',
+        options.static + 'images/ceilometerDashboard-icon-active.png'
       ],
       {force: true}
     );
@@ -70,6 +72,12 @@
     .pipe(gulp.dest(options.static + 'css/'))
   });
 
+  // copy images in correct folder
+  gulp.task('copyImages', ['wait'], function(){
+    return gulp.src([`${options.icon}/ceilometerDashboard-icon.png`,`${options.icon}/ceilometerDashboard-icon-active.png`])
+    .pipe(gulp.dest(options.static + 'images/'))
+  });
+
   // compile and minify scripts
   gulp.task('scripts', function() {
     return gulp.src([
@@ -104,7 +112,7 @@
       .pipe(
         inject(
           gulp.src([
-            options.static + 'js/vendor/xosCeilometerDashboardVendor.js',
+            options.static + 'vendor/xosCeilometerDashboardVendor.js',
             options.static + 'js/xosCeilometerDashboard.js',
             options.static + 'css/xosCeilometerDashboard.css'
           ]),
@@ -129,8 +137,8 @@
 
     return gulp.src(bowerDeps)
       .pipe(concat('xosCeilometerDashboardVendor.js'))
-      //.pipe(uglify())
-      .pipe(gulp.dest(options.static + 'js/vendor/'));
+      .pipe(uglify())
+      .pipe(gulp.dest(options.static + 'vendor/'));
   });
 
   gulp.task('lint', function () {
@@ -157,6 +165,7 @@
       'wiredep',
       'css',
       'copyCss',
+      'copyImages',
       'copyHtml',
       'cleanTmp'
     );
diff --git a/views/ngXosViews/ceilometerDashboard/gulp/server.js b/views/ngXosViews/ceilometerDashboard/gulp/server.js
index 19caf89..607c85d 100644
--- a/views/ngXosViews/ceilometerDashboard/gulp/server.js
+++ b/views/ngXosViews/ceilometerDashboard/gulp/server.js
@@ -30,6 +30,7 @@
   target: conf.host
 });
 
+
 proxy.on('error', function(error, req, res) {
   res.writeHead(500, {
     'Content-Type': 'text/plain'
@@ -51,7 +52,6 @@
       server: {
         baseDir: options.src,
         routes: {
-          '/xos/core/xoslib/static/js/vendor': options.helpers,
           '/xos/core/static': options.static + '../../static/'
         },
         middleware: function(req, res, next){
@@ -115,7 +115,7 @@
         inject(
           gulp.src([
             options.tmp + '**/*.js',
-            options.helpers + 'ngXosHelpers.js'
+            options.helpers + 'ngXosHelpers.min.js'
           ])
           .pipe(angularFilesort()),
           {
diff --git a/views/ngXosViews/ceilometerDashboard/gulpfile.js b/views/ngXosViews/ceilometerDashboard/gulpfile.js
index 08df554..c825df8 100644
--- a/views/ngXosViews/ceilometerDashboard/gulpfile.js
+++ b/views/ngXosViews/ceilometerDashboard/gulpfile.js
@@ -6,12 +6,13 @@
 var options = {
   src: 'src/',
   css: 'src/css/',
+  icon: 'src/icons',
   sass: 'src/sass/',
   scripts: 'src/js/',
   tmp: 'src/.tmp',
   dist: 'dist/',
   api: '../../ngXosLib/api/',
-  helpers: '../../../xos/core/xoslib/static/js/vendor/',
+  helpers: './src/vendor/ng-xos-lib/dist/',
   static: '../../../xos/core/xoslib/static/', // this is the django static folder
   dashboards: '../../../xos/core/xoslib/dashboards/' // this is the django html folder
 };
diff --git a/views/ngXosViews/ceilometerDashboard/karma.conf.js b/views/ngXosViews/ceilometerDashboard/karma.conf.js
index 9d9e77e..242d8b0 100644
--- a/views/ngXosViews/ceilometerDashboard/karma.conf.js
+++ b/views/ngXosViews/ceilometerDashboard/karma.conf.js
@@ -11,6 +11,7 @@
   return path.relative(process.cwd(), file);
 });
 
+
 module.exports = function(config) {
 /*eslint-enable*/
   config.set({
@@ -25,10 +26,9 @@
 
 
     // list of files / patterns to load in the browser
-    files: [
-      '../../../xos/core/xoslib/static/js/vendor/ngXosVendor.js',
-      '../../../xos/core/xoslib/static/js/vendor/ngXosHelpers.js',
-    ].concat(bowerComponents).concat([
+    files: ['./src/vendor/ng-xos-lib/dist/ngXosVendor.min.js']
+    .concat(bowerComponents).concat([
+      './src/vendor/ng-xos-lib/dist/ngXosHelpers.min.js',
       'src/js/main.js',
       'src/js/**/*.js',
       'spec/**/*.mock.js',
diff --git a/views/ngXosViews/ceilometerDashboard/src/icons/README.md b/views/ngXosViews/ceilometerDashboard/src/icons/README.md
new file mode 100644
index 0000000..0d5a787
--- /dev/null
+++ b/views/ngXosViews/ceilometerDashboard/src/icons/README.md
@@ -0,0 +1,18 @@
+# Set icon for custom dashboard 
+
+## Path to add images : <dashboard-name>/src/icons
+
+### Add two images with name in following format 
+    <dashboard-name>-icon.png
+    <dashboard-name>-icon-active.png
+
+Examples: 
+    If your dashboard name is `slice`
+    then you will add the images with the name as
+        `slice-icon.png`
+        `slice-icon-active.png`
+        
+        
+        
+        
+Note: If you don't add the custom images, then dashboard will use the default images stored at `/xos/core/xoslib/static/images`
\ No newline at end of file