Removed old API generator and fixed generator tests
diff --git a/views/ngXosViews/sampleView/bower.json b/views/ngXosViews/sampleView/bower.json
index 5a3dc83..cc5fc64 100644
--- a/views/ngXosViews/sampleView/bower.json
+++ b/views/ngXosViews/sampleView/bower.json
@@ -24,6 +24,6 @@
"angular-cookies": "1.4.7",
"angular-resource": "1.4.7",
"ng-lodash": "0.3.0",
- "bootstrap-css": "2.3.2"
+ "bootstrap-css": "3.3.6"
}
}
diff --git a/views/ngXosViews/sampleView/env/default.js b/views/ngXosViews/sampleView/env/default.js
index 2a5e8c0..5b198ec 100644
--- a/views/ngXosViews/sampleView/env/default.js
+++ b/views/ngXosViews/sampleView/env/default.js
@@ -7,7 +7,7 @@
// (works only for local environment as both application are served on the same domain)
module.exports = {
- host: 'http://xos.dev:9999',
- xoscsrftoken: 'NZ7lKKUcUUSYNeb7qpYKECL3MW3pKbSl',
- xossessionid: 'kkhk28qo1dy6fc3v8lmzla6ry1dgm5xw'
+ host: '',
+ xoscsrftoken: '',
+ xossessionid: ''
};
diff --git a/views/ngXosViews/sampleView/karma.conf.js b/views/ngXosViews/sampleView/karma.conf.js
index 83d3f63..4123be9 100644
--- a/views/ngXosViews/sampleView/karma.conf.js
+++ b/views/ngXosViews/sampleView/karma.conf.js
@@ -26,8 +26,8 @@
// list of files / patterns to load in the browser
files: bowerComponents.concat([
- '../../static/js/xosApi.js',
- '../../static/js/vendor/ngXosHelpers.js',
+ '../../../xos/core/xoslib/static/js/vendor/ngXosVendor.js',
+ '../../../xos/core/xoslib/static/js/vendor/ngXosHelpers.js',
'src/js/**/*.js',
'spec/**/*.mock.js',
'spec/**/*.test.js',
diff --git a/views/ngXosViews/sampleView/package.json b/views/ngXosViews/sampleView/package.json
index 6d07e1e..0ffe32c 100644
--- a/views/ngXosViews/sampleView/package.json
+++ b/views/ngXosViews/sampleView/package.json
@@ -8,6 +8,7 @@
"prebuild": "npm install && bower install",
"build": "gulp",
"test": "karma start",
+ "test:ci": "karma start --single-run",
"lint": "eslint src/js/"
},
"keywords": [
@@ -19,28 +20,44 @@
"license": "MIT",
"dependencies": {},
"devDependencies": {
+ "autoprefixer": "^6.3.3",
"browser-sync": "^2.9.11",
+ "css-mqpacker": "^4.0.0",
+ "csswring": "^4.2.1",
"del": "^2.0.2",
+ "easy-mocker": "^1.2.0",
+ "eslint": "^1.8.0",
+ "eslint-plugin-angular": "linkmesrl/eslint-plugin-angular",
"gulp": "^3.9.0",
"gulp-angular-filesort": "^1.1.1",
"gulp-angular-templatecache": "^1.8.0",
"gulp-babel": "^5.3.0",
"gulp-concat": "^2.6.0",
+ "gulp-concat-util": "^0.5.5",
+ "gulp-eslint": "^1.0.0",
"gulp-inject": "^3.0.0",
"gulp-minify-html": "^1.0.4",
+ "gulp-ng-annotate": "^1.1.0",
+ "gulp-postcss": "^6.0.1",
"gulp-rename": "^1.2.2",
"gulp-replace": "^0.5.4",
"gulp-sass": "^2.2.0",
"gulp-uglify": "^1.4.2",
"http-proxy": "^1.12.0",
+ "ink-docstrap": "^0.5.2",
+ "jasmine-core": "~2.3.4",
+ "karma": "^0.13.14",
+ "karma-babel-preprocessor": "~5.2.2",
+ "karma-coverage": "^0.5.3",
+ "karma-jasmine": "~0.3.6",
+ "karma-mocha-reporter": "~1.1.1",
+ "karma-ng-html2js-preprocessor": "^0.2.0",
+ "karma-phantomjs-launcher": "~0.2.1",
+ "lodash": "^3.10.1",
+ "phantomjs": "^1.9.19",
"proxy-middleware": "^0.15.0",
"run-sequence": "^1.1.4",
"wiredep": "^3.0.0-beta",
- "wrench": "^1.5.8",
- "gulp-ng-annotate": "^1.1.0",
- "lodash": "^3.10.1",
- "eslint": "^1.8.0",
- "eslint-plugin-angular": "linkmesrl/eslint-plugin-angular",
- "gulp-eslint": "^1.0.0"
+ "wrench": "^1.5.8"
}
}
diff --git a/views/ngXosViews/sampleView/spec/sample.test.js b/views/ngXosViews/sampleView/spec/sample.test.js
index daa996d..f0db699 100644
--- a/views/ngXosViews/sampleView/spec/sample.test.js
+++ b/views/ngXosViews/sampleView/spec/sample.test.js
@@ -11,7 +11,7 @@
httpBackend = $httpBackend;
// Setting up mock request
- $httpBackend.expectGET('/xos/users/?no_hyperlinks=1').respond([
+ $httpBackend.expectGET('/api/core/users/?no_hyperlinks=1').respond([
{
email: 'teo@onlab.us',
firstname: 'Matteo',
diff --git a/views/ngXosViews/sampleView/src/css/main.css b/views/ngXosViews/sampleView/src/css/main.css
deleted file mode 100644
index e69de29..0000000
--- a/views/ngXosViews/sampleView/src/css/main.css
+++ /dev/null
diff --git a/views/ngXosViews/sampleView/src/index.html b/views/ngXosViews/sampleView/src/index.html
index d24bb88..e6e5de7 100644
--- a/views/ngXosViews/sampleView/src/index.html
+++ b/views/ngXosViews/sampleView/src/index.html
@@ -1,38 +1,14 @@
<!-- browserSync -->
<!-- bower:css -->
-<link rel="stylesheet" href="vendor/bootstrap-css/css/bootstrap.css" />
<!-- endbower --><!-- endcss -->
<!-- inject:css -->
-<link rel="stylesheet" href="/css/main.css">
<!-- endinject -->
-<div ng-app="xos.sampleView" id="xosSampleView" class="container">
+<div ng-app="xos.sampleView" id="xosSampleView" class="container-fluid">
<div ui-view></div>
</div>
<!-- bower:js -->
-<script src="vendor/jquery/dist/jquery.js"></script>
-<script src="vendor/angular/angular.js"></script>
-<script src="vendor/angular-mocks/angular-mocks.js"></script>
-<script src="vendor/angular-ui-router/release/angular-ui-router.js"></script>
-<script src="vendor/angular-cookies/angular-cookies.js"></script>
-<script src="vendor/angular-resource/angular-resource.js"></script>
-<script src="vendor/ng-lodash/build/ng-lodash.js"></script>
-<script src="vendor/bootstrap-css/js/bootstrap.js"></script>
<!-- endbower --><!-- endjs -->
<!-- inject:js -->
-<script src="/xosHelpers/src/xosHelpers.module.js"></script>
-<script src="/xosHelpers/src/services/rest/vSG.js"></script>
-<script src="/xosHelpers/src/services/rest/vOLT.js"></script>
-<script src="/xosHelpers/src/services/rest/Users.js"></script>
-<script src="/xosHelpers/src/services/rest/Truckroll.js"></script>
-<script src="/xosHelpers/src/services/rest/Subscribers.js"></script>
-<script src="/xosHelpers/src/services/rest/ONOS-Services.js"></script>
-<script src="/xosHelpers/src/services/rest/ONOS-Apps.js"></script>
-<script src="/xosHelpers/src/ui_components/table/table.component.js"></script>
-<script src="/xosHelpers/src/ui_components/ui-components.module.js"></script>
-<script src="/xosHelpers/src/services/noHyperlinks.interceptor.js"></script>
-<script src="/xosHelpers/src/services/csrfToken.interceptor.js"></script>
-<script src="/xosHelpers/src/services/api.services.js"></script>
-<script src="/.tmp/main.js"></script>
<!-- endinject -->
diff --git a/views/ngXosViews/sampleView/src/templates/users-list.tpl.html b/views/ngXosViews/sampleView/src/templates/users-list.tpl.html
index 2983ad0..03be487 100644
--- a/views/ngXosViews/sampleView/src/templates/users-list.tpl.html
+++ b/views/ngXosViews/sampleView/src/templates/users-list.tpl.html
@@ -3,12 +3,12 @@
<p>This is only an example view.</p>
</div>
<div class="row">
- <div class="span4">Email</div>
- <div class="span4">First Name</div>
- <div class="span4">Last Name</div>
+ <div class="col-xs-4">Email</div>
+ <div class="col-xs-4">First Name</div>
+ <div class="col-xs-4">Last Name</div>
</div>
<div class="row" ng-repeat="user in vm.users">
- <div class="span4">{{user.email}}</div>
- <div class="span4">{{user.firstname}}</div>
- <div class="span4">{{user.lastname}}</div>
+ <div class="col-xs-4">{{user.email}}</div>
+ <div class="col-xs-4">{{user.firstname}}</div>
+ <div class="col-xs-4">{{user.lastname}}</div>
</div>
\ No newline at end of file