Git Product home page Git Product logo

camilosampedro / aton Goto Github PK

View Code? Open in Web Editor NEW
14.0 7.0 12.0 3.63 MB

Open web computer laboratory administrator

Home Page: http://camilosampedro.github.io/Aton

License: GNU General Public License v3.0

Scala 70.67% HTML 9.08% JavaScript 2.52% CSS 4.88% Shell 0.59% TypeScript 11.56% API Blueprint 0.70%
administration computers debian ubuntu linux-distribution ssh bash linux-mint play-framework

aton's People

Contributors

camilosampedro avatar farhatnader avatar gitter-badger avatar literalplus avatar martineliasq avatar minrwhite avatar nclsppr avatar ubaldop avatar yesyayen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

aton's Issues

Get the cookie auth from the response

Inside login.service.ts, after a correct login, check the existence of PLAY2AUTH cookie.

Actually it is getting the cookie and it is sending it to the server automatically as a default browser behavior, but the Angular2 code doesn't correctly know that it is logged in, it is only being checked that the response is a 200 and saving a token with localStorage.

Add a room button to block a certain user from that room

Add a button on views.roomPanel.scala.html that open a modal window to enter the user that will be blocked and two Confirm-Cancel buttons.

  • Remember that these buttons should be integrated with the messages API (@messages("resource"), on which resource is located on /conf/messages.*).

Create a user DAO

Create a UserDAO to perform all User operations against the database.

It must include a interface and implementation with:

  • Create method.
  • Update method.
  • Get method.
  • Delete method.

It can easily be done based on other DAOs.

Create a way to store customized commands

Create a way to store some customized commands that can be sent to the computers.

I have two ideas for doing this:

  • Use typesafehub/config (already available dependency) to have a conf file with commands. It is pretty clean but usually it is not intended for things that change during runtime, as it only reads and cache the config at startup.
  • Use a SQL table for storing the commands.
  • Use another file for storing them with another format.

Some considerations:

  • Some commands could be different depending on which OS or distro is running on the computer. It could be a good idea to store different commands for a "command name" depending on the OS. The OS is already known.
  • The commands should have information:
    • Executed with or without super user rights (sudo).
    • Don't wait for result flag: It is not very usual, but it is used when the command should not wait for a result (For example shutdown -h now) as maybe it will never come.
    • Executed by all the logged in users, by a specific user or by the provided ssh user. It is already know what are the logged in users.

Add a Linux command to block internet access without blocking SSH

On services.exec.SSHFunction add a command that block the computer from accessing internet. The target is to block browser's internet access (:earth_americas: Mozilla Firefox or Google Chrome mainly), but it is really important to not block the SSH port, because it is the way that it should be reverted.

It should be a single line String and it would be very useful to have comments on what is returned when executed, also if it depends on something that need to be checked before executing it (For example Linux distribution or login application).

If possible, include also the revert command for making internet accessible again.

React or Vue.js vs Fixing Angular2 build

Now that it is possible to build any node.js under ui folder, we will take a challenge for anyone that is interested as Angular2 with angular-cli is failing:

  • Create a simple project with react that runs with sbt run.
  • Create a simple project with vue.js that runs with sbt run.
  • Fix actual angular2 project located under `ui folder.

sbt run is actually running npm install and npm build under ui.

Don't hesitate to comment if you need more information about this.

Add a Linux command to block a user's login

On services.exec.SSHFunction add a command that block a user from login on that computer.

It should be a single line String and it would be very useful to have comments on what is returned when executed, also if it depends on something that need to be checked before executing it (For example Linux distribution or login application).

Fix build and deployment with angular-cli for new Re-Structure

Inside UI folder there are two main problems:

  1. Build

  2. Deployment

  3. Build:

    • NgSemanticModule is not recognized as a NgModule
    • ng2-idle is not imported right
  4. Deployment:

    • Web application builded in public/ui does not find app.js , vendor.js and also has an error with the decorator.js

Passwords are not encrypted in the database

Users' passwords are not encrypted in the database and might be a problem if someone gets into it.

To achieve this it is needed to change the column type in /conf/default/create.sqland also change the login service to encrypt the user's input to match the one stored in the database.

Implement "showForComputer"

Implement the method showForComputer(computer: Computer).

It will be used to show the modal to send a message to a single computer and be very similar to the case for showForSelected(computers: Computer[]), with the difference that showForComputer should not display a computers selection because it would be just a computer.

Add Angular2 to index.scala.html

In the angular-frontend branch it is being created an Angular2 front-end (TypeScript).

Angular was used because it is better to provide "simple and concise" information from the server instead of a whole html file.

At the beginning, the first requirement is to have a single html that calls a single transpiled main.js from the server. This issue is related to issue 40.

Sort rooms when showing them on a view

When showing roomPanel.scala.html view, rooms should be sorted by its name. This can be achieved with the services.impl.LaboratoryServiceImpl.get(id: Long) method.

Web page height overfills browser size

While left menu does, main content does not fit on the browser size, so it gets a weird looking.

I will be updating this issue to include screenshots.

Create unit test for LaboratoryController (LaboratoryControllerSpec)

Create a unit test for controllers.LaboratoryController controller. It might be pretty similar to ComputerControllerSpec:

  • You would need to mock the dependencies of LaboratoryController (Add a return value to the needed methods without executing anything, they are not intended to be tested here).
  • Check the return HTTP code of the methods (Firstly as you would expect them to be).

Don't worry if you don't know something about the functionality of this class, it will be a pleasure to me to answer your questions.

Create a user controller

Create controllers.admin.UserController on which it can be posible to:

  • Create a user with username and password.
  • Delete a user with its username.
  • Change user's username and password.

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.