Añadido customer

This commit is contained in:
nelo 2016-11-09 13:12:59 +01:00
parent 852fe34c6f
commit d79dda5f9e
47 changed files with 1495 additions and 5 deletions

View File

@ -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

View File

@ -0,0 +1 @@
/client/

View File

@ -0,0 +1,3 @@
{
"extends": "loopback"
}

19
@salix-services/customer/.gitignore vendored Normal file
View File

@ -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

View File

@ -0,0 +1,3 @@
{
"generator-loopback": {}
}

View File

@ -0,0 +1,3 @@
## Client
This is the place for your application front-end files.

View File

@ -0,0 +1,14 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Salix</title>
</head>
<body ng-app="login">
<vn-login></vn-login>
<script
type="text/javascript"
src="/salix.customer.js">
</script>
</body>
</html>

View File

@ -0,0 +1,15 @@
{
"name": "AccessTokenIp",
"base": "AccessToken",
"idInjection": false,
"properties": {
"ip": {
"type": "string",
"default": "1.1.1.1"
}
},
"validations": [],
"relations": {},
"acls": [],
"methods": {}
}

View File

@ -0,0 +1,18 @@
{
"name": "UserIp",
"base": "User",
"properties": {},
"validations": [],
"relations": {
"accessTokens": {
"type": "hasMany",
"model": "AccessTokenIp",
"foreignKey": "userId",
"options": {
"disableInclude": true
}
}
},
"acls": [],
"methods": {}
}

View File

@ -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": {}
}

View File

@ -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');
});
};
};

View File

@ -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"
}
}
}
}

View File

@ -0,0 +1,5 @@
'use strict';
module.exports = function(Usera) {
};

View File

@ -0,0 +1,13 @@
{
"name": "UserA",
"base": "PersistedModel",
"idInjection": true,
"options": {
"validateUpsert": true
},
"properties": {},
"validations": [],
"relations": {},
"acls": [],
"methods": {}
}

View File

@ -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"
}

View File

@ -0,0 +1,6 @@
'use strict';
module.exports = function enableAuthentication(server) {
// enable authentication
// server.enableAuth();
};

View File

@ -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);
};

View File

@ -0,0 +1,5 @@
{
"loopback-component-explorer": {
"mountPath": "/explorer"
}
}

View File

@ -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
}

View File

@ -0,0 +1,6 @@
{
"db": {
"name": "db",
"connector": "memory"
}
}

View File

@ -0,0 +1,10 @@
{
"final:after": {
"strong-error-handler": {
"params": {
"debug": true,
"log": true
}
}
}
}

View File

@ -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": {}
}
}

View File

@ -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);
};

View File

@ -0,0 +1,4 @@
module.exports = function() {
console.log('Date time middleware triggered.');
res.json({datetime: new Date()});
};

View File

@ -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
}
}

View File

@ -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();
});

View File

@ -6,4 +6,4 @@
<script type="text/javascript" src="/salix/config.js"> </script> <script type="text/javascript" src="/salix/config.js"> </script>
<p>Párrafo de ejemplo</p> <p>Párrafo de ejemplo</p>
</body> </body>
</html> </html>fore

View File

@ -7,9 +7,14 @@ export const COMPONENT = {
controller: function() { controller: function() {
this.users = [{id: 10, name: "xxxx"}]; this.users = [{id: 10, name: "xxxx"}];
this.search = function() { this.search = function() {
this.users.push({id: 2, name: 'yyyyy'}); $http.post('http://localhost:3000/api/Customers', {name: 'nelo'});
}; };
} }
}; };
module.component(NAME, COMPONENT); 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'];
}
]);

View File

@ -0,0 +1,9 @@
<div class="demo-layout mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header">
<navigation-header></navigation-header>
<div class="demo-drawer mdl-layout__drawer mdl-color--light-green-900 mdl-color-text--blue-grey-50">
<navigation-list items="$ctrl.items"></navigation-list>
</div>
<main class="mdl-layout__content mdl-color--grey-100">
<navigation-main></navigation-main>
</main>
</div>

View File

@ -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);

View File

@ -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;
}

View File

@ -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;
}

View File

