Code Monkey home page Code Monkey logo

api's People

Contributors

dependabot[bot] avatar inverse avatar paulotruta avatar

Watchers

 avatar

api's Issues

[FEATURE] Settings Screen: Basic Info form + toggles

This are is still not working, but should be very simple to implement, and give us a good idea of how to setup structures for the other settings areas.

image

Describe the solution you'd like
Being able to update your name and e-mail. E-mail field should be validated for a valid constructed e-mail address.
These values should be saved as "options" in the database with the names:

  • OWNER_NAME
  • OWNER_EMAIL

Toggles should save their state on click and also save that as Boolean options:

  • UPDATE_SYSTEM_AUTOMATICALLY
  • OWNER_EMAIL_NOTIFICATIONS

Considering other alternatives
Open to ideas around how to make this work in a streamlined way, and pave way for quick development of the rest of the setting screens.

[BUG] Don't show external connectivity settings when it is not possible to do a tunnel

Describe the bug
A clear and concise description of what the bug is.

which Branch / PHP Version are you using ?
php74

To Reproduce
Steps to reproduce the behavior:

  1. Setup ws in a local environment (not hardware or OS release)
  2. Go to 'Settings'
  3. Login with your Edgebox.io account
  4. An error will develop when setting up the tunnel via edgeboxctl service.

Expected behavior
A clear and concise description that a certain dependency is not available and thus this functionality cannot be used.

Additional context
We need that Edgeboxctl also detects and saves info as an option on the API DB, so the case can be properly handled via the API backend.

[FEATURE] Support Task: Restart edgeboxctl / edgebox

Supporting a system service restart, or a whole system reboot

Is your feature request related to a problem? Please describe.
Part of the roadmap is the possibility of issuing a restart of the system control service, or a reboot of the whole appliance.

Describe the solution you'd like

  • Support in TaskFactory,
  • HomeController (getActionsOverviewContainerVars()),
  • Quick Access sidebar button functional
  • Support for restart edgeboxctl and reboot the whole appliance in the settings screen.

Additional context
Coordinated issue for edgeboxctl support, explains well the logic behind what happens in the background: edgebox-iot/edgeboxctl#11

[BUG] Uncaught Exception when logging in to edgebox.io in settings screen

Describe the bug
When logging in to your edgebox.io account via the settings screen with a wrong password, an uncaught exception is thrown that is not properly catched (see screenshot)

which Branch / PHP Version are you using ?
php74

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Settings screen'
  2. Fill the login form with a valid username but invalid password
  3. Exception should be thrown and debug screen showed
  4. See error

Expected behavior
Properly catching this exception and showing the user the invalid password message.

Screenshots
image

Edgebox version:
Appliance version with api ) and edgeboxctl on the "cloud-version-support" branches.

**Additional context**
Catching other possible exceptions is also recommended.

Option JSON structures as native PHP types

Def thinking the way we're decoding these options into json arrays we should perhaps think about mapping these to real types... not sure what would be best as we could manually do it for the PHP side which would be sufficient but it's also from the go side right pushing them in.. opinions?

Originally posted by @inverse in #34 (comment)

Unit tests for the project

Is your feature request related to a problem? Please describe.
Unit tests is almost a mandatory thing, especially if we want to have our software be secure and robust.

Describe the solution you'd like
Some form of unit test support, so we can run it locally or plug it into a GitHub action for example.

Describe alternatives you've considered
Didn't explore much, but https://fatfreeframework.com/3.7/unit-testing#MockingHTTPRequests this link for mocking http requests posted by @inverse in the twig-tidy pull request shows that it is possible to mock actions in the app and thus be able to implement unit tests around this.

Additional context
Add any other context or screenshots about the feature request here.

[FEATURE] Reactive transitions on edgeapps

About which PHP Version we are talking ?

PHP 7.4

Describe the solution you'd like

When performing actions against an edgeapp. e.g. enabling online access the UI should update when the action has completed.

[FEATURE] Storage Module Basis

The storage module is all about visualizing and managing your box storage, both internal to the Edgebox, as well as external storage media such as Pen-Drives, External HDD's, and possibly even network locations.

The storage page should show a summary of the storage available in the box, its overall usage state, and options (tasks) that can be triggered, such as adding a new storage media, swapping edgeapp data between drives, etc.

Additional context

[DEV] Create partial twig templates for reusable parts

Is your feature request related to a problem? Please describe.
Organizing reusable template parts allows us to quickly add elements in future pages we build, directly injecting content into them with a simple controller template var.

Describe the solution you'd like
Adding templates to the partials based on possible reusable pieces of the dashboard, and wire existing parts to these new partials.

Describe alternatives you've considered
Using includes with named variables Vs. Embedding Controllers. Recommended to use include technique (less effort, more gain). The latter is very overkill for what we need in this situation, but in some cases can be justified, although needs further planning on structuring the controller folder and naming structure.

Additional context
Clear documentation from Twig: https://symfony.com/doc/current/templates.html#reusing-template-contents

[FEATURE] Cloud version should ask for edgebox.io credentials on first login, get jwt and login

Is your feature request related to a problem? Please describe.
Currently in cloud instances, when the user accesses the dashboard for the first time, he's given the option of choosing a username and password. Then, he needs to go to settings and login with his edgebox.io account to be able to use EdgeApps.

Describe the solution you'd like
Since the cloud version is coupled with the edgebox.io service, the first login should instead ask for edgebox.io credentials.

Additional context
One of the results would be increased security, since only the actual box owner could access the dashboard for the first time

[DEV] TaskFactory folder location fix

Shouldn't the TaskFactory.php file be in a folder called Factory (instead of "Task"?

image

Is your feature request related to a problem? Please describe.
TaskFactory.php is stored in a folder named Task, which is located in the same tree level as Controller, Helper, Entity, etc...
Per the folder structures as shown in the screenshot above, shouldn't Factory classes be stored in a folder called "Factory"?

Describe the solution you'd like
A quick renaming of the folder and fixing the use statements should make it.

Additional context
Thinking of creating another folder in src in order to create a new namespace for classes that can be used to get data for twig template partials, and their location, anywhere in the app :)

setup.edgebox.local (Base tasks database structure, task execution request and status check, setup page, 1-click external access setup)

Is your feature request related to a problem? Please describe.
Create basic interface for setting up Edgebox post-install, with options for setting up 1-click external access to Edgeapps, starting and stopping running Edgeapps, among other tasks for debugging / development purposes (while there is not a mobile app).

Describe the solution you'd like
A page available at setup.edgebox.local. Will have a couple of options:

  • Start / Stop Edgebox services
  • Start / Stop Individual EdgeApps
  • Setup 1-click external access to EdgeApps
  • Turn on / off external access to EdgeApps

Describe alternatives you've considered
After a conversation with @inverse , this seems to be a good straightforward way to develop the task queue, and task execution via the API project (so it is ready for integration with the future companion mobile app), while allowing for a simple setup process with the Edgebox owner (access a page in the browser, login to edgebox.io account, profit!)

Additional context
A few other issues along other repositories make part of this effort:

  • edgebox-iot/sysctl - Prepare binary to run as a service
  • edgebox-iot/sysctl - Read from task queue and execute commands
  • edgebox-iot/ua-netinst-config - Setup sysctl to be running as a service
  • edgebox-iot/ws - Setting up tunnel and calling /register endpoint on edgebox.io API based on tokens / data obtained with the setup.

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.