GithubHelp home page GithubHelp logo

amahi / platform Goto Github PK

View Code? Open in Web Editor NEW
139.0 139.0 104.0 3.12 MB

Core of the Amahi Platform, a web app in RoR

License: Other

Ruby 49.33% Makefile 0.17% JavaScript 0.65% CoffeeScript 5.16% CSS 8.34% HTML 12.85% Python 0.07% Dockerfile 0.11% SCSS 5.38% Slim 17.93%

platform's People

Contributors

abrbhat avatar agmps17 avatar ahmedkamal1432 avatar alwahsh avatar ankurgel avatar bigfoot65 avatar cpg avatar deanpcmad avatar ermacaz avatar fransm avatar gopesht avatar htrap avatar majidsas avatar manishyadavv avatar matheusrich avatar sbagroy986 avatar sharawatankit avatar slm4996 avatar souravmoitra avatar sukhbir-singh avatar tmkasun avatar vik-y avatar xw19 avatar

Stargazers

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

Watchers

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

platform's Issues

duplicate share item contents appear on creating new share

In "Share" tab, after creating a new share item by using the new-share form, the other shares visible on the page duplicates its content. Like extra parameters, locations, and tags field of shares on that page is shown twice in each share description.

duplicate-bug

tests fail while trying to login -- for no apparent reason

i cannot seem to find why this fails. other tests have a similar setup. the failure follows this test! rather strange.

  1. Users tab should allow an admin user to delete a regular user
    Failure/Error: click_button "Log In"
    Capybara::Poltergeist::JavascriptError:
    One or more errors were raised in the Javascript code on the page:
   TypeError: 'undefined' is not a function (evaluating '$('.stretchtoggle').live')
       at http://127.0.0.1:62772/assets/application.js:25630
       at http://127.0.0.1:62772/assets/application.js:1018
       at http://127.0.0.1:62772/assets/application.js:1128
       at http://127.0.0.1:62772/assets/application.js:417
       at http://127.0.0.1:62772/assets/application.js:93
 # (eval):2:in `click_button'
 # ./spec/requests/users_tab_spec.rb:34:in `block (2 levels) in <top (required)>'

Exception raised in Apps > Installed

Exception raised in Apps > Installed with two apps installed. Details:

ActionView::Template::Error (undefined method `toggle_in_dashboard_app_path' for #<#<Class:0x00000003adea50>:0x000000039ef928>):
    1: = simple_remote_checkbox :id => "in_dashboard_#{app.id}",
    2:                          :css_class => 'in_dashboard_checkbox',
    3:                          :url => toggle_in_dashboard_app_path(:id => app.identifier),
    4:                          :label => "&nbsp; List in dashboard &nbsp;",
    5:                          :checked => app.show_in_dashboard
  plugins/040-apps/app/views/apps/_in_dashboard.html.slim:3:in `_plugins_____apps_app_views_apps__in_dashboard_html_slim__3608747127184294939_35834800'

html IDs conflict with user PINs

looks like the PIN stuff uses duplicated HTML IDs?

[DOM] Found 2 elements with non-unique id #edit_user_1: (More info: https://goo.gl/9p2vKq) <form class=​"update-password update-form form-horizontal left-margin-20" id=​"edit_user_1" action=​"/​tab/​users/​users/​1/​update_password" accept-charset=​"UTF-8" data-remote=​"true" method=​"post">​…​</form>​ <form class=​"update-pin update-form form-horizontal left-margin-20" id=​"edit_user_1" action=​"/​tab/​users/​users/​1/​update_pin" accept-charset=​"UTF-8" data-remote=​"true" method=​"post">​…​</form>​
(index):1 [DOM] Found 2 elements with non-unique id #edit_user_2: (More info: https://goo.gl/9p2vKq) <form class=​"update-password update-form form-horizontal left-margin-20" id=​"edit_user_2" action=​"/​tab/​users/​users/​2/​update_password" accept-charset=​"UTF-8" data-remote=​"true" method=​"post">​…​</form>​ <form class=​"update-pin update-form form-horizontal left-margin-20" id=​"edit_user_2" action=​"/​tab/​users/​users/​2/​update_pin" accept-charset=​"UTF-8" data-remote=​"true" method=​"post">​…​</form>​

plugin assets are not being used

I wanted to finish the users plugin by moving it's relevant parts in the assets area to the plugin.

After doing that, I realized that the documentation indicates there should be a task users_engine:

rake users_engine:install:assets

however, there is no such task. the only task related to the users engine is

rake users_engine:install:migrations

Since we want these plugins to mount and unmount in one directory clean, we want to avoid the install assets situation. We want the asset pipeline to pick them up when the app is started. This article on mountable engines indicates one could assign

config.asset_path 

in the engine class for the engine.

I tried to add a config.asset_path assignment in plugins/001-users/lib/users/engine.rb with various combinations of:

config.asset_path = "/app/assets%s"
config.asset_path = "/tab/users/app/assets%s"

and a couple more without success.

Obviously, I do not understand the asset pipeline to know how to control this ...

Name to contain only characters [a-zA-Z]+

In the plugin "users", The Name of the User should not contain any number or special characters, but it is accepting this format, during create user form and update name.
I would like to work on this issue.
Screenshot from 2019-10-25 15-40-19

amahi.org certificate expired

I was working on the iOS repo for the GSOC 2019 project but I can't test the app as the server's certificate has expired and now I can't log in, someone please look into this as soon as possible

Problem in readme.md page

Hello mates,
I just saw some problem in the readme,md( IN BUTTON OF DEPENDENCY STATUS ) so I am opening this issue.
issueamahi

Plugin requirements for lets's encrypt (LE)

Aim of the plugin

Platform would get the cert from the API (from the user) as well as install it properly for the virtualhost that needs it. Plugin should show the status and time when the last certificate is generated and will show an alert before 15 days of the expiry of generated certificate. It will also give user option to regenerate it.

Plugin requirements:-

  1. The platform must not be aware of the nickname (at the moment it is, but that should be ignored and the API should be used). The current nickname in the platform can fall out of sync with amahi.org
  2. Do not make assumptions about the domain (at the moment it's yourhda.com but it could be different long term and we want to design it for that, so that we can change it later, so best to get it from the API)
  3. Initially the plugin will check to see
    a) if the cert is installed or not
    b) if it's valid or not and display that
  4. If it is installed, or expired, or valid but open for renewal (less than 15 days prior to expiration) then the user can renew it by hand.
  5. If it is not installed, the initial one should be created and installed.
  6. It should allow for deleting the cert as well.
  7. By installed, it means: interrogate the API about status, then request it and give it time to generate it. (this could take a few seconds or maybe up to two minutes), then obtain it (or deal with the error) and then if available install it in the system in the right place.
  8. Handle all the corner cases carefully.

