diff --git a/@salix-services/customer/.editorconfig b/@salix-services/customer/.editorconfig new file mode 100644 index 000000000..3ee22e5d3 --- /dev/null +++ b/@salix-services/customer/.editorconfig @@ -0,0 +1,13 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# http://editorconfig.org + +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/@salix-services/customer/.eslintignore b/@salix-services/customer/.eslintignore new file mode 100644 index 000000000..44f397018 --- /dev/null +++ b/@salix-services/customer/.eslintignore @@ -0,0 +1 @@ +/client/ \ No newline at end of file diff --git a/@salix-services/customer/.eslintrc b/@salix-services/customer/.eslintrc new file mode 100644 index 000000000..a6e52975a --- /dev/null +++ b/@salix-services/customer/.eslintrc @@ -0,0 +1,3 @@ +{ + "extends": "loopback" +} \ No newline at end of file diff --git a/@salix-services/customer/.gitignore b/@salix-services/customer/.gitignore new file mode 100644 index 000000000..aff1045b4 --- /dev/null +++ b/@salix-services/customer/.gitignore @@ -0,0 +1,19 @@ +*.csv +*.dat +*.iml +*.log +*.out +*.pid +*.seed +*.sublime-* +*.swo +*.swp +*.tgz +*.xml +.DS_Store +.idea +.project +.strong-pm +coverage +node_modules +npm-debug.log diff --git a/@salix-services/customer/.yo-rc.json b/@salix-services/customer/.yo-rc.json new file mode 100644 index 000000000..02f3fc17b --- /dev/null +++ b/@salix-services/customer/.yo-rc.json @@ -0,0 +1,3 @@ +{ + "generator-loopback": {} +} \ No newline at end of file diff --git a/@salix-services/customer/client/README.md b/@salix-services/customer/client/README.md new file mode 100644 index 000000000..dd00c9e9c --- /dev/null +++ b/@salix-services/customer/client/README.md @@ -0,0 +1,3 @@ +## Client + +This is the place for your application front-end files. diff --git a/@salix-services/customer/client/index.ejs b/@salix-services/customer/client/index.ejs new file mode 100644 index 000000000..3f258702d --- /dev/null +++ b/@salix-services/customer/client/index.ejs @@ -0,0 +1,14 @@ + + + + + Salix + + + + + + diff --git a/@salix-services/customer/common/models/AccessTokenIp.json b/@salix-services/customer/common/models/AccessTokenIp.json new file mode 100644 index 000000000..a2ed91c89 --- /dev/null +++ b/@salix-services/customer/common/models/AccessTokenIp.json @@ -0,0 +1,15 @@ +{ + "name": "AccessTokenIp", + "base": "AccessToken", + "idInjection": false, + "properties": { + "ip": { + "type": "string", + "default": "1.1.1.1" + } + }, + "validations": [], + "relations": {}, + "acls": [], + "methods": {} +} diff --git a/@salix-services/customer/common/models/UserIp.json b/@salix-services/customer/common/models/UserIp.json new file mode 100644 index 000000000..f25c2b0e9 --- /dev/null +++ b/@salix-services/customer/common/models/UserIp.json @@ -0,0 +1,18 @@ +{ + "name": "UserIp", + "base": "User", + "properties": {}, + "validations": [], + "relations": { + "accessTokens": { + "type": "hasMany", + "model": "AccessTokenIp", + "foreignKey": "userId", + "options": { + "disableInclude": true + } + } + }, + "acls": [], + "methods": {} +} diff --git a/@salix-services/customer/common/models/customer.json b/@salix-services/customer/common/models/customer.json new file mode 100644 index 000000000..ca90e88c2 --- /dev/null +++ b/@salix-services/customer/common/models/customer.json @@ -0,0 +1,30 @@ +{ + "name": "Customer", + "properties": { + "name": { + "type": "String", + "required": "true" + }, + "id": { + "type": "Number", + "id": true, + "description": "Customer ID" + } + }, + "validations": [], + "relations": {}, + "acls": [ + { + "principalType": "ROLE", + "principalId": "$unauthenticated", + "permission": "DENY" + }, + { + "principalType": "ROLE", + "principalId": "$everyone", + "permission": "ALLOW", + "property": "create" + } + ], + "methods": {} +} diff --git a/@salix-services/customer/common/models/message.js b/@salix-services/customer/common/models/message.js new file mode 100644 index 000000000..fc94c5a3b --- /dev/null +++ b/@salix-services/customer/common/models/message.js @@ -0,0 +1,8 @@ +module.exports = function(Message) { + Message.greet = function(msg, cb) { + process.nextTick(function() { + msg = msg || 'hello'; + cb(null, 'Sender says ' + msg + ' to receiver'); + }); + }; +}; diff --git a/@salix-services/customer/common/models/message.json b/@salix-services/customer/common/models/message.json new file mode 100644 index 000000000..ebd6606f8 --- /dev/null +++ b/@salix-services/customer/common/models/message.json @@ -0,0 +1,29 @@ +{ + "name": "Message", + "base": "Model", + "properties": {}, + "validations": [], + "relations": {}, + "acls": [], + "methods": { + "greet": { + "isStatic": true, + "accepts": [ + { + "arg": "msg", + "type": "string", + "http": { + "source": "query" + } + } + ], + "returns": { + "arg": "greeting", + "type": "string" + }, + "http": { + "verb": "get" + } + } + } +} diff --git a/@salix-services/customer/common/models/user-a.js b/@salix-services/customer/common/models/user-a.js new file mode 100644 index 000000000..38b9de5bc --- /dev/null +++ b/@salix-services/customer/common/models/user-a.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function(Usera) { + +}; diff --git a/@salix-services/customer/common/models/user-a.json b/@salix-services/customer/common/models/user-a.json new file mode 100644 index 000000000..15ab14096 --- /dev/null +++ b/@salix-services/customer/common/models/user-a.json @@ -0,0 +1,13 @@ +{ + "name": "UserA", + "base": "PersistedModel", + "idInjection": true, + "options": { + "validateUpsert": true + }, + "properties": {}, + "validations": [], + "relations": {}, + "acls": [], + "methods": {} +} diff --git a/@salix-services/customer/package.json b/@salix-services/customer/package.json new file mode 100644 index 000000000..eaa4ab7a3 --- /dev/null +++ b/@salix-services/customer/package.json @@ -0,0 +1,32 @@ +{ + "name": "customer", + "version": "1.0.0", + "main": "server/server.js", + "scripts": { + "lint": "eslint .", + "start": "node .", + "posttest": "npm run lint && nsp check" + }, + "dependencies": { + "compression": "^1.0.3", + "cors": "^2.5.2", + "helmet": "^1.3.0", + "loopback-boot": "^2.6.5", + "loopback-component-explorer": "^2.4.0", + "serve-favicon": "^2.0.1", + "strong-error-handler": "^1.0.1", + "loopback-datasource-juggler": "^2.39.0", + "loopback": "^2.22.0" + }, + "devDependencies": { + "eslint": "^2.13.1", + "eslint-config-loopback": "^4.0.0", + "nsp": "^2.1.0" + }, + "repository": { + "type": "", + "url": "" + }, + "license": "UNLICENSED", + "description": "customer" +} diff --git a/@salix-services/customer/server/boot/authentication.js b/@salix-services/customer/server/boot/authentication.js new file mode 100644 index 000000000..3ca9ee315 --- /dev/null +++ b/@salix-services/customer/server/boot/authentication.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = function enableAuthentication(server) { + // enable authentication + // server.enableAuth(); +}; diff --git a/@salix-services/customer/server/boot/root.js b/@salix-services/customer/server/boot/root.js new file mode 100644 index 000000000..0aa2d58fd --- /dev/null +++ b/@salix-services/customer/server/boot/root.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = function(server) { + // Install a `/` route that returns server status + var router = server.loopback.Router(); + + router.get('/', server.loopback.status()); + server.use(router); + +}; + + diff --git a/@salix-services/customer/server/component-config.json b/@salix-services/customer/server/component-config.json new file mode 100644 index 000000000..f36959a48 --- /dev/null +++ b/@salix-services/customer/server/component-config.json @@ -0,0 +1,5 @@ +{ + "loopback-component-explorer": { + "mountPath": "/explorer" + } +} diff --git a/@salix-services/customer/server/config.json b/@salix-services/customer/server/config.json new file mode 100644 index 000000000..40d45f4d6 --- /dev/null +++ b/@salix-services/customer/server/config.json @@ -0,0 +1,23 @@ +{ + "restApiRoot": "/api", + "host": "0.0.0.0", + "port": 3000, + "remoting": { + "context": false, + "rest": { + "normalizeHttpPath": false, + "xml": false + }, + "json": { + "strict": false, + "limit": "100kb" + }, + "urlencoded": { + "extended": true, + "limit": "100kb" + }, + "cors": false, + "handleErrors": false + }, + "legacyExplorer": false +} diff --git a/@salix-services/customer/server/datasources.json b/@salix-services/customer/server/datasources.json new file mode 100644 index 000000000..d6caf56d4 --- /dev/null +++ b/@salix-services/customer/server/datasources.json @@ -0,0 +1,6 @@ +{ + "db": { + "name": "db", + "connector": "memory" + } +} diff --git a/@salix-services/customer/server/middleware.development.json b/@salix-services/customer/server/middleware.development.json new file mode 100644 index 000000000..071c11a30 --- /dev/null +++ b/@salix-services/customer/server/middleware.development.json @@ -0,0 +1,10 @@ +{ + "final:after": { + "strong-error-handler": { + "params": { + "debug": true, + "log": true + } + } + } +} diff --git a/@salix-services/customer/server/middleware.json b/@salix-services/customer/server/middleware.json new file mode 100644 index 000000000..0d5c5e38d --- /dev/null +++ b/@salix-services/customer/server/middleware.json @@ -0,0 +1,44 @@ +{ + "initial:before": { + "loopback#favicon": {} + }, + "initial": { + "compression": {}, + "./middleware/cors": {}, + "helmet#xssFilter": {}, + "helmet#frameguard": { + "params": [ + "deny" + ] + }, + "helmet#hsts": { + "params": { + "maxAge": 0, + "includeSubdomains": true + } + }, + "helmet#hidePoweredBy": {}, + "helmet#ieNoOpen": {}, + "helmet#noSniff": {}, + "helmet#noCache": { + "enabled": false + } + }, + "session": {}, + "auth": {}, + "parse": {}, + "routes": { + "loopback#rest": { + "paths": [ + "${restApiRoot}" + ] + } + }, + "files": {}, + "final": { + "loopback#urlNotFound": {} + }, + "final:after": { + "strong-error-handler": {} + } +} diff --git a/@salix-services/customer/server/middleware/cors.js b/@salix-services/customer/server/middleware/cors.js new file mode 100644 index 000000000..9d8ad644c --- /dev/null +++ b/@salix-services/customer/server/middleware/cors.js @@ -0,0 +1,15 @@ +var cors = require('cors'); + +var whitelist = ['http://localhost:8080']; +var corsOptions = { + origin: function(origin, callback){ + var originIsWhitelisted = whitelist.indexOf(origin) !== -1; + callback(originIsWhitelisted ? null : 'Bad Request', originIsWhitelisted); + } +} + +module.exports = function() { + return cors(corsOptions); +}; + + diff --git a/@salix-services/customer/server/middleware/datetime.js b/@salix-services/customer/server/middleware/datetime.js new file mode 100644 index 000000000..d2fba2298 --- /dev/null +++ b/@salix-services/customer/server/middleware/datetime.js @@ -0,0 +1,4 @@ +module.exports = function() { + console.log('Date time middleware triggered.'); + res.json({datetime: new Date()}); +}; \ No newline at end of file diff --git a/@salix-services/customer/server/model-config.json b/@salix-services/customer/server/model-config.json new file mode 100644 index 000000000..7cf58375a --- /dev/null +++ b/@salix-services/customer/server/model-config.json @@ -0,0 +1,42 @@ +{ + "_meta": { + "sources": [ + "loopback/common/models", + "loopback/server/models", + "../common/models", + "./models" + ], + "mixins": [ + "loopback/common/mixins", + "loopback/server/mixins", + "../common/mixins", + "./mixins" + ] + }, + "User": { + "dataSource": "db" + }, + "Customer": { + "dataSource": "db", + "public": true + }, + "AccessToken": { + "dataSource": "db", + "public": false + }, + "ACL": { + "dataSource": "db", + "public": false + }, + "RoleMapping": { + "dataSource": "db", + "public": false + }, + "Role": { + "dataSource": "db", + "public": false + }, + "Message": { + "dataSource": null + } +} diff --git a/@salix-services/customer/server/server.js b/@salix-services/customer/server/server.js new file mode 100644 index 000000000..3d28538cc --- /dev/null +++ b/@salix-services/customer/server/server.js @@ -0,0 +1,30 @@ +'use strict'; + +var loopback = require('loopback'); +var boot = require('loopback-boot'); + +var app = module.exports = loopback(); + +app.start = function() { + // start the web server + return app.listen(function() { + app.emit('started'); + var baseUrl = app.get('url').replace(/\/$/, ''); + console.log('Web server listening at: %s', baseUrl); + if (app.get('loopback-component-explorer')) { + var explorerPath = app.get('loopback-component-explorer').mountPath; + console.log('Browse your REST API at %s%s', baseUrl, explorerPath); + } + }); +}; + +// Bootstrap the application, configure models, datasources and middleware. +// Sub-apps like REST API are mounted via boot scripts. +boot(app, __dirname, function(err) { + if (err) throw err; + + // start the server if `$ node server.js` + if (require.main === module) + app.start(); +}); + diff --git a/@salix-services/salix/client/index.ejs b/@salix-services/salix/client/index.ejs index 3ff44f9cc..b6845abfd 100644 --- a/@salix-services/salix/client/index.ejs +++ b/@salix-services/salix/client/index.ejs @@ -6,4 +6,4 @@

