Updated truckroll dashboard to new generator
diff --git a/views/ngXosLib/karma.conf.views.js b/views/ngXosLib/karma.conf.views.js
index a337b77..fc05c83 100644
--- a/views/ngXosLib/karma.conf.views.js
+++ b/views/ngXosLib/karma.conf.views.js
@@ -14,7 +14,10 @@
let viewFiles = fs.readdirSync(viewDir);
// hack to avoid testing backbone implementation (they need to be removed)
-viewFiles = viewFiles.filter(f => f.indexOf('xosAdminSite') === -1).filter(f => f.indexOf('xosCord') === -1);
+viewFiles = viewFiles
+ .filter(f => f.indexOf('xosAdminSite') === -1)
+ .filter(f => f.indexOf('xosCord') === -1)
+ .filter(f => f.indexOf('xosTenant') === -1);
viewFiles = viewFiles.filter(f => f.indexOf('js') >= 0).filter(f => f.match(/^xos[A-Z][a-z]+/)).map(f => `${viewDir}${f}`);
diff --git a/views/ngXosViews/truckroll/bower.json b/views/ngXosViews/truckroll/bower.json
index 1208905..0cc10f7 100644
--- a/views/ngXosViews/truckroll/bower.json
+++ b/views/ngXosViews/truckroll/bower.json
@@ -14,7 +14,8 @@
"test",
"tests"
],
- "dependencies": {},
+ "dependencies": {
+ },
"devDependencies": {
"jquery": "2.1.4",
"angular-mocks": "1.4.7",
@@ -25,9 +26,7 @@
"angular-resource": "1.4.7",
"lodash": "~4.11.1",
"bootstrap-css": "3.3.6",
- "angular-chart.js": "~0.10.2"
- },
- "resolutions": {
- "angular": "1.4.7"
+ "angular-chart.js": "~0.10.2",
+ "d3": "~3.5.17"
}
}
diff --git a/views/ngXosViews/truckroll/spec/sample.test.js b/views/ngXosViews/truckroll/spec/sample.test.js
index 75a8a56..06ebc1b 100644
--- a/views/ngXosViews/truckroll/spec/sample.test.js
+++ b/views/ngXosViews/truckroll/spec/sample.test.js
@@ -11,7 +11,7 @@
httpBackend = $httpBackend;
// Setting up mock request
- $httpBackend.expectGET('/api/core/users/?no_hyperlinks=1').respond([
+ $httpBackend.expectGET('/api/tenant/cord/subscriber/?no_hyperlinks=1').respond([
{
email: 'teo@onlab.us',
firstname: 'Matteo',
@@ -20,7 +20,7 @@
]);
scope = $rootScope.$new();
- element = angular.element('<users-list></users-list>');
+ element = angular.element('<truckroll></truckroll>');
$compile(element)(scope);
scope.$digest();
isolatedScope = element.isolateScope().vm;
@@ -28,10 +28,7 @@
it('should load 1 users', () => {
httpBackend.flush();
- expect(isolatedScope.users.length).toBe(1);
- expect(isolatedScope.users[0].email).toEqual('teo@onlab.us');
- expect(isolatedScope.users[0].firstname).toEqual('Matteo');
- expect(isolatedScope.users[0].lastname).toEqual('Scandolo');
+ expect(isolatedScope.subscribers.length).toBe(1);
});
});
\ No newline at end of file
diff --git a/views/ngXosViews/truckroll/src/index.html b/views/ngXosViews/truckroll/src/index.html
index b10d06b..bb4f072 100644
--- a/views/ngXosViews/truckroll/src/index.html
+++ b/views/ngXosViews/truckroll/src/index.html
@@ -27,6 +27,7 @@
<script src="vendor/bootstrap-css/js/bootstrap.min.js"></script>
<script src="vendor/Chart.js/Chart.js"></script>
<script src="vendor/angular-chart.js/dist/angular-chart.js"></script>
+<script src="vendor/d3/d3.js"></script>
<!-- endbower -->
<!-- endjs -->
<!-- inject:js -->
diff --git a/views/ngXosViews/truckroll/src/js/main.js b/views/ngXosViews/truckroll/src/js/main.js
index 20692c8..1004cb1 100644
--- a/views/ngXosViews/truckroll/src/js/main.js
+++ b/views/ngXosViews/truckroll/src/js/main.js
@@ -29,12 +29,6 @@
this.subscribers = subscribers;
});
- $log.log('Truckorll Component!');
- $log.info('Truckorll Component!');
- $log.warn('Truckorll Component!');
- $log.error('Truckorll Component!');
- $log.debug('Truckorll Component!');
-
this.loader = false;
this.runTest = () => {