uninitialized constant SharesController::DiskPoolPartition

Hello
I'm just trying this(amahi/platform) my osx machine.

I found an error follow.
app/controllers/shares_controller.rb:43:in `disk_pooling'
uninitialized constant SharesController::DiskPoolPartition

Where could I find the model.

IRC Automatically logout problem

Hi everyone if you facing this issue that if you close the Freenode tap and you automatically log out (or leave) the IRC then for this you can use Riot.im and log in with Freenode this slove your prolem.

rake db:create fails on docker setup

Hi! I was trying to setup my development environment with docker. I've followed the tutorial on README.md, but i fails after running docker-compose run amahi_web bundle exec rake db:create.

Here's the output:

Starting platform_amahi_box_1_dfd960b06721 ... done
Starting amahi_mysqldb                     ... done
Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "pool"=>5, "database"=>"amahi_dev", "host"=>"amahi_mysqldb", "username"=>"root", "password"=>"test123"}
rake aborted!
Mysql2::Error: Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
/box/gems/mysql2-0.5.1/lib/mysql2/client.rb:90:in `connect'
/box/gems/mysql2-0.5.1/lib/mysql2/client.rb:90:in `initialize'
/box/gems/activerecord-5.2.0/lib/active_record/connection_adapters/mysql2_adapter.rb:22:in `new'
/box/gems/activerecord-5.2.0/lib/active_record/connection_adapters/mysql2_adapter.rb:22:in `mysql2_connection'
/box/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:809:in `new_connection'
/box/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:853:in `checkout_new_connection'
/box/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:832:in `try_to_checkout_new_connection'
/box/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:793:in `acquire_connection'
/box/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:521:in `checkout'
/box/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:380:in `connection'
/box/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:1008:in `retrieve_connection'
/box/gems/activerecord-5.2.0/lib/active_record/connection_handling.rb:118:in `retrieve_connection'
/box/gems/activerecord-5.2.0/lib/active_record/connection_handling.rb:90:in `connection'
/box/gems/activerecord-5.2.0/lib/active_record/tasks/mysql_database_tasks.rb:6:in `connection'
/box/gems/activerecord-5.2.0/lib/active_record/tasks/mysql_database_tasks.rb:14:in `create'
/box/gems/activerecord-5.2.0/lib/active_record/tasks/database_tasks.rb:119:in `create'
/box/gems/activerecord-5.2.0/lib/active_record/tasks/database_tasks.rb:139:in `block in create_current'
/box/gems/activerecord-5.2.0/lib/active_record/tasks/database_tasks.rb:316:in `block in each_current_configuration'
/box/gems/activerecord-5.2.0/lib/active_record/tasks/database_tasks.rb:313:in `each'
/box/gems/activerecord-5.2.0/lib/active_record/tasks/database_tasks.rb:313:in `each_current_configuration'
/box/gems/activerecord-5.2.0/lib/active_record/tasks/database_tasks.rb:138:in `create_current'
/box/gems/activerecord-5.2.0/lib/active_record/railties/databases.rake:29:in `block (2 levels) in <top (required)>'
/box/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/cli/exec.rb:74:in `load'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/cli/exec.rb:74:in `kernel_load'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/cli/exec.rb:27:in `run'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/cli.rb:335:in `exec'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/cli.rb:20:in `dispatch'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/cli.rb:11:in `start'
/usr/local/share/gems/gems/bundler-1.14.6/exe/bundle:32:in `block in <top (required)>'
/usr/local/share/gems/gems/bundler-1.14.6/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/usr/local/share/gems/gems/bundler-1.14.6/exe/bundle:24:in `<top (required)>'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
Tasks: TOP => db:create
(See full trace by running task with --trace)

Am I missing something? Let me know!

rake db:test:prepare fails loading schema (generated by MySql ) using sqlite3 engine because of specific options passed in schema (MySql specific)

sqlite3 --version
3.25.2
mysql --version
mysql Ver 14.14 Distrib 5.7.25

Error Log:

bin/bundle exec rake db:test:prepare
rake aborted!
ActiveRecord::StatementInvalid: SQLite3::SQLException: near "ENGINE": syntax error: CREATE TABLE "app_dependencies" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "app_id" integer, "dependency_id" integer, "created_at" datetime, "updated_at" datetime) ENGINE=InnoDB DEFAULT CHARSET=utf8
/home/kareem/Projects/platform/db/schema.rb:15:in block in <top (required)>' /home/kareem/Projects/platform/db/schema.rb:13:in <top (required)>'
bin/bundle:104:in load' bin/bundle:104:in

'

Caused by:
SQLite3::SQLException: near "ENGINE": syntax error
/home/kareem/Projects/platform/db/schema.rb:15:in block in <top (required)>' /home/kareem/Projects/platform/db/schema.rb:13:in <top (required)>'
bin/bundle:104:in load' bin/bundle:104:in

'
Tasks: TOP => db:test:load_schema
(See full trace by running task with --trace)
Makefile:36: recipe for target 'run-tests' failed
make: *** [run-tests] Error 1

I can get around this by removing options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" from the schema file before running make run-tests.

themes are incomplete in rails-5-2

themes are now:

  • residing in public/themes
  • their init.rb is the same, however, there is no interpretation on assets, they have to be compiled
  • created an src folder with the style.scss, _mixins.scss, then generated the css with by compilind the scss by hand.
  • there is no asset pipeline involved
  • app themes will NOT work, as they install in app/assets/ iirc.

Converting erb files to slim

This feature is listed on amahi platform site at Feature #2255

This issue is created for tracking list of remaining erb files converted to slim.

Sent pull request So, In review:-

  • calendar.html.erb file
  • all erb files from aliases folder
  • all erb files from firewall folder
  • all erb files from server folder
  • all erb files from hosts folder

Deprecation warnings in r52 branch needs to be resolved

DEPRECATION WARNING: Using a dynamic :action segment in a route is deprecated and will be removed in Rails 6.0. (called from block in <top (required)> at /home/travis/build/amahi/platform/config/routes.rb:39)

DEPRECATION WARNING: Using a dynamic :controller segment in a route is deprecated and will be removed in Rails 6.0. (called from block in <top (required)> at /home/travis/build/amahi/platform/config/routes.rb:43)

DEPRECATION WARNING: Using a dynamic :action segment in a route is deprecated and will be removed in Rails 6.0. (called from block in <top (required)> at /home/travis/build/amahi/platform/config/routes.rb:43)

assets from plugins are not loaded

seeing a few errors like this, indicating the assets from the plugins are not loaded at all:

ActionController::RoutingError (No route matches [GET] "/javascripts/settings.js")

automatically set a fixed IP from a lease

It would be nice to see a system with an IP in the DHCP Leases tab and easily be able to make it a fixed IP.

The user should be shown some interface to enter the last byte of the new IP. Validation should be done for it to always within the range of fixed IP addresses and also not be the IP of the gateway or the IP of the HDA, as well as any other fixed IP addresses.

Bonus points to auto-suggest the "next available" IP.

Installation on Ubuntu

I am trying to understand this project more closely but I'm a little confused.

First of all, the installation process. I couldn't find information anywhere about support on Ubuntu. The installation method for Ubuntu as mentioned in the docs here http://docs.amahi.org/ubuntu-12.html doesn't work.

wget http://u12.amahi.org/install-amahi
--2017-03-13 10:29:37--  http://u12.amahi.org/install-amahi
Resolving u12.amahi.org (u12.amahi.org)... 208.115.201.203
Connecting to u12.amahi.org (u12.amahi.org)|208.115.201.203|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-03-13 10:29:38 ERROR 404: Not Found

I couldn't find any packages also for installation in Ubuntu.

After this I cloned the code and initialised the application for testing. I ran the app with simple "rails s" command and accessed the dashboard on "localhost:3000" but I was not able to install any apps or setup shares which makes sense because those things require root permission. I would like to document the whole process a little for ubuntu if you can provide some clarity.

Dockerize Amahi Platform

Are there any plans to dockerize amahi platform? That will make the installation, deployment, development and testing much easier. Also that can help in deploying amahi to many more linux distributions which are currently not supported.

I have been working on dockerizing it on my system and I can take it up as a GSoC project if the authors are ok with it.

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.