Removed sample files
diff --git a/views/ngXosLib/README.md b/views/ngXosLib/README.md
index 2eb73cb..f4b9c8f 100644
--- a/views/ngXosLib/README.md
+++ b/views/ngXosLib/README.md
@@ -6,14 +6,6 @@
This tools are designed to help you developing UI for XOS. As they born for this purpose if often necessary that a XOS instance is running on your sistem and responding at: `localhost:9999`. The `xos/configurations/frontend` is normally enough.
-### Apigen
-
-Usage: `npm run apigen`
-
-This tool will automatically generate an angular resource file for each endpoint available in Apiary.
-
->You can generate api related documentation with: `npm run doc`. The output is locate in `api/docs`. You can have a list of available method also trough Apiary at `http://docs.xos.apiary.io/#`
-
### Vendors
Xos comes with a preset of common libraries, as listed in `bower.json`:
@@ -33,7 +25,7 @@
### Helpers
-XOS comes with an helper library that is automatically loaded in the Django template.
+XOS comes with an helper library that is automatically loaded in the Django template. It a set of Services and UI Components
To use it, add `xos.helpers` to your required modules:
@@ -45,14 +37,12 @@
It will automatically ad a `token` to all your request, eventually you can take advantage of some other services:
-- **NoHyperlinks Interceptor**: will add a `?no_hyperlinks=1` to your request, to tell Django to return ids instead of links.
-
->_NOTE: for the API related service, check documentation in [Apigen](#apigen) section._
-
To develop components inside this folder there is a particular command: `npm run dev`, this will watch the helpers file and rebuild them with sourcemaps. For this reason remember to build them when done developing.
When some changes are applied to this common library it should be rebuilt with: `npm run build`
+To generate the relative documentation use: `npm run doc`
+
### Yo Xos
We have created a [yeoman](http://yeoman.io/) generator to help you scaffolding views.
diff --git a/views/ngXosLib/apigen/blueprintToNgResource.js b/views/ngXosLib/apigen/blueprintToNgResource.js
deleted file mode 100644
index fdb1050..0000000
--- a/views/ngXosLib/apigen/blueprintToNgResource.js
+++ /dev/null
@@ -1,77 +0,0 @@
-'use strict';
-
-const protagonist = require('protagonist');
-const fs = require('fs');
-const P = require('bluebird');
-const _ = require('lodash');
-const chalk = require('chalk');
-const Handlebars = require('handlebars');
-const util = require('util');
-const path = require('path');
-
-P.promisifyAll(fs);
-P.promisifyAll(protagonist);
-
-const angualarModuleName = 'xos.helpers'
-
-// format href in angular format
-const formatHref = url => url.replace('{', ':').replace('}', '');
-
-const formatTitle = title => title.split(' ').join('-');
-
-const getParamName = url => url.match(/\{([^)]+)\}/) ? url.match(/\{([^)]+)\}/)[1] : '';
-
-// Get Group description
-const getGroupDescription = (group) => _.find(group, {element: 'copy'}) ? _.find(group, {element: 'copy'}).content.replace(/\n$/, '') : '';
-
-// Loop APIs endpoint
-const loopApiEndpoint = (group) => {
- // removing description
- _.remove(group, {element: 'copy'})
-
- return _.map(group, g => {
- return {
- name: formatTitle(g.meta.title),
- param: {href: formatHref(g.attributes.href), name: getParamName(g.attributes.href)},
- }
- })
-};
-
-// Loop APIs groups
-const loopApiGroups = (defs) => {
- if (!Array.isArray(defs)) {
- return;
- }
- _.forEach(defs, d => {
- console.info(chalk.blue.bold(`Parsing Group: ${d.meta.title}`));
-
- var data = {
- description: getGroupDescription(d.content),
- ngModule: angualarModuleName,
- resources: loopApiEndpoint(d.content)
- };
- fs.writeFileSync(path.join(__dirname, `../xosHelpers/src/services/rest/${formatTitle(d.meta.title)}.js`), handlebarsTemplate(data));
- });
-
- console.info(chalk.green.bold(`Api Generated`));
-
-};
-
-// Loop the top level definitions
-const loopApiDefinitions = (defs) => {
- // console.log(util.inspect(defs, false, null));
- _.forEach(defs, d => loopApiGroups(d.content));
-};
-
-let handlebarsTemplate;
-
-// read blueprint docs and parse
-fs.readFileAsync(path.join(__dirname, './ngResourceTemplate.handlebars'), 'utf8')
-.then((template) => {
- handlebarsTemplate = Handlebars.compile(template);
- return fs.readFileAsync(path.join(__dirname, '../../../apiary.apib'), 'utf8')
-})
-.then(data => protagonist.parseAsync(data))
-.then(result => loopApiDefinitions(result.content))
-.catch(console.warn);
-
diff --git a/views/ngXosLib/apigen/ngResourceTemplate.handlebars b/views/ngXosLib/apigen/ngResourceTemplate.handlebars
deleted file mode 100644
index c1bc8f5..0000000
--- a/views/ngXosLib/apigen/ngResourceTemplate.handlebars
+++ /dev/null
@@ -1,17 +0,0 @@
-(function() {
- 'use strict';
-
- angular.module('{{ngModule}}')
- {{#each resources}}
- /**
- * @ngdoc service
- * @name {{../ngModule}}.{{name}}
- * @description Angular resource to fetch {{param.href}}
- **/
- .service('{{name}}', function($resource){
- return $resource('{{param.href}}'{{#if param.name}}, { {{param.name}}: '@id' }, {
- update: { method: 'PUT' }
- }{{/if}});
- })
- {{/each}}
-})();
\ No newline at end of file
diff --git a/views/ngXosLib/xosHelpers/src/services/rest/Subscribers.js b/views/ngXosLib/xosHelpers/src/services/rest/Subscribers.js
index 342d856..945e1e8 100644
--- a/views/ngXosLib/xosHelpers/src/services/rest/Subscribers.js
+++ b/views/ngXosLib/xosHelpers/src/services/rest/Subscribers.js
@@ -5,71 +5,143 @@
/**
* @ngdoc service
* @name xos.helpers.Subscribers
- * @description Angular resource to fetch /api/tenant/cord/subscriber/:subscriber_id/
+ * @description Angular resource to fetch Subscribers
**/
.service('Subscribers', function($resource){
- return $resource('/api/tenant/cord/subscriber/:subscriber_id/', { subscriber_id: '@id' }, {
- update: { method: 'PUT' }
- });
- })
- /**
- * @ngdoc service
- * @name xos.helpers.Subscriber-features
- * @description Angular resource to fetch /api/tenant/cord/subscriber/:subscriber_id/features/
- **/
- .service('Subscriber-features', function($resource){
- return $resource('/api/tenant/cord/subscriber/:subscriber_id/features/', { subscriber_id: '@id' }, {
- update: { method: 'PUT' }
- });
- })
- /**
- * @ngdoc service
- * @name xos.helpers.Subscriber-features-uplink_speed
- * @description Angular resource to fetch /api/tenant/cord/subscriber/:subscriber_id/features/uplink_speed/
- **/
- .service('Subscriber-features-uplink_speed', function($resource){
- return $resource('/api/tenant/cord/subscriber/:subscriber_id/features/uplink_speed/', { subscriber_id: '@id' }, {
- update: { method: 'PUT' }
- });
- })
- /**
- * @ngdoc service
- * @name xos.helpers.Subscriber-features-downlink_speed
- * @description Angular resource to fetch /api/tenant/cord/subscriber/:subscriber_id/features/downlink_speed/
- **/
- .service('Subscriber-features-downlink_speed', function($resource){
- return $resource('/api/tenant/cord/subscriber/:subscriber_id/features/downlink_speed/', { subscriber_id: '@id' }, {
- update: { method: 'PUT' }
- });
- })
- /**
- * @ngdoc service
- * @name xos.helpers.Subscriber-features-cdn
- * @description Angular resource to fetch /api/tenant/cord/subscriber/:subscriber_id/features/cdn/
- **/
- .service('Subscriber-features-cdn', function($resource){
- return $resource('/api/tenant/cord/subscriber/:subscriber_id/features/cdn/', { subscriber_id: '@id' }, {
- update: { method: 'PUT' }
- });
- })
- /**
- * @ngdoc service
- * @name xos.helpers.Subscriber-features-uverse
- * @description Angular resource to fetch /api/tenant/cord/subscriber/:subscriber_id/features/uverse/
- **/
- .service('Subscriber-features-uverse', function($resource){
- return $resource('/api/tenant/cord/subscriber/:subscriber_id/features/uverse/', { subscriber_id: '@id' }, {
- update: { method: 'PUT' }
- });
- })
- /**
- * @ngdoc service
- * @name xos.helpers.Subscriber-features-status
- * @description Angular resource to fetch /api/tenant/cord/subscriber/:subscriber_id/features/status/
- **/
- .service('Subscriber-features-status', function($resource){
- return $resource('/api/tenant/cord/subscriber/:subscriber_id/features/status/', { subscriber_id: '@id' }, {
- update: { method: 'PUT' }
- });
+ return $resource('/api/tenant/cord/subscriber/:id/', { id: '@id' }, {
+ update: { method: 'PUT' },
+ /**
+ * @ngdoc method
+ * @name xos.helpers.Subscribers#View-a-Subscriber-Features-Detail
+ * @methodOf xos.helpers.Subscribers
+ * @description
+ * View-a-Subscriber-Features-Detail
+ **/
+ 'View-a-Subscriber-Features-Detail': {
+ method: 'GET',
+ isArray: false,
+ url: '/api/tenant/cord/subscriber/:id/features/'
+ },
+ /**
+ * @ngdoc method
+ * @name xos.helpers.Subscribers#Read-Subscriber-uplink_speed
+ * @methodOf xos.helpers.Subscribers
+ * @description
+ * Read-Subscriber-uplink_speed
+ **/
+ 'Read-Subscriber-uplink_speed': {
+ method: 'GET',
+ isArray: false,
+ url: '/api/tenant/cord/subscriber/:id/features/uplink_speed/'
+ },
+ /**
+ * @ngdoc method
+ * @name xos.helpers.Subscribers#Update-Subscriber-uplink_speed
+ * @methodOf xos.helpers.Subscribers
+ * @description
+ * Update-Subscriber-uplink_speed
+ **/
+ 'Update-Subscriber-uplink_speed': {
+ method: 'PUT',
+ isArray: false,
+ url: '/api/tenant/cord/subscriber/:id/features/uplink_speed/'
+ },
+ /**
+ * @ngdoc method
+ * @name xos.helpers.Subscribers#Read-Subscriber-downlink_speed
+ * @methodOf xos.helpers.Subscribers
+ * @description
+ * Read-Subscriber-downlink_speed
+ **/
+ 'Read-Subscriber-downlink_speed': {
+ method: 'GET',
+ isArray: false,
+ url: '/api/tenant/cord/subscriber/:id/features/downlink_speed/'
+ },
+ /**
+ * @ngdoc method
+ * @name xos.helpers.Subscribers#Update-Subscriber-downlink_speed
+ * @methodOf xos.helpers.Subscribers
+ * @description
+ * Update-Subscriber-downlink_speed
+ **/
+ 'Update-Subscriber-downlink_speed': {
+ method: 'PUT',
+ isArray: false,
+ url: '/api/tenant/cord/subscriber/:id/features/downlink_speed/'
+ },
+ /**
+ * @ngdoc method
+ * @name xos.helpers.Subscribers#Read-Subscriber-cdn
+ * @methodOf xos.helpers.Subscribers
+ * @description
+ * Read-Subscriber-cdn
+ **/
+ 'Read-Subscriber-cdn': {
+ method: 'GET',
+ isArray: false,
+ url: '/api/tenant/cord/subscriber/:id/features/cdn/'
+ },
+ /**
+ * @ngdoc method
+ * @name xos.helpers.Subscribers#Update-Subscriber-cdn
+ * @methodOf xos.helpers.Subscribers
+ * @description
+ * Update-Subscriber-cdn
+ **/
+ 'Update-Subscriber-cdn': {
+ method: 'PUT',
+ isArray: false,
+ url: '/api/tenant/cord/subscriber/:id/features/cdn/'
+ },
+ /**
+ * @ngdoc method
+ * @name xos.helpers.Subscribers#Read-Subscriber-uverse
+ * @methodOf xos.helpers.Subscribers
+ * @description
+ * Read-Subscriber-uverse
+ **/
+ 'Read-Subscriber-uverse': {
+ method: 'GET',
+ isArray: false,
+ url: '/api/tenant/cord/subscriber/:id/features/uverse/'
+ },
+ /**
+ * @ngdoc method
+ * @name xos.helpers.Subscribers#Update-Subscriber-uverse
+ * @methodOf xos.helpers.Subscribers
+ * @description
+ * Update-Subscriber-uverse
+ **/
+ 'Update-Subscriber-uverse': {
+ method: 'PUT',
+ isArray: false,
+ url: '/api/tenant/cord/subscriber/:id/features/uverse/'
+ },
+ /**
+ * @ngdoc method
+ * @name xos.helpers.Subscribers#Read-Subscriber-status
+ * @methodOf xos.helpers.Subscribers
+ * @description
+ * Read-Subscriber-status
+ **/
+ 'Read-Subscriber-status': {
+ method: 'GET',
+ isArray: false,
+ url: '/api/tenant/cord/subscriber/:id/features/status/'
+ },
+ /**
+ * @ngdoc method
+ * @name xos.helpers.Subscribers#Update-Subscriber-status
+ * @methodOf xos.helpers.Subscribers
+ * @description
+ * Update-Subscriber-status
+ **/
+ 'Update-Subscriber-status': {
+ method: 'PUT',
+ isArray: false,
+ url: '/api/tenant/cord/subscriber/:id/features/status/'
+ }
+ })
})
})();
\ No newline at end of file
diff --git a/views/ngXosLib/xosHelpers/src/styles/main.scss b/views/ngXosLib/xosHelpers/src/styles/main.scss
index 800466e..43c54f6 100644
--- a/views/ngXosLib/xosHelpers/src/styles/main.scss
+++ b/views/ngXosLib/xosHelpers/src/styles/main.scss
@@ -1,5 +1,5 @@
@import './animations.scss';
-@import '../../../../../../style/sass/bootstrap/bootstrap/_variables.scss';
+@import '../../../../../views/style/sass/bootstrap/bootstrap/_variables.scss';
@import '../ui_components/dumbComponents/table/table.scss';
@import '../ui_components/dumbComponents/alert/alert.scss';