You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2009-06-06 11:51:09

pthoirey
Member
Registered: 2009-01-25
Posts: 74

Plugin appweb: associer plusieurs URLs à une application WEB

Environnement
GLPI SVN 20090603
Plugin appweb SVN SVN 20090603

Constats et suggestions
Il n'est pas rare pour une application WEB d'avoir plusieurs URLs. À titre d'illustration, le site WEB GLPI a pour URL principale http://www.glpi-project.org/ mais répond également à l'adresse http://glpi-project.org/. De plus, une application WEB est en général dotée d'une interface d'administration dont il serait intéressant de pouvoir inventorier l'URL.

Pour ces raisons, pourrait-on ajouter au formulaire des applications WEB (appweb/front/plugin_appweb.form.php):
- un champ « URL d'administration » en dessous du champ « URL »;
- un champ « Autres URL » permettant d'ajouter les URLs une à une (un peu de la même manière que ce qui a été fait avec les champs personnalisables du plugin applicatifs).

Qu'en pensez-vous?
Merci. smile

Offline

#2 2009-06-17 22:12:13

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

Re: Plugin appweb: associer plusieurs URLs à une application WEB

Pourquoi pas. Dans une prochaine version.


Xavier Caillaud
Blog GLPI Infotel

Offline

#3 2009-08-16 15:21:31

pthoirey
Member
Registered: 2009-01-25
Posts: 74

Re: Plugin appweb: associer plusieurs URLs à une application WEB

Voici un patch qui appliqué à la version 1.5.1 du plugin appweb intègre l'ajout du champ "URL d'administration".

diff -Naur appweb.ORIG/hook.php appweb/hook.php
--- appweb.ORIG/hook.php        2009-07-21 23:06:39.000000000 +0200
+++ appweb/hook.php     2009-08-16 15:13:18.000000000 +0200
@@ -227,6 +227,12 @@
                $sopt[PLUGIN_APPWEB_TYPE][10]['field']='name';^M
                $sopt[PLUGIN_APPWEB_TYPE][10]['linkfield']='FK_groups';^M
                $sopt[PLUGIN_APPWEB_TYPE][10]['name']=$LANG['common'][35];^M
+
+               $sopt[PLUGIN_APPWEB_TYPE][11]['table']='glpi_plugin_appweb';
+               $sopt[PLUGIN_APPWEB_TYPE][11]['field']='backoffice';
+               $sopt[PLUGIN_APPWEB_TYPE][11]['linkfield']='backoffice';
+               $sopt[PLUGIN_APPWEB_TYPE][11]['name']=$LANG['plugin_appweb'][7];
+               $sopt[PLUGIN_APPWEB_TYPE][11]['datatype']='weblink';
                ^M
                $sopt[PLUGIN_APPWEB_TYPE][13]['table']='glpi_plugin_appweb_device';^M
                $sopt[PLUGIN_APPWEB_TYPE][13]['field']='FK_device';^M
@@ -983,4 +989,4 @@
        $pdf->render(); ^M
 }^M
 ^M
-?>
\ Pas de fin de ligne à la fin du fichier.
+?>
diff -Naur appweb.ORIG/inc/plugin_appweb-1.5.1-empty.sql appweb/inc/plugin_appweb-1.5.1-empty.sql
--- appweb.ORIG/inc/plugin_appweb-1.5.1-empty.sql       2009-07-19 22:50:03.000000000 +0200
+++ appweb/inc/plugin_appweb-1.5.1-empty.sql    2009-08-16 15:13:18.000000000 +0200
@@ -5,6 +5,7 @@
        `recursive` tinyint(1) NOT NULL default '0',
        `name` varchar(255) collate utf8_unicode_ci NOT NULL default '',
        `address` varchar(255) collate utf8_unicode_ci NOT NULL default '',
+       `backoffice` varchar(255) collate utf8_unicode_ci NOT NULL default '',
        `type` int(4) NOT NULL default '0',
        `server` INT(4) NOT NULL DEFAULT '0',
        `technic` INT(4) NOT NULL DEFAULT '0',
