diff --git a/.elasticbeanstalk/config.yml b/.elasticbeanstalk/config.yml index 3a7cc1be017a40de6a267b2c3c696c4252ff0fc7..cd558c9735f25e36cd220c7eea685b88c92b1996 100644 --- a/.elasticbeanstalk/config.yml +++ b/.elasticbeanstalk/config.yml @@ -1,10 +1,12 @@ branch-defaults: - $GITBRANCH: - environment: $EBENV + $GIT_BRANCH: + environment: $EB_ENV global: - application_name: $EBAPP + application_name: $EB_APP default_ec2_keyname: EastCoastBPKey default_platform: 64bit Amazon Linux 2015.09 v2.0.8 running Docker 1.9.1 default_region: us-east-1 profile: null sc: git +deploy: + artifact: deployment.zip diff --git a/.gitignore b/.gitignore index 3722dc3f222bbb0eb71fb1ba739d66a79f0fc0c2..15037eae2b03e50e2d2abc321dbb3b5444235d10 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,12 @@ -# Python -__pycache__ -*.pyc - # Docker .cache # Config -app/config/production.py -app/config/development.py -app/config/test.py -config.json +config.ts -# SQLite -*.db +# NPM Logs +npm-debug.log +front/node_modules/* # PyCharm .idea @@ -36,5 +30,11 @@ virtpy/ # Local Dev Folder /local_dev +# Gulp Generated CSS +front/current/styles.css + #Index ignore front/index.html + +# Vim +*.swp diff --git a/config/dev.config.ts b/config/dev.config.ts new file mode 100644 index 0000000000000000000000000000000000000000..781445dd34e9043c80b406993499760f4d2a07eb --- /dev/null +++ b/config/dev.config.ts @@ -0,0 +1,13 @@ +import { Headers } from 'angular2/http'; + +export class config { + public static SERVICES:any = { + "user": {"url": "http://127.0.0.1:5600"}, + "project": {"url": "http://127.0.0.1:5310"}, + "document": {"url": "http://127.0.0.1:5320"} + }; + public static HEADERS = new Headers({ + 'x-blocpower-app-key': '$APP_KEY' + }); + public static static_url:string = '/current'; +}; diff --git a/config/dev.default.json b/config/dev.default.json deleted file mode 100644 index 94080b2496a9535c5cf9a9e83e2b87855cfd3478..0000000000000000000000000000000000000000 --- a/config/dev.default.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "services": { - "user": {"url": "http://127.0.0.1:5600"}, - "project": {"url": "http://127.0.0.1:5310"}, - "document": {"url": "http://127.0.0.1:5320"} - }, - "app_key": "$APP_KEY" -} diff --git a/config/production.config.ts b/config/production.config.ts new file mode 100644 index 0000000000000000000000000000000000000000..9e99a36ba584c1cdfd44e9ad6089b1f5d7c6f99b --- /dev/null +++ b/config/production.config.ts @@ -0,0 +1,13 @@ +import { Headers } from 'angular2/http'; + +export class config { + public static SERVICES:any = { + "user": {"url": "http://user.s.blocpower.us"}, + "project": {"url": "http://project.s.blocpower.us"}, + "document": {"url": "http://document.s.blocpower.us"} + }; + public static HEADERS = new Headers({ + 'x-blocpower-app-key': '$APP_KEY' + }); + public static static_url:string = '$CURRENT'; +}; diff --git a/config/production.default.json b/config/production.default.json deleted file mode 100644 index 821b52abfc120f83559d57a2c2777e044c81eaf8..0000000000000000000000000000000000000000 --- a/config/production.default.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "services": { - "user": {"url": "http://user.s.blocpower.us"}, - "project": {"url": "http://project.s.blocpower.us"}, - "document": {"url": "http://document.s.blocpower.us"} - }, - "app_key": "$APP_KEY" -} diff --git a/config/staging.config.ts b/config/staging.config.ts new file mode 100644 index 0000000000000000000000000000000000000000..d8a54a4d0b9fdaee56ea9a66d394260c5ee3ea5b --- /dev/null +++ b/config/staging.config.ts @@ -0,0 +1,13 @@ +import { Headers } from 'angular2/http'; + +export class config { + public static SERVICES:any = { + "user": {"url": "http://staging.user.s.blocpower.us"}, + "project": {"url": "http://staging.project.s.blocpower.us"}, + "document": {"url": "http://staging.document.s.blocpower.us"} + }; + public static HEADERS = new Headers({ + 'x-blocpower-app-key': '$APP_KEY' + }); + public static static_url:string = '$CURRENT'; +}; diff --git a/config/staging.default.json b/config/staging.default.json deleted file mode 100644 index 9a39559baca3072a50290af8b0f1f6cc175796ef..0000000000000000000000000000000000000000 --- a/config/staging.default.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "services": { - "user": {"url": "http://staging.user.s.blocpower.us"}, - "project": {"url": "http://staging.project.s.blocpower.us"}, - "document": {"url": "http://staging.document.s.blocpower.us"} - }, - "app_key": "$APP_KEY" -} diff --git a/front/current/assets/fontello/config.json b/front/current/assets/fontello/config.json new file mode 100644 index 0000000000000000000000000000000000000000..ffc5166a05d8b1d8625a0322320ce06b59d20155 --- /dev/null +++ b/front/current/assets/fontello/config.json @@ -0,0 +1,28 @@ +{ + "name": "blocpower", + "css_prefix_text": "icon-", + "css_use_suffix": false, + "hinting": true, + "units_per_em": 1000, + "ascent": 850, + "glyphs": [ + { + "uid": "3a6f0140c3a390bdb203f56d1bfdefcb", + "css": "gauge", + "code": 59392, + "src": "entypo" + }, + { + "uid": "f805bb95d40c7ef2bc51b3d50d4f2e5c", + "css": "list", + "code": 59394, + "src": "fontawesome" + }, + { + "uid": "2a6740fc2f9d0edea54205963f662594", + "css": "spinner", + "code": 59393, + "src": "fontelico" + } + ] +} \ No newline at end of file diff --git a/front/current/assets/fontello/css/animation.css b/front/current/assets/fontello/css/animation.css new file mode 100644 index 0000000000000000000000000000000000000000..ac5a9562fbd637637048f00b8a8eb86e6dbb4f88 --- /dev/null +++ b/front/current/assets/fontello/css/animation.css @@ -0,0 +1,85 @@ +/* + Animation example, for spinners +*/ +.animate-spin { + -moz-animation: spin 2s infinite linear; + -o-animation: spin 2s infinite linear; + -webkit-animation: spin 2s infinite linear; + animation: spin 2s infinite linear; + display: inline-block; +} +@-moz-keyframes spin { + 0% { + -moz-transform: rotate(0deg); + -o-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + + 100% { + -moz-transform: rotate(359deg); + -o-transform: rotate(359deg); + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +@-webkit-keyframes spin { + 0% { + -moz-transform: rotate(0deg); + -o-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + + 100% { + -moz-transform: rotate(359deg); + -o-transform: rotate(359deg); + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +@-o-keyframes spin { + 0% { + -moz-transform: rotate(0deg); + -o-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + + 100% { + -moz-transform: rotate(359deg); + -o-transform: rotate(359deg); + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +@-ms-keyframes spin { + 0% { + -moz-transform: rotate(0deg); + -o-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + + 100% { + -moz-transform: rotate(359deg); + -o-transform: rotate(359deg); + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +@keyframes spin { + 0% { + -moz-transform: rotate(0deg); + -o-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + + 100% { + -moz-transform: rotate(359deg); + -o-transform: rotate(359deg); + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} diff --git a/front/current/assets/fontello/css/blocpower-codes.css b/front/current/assets/fontello/css/blocpower-codes.css new file mode 100644 index 0000000000000000000000000000000000000000..2bc3c799a95265e5722c2c9801973396cfc45408 --- /dev/null +++ b/front/current/assets/fontello/css/blocpower-codes.css @@ -0,0 +1,4 @@ + +.icon-gauge:before { content: '\e800'; } /* '' */ +.icon-spinner:before { content: '\e801'; } /* '' */ +.icon-list:before { content: '\e802'; } /* '' */ \ No newline at end of file diff --git a/front/current/assets/fontello/css/blocpower-embedded.css b/front/current/assets/fontello/css/blocpower-embedded.css new file mode 100644 index 0000000000000000000000000000000000000000..81f09e30197b462776747c860a6ce24e889c403c --- /dev/null +++ b/front/current/assets/fontello/css/blocpower-embedded.css @@ -0,0 +1,57 @@ +@font-face { + font-family: 'blocpower'; + src: url('../font/blocpower.eot?64008959'); + src: url('../font/blocpower.eot?64008959#iefix') format('embedded-opentype'), + url('../font/blocpower.svg?64008959#blocpower') format('svg'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'blocpower'; + src: url('data:application/octet-stream;base64,d09GRgABAAAAAA0c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CQQCA0VYIRsjIVlCK7AIZbADJFB4sAEVMC0AS7gAyFJYsQEBjlmwAbkIAAgAY3CxAAVCsgABACqxAAVCswoCAQgqsQAFQrMOAAEIKrEABkK6AsAAAQAJKrEAB0K6AEAAAQAJKrEDAESxJAGIUViwQIhYsQNkRLEmAYhRWLoIgAABBECIY1RYsQMARFlZWVmzDAIBDCq4Af+FsASNsQIARAAA') format('truetype'); +} +/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */ +/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */ +/* +@media screen and (-webkit-min-device-pixel-ratio:0) { + @font-face { + font-family: 'blocpower'; + src: url('../font/blocpower.svg?64008959#blocpower') format('svg'); + } +} +*/ + + [class^="icon-"]:before, [class*=" icon-"]:before { + font-family: "blocpower"; + font-style: normal; + font-weight: normal; + speak: none; + + display: inline-block; + text-decoration: inherit; + width: 1em; + margin-right: .2em; + text-align: center; + /* opacity: .8; */ + + /* For safety - reset parent styles, that can break glyph codes*/ + font-variant: normal; + text-transform: none; + + /* fix buttons height, for twitter bootstrap */ + line-height: 1em; + + /* Animation center compensation - margins should be symmetric */ + /* remove if not needed */ + margin-left: .2em; + + /* you can be more comfortable with increased icons size */ + /* font-size: 120%; */ + + /* Uncomment for 3D effect */ + /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ +} +.icon-gauge:before { content: '\e800'; } /* '' */ +.icon-spinner:before { content: '\e801'; } /* '' */ +.icon-list:before { content: '\e802'; } /* '' */ \ No newline at end of file diff --git a/front/current/assets/fontello/css/blocpower-ie7-codes.css b/front/current/assets/fontello/css/blocpower-ie7-codes.css new file mode 100644 index 0000000000000000000000000000000000000000..d9ff95f951288e0a11213d8054ed49aa74613a0b --- /dev/null +++ b/front/current/assets/fontello/css/blocpower-ie7-codes.css @@ -0,0 +1,4 @@ + +.icon-gauge { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } +.icon-spinner { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } +.icon-list { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } \ No newline at end of file diff --git a/front/current/assets/fontello/css/blocpower-ie7.css b/front/current/assets/fontello/css/blocpower-ie7.css new file mode 100644 index 0000000000000000000000000000000000000000..ae9632981f0ad65fe77ae96ff6d5daca4a1f351a --- /dev/null +++ b/front/current/assets/fontello/css/blocpower-ie7.css @@ -0,0 +1,15 @@ +[class^="icon-"], [class*=" icon-"] { + font-family: 'blocpower'; + font-style: normal; + font-weight: normal; + + /* fix buttons height */ + line-height: 1em; + + /* you can be more comfortable with increased icons size */ + /* font-size: 120%; */ +} + +.icon-gauge { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } +.icon-spinner { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } +.icon-list { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } \ No newline at end of file diff --git a/front/current/assets/fontello/css/blocpower.css b/front/current/assets/fontello/css/blocpower.css new file mode 100644 index 0000000000000000000000000000000000000000..caf0caf1266a7caef171ffee0a4963af404aa795 --- /dev/null +++ b/front/current/assets/fontello/css/blocpower.css @@ -0,0 +1,60 @@ +@font-face { + font-family: 'blocpower'; + src: url('../font/blocpower.eot?85810131'); + src: url('../font/blocpower.eot?85810131#iefix') format('embedded-opentype'), + url('../font/blocpower.woff2?85810131') format('woff2'), + url('../font/blocpower.woff?85810131') format('woff'), + url('../font/blocpower.ttf?85810131') format('truetype'), + url('../font/blocpower.svg?85810131#blocpower') format('svg'); + font-weight: normal; + font-style: normal; +} +/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */ +/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */ +/* +@media screen and (-webkit-min-device-pixel-ratio:0) { + @font-face { + font-family: 'blocpower'; + src: url('../font/blocpower.svg?85810131#blocpower') format('svg'); + } +} +*/ + + [class^="icon-"]:before, [class*=" icon-"]:before { + font-family: "blocpower"; + font-style: normal; + font-weight: normal; + speak: none; + + display: inline-block; + text-decoration: inherit; + width: 1em; + margin-right: .2em; + text-align: center; + /* opacity: .8; */ + + /* For safety - reset parent styles, that can break glyph codes*/ + font-variant: normal; + text-transform: none; + + /* fix buttons height, for twitter bootstrap */ + line-height: 1em; + + /* Animation center compensation - margins should be symmetric */ + /* remove if not needed */ + margin-left: .2em; + + /* you can be more comfortable with increased icons size */ + /* font-size: 120%; */ + + /* Font smoothing. That was taken from TWBS */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + + /* Uncomment for 3D effect */ + /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ +} + +.icon-gauge:before { content: '\e800'; } /* '' */ +.icon-spinner:before { content: '\e801'; } /* '' */ +.icon-list:before { content: '\e802'; } /* '' */ \ No newline at end of file diff --git a/front/current/assets/fontello/font/blocpower.eot b/front/current/assets/fontello/font/blocpower.eot new file mode 100644 index 0000000000000000000000000000000000000000..4efe16fc89364723f90a132eb9125d26941ac25a Binary files /dev/null and b/front/current/assets/fontello/font/blocpower.eot differ diff --git a/front/current/assets/fontello/font/blocpower.svg b/front/current/assets/fontello/font/blocpower.svg new file mode 100644 index 0000000000000000000000000000000000000000..ca9fba6671e3227fb88239ae6899d94a7686c73c --- /dev/null +++ b/front/current/assets/fontello/font/blocpower.svg @@ -0,0 +1,16 @@ + + + +Copyright (C) 2016 by original authors @ fontello.com + + + + + + + + + + + + \ No newline at end of file diff --git a/front/current/assets/fontello/font/blocpower.ttf b/front/current/assets/fontello/font/blocpower.ttf new file mode 100644 index 0000000000000000000000000000000000000000..c5232509e2a4297d5d0b3f96331e12572c680623 Binary files /dev/null and b/front/current/assets/fontello/font/blocpower.ttf differ diff --git a/front/current/assets/fontello/font/blocpower.woff b/front/current/assets/fontello/font/blocpower.woff new file mode 100644 index 0000000000000000000000000000000000000000..23304ec169c448905d92087add71b23a0e9225e4 Binary files /dev/null and b/front/current/assets/fontello/font/blocpower.woff differ diff --git a/front/current/assets/fontello/font/blocpower.woff2 b/front/current/assets/fontello/font/blocpower.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..08b11da20fdcdc8214044d38306d0cdfab6a8a17 Binary files /dev/null and b/front/current/assets/fontello/font/blocpower.woff2 differ diff --git a/front/current/assets/images/logo.png b/front/current/assets/images/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..b39d6c529834693432defe80a64383bf01bd41ad Binary files /dev/null and b/front/current/assets/images/logo.png differ diff --git a/front/current/assets/styles/components/_animation.scss b/front/current/assets/styles/components/_animation.scss new file mode 100644 index 0000000000000000000000000000000000000000..c2cd1b833b8e9a7afd2ef5283fbe9f3b97a8efcd --- /dev/null +++ b/front/current/assets/styles/components/_animation.scss @@ -0,0 +1,19 @@ +.rotating { + display: inline-block; + -webkit-animation: rotation 2s linear infinite; + -moz-animation: rotation 2s linear infinite; + animation: rotation 2s linear infinite; +} +@-webkit-keyframes rotation { + from { -webkit-transform: rotate(0deg); } + to { -webkit-transform: rotate(359deg); } +} +@-moz-keyframes rotation { + from { -moz-transform: rotate(0deg); } + to { -moz-transform: rotate(359deg); } +} +@keyframes rotation { + from { transform: rotate(0deg); } + to { transform: rotate(360deg); } +} + diff --git a/front/current/assets/styles/components/_button.scss b/front/current/assets/styles/components/_button.scss new file mode 100644 index 0000000000000000000000000000000000000000..30e6ffc8676fe3286653b06952e11510b9e6661a --- /dev/null +++ b/front/current/assets/styles/components/_button.scss @@ -0,0 +1,9 @@ +button { + background: $gray-02; + border-radius: 30px; + line-height: 30px; + border: none; + color: $white; + cursor: pointer; + +} diff --git a/front/current/assets/styles/components/_global.scss b/front/current/assets/styles/components/_global.scss new file mode 100644 index 0000000000000000000000000000000000000000..3a545ef8819bd59984b2a72a0724f53d3b78cf9b --- /dev/null +++ b/front/current/assets/styles/components/_global.scss @@ -0,0 +1,106 @@ +/*! Typebase.less v0.1.0 | MIT License */ + +// Typesetting variables. Edit these! +$baseFontSize: 14px; // in pixels. This would result in 22px on desktop +$baseLineHeight: 1.5; // how large the line height is as a multiple of font size +$leading: $baseLineHeight * 1rem; + +// Rate of growth for headings +// I actually like this to be slightly smaller then the leading. Makes for tight headings. +$scale: 1.414; + +/* Setup */ +html { + /* Change default typefaces here */ + font-family: "MuseoSansRounded", Helvetica, sans-serif; + font-size: $baseFontSize; + + // Make everything look a little nicer in webkit + -webkit-font-smoothing: antialiased; + + // -webkit-text-size-adjust: auto + // -moz-text-size-adjust: auto + // -ms-text-size-adjust: auto + // -o-text-size-adjust: auto + // text-size-adjust: auto +} + +body { + margin: 0; + height: 100%; +} +/* Copy & Lists */ +p { + line-height: $leading; + margin-top: $leading; + margin-bottom: 0; +} +ul, ol { + margin: $leading, 0, $leading, 0; + padding: 0; + li { + line-height: $leading; + } + ul, ol { + margin-top: 0; + margin-bottom: 0; + } +} +blockquote { + line-height: $leading; + margin-top: $leading; + margin-bottom: $leading; +} +/* Headings */ +h1, h2, h3, h4, h5, h6 { + /* Change heading typefaces here */ + font-family: sans-serif; + margin-top: $leading; + margin-bottom: 0; + line-height: $leading; +} +h1 { + font-size: 3 * $scale * 1rem; + line-height: 3 * $leading; + margin-top: 2 * $leading; +} +h2 { + font-size: 2 * $scale * 1rem; + line-height: 2 * $leading; + margin-top: 2 * $leading; +} +h3 { + font-size: 1 * $scale * 1rem; +} +h4 { + font-size: $scale / 2 * 1rem; +} +h5 { + font-size: $scale / 3 * 1rem; +} +h6 { + font-size: $scale / 4 * 1rem; +} + +/* Tables */ +table { + border-spacing: 0px; + border-collapse: collapse; +} + td, th { + padding: 0; + } +/* Code blocks */ +code { + // Forces text to constrain to the line-height. Not ideal, but works. + vertical-align: bottom; +} +/* Leading paragraph text */ +.lead { + font-size: $scale * 1rem; +} + +/* Hug a the block above you */ +.hug { + margin-top: 0; +} diff --git a/front/current/assets/styles/components/_loaders.scss b/front/current/assets/styles/components/_loaders.scss new file mode 100644 index 0000000000000000000000000000000000000000..ec9df7d3a92f2f64256b8fde60bd5530c50ab903 --- /dev/null +++ b/front/current/assets/styles/components/_loaders.scss @@ -0,0 +1,12 @@ +.fullscreen-loader { + display: table-cell; + height: 100vh; + width: 100vw; + + font-size: 3em; + + text-align: center; + vertical-align: middle; + + color: $black; +} diff --git a/front/current/assets/styles/components/_nav.scss b/front/current/assets/styles/components/_nav.scss new file mode 100644 index 0000000000000000000000000000000000000000..4a17ae20559eecd08e8a64d6c55aa38308afc619 --- /dev/null +++ b/front/current/assets/styles/components/_nav.scss @@ -0,0 +1,40 @@ +nav.vertical { + background-color: $gray-01; + width: 50px; + height: 100%; + float: left; + margin-right: 10px; + + ul { + margin: 0; + + li { + display: block; + list-style: none; + + a { + display: block; + padding: 14px; + color: inherit; + &:visited { + color: inherit; + } + &:active { + color: inherit; + } + &:hover { + color: inherit; + } + &.logo { + padding: 7px; + img { + width: 35px; + } + } + } + &.current { + background: $white; + } + } + } +} diff --git a/front/current/assets/styles/components/_project-list.scss b/front/current/assets/styles/components/_project-list.scss new file mode 100644 index 0000000000000000000000000000000000000000..b0318b6328ef52371a6b8935709f1b00d37ae7ab --- /dev/null +++ b/front/current/assets/styles/components/_project-list.scss @@ -0,0 +1,32 @@ +table.projects { + width: calc(100% - 60px); // TODO Replace this with something more global. + color: $gray-02; + font-size: .9em; + + th.project-state, td.project-state { + width: 150px; + } + + tr { + border-bottom: 1px solid $light-gray; + + th, td { + line-height: 1.5em; + padding: 5px; + } + th { + text-transform: uppercase; + font-weight: normal; + text-align: left; + } + td { + text-align: left; + } + } + + tbody { + tr:last-child { + border-bottom: none; + } + } +} diff --git a/front/current/assets/styles/components/_project.scss b/front/current/assets/styles/components/_project.scss new file mode 100644 index 0000000000000000000000000000000000000000..7cec497c8bb8e40beb95c65a08673fa5562d8885 --- /dev/null +++ b/front/current/assets/styles/components/_project.scss @@ -0,0 +1,6 @@ +.project-state { + text-transform: uppercase; + + &[data-state=pending] { color: $orange; } + &[data-state=accepted] { color: $light-green; } +} diff --git a/front/current/assets/styles/styles.scss b/front/current/assets/styles/styles.scss new file mode 100644 index 0000000000000000000000000000000000000000..791c60fe31a549b0ef80a565af610c9f16ff52a1 --- /dev/null +++ b/front/current/assets/styles/styles.scss @@ -0,0 +1,13 @@ +@charset 'utf-8'; + +// Variables +@import 'variables/theme'; + +// Components +@import 'components/global'; +@import 'components/animation'; +@import 'components/button'; +@import 'components/nav'; +@import 'components/project'; +@import 'components/project-list'; +@import 'components/loaders'; diff --git a/front/current/assets/styles/variables/_theme.scss b/front/current/assets/styles/variables/_theme.scss new file mode 100644 index 0000000000000000000000000000000000000000..e3ee04bc7360c5c3dbb1eb684bf91a09f1246784 --- /dev/null +++ b/front/current/assets/styles/variables/_theme.scss @@ -0,0 +1,11 @@ +$gray-01: #7e7e7e; +$gray-02: #585858; +$light-gray: #9b9b9b; + +$orange: #ff9900; +$red: #f6301d; + +$light-green: #2faa6f; + +$white: #ffffff; +$black: #111111; diff --git a/front/current/config/.gitignore b/front/current/config/.gitignore deleted file mode 100644 index b1c572c5b4b30b9f35e0e9692bb6baf2e387e644..0000000000000000000000000000000000000000 --- a/front/current/config/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore every json file in this directory -*.json diff --git a/front/current/controllers/app/app.component.html b/front/current/controllers/app/app.component.html index f6cca80853a67b99ee50f26d973b5d9a7558c6a8..70ccb89a5ced396d564ac08c59e37560ce8dd8f4 100644 --- a/front/current/controllers/app/app.component.html +++ b/front/current/controllers/app/app.component.html @@ -1,6 +1,2 @@ -

