Show
Ignore:
Timestamp:
07/29/10 05:32:51 (3 years ago)
Author:
tm1000
Message:

-Lots of changes to endpoint manager. Now it will reference provisioner.net where it will reference a master repository of phone configuration modules that are run by Darren & Team and Andrew. Project Reference: https://www.assembla.com/code/provisioner/git/nodes?rev=master
--Reasoning for doing this project to to stop having different distributions and locations for users to get working configuration files. Whether a user uses FreePBX V2, V3 or something else they will know that their phones will work correctly and one change made to the repository on provisioner will change on all the clients/software using this package
--Removed local _ep_phone_modules. It was out of date and is now at https://www.assembla.com/code/provisioner/git/nodes?rev=master. This is a configuration file generator only. The full EPM will be hosted here on the SVN.

-Uses only Pear::DB now. No more direct MySQL References.

-Needs install script to be updated to reference new database structure. Old DB structure won't work. Working on this next.

-Supports custom template_data.xml files. Also can define these files in each family_data.xml file in the provisioner.net repository

-Everything is now referenced by models instead of product_line (family_line). This allows users to have template files all the way down to specific models.
--Need to add a way to combine models in the template system so that users aren't so restricted to model lines when creating global configurations...looking into way to fix this.

-Removing need for direct Internet access. If the XML files can't be downloaded or are corrupt then endpoint manager will use local files instead.
--Furthermore will add option to allow users to upload the provisioner.net repo incase they will never have Internet on said machine

-Still need to fix: Product Options/Configuration Editor, Import/Export Devices My Devices List, Manual Endpoint Modules Upload and Show/Hide Brands/Models

