Skip to content

Conversation

@luandro
Copy link
Contributor

@luandro luandro commented Jan 3, 2020

Integration with LiMe-App. Check reviews from pirania PR.

Copy link
Contributor

@nicopace nicopace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haven't finished reviewing... hope it helps! (you can also ignore completely :) )

@@ -0,0 +1,18 @@
{
"provider": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you describe the structure of this file? it is not clear what provider, community and member are, and how this affects the usage.
would be good to have a general documentaiton

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do.

http://www.apache.org/licenses/LICENSE-3.0
]]--

require "ubus"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this file be called pirania instead of pirania-app?
in that way it would be pirania ubus interface, and it would make sense for others to use it for their own interfaces.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two different apis. pirania deals with all the logic of the voucher system, while pirania-app deals more specifically with stuff related to the front-end app, such as content. Should it be merged into pirania?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel that the '-app' doesn't represent what it is actually doing.
Adding a piece of documentation to it would help figure out why they are grouped the way they are... and may be merging or renaming them. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs have been added. Lemme know what u think. This decision was made by @altergui and me when we first got pirania working, and I built the vanilla JS app. The distinction between pirania and pirania-app may not make much sense now anymore.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might not be needed anymore indeed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the docs!
It might be good to describe the whole governance.json.
it seems it has some clear structure with specific values that are used in different parts... would be good to know how them affect the use of the app.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the docs!
It might be good to describe the whole governance.json.
it seems it has some clear structure with specific values that are used in different parts... would be good to know how them affect the use of the app.

local function read_governance(msg)
local result = {}
local path = '/etc/pirania/governance.json'
result = utils.readJsonFile(path)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need to read it as json, you can just print it out, as it is already a json :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it needs to be parsed though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is already in the filesystem, it should have been parsed before... so not sure if it is needed

end

local function enable(msg)
uci_cursor:set("pirania", "base_config", "enabled", "1")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it needed to both set enabled=1 and run captive-portal start?
@spiccinini

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting enabled makes pirania start on startup. To make it run you need to captive-portal start.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can use the /etc/init.d/ scripts for the startup?

Copy link
Contributor

@spiccinini spiccinini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great improvements over the base code. Still many things remain that should be improved, I have some commits that address some. Anyhow I think it should be better to merge this into the other branch as is and build from there.

@spiccinini spiccinini requested a review from nicopace January 21, 2020 17:24
@spiccinini spiccinini merged commit b675883 into pirania Jan 21, 2020
@spiccinini spiccinini deleted the pirania-lime-app branch January 31, 2020 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants