Ticket #2317 (new Feature Requests)

Opened 6 years ago

Last modified 4 years ago

Customized FOP setting for column settings need to mvoe3 to a config file

Reported by: fskrotzki Assigned to:
Priority: minor Milestone: Undetermined
Component: Flash Operator Panel Version:
Keywords: FOP Cc:
Confirmation: Need Feedback Distro:
Backend Engine: Asterisk 1.2.x Distro Ver:
Backend Ver: SVN Revision (if applicable):

Description

This has been happening to me for over a year (we started at trixbox 1.0 and currently use 2.2.4 with freepbx 2.3.0, upgraded today which bit me again so I'm writing it up).

We have 45 extensions. The defaults for FOP are 40 cells for extensions. Each cell grouping when it reaches the end will restarts at the top left cell and over writes the previous ones.

I've found and made changes in the retrieve_op_conf_from_mysql.pl, op_style.cfg, op_buttons.cfg, op_buttons_additional.cfg, and op_server.cfg files with the proper values for our setup so that our slightly smaller buttons fit now in three columns along with our 26 trunks.

But every time we upgrade the install scripts just go ahead and over write the previous version files without prompting about a existing older version and giving me a option of doing a diff, overwrite, yes, no, etc. so can do something before I loose my pain staking changes we've done.

At the very least for the retrieve_op_conf_from_mysql.pl file can values that define cell postitions be moved into a install non-overwritable config file some place and have it read out from the FOP webroot/panel directory where all other settings are stored?

It would be nice if the install also prompted about overwriting of those files for those of us who make changes to them.

Attachments

retrieve_op_conf_from_mysql.pl.diff (0.8 kB) - added by pwalker on 07/11/08 07:50:21.

Change History

09/08/07 15:15:10 changed by p_lindheimer

  • confirmation changed from Unreviewed to Need Feedback.
  • version changed from 2.2.3 to 2.3.0.

the system will not prompt about overwriting core scripts beyond what already exists in install_amp. People who do modifications will have to address their own systems and there are plenty of ways to do that. (patch plus model, write protect, etc.)

If you have modifications, how about making those modifications more general purpose (calculate the number of extensions and then size accordingly). Sounds like what you have done is one step removed from that.

If you do that and submit it then we can get it into the code base and it fixes your problem and everyone else who has a similar situation. That's one of the benefits of Open Source, not keeping your fixes to yourself - sending them back for all to use. If the config file is really the way to go, then make that change and submit it for review - although I prefer if possible to have it auto calculate and generate the stuff.

09/10/07 14:12:37 changed by fskrotzki

At this time because we have change SO much it's not that simple. We've tweaked the spacing inside each phone to make it look ok, added another full height column for extensions and also increased the space for trunks as we have 25 total, along with space for parking and conferance rooms (yea not supported yet)... It's not a simple thing. I spent two days tweaking it all to look right for the people who need to use it.

I am attempting to look in to making the FOP support includes for some files so that I can place my changes into a _custom file that will not get over written. Yes I have a scheme currently so that when they do get overwritten I can recover from it but it's a PITA to have to remember and do each time.

If I knew PHP and or Perl I'd think about taking it on but I don't.

09/17/07 22:47:13 changed by p_lindheimer

  • type changed from Bugs to Feature Requests.

11/14/07 20:00:16 changed by p_lindheimer

  • version deleted.
  • milestone deleted.

01/23/08 12:10:47 changed by skurylo

I'm willing to do the work to move the position variables into the config file. I was going to add some more FOP* variables to /etc/amportal.conf. For example FOPEXTENPOS. Let me know if you think there is a better way.

Giving an auto completion might come after that, perhaps when FOPEXTENPOS is set to "auto".

06/15/08 04:23:46 changed by mbrevda

  • owner deleted.

07/11/08 07:49:46 changed by pwalker

Just as a possible starting point, I've moved the $...pos settings from retrieve_op_conf_from_mysql to a new "config file" /var/www/html/panel/op_conf.pl, which could then contain something like:

 $extenpos="2-40";
 $trunkpos="53-60,72-80";
 $parkingpos="50-51,69-71";
 $confepos="46-48,65-68";
 $queuepos="42-44,61-64";

In the original file, it's included with

 require "retrieve_parse_amportal_conf.pl";

See patch.

07/11/08 07:50:21 changed by pwalker

  • attachment retrieve_op_conf_from_mysql.pl.diff added.

07/11/08 10:28:02 changed by p_lindheimer

the problem with this is that we would still overwrite the include file as you have done it if we have to change things. Why don't you try something like this in the main file and if it works we can add it once tested:

$extenpos="2-40";
$trunkpos="53-60,72-80";
$parkingpos="50-51,69-71";
$confepos="46-48,65-68";
$queuepos="42-44,61-64";

# Now include conf file exists, and re define any and all
# of the above paramters so user can control changes without
# getting overwritten
if (file_existst($astetc_path."/fop.conf")) {
 include "$astetc_path.'/fop.conf'"
}

07/11/08 10:48:22 changed by fskrotzki

I also like this idea/approach better. Wish I knew Perl better to have come up with that as that was more my thinking originally. I also think that the FOP author would accept a change like this more easily so that it can be integrated into the base code he uses.

07/11/08 11:19:51 changed by mbrevda

one more thing: for the same of continuity as well as for backup purposes, perhaps this file should be located in /etc/asterisk

07/11/08 11:23:48 changed by p_lindheimer

thus my pseudo code: $astetc_path."/fop.conf"

I just can't recall where that path is put in the perl parser that this uses. BTW - this code is part of FreePBX not FOP, so no need to include it back into FOP. What would be nice is if someone wanted to migrate this to php so we have one more perl script out of the way :-)

btw - if you want to get this working and tested, we can get it into 2.5.

07/11/08 11:26:13 changed by mbrevda

ops, my bad :)

07/25/08 10:42:07 changed by ryppn

  • milestone set to 3.0.

08/18/09 17:35:52 changed by p_lindheimer

  • milestone changed from 2.6 to 2.7.