{{title}}

- + diff --git a/front/current/controllers/app/app.component.ts b/front/current/controllers/app/app.component.ts index d61de3d14fda2b97f526e69b424447527df04891..2e8070ce6003d5228ed10cc6e3773fd5d04e67eb 100644 --- a/front/current/controllers/app/app.component.ts +++ b/front/current/controllers/app/app.component.ts @@ -1,64 +1,33 @@ -import { Component, OnInit} from 'angular2/core'; +import { Component } from 'angular2/core'; + import { RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from 'angular2/router'; -import {HTTP_PROVIDERS, Http, Response} from 'angular2/http'; -import { ProjectsComponent } from '../projects/projects.component'; -import { RestfulApiService } from '../../services/restful-api.service'; -import { ProjectService } from '../../services/project.service'; -import { DashboardComponent } from '../dashboard/dashboard.component'; -import { Observable } from 'rxjs/Observable'; + +import { config } from '../../config'; + +import { RestService } from '../../services/rest.service'; +import { ProjectService } from '../../services/project/project.service'; + +import { NavComponent } from '../nav/nav.component'; +import { ProjectListComponent } from '../projects/list.component'; @Component({ selector: 'my-app', - templateUrl: 'current/controllers/app/app.component.html', - directives: [ROUTER_DIRECTIVES], + templateUrl: config.static_url + '/controllers/app/app.component.html', providers: [ ROUTER_PROVIDERS, - HTTP_PROVIDERS, - RestfulApiService, - ProjectService - ] + RestService, ProjectService + ], + directives: [ROUTER_DIRECTIVES, NavComponent] }) @RouteConfig([ { - path: '/dashboard', - name: 'Dashboard', - component: DashboardComponent, - useAsDefault: true - }, - { - path: '/projects', + path: '/project/', name: 'Projects', - component: ProjectsComponent + component: ProjectListComponent, + useAsDefault: true } ]) -export class AppComponent implements OnInit { - title = 'Project Dashboard'; - public config: Object = {}; - constructor(private http: Http, private restfulApiService: RestfulApiService){} - - ngOnInit(){ - var configObservable = this.http.get('config.json') - .catch(this.loadConfigError); - - configObservable.subscribe(res => { - this.authenticateApplication(res) - }) - } - - /** Authenticate application with mock restful service object*/ - private authenticateApplication(response: Response){ - console.log(JSON.stringify(response.json())); - this.config = response.json(); - console.log(JSON.stringify(this.config)); - RestfulApiService.baseURL = this.config['api']; - RestfulApiService.origin = this.config['domain']; - this.restfulApiService.authorizeApi(this.config['apiKey']); - } - - /** Throw config error */ - private loadConfigError(error: Response){ - console.log("JSON config error "+JSON.stringify(error.json())); - return Observable.throw(error.json().error || 'Server Error') - } +export class AppComponent { + public title:string = 'Project Dashboard'; } diff --git a/front/current/controllers/dashboard/dashboard.component.html b/front/current/controllers/dashboard/dashboard.component.html deleted file mode 100644 index 792e3af88f83492684491d90396373c3062be328..0000000000000000000000000000000000000000 --- a/front/current/controllers/dashboard/dashboard.component.html +++ /dev/null @@ -1,2 +0,0 @@ -

Top Projects

- diff --git a/front/current/controllers/dashboard/dashboard.component.ts b/front/current/controllers/dashboard/dashboard.component.ts deleted file mode 100644 index a2bff1790c743054239e0414b50a817a3522695a..0000000000000000000000000000000000000000 --- a/front/current/controllers/dashboard/dashboard.component.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Component, OnInit } from 'angular2/core'; -import { Router } from 'angular2/router'; -import { Project, ProjectService } from '../../services/project.service'; -import { ProjectListComponent } from '../projects/project-list.component'; - -@Component({ - selector: 'my-dashboard', - templateUrl: 'current/controllers/dashboard/dashboard.component.html', - directives: [ProjectListComponent] - //styleUrls: ['app/dashboard.component.css'] -}) -export class DashboardComponent implements OnInit { - projects: Project[] = []; - errorMessage: string; - - constructor(private _projectService: ProjectService, private _router: Router) { } - - /** On init get objects 0 to 3 */ - ngOnInit() { - this._projectService.index() - .subscribe( - projects => this.projects = projects.slice(0,2), - error => this.errorMessage = error) - } - - gotoProjectDetail(hero: Project) { - this._router.navigate(['HeroDetail', { id: hero.id }]); - } -} diff --git a/front/current/controllers/nav/nav.component.html b/front/current/controllers/nav/nav.component.html new file mode 100644 index 0000000000000000000000000000000000000000..164369f9cfdde5a50fca5cd96c06f28eed1d5514 --- /dev/null +++ b/front/current/controllers/nav/nav.component.html @@ -0,0 +1,21 @@ + diff --git a/front/current/controllers/nav/nav.component.ts b/front/current/controllers/nav/nav.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..2946a83945017e6e5412730a0fd01343bb7549ca --- /dev/null +++ b/front/current/controllers/nav/nav.component.ts @@ -0,0 +1,13 @@ +import { Component } from 'angular2/core'; +import { ROUTER_DIRECTIVES } from 'angular2/router'; +import { config } from '../../config'; + + +@Component({ + selector: 'navigation-bar', + templateUrl: config.static_url + '/controllers/nav/nav.component.html', + directives: [ROUTER_DIRECTIVES] +}) +export class NavComponent { + public config:any = config; +}; diff --git a/front/current/controllers/projects/list.component.html b/front/current/controllers/projects/list.component.html new file mode 100644 index 0000000000000000000000000000000000000000..e4688aeb55e83b51d77c515317e4e409d50255c9 --- /dev/null +++ b/front/current/controllers/projects/list.component.html @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + +
statusname
+ +
+ {{ projects.error['status'] }}: {{ projects.error['short'] }} +
+ {{ project.data['state'] }} + {{ project.data['name'] }}
diff --git a/front/current/controllers/projects/list.component.ts b/front/current/controllers/projects/list.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..212d18444c82522d238cc8bcd8cb43df9f463aeb --- /dev/null +++ b/front/current/controllers/projects/list.component.ts @@ -0,0 +1,32 @@ +import { Component, OnInit } from 'angular2/core'; +import { Router } from 'angular2/router'; + +import { config } from '../../config'; +import { RestService, Model, Collection } from '../../services/rest.service'; +import { ProjectService } from '../../services/project/project.service'; + +@Component({ + selector: 'project-list', + templateUrl: config.static_url + '/controllers/projects/list.component.html' +}) +export class ProjectListComponent implements OnInit{ + constructor( + private _router:Router, + private _restService:RestService, + private _projectService:ProjectService + ) {}; + + public projects:Collection; + public selectedProject:Model; + + errorMessage:string; + + ngOnInit() { + this.fetch(); + } + + fetch() { + (this.projects = this._restService.Collection(this._projectService, [])) + .fetch(); + }; +} diff --git a/front/current/controllers/projects/project-list.component.html b/front/current/controllers/projects/project-list.component.html deleted file mode 100644 index f6555bf0c29e4ebc711c4c9c994596100e87904a..0000000000000000000000000000000000000000 --- a/front/current/controllers/projects/project-list.component.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/front/current/controllers/projects/project-list.component.ts b/front/current/controllers/projects/project-list.component.ts deleted file mode 100644 index a8221bb7edf8c49c56926725fc576a0eba3d14d9..0000000000000000000000000000000000000000 --- a/front/current/controllers/projects/project-list.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component } from 'angular2/core'; -import { Project } from '../../services/project.service' - -@Component({ - selector: 'project-list', - templateUrl: 'current/controllers/projects/project-list.component.html', - inputs: ['projects'] -}) -export class ProjectListComponent{ - public projects: Project[] = []; -} diff --git a/front/current/controllers/projects/projects.component.html b/front/current/controllers/projects/projects.component.html deleted file mode 100644 index f6c08fbc3f14818b0f7e90c2cede4eedf82cd46b..0000000000000000000000000000000000000000 --- a/front/current/controllers/projects/projects.component.html +++ /dev/null @@ -1,2 +0,0 @@ -

Projects

- diff --git a/front/current/controllers/projects/projects.component.ts b/front/current/controllers/projects/projects.component.ts deleted file mode 100644 index a85b34b544b49551bc03774bebdd891068b14978..0000000000000000000000000000000000000000 --- a/front/current/controllers/projects/projects.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Component, OnInit } from 'angular2/core'; -import { ProjectService, Project } from '../../services/project.service'; -import { ProjectListComponent } from './project-list.component' - -@Component({ - selector: 'projects', - templateUrl: 'current/controllers/projects/projects.component.html', - directives: [ProjectListComponent] -}) -export class ProjectsComponent implements OnInit{ - constructor(private _projectService: ProjectService) { } - projects: Project[] = []; - errorMessage: string; - - ngOnInit(){ - this.getProjects(); - } - - getProjects(){ - //this._projectService.getProjects().then(projects => this.projects = projects); - this._projectService.index() - .subscribe( - projects => this.projects = projects, - error => this.errorMessage = error) - } -} diff --git a/front/current/lib/object.ts b/front/current/lib/object.ts new file mode 100644 index 0000000000000000000000000000000000000000..6534ad08d64cc8acd2fb082e2a09eebb754dd622 --- /dev/null +++ b/front/current/lib/object.ts @@ -0,0 +1,5 @@ +export function extend(object, extension) { + for (let key in extension) + object[key] = extension[key]; + return object; +}; diff --git a/front/current/main.ts b/front/current/main.ts index 64ccf2dd40b1423e076cc1d60291887181b3f614..0404bf4986e81ca08598e5f6609aa95d6a809d6e 100644 --- a/front/current/main.ts +++ b/front/current/main.ts @@ -1,6 +1,7 @@ -import { bootstrap } from 'angular2/platform/browser'; +import { bootstrap } from 'angular2/platform/browser'; +import { HTTP_PROVIDERS } from 'angular2/http'; import { AppComponent } from './controllers/app/app.component'; import 'rxjs/Rx'; -bootstrap(AppComponent); +bootstrap(AppComponent, [HTTP_PROVIDERS]); diff --git a/front/current/services/project.service.ts b/front/current/services/project.service.ts deleted file mode 100644 index 3eed9b0715b7ab9cb4c243052f218578cd0d9d94..0000000000000000000000000000000000000000 --- a/front/current/services/project.service.ts +++ /dev/null @@ -1,59 +0,0 @@ - -import {Injectable, OnInit, Injector} from 'angular2/core'; -import { Http, Response} from 'angular2/http'; -import {Headers, RequestOptions} from 'angular2/http'; -import { Observable } from 'rxjs/Observable'; -import { RestfulApiService, RestfulObject } from './restful-api.service'; - -export enum Status { - cancelled, - pending, - accepted, - analysed_remotely, - audited, - analysed, - scoped, - proposal_received, - proposal_selected, - customer_reviewed, - approved, - financed, - contracted, - constructed, - verified, - paid -} -export class Project extends RestfulObject { - - static modelURL = '/project' - constructor( - public id: string, - public name: string, - public status: Status - ) { - super(id) - } - - getStatus(): string { - - return Status[this.status]; - } -} - -@Injectable() -export class ProjectService{ - - constructor(_http: Http, protected _restfulApiService: RestfulApiService){ - console.log("The RestfulApiService" + RestfulApiService.baseURL) - console.log(RestfulApiService.requestHeaders.toJSON()) - } - - index():Observable{ - return this._restfulApiService.index(Project.modelURL); - } - - get(id: string):Observable{ - return this._restfulApiService.get(Project.modelURL,id); - } - -} diff --git a/front/current/services/project/project.service.ts b/front/current/services/project/project.service.ts new file mode 100644 index 0000000000000000000000000000000000000000..1c69e6ec28414fe3f274e61283c60cd57f9089e3 --- /dev/null +++ b/front/current/services/project/project.service.ts @@ -0,0 +1,10 @@ +import { Injectable } from 'angular2/core'; + +import { config } from '../../config'; +import { RestService } from '../rest.service'; + +@Injectable() +export class ProjectService { + public config:any = config.SERVICES.project; + public url:string = '/project/'; +}; diff --git a/front/current/services/rest.service.ts b/front/current/services/rest.service.ts new file mode 100644 index 0000000000000000000000000000000000000000..aa18f4cf1b22e11b5ff50cf54441f41e04e4f17e --- /dev/null +++ b/front/current/services/rest.service.ts @@ -0,0 +1,150 @@ +import { Injectable } from 'angular2/core'; +import { Http, Response, URLSearchParams } from 'angular2/http'; +import { Observable } from 'rxjs/Observable'; + +import { config } from '../config'; +import { extend } from '../lib/object'; + +export class Model { + constructor( + public service:any, + private _http:Http + ) {}; + + // The actual model. + public data = {}; + // Filters that apply to the query string parameters. + public filters:any = {}; + // Is the model currently loading. + public loading:boolean = false; + // The error object returned by the server. + public error:any; + + set(data:any):Model { + // Update the model data. + extend(this.data, data); + return this; + }; + setFilters(filters:any):Model { + // Update filter parameters. + extend(this.filters, filters); + return this; + }; + + get url(): string { + let params = new URLSearchParams(''); + for (let key of this.filters) + params.set(key, this.filters[key]); + + return ( + this.service.config.url + + this.service.url + + (this.data['id'] || '') + + '?' + params.toString()); + }; + + parse(response:Response):Model { + return this.set(response.json().data); + }; + setError(response:Response) { + this.error = response.json(); + }; + + fetch() { + // Update a model from the server. + let self = this; + self.loading = true; + self.error = undefined; + return (self._http.get(self.url, {headers: config.HEADERS}) + .subscribe(self.parse.bind(self), self.setError.bind(self), () => { self.loading = false; })); + }; + save():Observable { + // Save a model to the server. + let method = (this.data['id'] ? 'put' : 'post'); + return ( + this._http[method]( + this.url, + JSON.stringify(this.data), + {headers: config.HEADERS} + ) + .map(this.parse)); + }; + destroy():Observable { + // Delete a model on the server. + return this._http.delete(this.url, {headers: config.HEADERS}); + }; +}; + +export class Collection { + constructor( + public service:any, + private _http:Http + ) {}; + + // A list of models. + public models:Model[] = []; + // Filters that apply to the query string parameters. + public filters:any = {}; + // Is the collection currently loading. + public loading:boolean = false; + // The error response returned by the server. + public error:any; + + public set(models:any[]):Collection { + // Set the list of models. + // + // Unlike Model.set(), this overrides all existing models with a new + // array of models. + this.models = []; + for (let model_data of models) { + var model: Model = new Model(this.service, this._http); + model.set(model_data); + this.models.push(model); + } + return this; + }; + public setFilters(filters:any):Collection { + // Update filter parameters. + extend(this.filters, filters); + return this; + }; + + public get url(): string { + let params = new URLSearchParams(''); + for (let key of this.filters) + params.set(key, this.filters[key]); + + return this.service.config.url + this.service.url + '?' + params.toString(); + }; + + parse(response:Response):Collection { + return this.set(response.json().data); + }; + setError(response:Response) { + this.error = response.json(); + }; + + fetch() { + // Get a list of models from the server. + let self = this; + self.loading = true; + self.error = undefined; + return (self._http.get(self.url, {headers: config.HEADERS}) + .subscribe(self.parse.bind(self), self.setError.bind(self), () => { self.loading = false; })); + }; +}; + +@Injectable() +export abstract class RestService { + constructor(private _http:Http) {}; + + Model(service:any, data:any):Model { + return (new Model(service, this._http) + .set(data)); + }; + + Collection(service:any, data:any[]):Collection { + return (new Collection(service, this._http) + .set(data)); + }; +}; diff --git a/front/current/services/restful-api.service.ts b/front/current/services/restful-api.service.ts deleted file mode 100644 index 02b7a5bc108477506447e24ddef6baab4ea16435..0000000000000000000000000000000000000000 --- a/front/current/services/restful-api.service.ts +++ /dev/null @@ -1,175 +0,0 @@ - -import {Injectable, Injector} from 'angular2/core'; -import { Http, Response} from 'angular2/http'; -import {Headers, RequestOptions} from 'angular2/http' -import { Observable } from 'rxjs/Observable'; - -export class RestfulObject { - protected static modelURL: string; - constructor( - public id: string - ) { } -} - -@Injectable() -export class RestfulApiService{ - - /** HTTP object is injected from application and into class variable for static methods*/ - public static origin: string; - public static baseURL: string; - public static requestHeaders: Headers; - protected authenticated: boolean = false; - protected appKey: string; - protected errorMessage: string; - - constructor(private http: Http){ - } - - /** Returns observable of the array of Restful Object. */ - public index(url: string): Observable { - return this.http.get(RestfulApiService.baseURL+url, { headers: RestfulApiService.requestHeaders }) - .map(res => this.processIndex(res,RestfulObject)) - .do(data => console.log(data)) - .catch(this.handleError) - } - - /** Returns observable of a RestfulObject. */ - public get(url: string, id: string): Observable { - return this.http.get(RestfulApiService.baseURL + url + "/" + id, { headers: RestfulApiService.requestHeaders }) - .map(res => this.processGet(res,RestfulObject)) - .do(data => console.log(data)) - .catch(this.handleError) - } - - /** Return observable of id string of a Restful Object. */ - protected post(url: string, object: T): Observable { - return this.http.post(RestfulApiService.baseURL + url, JSON.stringify({ 'objectId': object.id }), { headers: RestfulApiService.requestHeaders }) - .map(res => this.processPost(res)) - .do(data => console.log(data)) - .catch(this.handleError) - } - - /** Return observable of boolean value for success of put request. */ - protected put(url: string, object: RestfulObject): Observable { - return this.http.put(RestfulApiService.baseURL + url + "/" + object.id, object.toString(), { headers: RestfulApiService.requestHeaders }) - .map(res => this.processPut(res)) - .do(data => console.log(data)) - .catch(this.handleError) - } - - /** Return observable of boolean value for success of delete request. */ - protected delete(url: string, id: string): Observable { - return this.http.delete(RestfulApiService.baseURL + url + "/" + id, { headers: RestfulApiService.requestHeaders }) - .map(res => this.processDelete(res)) - .do(data => console.log(data)) - .catch(this.handleError) - } - - /** Set base URL and authorize API */ - public authorizeApi(appKey: string){ - this.appKey = appKey; - this.authorizeRestfulService(); - } - - /** Process GET response from index RestfulObject API endpoint. */ - protected processIndex(res, model: { new (id: string): T; }): RestfulObject[] { - if(!this.isSuccessfulResponse(res)){ - return null; - } - - var data = res.json() - var restfulObjects: RestfulObject[] = []; - - for (var i = data.length - 1; i >= 0; i--) { - var tempObject: RestfulObject = new model(data[i]["id"]); - restfulObjects.push( - tempObject - ); - } - - return restfulObjects; - } - - protected isSuccessfulResponse(res: Response){ - var validStatuses: number[] = [200,201,204] - if (validStatuses.find(res.json().status_code)){ - return true; - } - return false; - } - - - /** Process GET request response from RestfulObject API endpoint. */ - protected processGet(res: Response, obj: { new (id: string): T; }): RestfulObject { - if (!this.isSuccessfulResponse(res)) { - return null; - } - var data = res.json() - - if(data.length==1){ - var object: RestfulObject = new obj(data['id']); - return object; - } - } - - /** Process POST request response and return RestfulObject id string. */ - protected processPost(res: Response): string { - if (!this.isSuccessfulResponse(res)) { - return null; - } - var data = res.json() - - // Return id - return data.id; - } - - /** Process PUT request response and return success boolean. */ - protected processPut(res: Response): boolean { - if (!this.isSuccessfulResponse(res)) { - return false; - } - return true; - } - - /** Process DELETE request response and return success boolean. */ - protected processDelete(res: Response): boolean { - if (!this.isSuccessfulResponse(res)) { - return false; - } - return true; - } - - /** Throw error with message from API */ - protected handleError(error: Response){ - console.log(error.json()); - - // If API not authenticated authenticate API - // if(error.json().error == 401){ - // this.authorizeRestfulService() - // } - - return Observable.throw(error.json().error || 'Server Error') - } - - - /** Return observable of response from Application Authorization and Authentication endpoint */ - protected getAccessToken():Observable { - //TODO: Add Application key here from environment variable - var headers = new Headers(); - headers.append('Content-Type', 'application/json'); - headers.append('x-app-key', this.appKey); - return this.http.post(RestfulApiService.baseURL + '/api/auth', JSON.stringify({}), { - headers: headers - }) - .retry(5) - .catch(this.handleError) - } - - /** Observe access token response and set Restful API headers */ - protected authorizeRestfulService(){ - this.getAccessToken().subscribe( - apiAuthResponse => RestfulApiService.requestHeaders = new Headers({ 'x-app-token': apiAuthResponse.headers.get('x-app-token'), 'x-app-key': this.appKey }), - error => this.errorMessage = error) - } - -} diff --git a/front/current/styles.css b/front/current/styles.css deleted file mode 100644 index 0dcc5daa8485d16a0b9b80cb031937a8df39ef58..0000000000000000000000000000000000000000 --- a/front/current/styles.css +++ /dev/null @@ -1,8 +0,0 @@ -/* - - BASE - -*/ -html, -body { - height: 100%; } diff --git a/front/current/styles/styles.scss b/front/current/styles/styles.scss deleted file mode 100644 index 9ecb8bf0c071a78f0774faa1113edd9ab877c0ec..0000000000000000000000000000000000000000 --- a/front/current/styles/styles.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import 'tachyons-sass/scss/base'; - -@import 'variables/variables'; - - diff --git a/front/current/styles/variables/variables.scss b/front/current/styles/variables/variables.scss deleted file mode 100644 index 139597f9cb07c5d48bed18984ec4747f4b4f3438..0000000000000000000000000000000000000000 --- a/front/current/styles/variables/variables.scss +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/front/current/tests/mockObjects/mock-projects.ts b/front/current/tests/mockObjects/mock-projects.ts deleted file mode 100644 index 26669c3d274b86604957db0bd3f73394bfd36cc8..0000000000000000000000000000000000000000 --- a/front/current/tests/mockObjects/mock-projects.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Project, Status } from '../../services/project.service'; -export var PROJECTS: Project[] = [ - new Project("1",'Joses Hose Lighting', Status.accepted), - new Project("2",'AME Zion Lighting', Status.constructed), - new Project("3",'AME Zion Weather Proofing', Status.constructed), - new Project("4", 'Joses Hose Lighting', Status.analysed), - new Project("5", 'AME Zion Lighting', Status.audited), - new Project("6", 'AME Zion Weather Proofing', Status.cancelled) -]; diff --git a/front/current/tests/mockObjects/projects.json b/front/current/tests/mockObjects/projects.json deleted file mode 100644 index a494959690024b4d9452a87c3b6b8d0585eaaabe..0000000000000000000000000000000000000000 --- a/front/current/tests/mockObjects/projects.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "data": [ - { "id": "1", "name": "AME Zion Lighting", "status": "accepted" }, - { "id": "2", "name": "St. Joseph's Catholic Church", "status": "constructed" }, - { "id": "3", "name": "Not Magenta", "status" : "constructed" }, - { "id": "4", "name": "Tornado", "status": "constructed" } - ] -} diff --git a/front/gulpfile.js b/front/gulpfile.js index 155b78c9e845adf3024c26f74ce8754badf9bbeb..1b71768886e7b7dd27b5ff400093cc5c0ea0f22e 100644 --- a/front/gulpfile.js +++ b/front/gulpfile.js @@ -1,29 +1,27 @@ var gulp = require('gulp'), + autoprefixer = require('gulp-autoprefixer'), sass = require('gulp-sass'), cleanCSS = require('gulp-clean-css'); - -// 'use strict'; - gulp.task('styles', function () { - return gulp.src('./current/styles/styles.scss') + return gulp.src('./current/assets/styles/styles.scss') .pipe(sass({ includePaths: ['node_modules'] }).on('error', sass.logError)) - .pipe(gulp.dest('./current/')); + .pipe(gulp.dest('./current/')) + .pipe(autoprefixer()); }); // Minify CSS -gulp.task('minify-css', function() { - return gulp.src('./current/styles/*.css') - .pipe(cleanCSS({compatibility: 'ie8'})) - .pipe(gulp.dest('dist')); +gulp.task('cleanCSS', function() { + return (gulp.src('./current/*.css') + .pipe(cleanCSS({compatibility: 'ie8'}))); }); // Watch task gulp.task('default',function() { - gulp.watch('current/styles/**/*.scss',['styles']); + gulp.watch('current/assets/styles/**/*.scss',['styles']); }); // Build task -gulp.task('build', ['styles', 'minify-css'], function() {}); +gulp.task('build', ['styles', 'cleanCSS'], function() {}); diff --git a/front/index.default.html b/front/index.default.html index e698872d92efb3edb3b91c3147f5d87f964005de..a5c6978964f20742a1cf1000e3bc98724bfd801d 100644 --- a/front/index.default.html +++ b/front/index.default.html @@ -2,14 +2,17 @@ Project Dashboard - + - + + + + - + @@ -18,10 +21,10 @@ - + - - Loading... + +
+ +
+
diff --git a/front/package.json b/front/package.json index ba3429ddc1a2f9acb00f5b7e095fd888a7ffec5a..21cb01b6055cbabc4785fd8ef03df748c929e771 100644 --- a/front/package.json +++ b/front/package.json @@ -16,6 +16,7 @@ "config-json": "^1.0.0", "es6-promise": "^3.0.2", "es6-shim": "^0.33.3", + "node-sass": "^3.4.2", "reflect-metadata": "0.1.2", "rxjs": "5.0.0-beta.2", "systemjs": "0.19.24", @@ -25,6 +26,7 @@ "devDependencies": { "concurrently": "^2.0.0", "gulp": "^3.9.1", + "gulp-autoprefixer": "^3.1.0", "gulp-clean-css": "^2.0.4", "gulp-sass": "^2.2.0", "lite-server": "^2.1.0",