-Other Fixes I'm sure.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • contributed_modules/modules/endpointman/templates/advanced_settings_settings.html

    r10052 r10198  
     1<h3>{$message}</h3> 
    12<form action='config.php{$web_vars}&display=epm_advanced&subpage=settings' method='POST'> 
    23<table width='90%' align='center'> 
  • contributed_modules/modules/endpointman/templates/advanced_subheader.html

    r10052 r10198  
    44<td align='center'><h4><a href='{$web_vars}&display=epm_advanced&subpage=oui_manager'><?=_('OUI Manager')?></a></h4></td> 
    55<td align='center'><h4><a href='{$web_vars}&display=epm_advanced&subpage=poce'><?=_('Product Options/Configuration Editor')?></a></h4></td> 
    6 <td align='center'><h4><a href='{$web_vars}&display=epm_advanced&subpage=iedl'><?=_('Import/Export Devices My Devices List')?></a></h4></td> 
     6</tr> 
     7<tr> 
     8    <td align='center'><h4><a href='{$web_vars}&display=epm_advanced&subpage=iedl'><?=_('Import/Export Devices My Devices List')?></a></h4></td> 
     9<td align='center'><h4><a href='{$web_vars}&display=epm_advanced&subpage=sh_manager'><?=_('Manual Endpoint Modules Upload')?></a></h4></td> 
    710<td align='center'><h4><a href='{$web_vars}&display=epm_advanced&subpage=sh_manager'><?=_('Show/Hide Brands/Models')?></a></h4></td> 
    811</tr> 
  • contributed_modules/modules/endpointman/templates/brand_model_manager.html

    r10052 r10198  
    1919--> 
    2020</style> 
    21 <h1 align='center'><font color='red'>{$error}</font></h1
     21<h3 align='center'><font color='red'>{$error}</font></h3
    2222<center> 
    2323<form action='config.php{$web_var}&display=epm_config' method='POST'> 
     
    2929 
    3030{if condition="isset($installer_address)"} 
    31 <?=_('Please wait for the progress bar to show below (this might take a minute or two)')?> 
    32 <iframe src="http://{$installer_address}" frameborder=0 width="100%" height=70 scrolling="no"></iframe> 
     31<script> 
     32function process_module_actions(actions) { 
     33  freepbx_modal_show('moduleBox'); 
     34  urlStr = "config.php?type=tool&amp;display=epm_config&amp;quietmode=1&amp;handler=file&amp;file=installer.html.php&amp;module=endpointman&amp;type=install&amp;brand={$brand}"; 
     35  urlStr += "&amp;rand="+Math.random ( ); 
     36  for (var i in actions) { 
     37    urlStr += "&amp;moduleaction["+i+"]="+actions[i]; 
     38  } 
     39  $('#moduleBox').html('<iframe src="'+urlStr+'"></iframe><a href="#" onclick="close_module_actions(1)">Return</a>'); 
     40
     41function close_module_actions(goback) { 
     42  //freepbx_modal_close('moduleBox'); 
     43  freepbx_modal_hide('moduleBox'); 
     44  if (goback) { 
     45      location.href = 'config.php?display=epm_config&amp;type=tool'; 
     46  } 
     47
     48process_module_actions(); 
     49</script> 
     50 
     51<div id="moduleBox" style="display:none;"></div>  
     52 
    3353{/if} 
    34  
    3554 
    3655{loop name="brand2_list"} 
     
    4463  <table width="100%" class="product" border="0" cellspacing="0" cellpadding="0"> 
    4564      <tr> 
    46         <td colspan="2">{$value.long_name} {if condition="$value.cfg_ver != ''"}(<?=_('Version')?> [{$value.cfg_ver}]){/if} <form action='config.php{$web_var}&display=epm_config' method='POST'><input type="hidden" name="product" value="{$value.id}"><input type="submit" name="button_{if condition="$value.installed == '1'"}uninstall{else}install{/if}" class="button_{if condition="$value.installed == '1'"}Disable{else}Enable{/if}" value="{if condition="$value.installed == '1'"}<?=_('Uninstall')?>{else}<?=_('Install')?>{/if}">{if condition="array_key_exists('update',$value)"}{if condition="$value.update == 1"}<input type="submit" name="button_update" class="button_update" value="Update">{/if}{/if}{if condition="$value.fw_type == 'install'"}<input type="submit" name="button_install_firmware" class="button_update" value="<?=_('Install Firmware')?>">{elseif condition="$value.fw_type == 'remove'"}<input type="submit" name="button_remove_firmware" class="button_update" value="<?=_('Remove Firmware')?>">{/if}{if condition="array_key_exists('update_fw',$value)"}{if condition="$value.update_fw == 1"}<input type="submit" name="button_update_firmware" class="button_update" value="<?=_('Update Firmware')?>">{/if}{/if}</form>{if condition="array_key_exists('update',$value)"}{if condition="$value.update == 1"}New Version: <i>{$value.update_vers}</i> <br/>Changes: <i>{$value.update_desc}</i>{/if}{/if}</td> 
     65        <td colspan="2">{$value.long_name} {if condition="$value.cfg_ver != ''"}(<?=_('Version')?> [{$value.cfg_ver}]){/if} <form action='config.php{$web_var}&display=epm_config' method='POST'><input type="hidden" name="product" value="{$value.id}">{if condition="array_key_exists('update',$value)"}{if condition="$value.update == 1"}<input type="submit" name="button_update" class="button_update" value="Update">{/if}{/if}{if condition="$value.fw_type == 'install'"}<input type="submit" name="button_install_firmware" class="button_update" value="<?=_('Install Firmware')?>">{elseif condition="$value.fw_type == 'remove'"}<input type="submit" name="button_remove_firmware" class="button_update" value="<?=_('Remove Firmware')?>">{/if}{if condition="array_key_exists('update_fw',$value)"}{if condition="$value.update_fw == 1"}<input type="submit" name="button_update_firmware" class="button_update" value="<?=_('Update Firmware')?>">{/if}{/if}</form>{if condition="array_key_exists('update',$value)"}{if condition="$value.update == 1"}New Version: <i>{$value.update_vers}</i> <br/>Changes: <i>{$value.update_desc}</i>{/if}{/if}</td> 
    4766      </tr> 
    4867      <tr> 
  • contributed_modules/modules/endpointman/templates/devices_manager.html

    r10052 r10198  
    179179  <td width="19%" align='center'>{$value.ext} - {$value.description}</td> 
    180180  <td align='center' width='18%'>{$value.template_name}</td> 
    181   <td align='center' width='9%'><a href={$web_vars}&editready=true&display=epm_devices&id={$value.id}><img src='{$web_path}templates/images/edit.gif' ALT='<?=_('Edit')?>' border='0'></a></td> 
    182   <td align='center' width='5%'><a href={$web_vars}&deleteready=true&display=epm_devices&id={$value.id}><img src='{$web_path}templates/images/delete.gif' ALT='<?=_('Delete')?>' border='0'></a></td> 
     181  <td align='center' width='9%'><a href=config.php?type=tool&display=epm_devices&editready=true&display=epm_devices&id={$value.id}><img src='{$web_path}templates/images/edit.gif' ALT='<?=_('Edit')?>' border='0'></a></td> 
     182  <td align='center' width='5%'><a href=config.php?type=tool&display=epm_devices&deleteready=true&display=epm_devices&id={$value.id}><img src='{$web_path}templates/images/delete.gif' ALT='<?=_('Delete')?>' border='0'></a></td> 
    183183  </tr> 
    184184  {/loop} 
  • contributed_modules/modules/endpointman/templates/global_header.html

    r10031 r10198  
    1818    <!-- End JavaScript --> 
    1919  {/if} 
     20                <!-- config.php?type=tool&amp;display=epm_config&amp;quietmode=1&amp;handler=file&amp;module=endpointman&amp;file=ajax_select.php?amp_conf --> 
     21 
     22                 
     23 
    2024  {if condition="isset($amp_conf_serial)"} 
    2125    <script type="text/javascript" charset="utf-8">  
    2226    $(function(){ 
    2327      $("select#brand_edit").change(function(){ 
    24         $.getJSON("<?=WEB_PATH?>includes/ajax_select.php?amp_conf={$amp_conf_serial}&type=model",{id: $(this).val()}, function(j){ 
     28        $.getJSON("config.php?type=tool&quietmode=1&handler=file&module=endpointman&file=ajax_select.html.php&atype=model",{id: $(this).val()}, function(j){ 
    2529          var options = ''; 
    2630          for (var i = 0; i < j.length; i++) { 
     
    3640    $(function(){ 
    3741      $("select#product_select").change(function(){ 
    38         $.getJSON("<?=WEB_PATH?>includes/ajax_select.php?amp_conf={$amp_conf_serial}&type=template",{id: $(this).val()}, function(j){ 
     42        $.getJSON("config.php?type=tool&quietmode=1&handler=file&module=endpointman&file=ajax_select.html.php&atype=template",{id: $(this).val()}, function(j){ 
    3943          var options = ''; 
    4044          for (var i = 0; i < j.length; i++) { 
     
    4852    $(function(){ 
    4953      $("select#model_new").change(function(){ 
    50         $.getJSON("<?=WEB_PATH?>includes/ajax_select.php?amp_conf={$amp_conf_serial}&type=template2",{id: $(this).val()}, function(j){ 
     54        $.getJSON("config.php?type=tool&quietmode=1&handler=file&module=endpointman&file=ajax_select.html.php&atype=template2",{id: $(this).val()}, function(j){ 
    5155          var options = ''; 
    5256          for (var i = 0; i < j.length; i++) { 
     
    6064    $(function(){ 
    6165      $("select#brand_list_selected").change(function(){ 
    62         $.getJSON("<?=WEB_PATH?>includes/ajax_select.php?amp_conf={$amp_conf_serial}&type=model",{id: $(this).val()}, function(j){ 
     66        $.getJSON("config.php?type=tool&quietmode=1&handler=file&module=endpointman&file=ajax_select.html.php&atype=model",{id: $(this).val()}, function(j){ 
    6367          var options = ''; 
    6468          for (var i = 0; i < j.length; i++) { 
     
    7074      })       
    7175    }) 
     76                $(function(){ 
     77                        $("select#model_class").change(function(){ 
     78                                $.getJSON("config.php?type=tool&quietmode=1&handler=file&module=endpointman&file=ajax_select.html.php&atype=model_clone",{id: $(this).val()}, function(j){ 
     79                                        var options = ''; 
     80                                        for (var i = 0; i < j.length; i++) { 
     81                                                options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; 
     82                                        } 
     83                                        $("#model_clone").html(options); 
     84                                        $('#model_clone option:first').attr('selected', 'selected'); 
     85                                }) 
     86                        }) 
     87                }) 
    7288    </script> 
    7389  {/if} 
  • contributed_modules/modules/endpointman/templates/template_editor.html

    r10052 r10198  
    11{if condition="isset($in_ari)"} 
    2  <html> 
    3  <head> 
    4     <link href="/recordings/theme/coda-slider-2.0a.css" rel="stylesheet" type="text/css" />  
     2<html> 
     3    <head> 
     4        <link href="/recordings/theme/coda-slider-2.0a.css" rel="stylesheet" type="text/css" /> 
    55 
    66 
    7     <!-- Begin JavaScript -->  
    8       <script type="text/javascript" src="/recordings/theme/js/jquery.easing.1.3.js"></script>  
    9       <script type="text/javascript" src="/recordings/theme/js/jquery.coda-slider-2.0.js"></script>  
    10        <script type="text/javascript">  
    11              $().ready(function() { 
    12                $('#coda-slider-9').codaSlider({ 
    13            dynamicArrows: false 
    14          }); 
    15              }); 
    16            </script>  
    17    <!-- End JavaScript --> 
    18  </head> 
    19  <body> 
    20 {else} 
    21  <?=_('You are currently editing')?> 
     7        <!-- Begin JavaScript --> 
     8        <script type="text/javascript" src="/recordings/theme/js/jquery.easing.1.3.js"></script> 
     9        <script type="text/javascript" src="/recordings/theme/js/jquery.coda-slider-2.0.js"></script> 
     10        <script type="text/javascript"> 
     11            $().ready(function() { 
     12                $('#coda-slider-9').codaSlider({ 
     13                    dynamicArrows: false 
     14                }); 
     15            }); 
     16        </script> 
     17        <!-- End JavaScript --> 
     18    </head> 
     19    <body> 
     20        {else} 
     21        <?=_('You are currently editing')?> 
    2222  {if condition="$custom != 0"} 
    23  <?=_('a custom config template for extension')?> {$ext}, <?=_('Model')?>: {$model} 
     23        <?=_('a custom config template for extension')?> {$ext}, <?=_('Model')?>: {$model} 
    2424  {/if} 
    2525  {if condition="$custom == 0"} 
    26  <?=_('the template named')?> "{$template_name}" <?=_('for Model')?>: {$model} 
     26        <?=_('the template named')?> "{$template_name}" <?=_('for Model')?>: {$model} 
    2727  {/if} 
    28  <br /> 
    29  <form action="config.php{$web_vars}&display=epm_templates" method="post"> 
     28        <br /> 
     29        <form action="config.php?display=epm_templates" method="post"> 
    3030  {if condition="$alt != 0"} 
    31  <br/> 
    32  <br /> 
    33  <?=_('Select Alternative File Configurations:')?> 
     31            <br/> 
     32            <br /> 
     33            <?=_('Select Alternative File Configurations:')?> 
    3434  {$alt_configs} 
    35  <br/> 
     35            <br/> 
    3636  {/if} 
    37  <br /> 
    38  <?=_('You can also use certain variables in your configs')?>:<br />{noparse} 
     37            <br /> 
     38            <?=_('You can also use certain variables in your configs')?>:<br />{noparse} 
    3939  -"{$srvip}" = <?=_('Server IP')?><br /> 
    4040  -"{$mac}" = <?=_('Device\'s Mac Address')?><br /> 
    4141  -"{$ext}" = <?=_('Device\'s Default Extension (Line 1 or Master)')?><br /> 
    4242  -"{$diplayname}" = <?=_('Device\'s Description in FreePBX (Usually the Full Name)')?><br />{/noparse} 
    43  <br /> 
    44 {/if} 
     43            <br /> 
     44            {/if} 
    4545 
    46 <div class="coda-slider-wrapper">  
    47     <div class="coda-slider preload" id="coda-slider-9"> 
     46            <div class="coda-slider-wrapper"> 
     47                <div class="coda-slider preload" id="coda-slider-9"> 
    4848    {loop name="template_editor"}  
    49      <div class="panel"> 
    50         <div class="panel-wrapper">  
    51                <h2 class="title">{$value.title}</h2> 
    52          <table width="100%" border="0" cellspacing="0" cellpadding="0"> 
     49                    <div class="panel"> 
     50                        <div class="panel-wrapper"> 
     51                            <h2 class="title">{$value.title}</h2> 
     52                            <table width="100%" border="0" cellspacing="0" cellpadding="0"> 
    5353          {loop name="value.data"} 
    54            <tr> 
    55              <td nowrap> 
     54                                <tr> 
     55                                    <td nowrap> 
    5656            {if condition="$value.type == 'input'"} 
    57              <label>{$value.description}: <input type='text' name='{$value.key}' value='{$value.value}' size="40"></label> 
     57                                        <label>{$value.description}: <input type='text' name='{$value.key}' value='{$value.value}' size="40"></label> 
    5858            {elseif condition="$value.type == 'radio'"} 
    5959              {$value.description} 
    6060              {loop name="value.data"} 
    61                <label>{$value.description}: <input type='radio' name='{$value.key}' value='{$value.value}' {if condition="array_key_exists('checked',$value)"}{$value.checked}{/if}></label> 
     61                                        <label>{$value.description}: <input type='radio' name='{$value.key}' value='{$value.value}' {if condition="array_key_exists('checked',$value)"}{$value.checked}{/if}></label> 
    6262              {/loop} 
    6363            {elseif condition="$value.type == 'list'"} 
    6464              {$value.description} <select name='{$value.key}'> 
    6565              {loop name="value.data"} 
    66                <option value='{$value.value}' {if condition="array_key_exists('selected',$value)"}{$value.selected}{/if}>{$value.description}</option> 
     66                                            <option value='{$value.value}' {if condition="array_key_exists('selected',$value)"}{$value.selected}{/if}>{$value.description}</option> 
    6767              {/loop} 
    68              </select> 
     68                                        </select> 
    6969            {/if} 
    70            </td><td width="90%"> 
     70                                    </td><td width="90%"> 
    7171            {if condition="isset($value.aried)"} 
    72              <label><input type='checkbox' name='ari_{$value.ari.key}' {$value.ari.checked}><?=_('End User Editable (Through ARI Module)')?></label> 
     72                                        <label><input type='checkbox' name='ari_{$value.ari.key}' {if condition="isset($value.ari.checked)"}{$value.ari.checked}{/if}><?=_('End User Editable (Through ARI Module)')?></label> 
    7373            {/if} 
    74            </td> 
    75            </tr> 
     74                                    </td> 
     75                                </tr> 
    7676            {if condition="$value.type == 'break'"} 
    77              <tr> 
    78                <td>&nbsp;</td> 
    79                <td>&nbsp;</td> 
    80              </tr> 
     77                                <tr> 
     78                                    <td>&nbsp;</td> 
     79                                    <td>&nbsp;</td> 
     80                                </tr> 
    8181            {/if} 
    8282          {/loop} 
    83          </table> 
    84         </div>  
    85       </div>  
     83                            </table> 
     84                        </div> 
     85                    </div> 
    8686    {/loop} 
    87   </div><!-- .coda-slider -->  
    88 </div><!-- .coda-slider-wrapper --> 
    89 <input name="id" type="hidden" value="{$hidden_id}"> 
    90 <input name="custom" type="hidden" value="{$hidden_custom}"> 
    91 {if condition="!isset($in_ari)"} 
    92  <input type="submit" name="button_save_template" value="<?=_('Save Template');?>"> 
    93  </form> 
    94 {/if} 
     87                </div><!-- .coda-slider --> 
     88            </div><!-- .coda-slider-wrapper --> 
     89            <input name="id" type="hidden" value="{$hidden_id}"> 
     90            <input name="custom" type="hidden" value="{$hidden_custom}"> 
     91            {if condition="!isset($in_ari)"} 
     92            <input type="submit" name="button_save_template" value="<?=_('Save Template');?>"> 
     93        </form> 
     94        {/if} 
  • contributed_modules/modules/endpointman/templates/template_manager.html

    r10052 r10198  
    33{if condition="$no_add == FALSE"} 
    44<center> 
    5   <h3><?=_('Add New Template')?>:</h3><form action="config.php{$web_vars}&Submit=EditTemplate&display=epm_templates" method="POST"> 
     5  <h3><?=_('Add New Template')?>:</h3><form action="config.php?display=epm_templates&Submit=EditTemplate" method="POST"> 
    66    <?=_('Template Name')?>: 
    77    <label> 
    8       <input type="text" name="template_name" id="textfield"> 
     8      <input type="text" name="template_name" id="template_name"> 
    99    <input type="hidden" name="page" value="template_manager"> 
    1010    </label> 
    1111  <?=_('Product Select')?>:  
    1212  <label> 
    13     <select name="model_class" id="select"> 
     13    <select name="model_class" id="model_class"> 
    1414    {loop name="class_list"} 
    1515      <option value="{$value.value}">{$value.text}</option> 
    1616    {/loop} 
     17    </select> 
     18  </label> 
     19        Clone Template From: 
     20        <label> 
     21    <select name="model_clone" id="model_clone"> 
    1722    </select> 
    1823  </label> 
     
    2126  </label> 
    2227  </form> 
    23 <table width="50%" border="0" cellspacing="0" cellpadding="0"> 
     28<table width="80%" border="0" cellspacing="0" cellpadding="0"> 
    2429  <tr> 
    2530    <td><h3><?=_('Template Name')?></h3></td> 
    2631    <td><h3><?=_('Model Classification')?></h3></td> 
     32    <td><h3><?=_('Model Clone')?></h3></td> 
    2733    <td><h3><?=_('Edit')?></h3></td> 
    2834    <td><h3><?=_('Delete')?></h3></td> 
     
    3238    <td>{$value.name}</td> 
    3339    <td>{$value.model_class}</td> 
    34   <td align='center' width='9%'><a href={$web_vars}&edit_template=true&display=epm_templates&custom={$value.custom}&id={$value.id}><img src='<?=WEB_PATH?>templates/images/edit.gif' ALT='<?=_('Edit')?>' border='0'></a></td> 
     40    <td>{$value.model_clone}</td> 
     41 
     42  <td align='center' width='9%'><a href="config.php?edit_template=true&display=epm_templates&custom={$value.custom}&id={$value.id}"><img src='<?=WEB_PATH?>templates/images/edit.gif' ALT='<?=_('Edit')?>' border='0'></a></td> 
    3543  <td align='center' width='5%'>{if condition="$value.custom == 0"} 
    36   <a href={$web_vars}&delete_template=true&display=epm_templates&id={$value.id}><img src='<?=WEB_PATH?>templates/images/delete.gif' ALT='<?=_('Delete')?>' border='0'></a>{/if}</td> 
     44  <a href="config.php?delete_template=true&display=epm_templates&id={$value.id}"><img src='<?=WEB_PATH?>templates/images/delete.gif' ALT='<?=_('Delete')?>' border='0'></a>{/if}</td> 
    3745  </tr> 
    3846{/loop}