Coder Social home page Coder Social logo

the-app's Introduction

angular-fullstack

This project was generated with the Angular Full-Stack Generator version 3.7.5.

Getting Started

Prerequisites

Developing

  1. Run npm install to install server dependencies.

  2. Run bower install to install front-end dependencies.

  3. Run gulp serve to start the development server. It should automatically open the client in your browser when ready.

Build & development

Run grunt build for building and grunt serve for preview.

Testing

Running npm test will run the unit tests with karma.

the-app's People

Contributors

distributev avatar luismanuel001 avatar nabilzhafri avatar

Watchers

 avatar  avatar  avatar  avatar

the-app's Issues

blank-screen

I get a blank screen instead of login
The console shows no error or other message.

blank-screen

no custom css

If we use bootstrap - then we should we bootstrap.

It's possible to achieve what is required to achieve with 0 custom CSS? Of course the end result should continue to look great.

One of the aims of frameworks like bootstrap, foundation, etc. was to eliminate the need for such adhoc custom CSS.

no-css

Questions about hard-codings

In server/api/jobs/jobs.controller.js

  1. What is this hard-coded path ? - require('../../../config/databases/redis.json')
  2. What is this hard-coded 'http://localhost:'? var baseApiUrl = 'http://localhost:' + config.port + '/api';
  3. What are these hard-coded IDs '/0..10000'? var requestUrl = baseApiUrl + '/kue/jobs/' + type + '/' + state + '/0..10000';

Hard-codings are not good.

For instance currently gulp serve:dist command fails because of hard-coded redis.json path

With this project https://github.com/distributev/package-app the application will (very) soon get an additional deployment strategy (besides the existing development and dist:production) which means the existing hard-coded paths will create even more trouble (when package-app project code will be merged)

Hard-codings still present in the new package tasks

/TheApp/ and theapp.zip are still hard-coded in the gulp file.

Please replace both with corresponding variables defined at the beginning of file.

Is there any other hard-coding in the new gulp package tasks? If some remove all hard-codings introduced in the new package tasks.

Missing KUE api to get /jobs/email or /jobs/backup, etc.?

Is there any kue API /jobs/email or /jobs/backup, etc.?

"nope. unfortunately. when selecting job type, must provide state i.e inactive, failed, etc. If there is, I've already enable it :) easier for me to implement also."

For more details please see issue add-show-all-statuses-filter-option #16

runtime-error

gulpfile.babel should not be changed
Client side JS and CSS files should not be hard-coded by hand in index.html but instead should be injected automatically by the gulpfile.babel/bower build

If you find it's an issue with angular-fullstack look on their issue tracker if somebody else raised the same and what was the solution.
If you find it's an issue with angular-fullstack but you don't find any issue raised yet for that - please raise yourself the issue and past the link to the issue here so I can follow up with the proposed solutions.
runtime-error

Implement AngularJS directives to manipulate KUE jobs

For full details please refer to attached kue-jobs.zip

Implement 3 AngularJS directives to show/filter/pause/resume/stop/delete KUE jobs

The delivery of this project will be 3 AngularJS1.x directives to display and manage the JOBs available on the KUE node.js priority job queue

https://github.com/Automattic/kue

Please see something similar - https://raw.githubusercontent.com/joeframbach/agendash/master/job-details.png

However you need to implement the directives as per the requirements from this project.

  1. The 3 directives should be implemented as reusable angularjs components
  2. The names for the directives should be view-job-details, list-jobs and start-stop-jobs and the code should be under /client/components/kue/view-job-details /client/components/kue/list-jobs and /client/components/kue/start-stop-jobs
  3. The jobs table should be powered by https://datatables.net
  4. You should use the https://github.com/Automattic/kue#json-api REST API to get list of jobs and manipulate jobs (show/start/stop/pause/delete)

The list-jobs directive should render a datatables.net powered table with the list of jobs available in KUE
There should be capabilities to /show/pause/resume/stop/delete jobs, filter jobs, search jobs, etc.

The list-jobs directive should offer following arguments

(a) jobType - if provided the rendered table will list only the jobs of type jobType otherwise render all jobs no matter of their type
(b) maxFetchDate - if provided fetch only the jobs newer >= then maxFetchDate otherwise don't filter on date - default value is 3 months ago 
(c) maxFetchSize - if provided fetch maximum maxFetchSize rows otherwise all jobs that match maxFetchDate condition - default value is 200 
(d) autoRefreshInterval - auto-refresh the jobs table user interface with jobs every autoRefreshInterval ms - default value is 60 000 ms (1 minute)

The view-job-details directive should offer following arguments

(a) jobId - the ID of the job to view details of
(b) autoRefreshInterval - auto-refresh the job details autoRefreshInterval ms - default value is 60 000 ms (1 minute)
(c) showRequeueButton - if TRUE then show the Requeue button otherwise don't show default value is TRUE

view-job-details should also offer capabilities to /delete/requeue the job

The start-stop-jobs directive should offer functionality/buttons to pause/resume/stop all jobs in the queue.

For all details on how the user interface should look and what capabilities should be implemented see the attached PNG files.