@@ -99,4 +100,4 @@
 INSERT INTO `glpi_display` ( `ID` , `type` , `num` , `rank` , `FK_users` )  VALUES (NULL,'1300','3','4','0');
 INSERT INTO `glpi_display` ( `ID` , `type` , `num` , `rank` , `FK_users` )  VALUES (NULL,'1300','6','5','0');
 INSERT INTO `glpi_display` ( `ID` , `type` , `num` , `rank` , `FK_users` )  VALUES (NULL,'1300','7','6','0');
-INSERT INTO `glpi_display` ( `ID` , `type` , `num` , `rank` , `FK_users` )  VALUES (NULL,'1300','8','7','0');
\ Pas de fin de ligne à la fin du fichier.
+INSERT INTO `glpi_display` ( `ID` , `type` , `num` , `rank` , `FK_users` )  VALUES (NULL,'1300','8','7','0');
diff -Naur appweb.ORIG/inc/plugin_appweb-1.5.1-update.sql appweb/inc/plugin_appweb-1.5.1-update.sql
--- appweb.ORIG/inc/plugin_appweb-1.5.1-update.sql      2009-07-19 22:50:03.000000000 +0200
+++ appweb/inc/plugin_appweb-1.5.1-update.sql   2009-08-16 15:13:18.000000000 +0200
@@ -1 +1,2 @@
-ALTER TABLE `glpi_plugin_appweb` ADD `helpdesk_visible` int(11) NOT NULL default '1',ADD `date_mod` datetime default NULL;
\ Pas de fin de ligne à la fin du fichier.
+ALTER TABLE `glpi_plugin_appweb` ADD `helpdesk_visible` int(11) NOT NULL default '1',ADD `date_mod` datetime default NULL;
+ALTER TABLE `glpi_plugin_appweb` ADD `backoffice` varchar(255) collate utf8_unicode_ci NOT NULL default '' AFTER address;
diff -Naur appweb.ORIG/inc/plugin_appweb.appweb.class.php appweb/inc/plugin_appweb.appweb.class.php
--- appweb.ORIG/inc/plugin_appweb.appweb.class.php      2009-07-19 22:50:03.000000000 +0200
+++ appweb/inc/plugin_appweb.appweb.class.php   2009-08-16 15:13:18.000000000 +0200
@@ -222,10 +222,19 @@
                        echo "</td></tr>";


+                       //URLs
+                       echo "<tr><td  class='tab_bg_1' valign='top' align='center' colspan='3'>";
+                       echo "<table cellpadding='2' cellspacing='2' border='0'>";
                        //url of appweb
-                       echo "<tr><td  class='tab_bg_1' valign='top' align='center' colspan='4'>".$LANG['plugin_appweb'][1].": ";
+                       echo "<tr><td>".$LANG['plugin_appweb'][1].": </td><td>";
                        autocompletionTextField("address","glpi_plugin_appweb","address",$this->fields["address"],70,$this->fields["FK_entities"]);
                        echo "</td></tr>";
+                       //backoffice url of appweb
+                       echo "<tr><td>".$LANG['plugin_appweb'][7].": </td><td>";
+                       autocompletionTextField("backoffice","glpi_plugin_appweb","backoffice",$this->fields["backoffice"],70,$this->fields["FK_entities"]);
+                       echo "</td></tr>";
+                       echo "</table>";
+                       echo "</td></tr>";

                        echo "<tr><td class='tab_bg_1' valign='top' colspan='3'>";
                        //comments of appweb
@@ -289,4 +298,4 @@
        }
 }

-?>
\ Pas de fin de ligne à la fin du fichier.
+?>
diff -Naur appweb.ORIG/locales/en_GB.php appweb/locales/en_GB.php
--- appweb.ORIG/locales/en_GB.php       2009-05-31 10:55:16.000000000 +0200
+++ appweb/locales/en_GB.php    2009-08-16 15:13:18.000000000 +0200
@@ -41,6 +41,7 @@
 $LANG['plugin_appweb'][4] = "".$title."";
 $LANG['plugin_appweb'][5] = "Open tickets on associated equipments";
 $LANG['plugin_appweb'][6] = "Create a new web application";