@ -0,0 +1,24 @@
<header class="demo-header mdl-layout__header">
<div class="mdl-layout__header-row">
<div class="mdl-layout-spacer"></div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable">
<label class="mdl-button mdl-js-button mdl-button--icon" for="search">
<i class="material-icons">search</i>
</label>
<div class="mdl-textfield__expandable-holder">
<input class="mdl-textfield__input" type="text" id="search">
</div>
</div>
<div class="mdl-layout-spacer"></div>
<button class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon" id="hdrbtn">
<i class="material-icons">more_vert</i>
</button>
<ul class="mdl-menu mdl-js-menu mdl-js-ripple-effect mdl-menu--bottom-right" for="hdrbtn">
<li class="mdl-menu__item">Opcion</li>
<li class="mdl-menu__item">Opcion</li>
<li class="mdl-menu__item">Opcion</li>
</ul>
</div>
</header>

View File

@ -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);

View File

@ -0,0 +1,233 @@
<head>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&amp;lang=en">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.2.1/material.light_green-orange.min.css">
<style>
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;
}
.mdl-card__title-text{
text-shadow: 1px 1px #5e892a
}
</style>
</head>
<body>
<navigation-compose></navigation-compose>
<script src="https://code.getmdl.io/1.2.1/material.min.js"></script>
</body>

View File

@ -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);

View File

@ -0,0 +1,4 @@
<a class="mdl-navigation__link" item= "item" href={{$ctrl.item.link}}>
<i class="mdl-color-text--white material-icons" role="presentation">{{$ctrl.item.icon}}</i>
{{$ctrl.item.text}}
</a>

View File

@ -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);

View File

@ -0,0 +1,8 @@
<header class="demo-drawer-header">
<img src="images/user.jpg" class="demo-avatar">
</header>
<nav class="demo-navigation mdl-navigation mdl-color--light-green">
<navigation-item ng-repeat="item in $ctrl.items" item ="item"></navigation-item>
<div class="mdl-layout-spacer"></div>
<a class="mdl-navigation__link" href=""><i class="mdl-color-text--white material-icons" role="presentation">help_outline</i><span class="visuallyhidden">Help</span></a>
</nav>

View File

@ -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);

View File

@ -0,0 +1,13 @@
<div class="demo-cards mdl-cell mdl-cell--6-col mdl-cell mdl-grid">
<div class="demo-updates mdl-card mdl-shadow--2dp mdl-cell mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--12-col-desktop">
<div class="mdl-card__title mdl-card--expand mdl-color--light-green">
<h2 class="mdl-card__title-text">Opciones</h2>
</div>
<div class="mdl-card__supporting-text mdl-color-text--grey-600">
Cuerpo principal de la tarjeta "opciones"
</div>
<div class="mdl-card__actions mdl-card--border">
<a href="#" class="mdl-button mdl-js-button mdl-js-ripple-effect">Guardar Cambios</a>
</div>
</div>
</div>

View File

@ -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);

View File

@ -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;
}

View File

@ -0,0 +1,8 @@
[{
url: '/navigation',
state: 'navigation',
template: '<navigation-index></navigation-index>',
module: 'crud',
description: '',
image: '',
}]

View File

@ -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: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: *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/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

View File

@ -14,5 +14,14 @@
"script": "server.js", "script": "server.js",
"sourceDir": "./@salix-services/account/server", "sourceDir": "./@salix-services/account/server",
"workingDir": "." "workingDir": "."
},
{
"uid": "customer",
"append": true,
"watch": true,
"script": "server.js",
"sourceDir": "./@salix-services/customer/server",
"workingDir": "."
} }
] ]

View File

@ -1,7 +1,7 @@
{ {
"ids": { "ids": {
"User": 2, "User": 2,
"AccessToken": 12 "AccessToken": 13
}, },
"models": { "models": {
"User": { "User": {
@ -18,7 +18,8 @@
"x3ZcHQwhgkLZPKJlrGEvrlTIh3le4lbCChEmMbXOzEkGtrb0UKuMxhilgehhaP4H": "{\"id\":\"x3ZcHQwhgkLZPKJlrGEvrlTIh3le4lbCChEmMbXOzEkGtrb0UKuMxhilgehhaP4H\",\"ttl\":1209600,\"created\":\"2016-11-08T13:04:35.169Z\",\"userId\":1}", "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}", "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}", "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}"
} }
} }
} }