To understand how job filtering should work see

04 - filtering-when-list-jobs-jobtype-argument-is-provided.png
05 - filtering-when-list-jobs-jobtype-argument-is-not-provided-null.png
Login in your Gmail account and notice how filtering for emails is implemented. Job filtering should work similarly.

kue-jobs.zip

warnings-on-build

The git pushed code should be free of any warnings and/or errors at build and/or runtime.

gulpfile.babel should not be changed
Client side JS and CSS files should not be hard-coded by hand in index.html but instead should be injected automatically by the gulpfile.babel/bower build

I keep repeat pasting this here since previous freelancers tried to "fix" similar issues by removing the javascript linting rules from the build. Once I will see it's safe and you don't mess with gulpfile.babel and you don't hardcode deps in index.html then I will not repeat (copy-paste) the same pre-requisite rules.

again check if it's an issue with angular-fullstack and if so search their repository for solutions and if there is none - raise yourself the issue. This is the approach we need to take.
warnings-on-build

merge-admin-lte functionality

from https://github.com/distributev/ng-admin-lte repository

including Customers and Transactions

I remember I said to leave Customers / Transactions out but I need menu.js functionality from that repository and I forgot Customers and Transactions are supposed to test that menu.js works fine.

The final result should contain only our own functionality and not any "dummy" feature (thing) from angular-fullstack

package.json extra dependencies

It's a good practice to minimize the number of dependencies.

  1. Where do you need the request.js dependency?
  2. Further more bluebird.js dependency was introduced when bookshelf project was developed - At that time I tried to understand if bluebird.js it's really required and the answer was "it's a promise library and it's good to have it there"

Now I see that q.js, another promise library, dependency is also added. Please remove q.js and use the existing dependency bluebird.js to achieve the same.

package

/components/jobs/kue

  1. move existing /components/kue files under /components/jobs/kue
  2. remove any kue from the file names (i.e. kue-jobs.controller.js should be renamed to jobs.controller.js)

The component it's actually the /jobs/ - kue it's only the API used to implement the /jobs/ component

  • later another /components/jobs/agenda implementation might come

small-gui-adjustments-2

Please adjust the filtering by job states GUI like that

small-gui-adjustments-2

Through the GUI relabel Inactive to Queued and Active to Running (in the jobs list also).

replace req.user.get('_id') with req.user.get('email')

as you said user.get('_id') it's not reliable between different executions of same software
sometimes admin with id = 1 and other times admin with id = 3

what is reliable identifying users across prod and dev and accross executions is their email req.user.get('email')

===>

replace all occurences of user.get('_id') with user.get('email')

P.S - as a side effect the Promise error will go away. This is not the main scope of this change. The scope is that it's more correct with user.get('email')

save skin functionality

When I first tested this after git pull I got the impression that the skin was not saved during logout and login again. 2nd time it worked ==> test and double check this functionality works all the time.

Another thing is that the saved skin should be applied even after the user is doing logout and he comes again to the login screen. The login screen should have the user's saved theme (from local storage - in case the user did not delete browser cache).

Implement view-job directive

See attached view-job.zip

Implement a simple AngularJS directive to view details of an individual KUE job

The delivery of this project will be an AngularJS1.x directive to display the details of any individual KUE job (KUE is a node.js job queue)

https://github.com/Automattic/kue

  1. The directive should be implemented as a reusable angularjs component
  2. The name for the directive should be view-job and the source code should be placed under /client/components/kue/view-job
  3. You should use the https://github.com/Automattic/kue#json-api to get/manipulate job details

There should be capabilities to /delete/requeue the job

The view-job directive should offer following arguments

(a) jobId - the ID of the job to view details of
(b) autoRefreshInterval - auto-refresh the job details autoRefreshInterval ms - default value is 60 000 ms (1 minute)
(c) showRequeueButton - if TRUE then show the Requeue button otherwise don't show default value is TRUE

For all details on how the user interface should look and what capabilities should be implemented see

03 - view-job-directive.png

view-job.zip

empty-screen-instead-of-login

Sometimes when I run gulp serve I get an empty screen instead of the expected login screen. Usually if I stop and start again it works fine 2nd time. What could be the cause?
empty-screen-instead-of-login

Rollback to initial app folder structure

I see that an extra admin folder was introduced under the /client/app While I'm not sure the reason why this was done it might be related with the new /admin routes which were requested.

Please remove this extra admin folder and roll back to the initial folder structure. My intention is only to have the angularjs routing remapped as required and not to create new physical folder in the source tree.

It might be that the requirements were not clear (sorry if that is the case) but I read now again the 03 - how-to - Updated.txt and I can see that I have specified there everywhere move all current app routes under /admin/* and in many other places it says the word routes only.

Route to /theapp to solve the conflict with hexo-admin which is also mounting to /admin

Instead of /admin route everything (only angularjs route remapping) to /theapp so the current /login will become /theapp/login and the current /admin (the one changed to /users) will become /theapp/admin and so on. This is to solve the conflict with hexo-admin which is also mounting to the same /admin - This time also only remapp to /theapp the angularjs routing and don't create new folders in the source tree.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.