Ticket #4469 (closed Feature Requests: fixed)

Opened 2 years ago

Last modified 1 year ago

move amportal.conf settings to a module

Reported by: mbrevda Assigned to:
Priority: minor Milestone: 2.9
Component: FreePBX Framework Version: SVN-HEAD
Keywords: Cc:
Confirmation: Unreviewed SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description (Last modified by mickecarlsson)

I'm pretty sure there is a ticket already open for this, but I couldn't find it. Here are the steps that I see as necessary, comments/suggestions welcome!

  • Rename General Settings to Settings
  • Add link for "advanced settings"
  • The gui for advanced options is currently being developed as amportalsettings in the contributed repo. This needs to be integrated into framework
  • Each option has the following fields:
    • key: the (former) amportal.conf key
    • value: the key's value
    • level: the administrative/permission level with 0 being the highest. This can be used either to delegate permission between admins or even just to keep the 'dangerous stuff' off the page
    • description: plain text description of the option
    • type: the field type to put the setting into (i.e. text, select, etc)
    • option: possible options for the field - comma delimited (i.e. for select: val1, val2, val)
    • defaultval: the default value so that users can easily revert if they messed something up
    • readonly: make a value uneditable
    • hidden: a key that should be hidden from the gui

Attachments

set.png (0.7 MB) - added by mbrevda on 07/23/10 08:59:08.
screen shot of what we have so far

Change History

07/23/10 08:59:08 changed by mbrevda

  • attachment set.png added.

screen shot of what we have so far

07/23/10 09:03:23 changed by mbrevda

(In [10195]) re #4469 - sorry mick, kinda too your mod for a ride here... The buttond dont work yet, as there is no js attached to them. yet.

07/23/10 09:16:15 changed by mickecarlsson

  • owner deleted.
  • type changed from Bugs to Feature Requests.
  • version changed from 2.8-branch to SVN-HEAD.
  • component changed from - choose - to FreePBX Framework.
  • description changed.

Looking good, setting ticket to feature request.

What are the bare minimum setting that needs to be in amportal.conf for FreePBX st start?

07/23/10 13:46:57 changed by mickecarlsson

See also: #2614, #3571 and #3576

There is a missing key in amportal.conf called AMPLAYKEY that is used in recordings module, from #2016

07/27/10 20:30:09 changed by p_lindheimer

most settings could be moved out, there are a few that couldn't not easily be part of a module though, for example, the database user/password and similar...

07/27/10 22:53:24 changed by mbrevda

Right - those would either have to stay where they are, or move to a bootstrap file. Btw, which other settings do you see as problematic?

07/28/10 00:07:07 changed by mickecarlsson

I think that these settings should be in amportal.conf, they can be changed by a user when moving FreePBX to, for example, sqlite3

  • AMPDBENGINE
  • AMPDBNAME
  • AMPDBHOST
  • AMPDBUSER
  • AMPDBPASS

08/01/10 09:31:24 changed by mbrevda

(In [10203]) re #4469 - add migration and ability to edit. Not sure this work 100%, please report any bugs!

08/03/10 01:16:10 changed by mickecarlsson

  • summary changed from move aportal.conf settings to a module to move amportal.conf settings to a module.

Install wont work, it bombs on the database creation. I think that you need to split the sql, one for actually create the database and one for populating it.

The field areas needs to be expanded, DASHBOARD_STATS_UPDATE_TIME is truncated to DASHBOARD_STATS_UPDATE_TI.

I also find the drop-down for TRUE FALSE are somewhat disturbing, they could be replaced with radio buttons instead "True (*) False ()".

The rest is looking good

08/03/10 02:18:31 changed by mbrevda

mickecarlsson, did you drop the old database before installing?

08/03/10 05:47:26 changed by mickecarlsson

Yes, tested it twice just to be sure

[nativecode=1064 ** You have an error in your SQL syntax; 
check the manual that corresponds to your MySQL server version for the right syntax to use near
 'LOCK TABLES `freepbx_settings` WRITE; 
 INSERT INTO `freepbx_settings` VALUES ('A' at line 14]

08/03/10 07:17:37 changed by mbrevda

(In [10206]) re #4469 - fix insert query

08/03/10 12:40:14 changed by mickecarlsson

Database schema does not make sense, 'description' is only VARCHAR(150) but the longest help text is 642 characters.

'options' is varchar(500), that seems odd.

Dropped my database, installed, then the database was corrupt. This is how it is created:

INSERT INTO `freepbx_settings` VALUES ('AMPADMINLOGO','custom-logo.png',0,NULL,NULL,NULL,NULL,NULL,NULL)

08/03/10 12:49:31 changed by mickecarlsson

'key' is a reserved word in MySQL. Database schema contains this:

+-------------+--------------+------+-----+---------+-------+
| Field       | Type         | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+-------+
| key         | varchar(25)  | YES  | UNI | NULL    |       |

Field 'key' needs to be renamed to 'key_id'.

08/03/10 14:17:55 changed by mbrevda

key is reserved. `key` works just fine! Hit me up on irc to discuss the rest

08/08/10 06:23:13 changed by mbrevda

(In [10210]) re #4469, try not to overwrite default fields... :)

08/08/10 06:37:24 changed by mbrevda

(In [10211]) re #4469 - fix key discriptions

08/08/10 12:15:14 changed by mbrevda

(In [10212]) re #4469 - move settings to core

08/08/10 15:14:55 changed by mbrevda

(In [10213]) re #4469 - update setting db

08/09/10 03:29:55 changed by mickecarlsson

Todo: change the field key in the MySQL database to something that works in a CLI, for example: ampkey

09/27/10 23:37:33 changed by mbrevda

Question: do we still set keys to defaults or should we JUST read what in the db? (point in case: #4556)

09/27/10 23:56:14 changed by mickecarlsson

What's in amp_conf[] should be read in as that is what we do today when parsing amportal.conf.

The rest of the settings should be set so blank (unset) and it is up to the user to set them.

Default settings that are in amportal.conf should be in admin/functions.inc.php, and I am sure that they are (if not, then we we will have to add them).

09/28/10 00:05:07 changed by mickecarlsson

See also proposed FREEPBXCONFIG variable in #3561, #3571, #3572, #3573, #3574 and #3576.

11/13/10 17:47:36 changed by mbrevda

  • status changed from new to closed.
  • resolution set to fixed.

(In [10558]) re #4566; move amportal.conf settings to a module - Thanks mickecarlsson! closes #4469, #3561, #3571, #3572, #3573, #3547, #3576. untill we get a proper migration in place, please add your db values to /etc/environment, see common/db_connect.php for the varibles that need to be set

01/16/11 01:20:27 changed by p_lindheimer

(In [10973]) mv core.js to advancedsettings.js since only used by latter re #4469