manosbatsis / restdude

Full stack, high level framework for horizontal, model-driven application hackers.
https://manosbatsis.github.io/restdude
3 stars 3 forks source link

Add basic views/routes to ember client #9

Open manosbatsis opened 7 years ago

manosbatsis commented 7 years ago

Add the following routes to the ember client:

The pages must use a handlebars template. Use hardcoded values where appropriate, since you will not have an actual model for now. Layout should follow the Extras > Pages samples in [1] when available.

[1] http://coreui.io/demo/Ajax_Demo/#main.html

manosbatsis commented 7 years ago

Please also add:

nkapetanas commented 7 years ago

Please run the app and check the documentation and the route pages. Please comment any changes that you want to apply.

manosbatsis commented 7 years ago

@delta750 : All ember commands like build, test etc. fail as follows:

$ ember build
WARNING: Node v7.4.0 has currently not been tested against Ember CLI and may result in unexpected behaviour.
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
⠋ BuildingTorii is installed but not configured in config/environment.js!
Build failed.
The Broccoli Plugin: [SimpleConcat: Concat: Vendor Styles/assets/vendor.css] failed with:
Error: ENOENT: no such file or directory, stat '/home/manos/git/restdude/restdude-client-ember/tmp/simple_concat-input_base_path-WegooKMI.tmp/0/vendor/ember-tutorial.css'
    at Object.fs.statSync (fs.js:907:18)
    at Concat.keyForFile (/home/manos/git/restdude/restdude-client-ember/node_modules/broccoli-caching-writer/index.js:87:20)
    at Array.map (native)
    at Concat.CachingWriter._conditionalBuild (/home/manos/git/restdude/restdude-client-ember/node_modules/broccoli-caching-writer/index.js:109:65)
    at /home/manos/git/restdude/restdude-client-ember/node_modules/broccoli-caching-writer/node_modules/broccoli-plugin/read_compat.js:61:34
    at tryCatch (/home/manos/git/restdude/restdude-client-ember/node_modules/rsvp/dist/rsvp.js:538:12)
    at invokeCallback (/home/manos/git/restdude/restdude-client-ember/node_modules/rsvp/dist/rsvp.js:553:13)
    at publish (/home/manos/git/restdude/restdude-client-ember/node_modules/rsvp/dist/rsvp.js:521:7)
    at flush (/home/manos/git/restdude/restdude-client-ember/node_modules/rsvp/dist/rsvp.js:2373:5)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

The broccoli plugin was instantiated at: 
    at Concat.Plugin (/home/manos/git/restdude/restdude-client-ember/node_modules/broccoli-caching-writer/node_modules/broccoli-plugin/index.js:10:31)
    at Concat.CachingWriter [as constructor] (/home/manos/git/restdude/restdude-client-ember/node_modules/broccoli-caching-writer/index.js:18:10)
    at new Concat (/home/manos/git/restdude/restdude-client-ember/node_modules/broccoli-concat/concat.js:32:17)
    at module.exports (/home/manos/git/restdude/restdude-client-ember/node_modules/broccoli-concat/index.js:26:10)
    at EmberApp.concatFiles (/home/manos/git/restdude/restdude-client-ember/node_modules/ember-cli/lib/broccoli/ember-app.js:368:10)
    at EmberApp._concatFiles (/home/manos/git/restdude/restdude-client-ember/node_modules/ember-cli/lib/broccoli/ember-app.js:381:15)
    at EmberApp.styles (/home/manos/git/restdude/restdude-client-ember/node_modules/ember-cli/lib/broccoli/ember-app.js:1318:28)
    at EmberApp.toArray (/home/manos/git/restdude/restdude-client-ember/node_modules/ember-cli/lib/broccoli/ember-app.js:1607:10)
    at EmberApp.toTree (/home/manos/git/restdude/restdude-client-ember/node_modules/ember-cli/lib/broccoli/ember-app.js:1628:30)
    at module.exports (/home/manos/git/restdude/restdude-client-ember/ember-cli-build.js:23:14)
nkapetanas commented 7 years ago

Did you run npm install and bower install before you build it? I do not have this type of error.

manosbatsis commented 7 years ago

@delta750 the build mostly runs but there are issues:

1:Home page is blank

http://localhost:4200/ is just a white screen.

2 Invalid HTML structure

New pages include nested <head>, and <body> sections etc

3 Login form CSS

The login form does is not styled/render correctly

4 Login Link

Login/register links should move to header menu on the right

5: ember test fails

Running the tests fails. If phantomjs needs special care to setup please add the relevant instructions. Also, there are JSHint errors that need fixing

$ ember test 
WARNING: Node v7.4.0 has currently not been tested against Ember CLI and may result in unexpected behaviour.
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.

authenticators/custom.js: line 33, col 38, 'error' is defined but never used.
authenticators/custom.js: line 33, col 30, 'status' is defined but never used.

2 errors

authorizers/custom.js: line 4, col 32, 'requestOptions' is defined but never used.

1 error

components/login-form.js: line 6, col 18, 'service' is not defined.

1 error

===== 3 JSHint Errors

Built project successfully. Stored in "/home/manos/git/restdude/restdude-client-ember/tmp/core_object-tests_dist-fGZtL2UW.tmp".
not ok 1 Error
    ---
        message: >
            Launcher PhantomJS not found. Not installed?
    ...

1..1
# tests 1
# pass  0
# skip  0
# fail  1
Launcher PhantomJS not found. Not installed?
Error: Launcher PhantomJS not found. Not installed?
    at /home/manos/git/restdude/restdude-client-ember/node_modules/testem/lib/config.js:326:15
    at Array.forEach (native)
    at Config.getWantedLaunchers (/home/manos/git/restdude/restdude-client-ember/node_modules/testem/lib/config.js:320:10)
    at /home/manos/git/restdude/restdude-client-ember/node_modules/testem/lib/config.js:290:10
    at /home/manos/git/restdude/restdude-client-ember/node_modules/testem/lib/config.js:279:5
    at tryCatcher (/home/manos/git/restdude/restdude-client-ember/node_modules/testem/node_modules/bluebird/js/release/util.js:16:23)
    at Promise.successAdapter [as _fulfillmentHandler0] (/home/manos/git/restdude/restdude-client-ember/node_modules/testem/node_modules/bluebird/js/release/nodeify.js:23:30)
    at Promise._settlePromise (/home/manos/git/restdude/restdude-client-ember/node_modules/testem/node_modules/bluebird/js/release/promise.js:564:21)
    at Promise._settlePromise0 (/home/manos/git/restdude/restdude-client-ember/node_modules/testem/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/home/manos/git/restdude/restdude-client-ember/node_modules/testem/node_modules/bluebird/js/release/promise.js:691:18)
    at Promise._fulfill (/home/manos/git/restdude/restdude-client-ember/node_modules/testem/node_modules/bluebird/js/release/promise.js:636:18)
    at MappingPromiseArray.PromiseArray._resolve (/home/manos/git/restdude/restdude-client-ember/node_modules/testem/node_modules/bluebird/js/release/promise_array.js:125:19)
    at MappingPromiseArray._filter (/home/manos/git/restdude/restdude-client-ember/node_modules/testem/node_modules/bluebird/js/release/map.js:127:10)
    at MappingPromiseArray._promiseFulfilled (/home/manos/git/restdude/restdude-client-ember/node_modules/testem/node_modules/bluebird/js/release/map.js:99:18)
    at Promise._settlePromise (/home/manos/git/restdude/restdude-client-ember/node_modules/testem/node_modules/bluebird/js/release/promise.js:572:26)
    at Promise._settlePromise0 (/home/manos/git/restdude/restdude-client-ember/node_modules/testem/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/home/manos/git/restdude/restdude-client-ember/node_modules/testem/node_modules/bluebird/js/release/promise.js:691:18)
    at Promise._fulfill (/home/manos/git/restdude/restdude-client-ember/node_modules/testem/node_modules/bluebird/js/release/promise.js:636:18)
    at Promise._resolveCallback (/home/manos/git/restdude/restdude-client-ember/node_modules/testem/node_modules/bluebird/js/release/promise.js:431:57)
    at Promise._settlePromiseFromHandler (/home/manos/git/restdude/restdude-client-ember/node_modules/testem/node_modules/bluebird/js/release/promise.js:522:17)
    at Promise._settlePromise (/home/manos/git/restdude/restdude-client-ember/node_modules/testem/node_modules/bluebird/js/release/promise.js:567:18)
    at Promise._settlePromise0 (/home/manos/git/restdude/restdude-client-ember/node_modules/testem/node_modules/bluebird/js/release/promise.js:612:10)
nkapetanas commented 7 years ago

I have solved 1-4 problems. Please check if I need anything else to fix. I looked into the ember test fails ( 5: ember test fails) and I get 3 errors. I contacted the EmberJS community and they told me specifically "Those errors came up with a recent ember release. Looks like we’ll need to update super-rentals" . Also they told me that at the 2.8 version ( we are running 2.11) probably there are not those errors. Do you want to proceed with 2.8 instructions or to wait until they update it and continue developing it with your instructions?

nkapetanas commented 7 years ago

They have updated me that the test issues were solved. So I will fix the errors based on the new commit.

nkapetanas commented 7 years ago

Please check the fixed files and let me know for any other improvements.