Párrafo de ejemplo

- \ No newline at end of file +fore \ No newline at end of file diff --git a/@salix/crud/src/customer/index/index.js b/@salix/crud/src/customer/index/index.js index 92adbe333..782e1038c 100644 --- a/@salix/crud/src/customer/index/index.js +++ b/@salix/crud/src/customer/index/index.js @@ -7,9 +7,14 @@ export const COMPONENT = { controller: function() { this.users = [{id: 10, name: "xxxx"}]; this.search = function() { - this.users.push({id: 2, name: 'yyyyy'}); + $http.post('http://localhost:3000/api/Customers', {name: 'nelo'}); }; } }; module.component(NAME, COMPONENT); - +//TODO: MOVER EL CONFIG DONDE TOQUE +module.config(['$httpProvider', function($httpProvider) { + $httpProvider.defaults.useXDomain = true; + delete $httpProvider.defaults.headers.common['X-Requested-With']; + } +]); diff --git a/@salix/crud/src/navigation/index/compose.html b/@salix/crud/src/navigation/index/compose.html new file mode 100644 index 000000000..82debc33d --- /dev/null +++ b/@salix/crud/src/navigation/index/compose.html @@ -0,0 +1,9 @@ +
+ +
+ +
+
+ +
+
diff --git a/@salix/crud/src/navigation/index/compose.js b/@salix/crud/src/navigation/index/compose.js new file mode 100644 index 000000000..f8a4ce870 --- /dev/null +++ b/@salix/crud/src/navigation/index/compose.js @@ -0,0 +1,20 @@ +import template from './compose.html'; +import {module} from '../../module'; + +export const NAME = 'navigationCompose'; + +export const COMPONENT = { + template: template, + controller: function() { + this.items = [{icon: 'home', text: 'Opcion 1', link: ''}, + {icon: 'inbox', text: 'Opcion 2', link: ''}, + {icon: 'delete', text: 'Opcion 3', link: ''}, + {icon: 'report', text: 'Opcion 4', link: ''}, + {icon: 'forum', text: 'Opcion 5', link: ''}, + {icon: 'flag', text: 'Opcion 6', link: ''}, + {icon: 'local_offer', text: 'Opcion 7', link: ''}, + {icon: 'shopping_cart', text: 'Opcion 8', link: ''}, + {icon: 'people', text: 'Opcion 9', link: ''}]; + } +}; +module.component(NAME, COMPONENT); diff --git a/@salix/crud/src/navigation/index/css/styles b/@salix/crud/src/navigation/index/css/styles new file mode 100644 index 000000000..048208653 --- /dev/null +++ b/@salix/crud/src/navigation/index/css/styles @@ -0,0 +1,208 @@ +html, body { + font-family: 'Roboto', 'Helvetica', sans-serif; +} +.demo-avatar { + width: 48px; + height: 48px; + border-radius: 24px; +} +.demo-layout .demo-header .mdl-textfield { + padding: 0px; + margin-top: 41px; +} +.demo-layout .demo-header .mdl-textfield .mdl-textfield__expandable-holder { + bottom: 19px; +} +.demo-layout .mdl-layout__header .mdl-layout__drawer-button { + color: rgba(0, 0, 0, 0.54); +} +.mdl-layout__drawer .avatar { + margin-bottom: 16px; +} +.demo-drawer { + border: none; +} +/* iOS Safari specific workaround */ +.demo-drawer .mdl-menu__container { + z-index: -1; +} +.demo-drawer .demo-navigation { + z-index: -2; +} +/* END iOS Safari specific workaround */ +.demo-drawer .mdl-menu .mdl-menu__item { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; +} +.demo-drawer-header { + box-sizing: border-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-justify-content: flex-end; + -ms-flex-pack: end; + justify-content: flex-end; + padding: 16px; + height: 151px; +} +.demo-avatar-dropdown { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + position: relative; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + width: 100%; +} + +.demo-navigation { + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; +} +.demo-layout .demo-navigation .mdl-navigation__link { + display: -webkit-flex !important; + display: -ms-flexbox !important; + display: flex !important; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + color: rgba(255, 255, 255, 0.56); + font-weight: 500; +} +.demo-layout .demo-navigation .mdl-navigation__link:hover { + background-color: #00BCD4; + color: #37474F; +} +.demo-navigation .mdl-navigation__link .material-icons { + font-size: 24px; + color: rgba(255, 255, 255, 0.56); + margin-right: 32px; +} + +.demo-content { + max-width: 1080px; +} + +.demo-charts { + -webkit-align-items: center; + -ms-flex-align: center; + -ms-grid-row-align: center; + align-items: center; +} +.demo-chart:nth-child(1) { + color: #ACEC00; +} +.demo-chart:nth-child(2) { + color: #00BBD6; +} +.demo-chart:nth-child(3) { + color: #BA65C9; +} +.demo-chart:nth-child(4) { + color: #EF3C79; +} +.demo-graphs { + padding: 16px 32px; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-align-items: stretch; + -ms-flex-align: stretch; + align-items: stretch; +} +/* TODO: Find a proper solution to have the graphs + * not float around outside their container in IE10/11. + * Using a browserhacks.com solution for now. + */ +_:-ms-input-placeholder, :root .demo-graphs { + min-height: 664px; +} +_:-ms-input-placeholder, :root .demo-graph { + max-height: 300px; +} +/* TODO end */ +.demo-graph:nth-child(1) { + color: #00b9d8; +} +.demo-graph:nth-child(2) { + color: #d9006e; +} + +.demo-cards { + -webkit-align-items: flex-start; + -ms-flex-align: start; + -ms-grid-row-align: flex-start; + align-items: flex-start; + -webkit-align-content: flex-start; + -ms-flex-line-pack: start; + align-content: flex-start; +} +.demo-cards .demo-separator { + height: 32px; +} +.demo-cards .mdl-card__title.mdl-card__title { + color: white; + font-size: 24px; + font-weight: 400; +} +.demo-cards ul { + padding: 0; +} +.demo-cards h3 { + font-size: 1em; +} +.demo-updates .mdl-card__title { + min-height: 200px; + background-image: url('images/dog.png'); + background-position: 90% 100%; + background-repeat: no-repeat; +} +.demo-cards .mdl-card__actions a { + color: #00BCD4; + text-decoration: none; +} + +.demo-options h3 { + margin: 0; +} +.demo-options .mdl-checkbox__box-outline { + border-color: rgba(255, 255, 255, 0.89); +} +.demo-options ul { + margin: 0; + list-style-type: none; +} +.demo-options li { + margin: 4px 0; +} +.demo-options .material-icons { + color: rgba(255, 255, 255, 0.89); +} +.demo-options .mdl-card__actions { + height: 64px; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + box-sizing: border-box; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; +} \ No newline at end of file diff --git a/@salix/crud/src/navigation/index/css/styles.css b/@salix/crud/src/navigation/index/css/styles.css new file mode 100644 index 000000000..f0951f003 --- /dev/null +++ b/@salix/crud/src/navigation/index/css/styles.css @@ -0,0 +1,234 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +html, body { + font-family: 'Roboto', 'Helvetica', sans-serif; +} + +.demo-avatar { + width: 40px; + height: 40px; + border-radius: 24px; +} + +.mdl-textfield--expandable .mdl-button--icon { + top: 0px; +} + +.demo-layout .demo-header .mdl-textfield { + margin-top: 41px; +} +.demo-layout .demo-header .mdl-textfield .mdl-textfield__expandable-holder { + bottom: 19px; +} +.demo-layout .mdl-layout__header .mdl-layout__drawer-button { + color: rgba(0, 0, 0, 0.54); +} +.mdl-layout__drawer .avatar { + margin-bottom: 16px; +} +.demo-drawer { + border: none; +} +/* iOS Safari specific workaround */ +.demo-drawer .mdl-menu__container { + z-index: -1; +} +.demo-drawer .demo-navigation { + z-index: -2; +} +/* END iOS Safari specific workaround */ +.demo-drawer .mdl-menu .mdl-menu__item { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; +} +.demo-drawer-header { + box-sizing: border-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-justify-content: flex-end; + -ms-flex-pack: end; + justify-content: flex-end; + height: 64px; + padding-bottom: 12px; + padding-left: 16px; +} +.demo-avatar-dropdown { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + position: relative; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + width: 100%; +} + +.demo-navigation { + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; +} +.demo-layout .demo-navigation .mdl-navigation__link { + display: -webkit-flex !important; + display: -ms-flexbox !important; + display: flex !important; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + color: #424242; + font-weight: 500; +} +.demo-layout .demo-navigation .mdl-navigation__link:hover { + background-color: #ff9800; + color: #fff; +} +.demo-navigation .mdl-navigation__link .material-icons { + font-size: 24px; + color: rgba(255, 255, 255, 0.56); + margin-right: 32px; +} + +.demo-content { + max-width: 1080px; +} + +.demo-charts { + -webkit-align-items: center; + -ms-flex-align: center; + -ms-grid-row-align: center; + align-items: center; +} +.demo-chart:nth-child(1) { + color: #ACEC00; +} +.demo-chart:nth-child(2) { + color: #00BBD6; +} +.demo-chart:nth-child(3) { + color: #BA65C9; +} +.demo-chart:nth-child(4) { + color: #EF3C79; +} +.demo-graphs { + padding: 16px 32px; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-align-items: stretch; + -ms-flex-align: stretch; + align-items: stretch; +} +/* TODO: Find a proper solution to have the graphs + * not float around outside their container in IE10/11. + * Using a browserhacks.com solution for now. + */ +_:-ms-input-placeholder, :root .demo-graphs { + min-height: 664px;º +} +_:-ms-input-placeholder, :root .demo-graph { + max-height: 300px; +} +/* TODO end */ +.demo-graph:nth-child(1) { + color: #00b9d8; +} +.demo-graph:nth-child(2) { + color: #d9006e; +} + +.demo-cards { + -webkit-align-items: flex-start; + -ms-flex-align: start; + -ms-grid-row-align: flex-start; + align-items: flex-start; + -webkit-align-content: flex-start; + -ms-flex-line-pack: start; + align-content: flex-start; +} +.demo-cards .demo-separator { + height: 32px; +} +.demo-cards .mdl-card__title.mdl-card__title { + color: white; + padding-bottom: 30px; + font-size: 24px; + font-weight: 400; +} + +.demo-cards ul { + padding: 0; +} + +.demo-cards h3 { + font-size: 1em; +} +.demo-updates .mdl-card__title { + height: 64px; +} + +.demo-cards .mdl-card__actions a { + color: ; + text-decoration: none; +} + +.demo-options h3 { + margin: 0; +} +.demo-options .mdl-checkbox__box-outline { + border-color: rgba(255, 255, 255, 0.89); +} +.demo-options ul { + margin: 0; + list-style-type: none; +} +.demo-options li { + margin: 4px 0; +} +.demo-options .material-icons { + color: rgba(255, 255, 255, 0.89); +} +.demo-options .mdl-card__actions { + height: 64px; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + box-sizing: border-box; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; +} + + + diff --git a/@salix/crud/src/navigation/index/header.html b/@salix/crud/src/navigation/index/header.html new file mode 100644 index 000000000..09fec1e42 --- /dev/null +++ b/@salix/crud/src/navigation/index/header.html @@ -0,0 +1,24 @@ +
+
+
+
+ +
+ +
+
+ +
+ + + +
+
\ No newline at end of file diff --git a/@salix/crud/src/navigation/index/header.js b/@salix/crud/src/navigation/index/header.js new file mode 100644 index 000000000..2b6160d46 --- /dev/null +++ b/@salix/crud/src/navigation/index/header.js @@ -0,0 +1,10 @@ +import template from './header.html'; +import {module} from '../../module'; + +export const NAME = 'navigationHeader'; + +export const COMPONENT = { + template: template +}; + +module.component(NAME, COMPONENT); diff --git a/@salix/crud/src/navigation/index/index.html b/@salix/crud/src/navigation/index/index.html new file mode 100644 index 000000000..a9be77130 --- /dev/null +++ b/@salix/crud/src/navigation/index/index.html @@ -0,0 +1,233 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/@salix/crud/src/navigation/index/index.js b/@salix/crud/src/navigation/index/index.js new file mode 100644 index 000000000..680ac7c56 --- /dev/null +++ b/@salix/crud/src/navigation/index/index.js @@ -0,0 +1,11 @@ +import template from './index.html'; +import {module} from '../../module'; + +export const NAME = 'navigationIndex'; + +export const COMPONENT = { + template: template, +}; + +module.component(NAME, COMPONENT); + diff --git a/@salix/crud/src/navigation/index/item.html b/@salix/crud/src/navigation/index/item.html new file mode 100644 index 000000000..1be1dc305 --- /dev/null +++ b/@salix/crud/src/navigation/index/item.html @@ -0,0 +1,4 @@ + + {{$ctrl.item.icon}} + {{$ctrl.item.text}} + \ No newline at end of file diff --git a/@salix/crud/src/navigation/index/item.js b/@salix/crud/src/navigation/index/item.js new file mode 100644 index 000000000..452d05499 --- /dev/null +++ b/@salix/crud/src/navigation/index/item.js @@ -0,0 +1,13 @@ +import template from './item.html'; +import {module} from '../../module'; + +export const NAME = 'navigationItem'; + +export const COMPONENT = { + template: template, + bindings: { + item: '<' + } +}; + +module.component(NAME, COMPONENT); diff --git a/@salix/crud/src/navigation/index/list.html b/@salix/crud/src/navigation/index/list.html new file mode 100644 index 000000000..8c1e3fed1 --- /dev/null +++ b/@salix/crud/src/navigation/index/list.html @@ -0,0 +1,8 @@ +
+ +
+ diff --git a/@salix/crud/src/navigation/index/list.js b/@salix/crud/src/navigation/index/list.js new file mode 100644 index 000000000..664f9f7b3 --- /dev/null +++ b/@salix/crud/src/navigation/index/list.js @@ -0,0 +1,13 @@ +import template from './list.html'; +import {module} from '../../module'; + +export const NAME = 'navigationList'; + +export const COMPONENT = { + template: template, + bindings: { + items: '<' + } +}; + +module.component(NAME, COMPONENT); diff --git a/@salix/crud/src/navigation/index/main.html b/@salix/crud/src/navigation/index/main.html new file mode 100644 index 000000000..ee8548645 --- /dev/null +++ b/@salix/crud/src/navigation/index/main.html @@ -0,0 +1,13 @@ +
+
+
+

Opciones

+
+
+ Cuerpo principal de la tarjeta "opciones" +
+ +
+
\ No newline at end of file diff --git a/@salix/crud/src/navigation/index/main.js b/@salix/crud/src/navigation/index/main.js new file mode 100644 index 000000000..f42898106 --- /dev/null +++ b/@salix/crud/src/navigation/index/main.js @@ -0,0 +1,10 @@ +import template from './main.html'; +import {module} from '../../module'; + +export const NAME = 'navigationMain'; + +export const COMPONENT = { + template: template +}; + +module.component(NAME, COMPONENT); diff --git a/@salix/crud/src/navigation/index/style.css b/@salix/crud/src/navigation/index/style.css new file mode 100644 index 000000000..e9654abcc --- /dev/null +++ b/@salix/crud/src/navigation/index/style.css @@ -0,0 +1,234 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +html, body { + font-family: 'Roboto', 'Helvetica', sans-serif; +} + +.demo-avatar { + width: 40px; + height: 40px; + border-radius: 24px; +} + +.mdl-textfield--expandable .mdl-button--icon { + top: 0px; +} + +.demo-layout .demo-header .mdl-textfield { + margin-top: 41px; +} +.demo-layout .demo-header .mdl-textfield .mdl-textfield__expandable-holder { + bottom: 19px; +} +.demo-layout .mdl-layout__header .mdl-layout__drawer-button { + color: rgba(0, 0, 0, 0.54); +} +.mdl-layout__drawer .avatar { + margin-bottom: 16px; +} +.demo-drawer { + border: none; +} +/* iOS Safari specific workaround */ +.demo-drawer .mdl-menu__container { + z-index: -1; +} +.demo-drawer .demo-navigation { + z-index: -2; +} +/* END iOS Safari specific workaround */ +.demo-drawer .mdl-menu .mdl-menu__item { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; +} +.demo-drawer-header { + box-sizing: border-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-justify-content: flex-end; + -ms-flex-pack: end; + justify-content: flex-end; + height: 64px; + padding-bottom: 12px; + padding-left: 16px; +} +.demo-avatar-dropdown { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + position: relative; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + width: 100%; +} + +.demo-navigation { + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; +} +.demo-layout .demo-navigation .mdl-navigation__link { + display: -webkit-flex !important; + display: -ms-flexbox !important; + display: flex !important; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + color: #424242; + font-weight: 500; +} +.demo-layout .demo-navigation .mdl-navigation__link:hover { + background-color: #ff9800; + color: #fff; +} +.demo-navigation .mdl-navigation__link .material-icons { + font-size: 24px; + color: rgba(255, 255, 255, 0.56); + margin-right: 32px; +} + +.demo-content { + max-width: 1080px; +} + +.demo-charts { + -webkit-align-items: center; + -ms-flex-align: center; + -ms-grid-row-align: center; + align-items: center; +} +.demo-chart:nth-child(1) { + color: #ACEC00; +} +.demo-chart:nth-child(2) { + color: #00BBD6; +} +.demo-chart:nth-child(3) { + color: #BA65C9; +} +.demo-chart:nth-child(4) { + color: #EF3C79; +} +.demo-graphs { + padding: 16px 32px; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-align-items: stretch; + -ms-flex-align: stretch; + align-items: stretch; +} +/* TODO: Find a proper solution to have the graphs + * not float around outside their container in IE10/11. + * Using a browserhacks.com solution for now. + */ +_:-ms-input-placeholder, :root .demo-graphs { + min-height: 664px; +} +_:-ms-input-placeholder, :root .demo-graph { + max-height: 300px; +} +/* TODO end */ +.demo-graph:nth-child(1) { + color: #00b9d8; +} +.demo-graph:nth-child(2) { + color: #d9006e; +} + +.demo-cards { + -webkit-align-items: flex-start; + -ms-flex-align: start; + -ms-grid-row-align: flex-start; + align-items: flex-start; + -webkit-align-content: flex-start; + -ms-flex-line-pack: start; + align-content: flex-start; +} +.demo-cards .demo-separator { + height: 32px; +} +.demo-cards .mdl-card__title.mdl-card__title { + color: white; + padding-bottom: 30px; + font-size: 24px; + font-weight: 400; +} + +.demo-cards ul { + padding: 0; +} + +.demo-cards h3 { + font-size: 1em; +} +.demo-updates .mdl-card__title { + height: 64px; +} + +.demo-cards .mdl-card__actions a { + color: ; + text-decoration: none; +} + +.demo-options h3 { + margin: 0; +} +.demo-options .mdl-checkbox__box-outline { + border-color: rgba(255, 255, 255, 0.89); +} +.demo-options ul { + margin: 0; + list-style-type: none; +} +.demo-options li { + margin: 4px 0; +} +.demo-options .material-icons { + color: rgba(255, 255, 255, 0.89); +} +.demo-options .mdl-card__actions { + height: 64px; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + box-sizing: border-box; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; +} + + + diff --git a/@salix/crud/src/navigation/routes.js b/@salix/crud/src/navigation/routes.js new file mode 100644 index 000000000..6db83b497 --- /dev/null +++ b/@salix/crud/src/navigation/routes.js @@ -0,0 +1,8 @@ +[{ + url: '/navigation', + state: 'navigation', + template: '', + module: 'crud', + description: '', + image: '', +}] diff --git a/@salix/error.log b/@salix/error.log index e45721d1a..007bca8ab 100644 --- a/@salix/error.log +++ b/@salix/error.log @@ -1110,3 +1110,23 @@ 2016/11/08 14:20:35 [info] 9592#8848: *282 client closed connection while waiting for request, client: 127.0.0.1, server: 0.0.0.0:8080 2016/11/08 14:21:04 [info] 9592#8848: *288 client closed connection while waiting for request, client: 127.0.0.1, server: 0.0.0.0:8080 2016/11/08 14:21:04 [info] 9592#8848: *289 client closed connection while waiting for request, client: 127.0.0.1, server: 0.0.0.0:8080 +2016/11/09 11:53:27 [notice] 871#0: using the "kqueue" event method +2016/11/09 11:53:27 [notice] 871#0: using the "kqueue" event method +2016/11/09 11:53:27 [notice] 871#0: nginx/1.10.1 +2016/11/09 11:53:27 [notice] 871#0: nginx/1.10.1 +2016/11/09 11:53:27 [notice] 871#0: built by clang 8.0.0 (clang-800.0.38) +2016/11/09 11:53:27 [notice] 871#0: built by clang 8.0.0 (clang-800.0.38) +2016/11/09 11:53:27 [notice] 871#0: OS: Darwin 16.0.0 +2016/11/09 11:53:27 [notice] 871#0: OS: Darwin 16.0.0 +2016/11/09 11:53:27 [notice] 871#0: hw.ncpu: 4 +2016/11/09 11:53:27 [notice] 871#0: hw.ncpu: 4 +2016/11/09 11:53:27 [notice] 871#0: net.inet.tcp.sendspace: 131072 +2016/11/09 11:53:27 [notice] 871#0: net.inet.tcp.sendspace: 131072 +2016/11/09 11:53:27 [notice] 871#0: kern.ipc.somaxconn: 128 +2016/11/09 11:53:27 [notice] 871#0: kern.ipc.somaxconn: 128 +2016/11/09 11:53:27 [notice] 871#0: getrlimit(RLIMIT_NOFILE): 1024:9223372036854775807 +2016/11/09 11:53:27 [notice] 871#0: getrlimit(RLIMIT_NOFILE): 1024:9223372036854775807 +2016/11/09 11:53:27 [notice] 872#0: start worker processes +2016/11/09 11:53:27 [notice] 872#0: start worker processes +2016/11/09 11:53:27 [notice] 872#0: start worker process 873 +2016/11/09 11:53:27 [notice] 872#0: start worker process 873 diff --git a/forever.json b/forever.json index 79abf201f..27250bb05 100644 --- a/forever.json +++ b/forever.json @@ -14,5 +14,14 @@ "script": "server.js", "sourceDir": "./@salix-services/account/server", "workingDir": "." + }, + { + "uid": "customer", + "append": true, + "watch": true, + "script": "server.js", + "sourceDir": "./@salix-services/customer/server", + "workingDir": "." } + ] \ No newline at end of file diff --git a/myToken.json b/myToken.json index fe608b5c1..66527496a 100644 --- a/myToken.json +++ b/myToken.json @@ -1,7 +1,7 @@ { "ids": { "User": 2, - "AccessToken": 12 + "AccessToken": 13 }, "models": { "User": { @@ -18,7 +18,8 @@ "x3ZcHQwhgkLZPKJlrGEvrlTIh3le4lbCChEmMbXOzEkGtrb0UKuMxhilgehhaP4H": "{\"id\":\"x3ZcHQwhgkLZPKJlrGEvrlTIh3le4lbCChEmMbXOzEkGtrb0UKuMxhilgehhaP4H\",\"ttl\":1209600,\"created\":\"2016-11-08T13:04:35.169Z\",\"userId\":1}", "cEJfb8uHS5bEjVF3lHjbrFSSl6kbvl71PYyM74FGjoA0aPL2MHkVlf3L2cG8UX4O": "{\"id\":\"cEJfb8uHS5bEjVF3lHjbrFSSl6kbvl71PYyM74FGjoA0aPL2MHkVlf3L2cG8UX4O\",\"ttl\":1209600,\"created\":\"2016-11-08T13:09:40.950Z\",\"userId\":1}", "F5yGEtsyK4XamSRGjqCckISqRYv8RyUfw0cnTthnSrLTD1sZAWsv68vizFAGDLPS": "{\"id\":\"F5yGEtsyK4XamSRGjqCckISqRYv8RyUfw0cnTthnSrLTD1sZAWsv68vizFAGDLPS\",\"ttl\":1209600,\"created\":\"2016-11-08T13:09:57.542Z\",\"userId\":1}", - "gk3QKn3Hyg65NE2Brq3lPYxCTaSCFNYrOeny47lrxnw0cFOrXdF5uN3O6WerqXrL": "{\"id\":\"gk3QKn3Hyg65NE2Brq3lPYxCTaSCFNYrOeny47lrxnw0cFOrXdF5uN3O6WerqXrL\",\"ttl\":1209600,\"created\":\"2016-11-08T13:11:06.135Z\",\"userId\":1}" + "gk3QKn3Hyg65NE2Brq3lPYxCTaSCFNYrOeny47lrxnw0cFOrXdF5uN3O6WerqXrL": "{\"id\":\"gk3QKn3Hyg65NE2Brq3lPYxCTaSCFNYrOeny47lrxnw0cFOrXdF5uN3O6WerqXrL\",\"ttl\":1209600,\"created\":\"2016-11-08T13:11:06.135Z\",\"userId\":1}", + "u5Cvy3hvP6GHnzUs3SaBaSKUvllfB9ZwblgAGC7v3HC2MxCvyhw3jbbrALKiJ4WY": "{\"id\":\"u5Cvy3hvP6GHnzUs3SaBaSKUvllfB9ZwblgAGC7v3HC2MxCvyhw3jbbrALKiJ4WY\",\"ttl\":1209600,\"created\":\"2016-11-09T10:54:05.162Z\",\"userId\":1}" } } } \ No newline at end of file