$this->Changelog->create();
if ($this->Changelog->save($this->request->data)) {
$this->Session->setFlash(__("L'historique a été enregistré."));
- $this->redirect(array('action' => 'index'));
+
+ // REDIRECTION TO APPLIANCES PAGE
+ $this->redirect(array('controller' => 'appliances', 'action' => 'index'));
}
$this->Session->setFlash(__("Enregistrement de l'historique impossible."));
}
$this->Changelog->id = $id;
if ($this->Changelog->save($this->request->data)) {
$this->Session->setFlash(__("L'historique a été mis à jour."));
- $this->redirect(array('action' => 'index'));
+
+ // REDIRECTION TO APPLIANCES PAGE
+ $this->redirect(array('controller' => 'appliances', 'action' => 'index'));
}
$this->Session->setFlash(__("Mise à jour de l'historique impossible."));
}
$this->Session->setFlash(
__("L'historique d'id: %s a été supprimé.", h($id))
);
- $this->redirect(array('action' => 'index'));
+
+ // REDIRECTION TO APPLIANCES PAGE
+ $this->redirect(array('controller' => 'appliances', 'action' => 'index'));
}
}
<?php endforeach; unset($appliances); } ?>
</table>
<script>
-
// JS FUNCTIONS FOR CONFIRMATION POP-UPS AND AJAX CALLS
var keepMaintained = function (appliance_id, changelog_id, warning_id) {
var acknowledgeWarningUrl = "/changelogs/acknowledgeWarning/"+changelog_id+"/"+warning_id+"/false",
<script>
var synchronizeCustomersInformation = function () {
$.ajax({
- url: "http://allo_serveur/?action=synchronize_customers_info",
+ url: "http://allo_serveur_dev/?action=synchronize_customers_info",
beforeSend: function(xhr) {
xhr.overrideMimeType("text/plain; charset=x-user-defined");
}
-L'application a renvoyé une erreur :
-Aucune réponse de l'application
--- /dev/null
+{
+ "canal": "prod",
+ "fqdn_interne": "api_test",
+ "systeme": "Ubuntu 14.04.2 LTS ",
+ "usager_type": "client",
+ "produit": "i-Parapheur",
+ "version": "4.2.06",
+ "reference": "IP/VILLELAG_77243_2004151140",
+ "disques": "/dev/sda1: UUID=ba9880c3-9243-4bf5-ac40-e444f50f5bab TYPE=ext4 \n/dev/sda2: UUID=60e43c5a-e2bd-4292-ae2f-c9a99f8f2e14 TYPE=swap \n/dev/sda3: UUID=8d5b0c17-4189-4de8-bc82-cc674b58b4b0 TYPE=ext4 ",
+ "fqdn_externe": "instance.mondomaine.fr"
+}
-{"produit":"as@lae","version":"4.1.02"}
\ No newline at end of file
+{"produit":"i-Parapheur","version":"4.2.06"}
\ No newline at end of file
--- /dev/null
+HTTP/1.1 200 OK
+Date: Tue, 12 May 2015 10:07:15 GMT
+Server: Apache/2.4.7 (Ubuntu)
+X-Powered-By: PHP/5.5.9-1ubuntu4.9
+Access-Control-Allow-Origin: *
+Content-Length: 0
+Content-Type: text/html; charset=utf-8
+
--- /dev/null
+{
+ "reference": "IP/VILLELAG_77243_2004151140",
+ "version": "4.2.06",
+ "produit": "i-Parapheur"
+}
--- /dev/null
+{
+ "usager_type": "client",
+ "produit": "i-Parapheur",
+ "version": "4.2.06",
+ "reference": "IP/VILLELAG_77243_2004151140"
+}
--- /dev/null
+{
+ "disques": "/dev/sda1: UUID=ba9880c3-9243-4bf5-ac40-e444f50f5bab TYPE=ext4 \n/dev/sda2: UUID=60e43c5a-e2bd-4292-ae2f-c9a99f8f2e14 TYPE=swap \n/dev/sda3: UUID=8d5b0c17-4189-4de8-bc82-cc674b58b4b0 TYPE=ext4 ",
+ "reference": "IP/VILLELAG_77243_2004151140",
+ "version": "4.2.06",
+ "produit": "i-Parapheur",
+ "usager_type": "client"
+}
--- /dev/null
+{
+ "systeme": "Ubuntu 14.04.2 LTS ",
+ "usager_type": "client",
+ "produit": "i-Parapheur",
+ "version": "4.2.06",
+ "reference": "IP/VILLELAG_77243_2004151140",
+ "disques": "/dev/sda1: UUID=ba9880c3-9243-4bf5-ac40-e444f50f5bab TYPE=ext4 \n/dev/sda2: UUID=60e43c5a-e2bd-4292-ae2f-c9a99f8f2e14 TYPE=swap \n/dev/sda3: UUID=8d5b0c17-4189-4de8-bc82-cc674b58b4b0 TYPE=ext4 "
+}
--- /dev/null
+{
+ "fqdn_externe": "instance.mondomaine.fr",
+ "disques": "/dev/sda1: UUID=ba9880c3-9243-4bf5-ac40-e444f50f5bab TYPE=ext4 \n/dev/sda2: UUID=60e43c5a-e2bd-4292-ae2f-c9a99f8f2e14 TYPE=swap \n/dev/sda3: UUID=8d5b0c17-4189-4de8-bc82-cc674b58b4b0 TYPE=ext4 ",
+ "reference": "IP/VILLELAG_77243_2004151140",
+ "version": "4.2.06",
+ "produit": "i-Parapheur",
+ "usager_type": "client",
+ "systeme": "Ubuntu 14.04.2 LTS "
+}
--- /dev/null
+{
+ "fqdn_interne": "api_test",
+ "systeme": "Ubuntu 14.04.2 LTS ",
+ "usager_type": "client",
+ "produit": "i-Parapheur",
+ "version": "4.2.06",
+ "reference": "IP/VILLELAG_77243_2004151140",
+ "disques": "/dev/sda1: UUID=ba9880c3-9243-4bf5-ac40-e444f50f5bab TYPE=ext4 \n/dev/sda2: UUID=60e43c5a-e2bd-4292-ae2f-c9a99f8f2e14 TYPE=swap \n/dev/sda3: UUID=8d5b0c17-4189-4de8-bc82-cc674b58b4b0 TYPE=ext4 ",
+ "fqdn_externe": "instance.mondomaine.fr"
+}
# LOG DE LA REPONSE
#echo "$(cat response.json)" 2>&1 | tee -a $log_file
- # VALIDATION DU JSON (nécessite outil de validation json)
- isJSONCorrupted=$(module/json -nq response.json)
-
+ # VALIDATION DU JSON (nécessite outil de validation json et paquet node)
+ isJSONCorrupted="$(module/json -nq response.json)"
+ echo "${isJSONCorrupted}"
# SI LA VARIABLE EST INITIALISEE MAIS VIDE => PAS D'ERREUR
if [[ -z $isJSONCorrupted && ${isJSONCorrupted+x} ]]
then