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/subscribers/bower.json b/views/ngXosViews/subscribers/bower.json
index 2fb2dab..542ffeb 100644
--- a/views/ngXosViews/subscribers/bower.json
+++ b/views/ngXosViews/subscribers/bower.json
@@ -5,7 +5,7 @@
     "Matteo Scandolo <matteo.scandolo@gmail.com>"
   ],
   "description": "The subscribers view",
-  "license": "MIT",
+  "license": "Apache-2.0",
   "ignore": [
     "**/.*",
     "node_modules",
@@ -14,7 +14,8 @@
     "test",
     "tests"
   ],
-  "dependencies": {},
+  "dependencies": {
+  },
   "devDependencies": {
     "jquery": "2.1.4",
     "angular-mocks": "1.4.7",
@@ -27,6 +28,7 @@
     "bootstrap-css": "3.3.6",
     "angular-chart.js": "~0.10.2",
     "d3": "~3.5.17",
-    "angular-recursion": "~1.0.5"
+    "angular-recursion": "~1.0.5",
+    "ng-xos-lib": "opencord/ng-xos-lib#~1.0.0"
   }
 }
diff --git a/views/ngXosViews/subscribers/gulp/build.js b/views/ngXosViews/subscribers/gulp/build.js
index 7f446ed..a23d5be 100644
--- a/views/ngXosViews/subscribers/gulp/build.js
+++ b/views/ngXosViews/subscribers/gulp/build.js
@@ -41,7 +41,9 @@
     return del(
       [
         options.dashboards + 'xosSubscribers.html',
-        options.static + 'css/xosSubscribers.css'
+        options.static + 'css/xosSubscribers.css',
+        options.static + 'images/subscribers-icon.png',
+        options.static + 'images/subscribers-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}/subscribers-icon.png`,`${options.icon}/subscribers-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/xosSubscribersVendor.js',
+            options.static + 'vendor/xosSubscribersVendor.js',
             options.static + 'js/xosSubscribers.js',
             options.static + 'css/xosSubscribers.css'
           ]),
@@ -130,7 +138,7 @@
     return gulp.src(bowerDeps)
       .pipe(concat('xosSubscribersVendor.js'))
       .pipe(uglify())
-      .pipe(gulp.dest(options.static + 'js/vendor/'));
+      .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/subscribers/gulp/server.js b/views/ngXosViews/subscribers/gulp/server.js
index 1e40a34..36fdded 100644
--- a/views/ngXosViews/subscribers/gulp/server.js
+++ b/views/ngXosViews/subscribers/gulp/server.js
@@ -52,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 +114,7 @@
         inject(
           gulp.src([
             options.tmp + '**/*.js',
-            options.helpers + 'ngXosHelpers.js'
+            options.helpers + 'ngXosHelpers.min.js'
           ])
           .pipe(angularFilesort()),
           {
diff --git a/views/ngXosViews/subscribers/gulpfile.js b/views/ngXosViews/subscribers/gulpfile.js
index 08df554..c825df8 100644
--- a/views/ngXosViews/subscribers/gulpfile.js
+++ b/views/ngXosViews/subscribers/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/subscribers/karma.conf.js b/views/ngXosViews/subscribers/karma.conf.js
index 0e9c4d8..02c1cb1 100644
--- a/views/ngXosViews/subscribers/karma.conf.js
+++ b/views/ngXosViews/subscribers/karma.conf.js
@@ -27,8 +27,9 @@
     // list of files / patterns to load in the browser
     files: bowerComponents.concat([
       'node_modules/babel-polyfill/dist/polyfill.js',
-      '../../../xos/core/xoslib/static/js/vendor/ngXosVendor.js',
-      '../../../xos/core/xoslib/static/js/vendor/ngXosHelpers.js',
+      './src/vendor/ng-xos-lib/dist/ngXosVendor.min.js',
+      './src/vendor/ng-xos-lib/dist/ngXosHelpers.min.js',
+      'src/js/main.js',
       'src/js/**/*.js',
       'spec/**/*.mock.js',
       'spec/**/*.test.js',
@@ -46,6 +47,7 @@
     preprocessors: {
       'src/js/**/*.js': ['babel'],
       'spec/**/*.test.js': ['babel'],
+      'spec/**/*.mock.js': ['babel'],
       'src/**/*.html': ['ng-html2js']
     },
 
@@ -79,10 +81,7 @@
 
     // start these browsers
     // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
-    browsers: [
-      'PhantomJS',
-      'Chrome'
-    ],
+    browsers: ['PhantomJS'],
 
 
     // Continuous Integration mode
diff --git a/views/ngXosViews/subscribers/package.json b/views/ngXosViews/subscribers/package.json
index 96a2326..812ca00 100644
--- a/views/ngXosViews/subscribers/package.json
+++ b/views/ngXosViews/subscribers/package.json
@@ -17,7 +17,7 @@
     "XOSlib"
   ],
   "author": "Matteo Scandolo",
-  "license": "MIT",
+  "license": "Apache-2.0",
   "dependencies": {},
   "devDependencies": {
     "autoprefixer": "^6.3.3",
@@ -49,7 +49,6 @@
     "jasmine-core": "~2.3.4",
     "karma": "^0.13.14",
     "karma-babel-preprocessor": "~5.2.2",
-    "karma-chrome-launcher": "^1.0.1",
     "karma-coverage": "^0.5.3",
     "karma-jasmine": "~0.3.6",
     "karma-mocha-reporter": "~1.1.1",
diff --git a/views/ngXosViews/subscribers/src/css/dev.css b/views/ngXosViews/subscribers/src/css/dev.css
new file mode 100644
index 0000000..76c2d5b
--- /dev/null
+++ b/views/ngXosViews/subscribers/src/css/dev.css
@@ -0,0 +1,5 @@
+#xosSubscribers{
+  position: absolute;
+  top: 100px;
+  left: 200px;
+}
\ No newline at end of file
diff --git a/views/ngXosViews/subscribers/src/icons/README.md b/views/ngXosViews/subscribers/src/icons/README.md
new file mode 100644
index 0000000..0d5a787
--- /dev/null
+++ b/views/ngXosViews/subscribers/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
diff --git a/views/ngXosViews/subscribers/src/index.html b/views/ngXosViews/subscribers/src/index.html
index 71cbddc..a234964 100644
--- a/views/ngXosViews/subscribers/src/index.html
+++ b/views/ngXosViews/subscribers/src/index.html
@@ -5,6 +5,7 @@
 <!-- endbower -->
 <!-- endcss -->
 <!-- inject:css -->
+<link rel="stylesheet" href="/css/dev.css">
 <link rel="stylesheet" href="/css/main.css">
 <link rel="stylesheet" href="/../../../xos/core/static/xosNgLib.css">
 <!-- endinject -->
@@ -30,6 +31,6 @@
 <!-- endbower -->
 <!-- endjs -->
 <!-- inject:js -->
-<script src="/../../../xos/core/xoslib/static/js/vendor/ngXosHelpers.js"></script>
+<script src="/vendor/ng-xos-lib/dist/ngXosHelpers.min.js"></script>
 <script src="/.tmp/main.js"></script>
 <!-- endinject -->
\ No newline at end of file
diff --git a/views/ngXosViews/subscribers/src/templates/users-list.tpl.html b/views/ngXosViews/subscribers/src/templates/users-list.tpl.html
new file mode 100644
index 0000000..1fee0e2
--- /dev/null
+++ b/views/ngXosViews/subscribers/src/templates/users-list.tpl.html
@@ -0,0 +1 @@
+<xos-table config="vm.tableConfig" data="vm.users"></xos-table>
\ No newline at end of file