+$LANG['plugin_appweb'][7] = "Backoffice URL";
 $LANG['plugin_appweb'][11] = "No ".$title." found";
 $LANG['plugin_appweb'][12] = "Version";
 $LANG['plugin_appweb'][13] = "Langage of treatment";
@@ -61,4 +62,4 @@
 $LANG['plugin_appweb']['setup'][25] = "Associate to web application";
 $LANG['plugin_appweb']['setup'][28] = "Editor";

-?>
\ Pas de fin de ligne à la fin du fichier.
+?>
diff -Naur appweb.ORIG/locales/fr_FR.php appweb/locales/fr_FR.php
--- appweb.ORIG/locales/fr_FR.php       2009-05-31 10:55:16.000000000 +0200
+++ appweb/locales/fr_FR.php    2009-08-16 15:13:18.000000000 +0200
@@ -36,11 +36,12 @@

 $LANG['plugin_appweb'][0] = "Nom";
 $LANG['plugin_appweb'][1] = "URL";
-$LANG['plugin_appweb'][2] = "Commentaires";
+$LANG['plugin_appweb'][2] = "Description";
 $LANG['plugin_appweb'][3] = "Responsable technique";
 $LANG['plugin_appweb'][4] = "".$title."";
 $LANG['plugin_appweb'][5] = "Tickets en cours sur les éléments associés";
 $LANG['plugin_appweb'][6] = "Créer une nouvelle application web";
+$LANG['plugin_appweb'][7] = "URL d'administration";
 $LANG['plugin_appweb'][11] = "Aucune ".$title." trouvée";
 $LANG['plugin_appweb'][12] = "Version";
 $LANG['plugin_appweb'][13] = "Langage de traitement";
@@ -61,4 +62,4 @@
 $LANG['plugin_appweb']['setup'][25] = "Associer à l'application Web";
 $LANG['plugin_appweb']['setup'][28] = "Editeur ";

-?>
\ Pas de fin de ligne à la fin du fichier.
+?>
diff -Naur appweb.ORIG/locales/pt_BR.php appweb/locales/pt_BR.php
--- appweb.ORIG/locales/pt_BR.php       2009-05-06 10:30:59.000000000 +0200
+++ appweb/locales/pt_BR.php    2009-08-16 15:13:18.000000000 +0200
@@ -41,6 +41,7 @@
 $LANG['plugin_appweb'][4] = "".$title."";
 $LANG['plugin_appweb'][5] = "Open tickets on associated equipments";
 $LANG['plugin_appweb'][6] = "Create a new web application";
+$LANG['plugin_appweb'][7] = "Backoffice URL";
 $LANG['plugin_appweb'][11] = "N&#65533;o ".$title." encontrado";
 $LANG['plugin_appweb'][12] = "Vers&#65533;o";
 $LANG['plugin_appweb'][13] = "Linguagem para Tratamento";
@@ -61,4 +62,4 @@
 $LANG['plugin_appweb']['setup'][25] = "Associar com Aplica&#65533;&#65533;o WEB";
 $LANG['plugin_appweb']['setup'][28] = "Editor";

-?>
\ Pas de fin de ligne à la fin du fichier.
+?>

Offline

#4 2009-08-24 21:30:07

pthoirey
Member
Registered: 2009-01-25
Posts: 74

Re: Plugin appweb: associer plusieurs URLs à une application WEB

Est-ce que cette modification a une chance d'être intégrée?

Merci. smile

Offline

#5 2009-09-09 10:41:32

pthoirey
Member
Registered: 2009-01-25
Posts: 74

Re: Plugin appweb: associer plusieurs URLs à une application WEB

Bonjour,

j'utilise maintenant depuis plusieurs semaines la modification postée le 16/08/2009 sans avoir rencontré le moindre problème. Je réitère donc ma question du 24/08/2009 en souhaitant vivement que la réponse soit positive.

Merci.

Offline

#6 2010-01-17 17:48:27

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

Re: Plugin appweb: associer plusieurs URLs à une application WEB

Ajouté pour la 0.80 de GLPI.
https://forge.indepnet.net/repositories/revision/16/85

Attention à ton update quand tu passeras en 0.80


Xavier Caillaud
Blog GLPI Infotel

Offline

Board footer

Powered by FluxBB