diff --git a/build/api/module/motheure.php b/build/api/module/motheure.php new file mode 100644 index 0000000..f4e770e --- /dev/null +++ b/build/api/module/motheure.php @@ -0,0 +1,76 @@ + Identifiant de la machine + * + * @return count Retourne le compte horaire + * + */ + public function getCount($params){ + extract($params); + + + /* (1) Check if machine have motheure etree activated + ---------------------------------------------------------*/ + $mod = Table::get('module') + ->whereName('motheure'); + + $etree = Table::get('etree') + ->whereDaemon('simple') + ->join('id_module', $mod); + + $mc = Table::get('module_merge') + ->join('id_etree', $etree); + + $m = Table::get('machine') + ->select('id_machine') + ->whereId($id_machine); + + $mc_m = Table::get('machine_cluster_merge') + ->join('id_machine', $m) + ->join('id_machine_cluster', $mc); + + /* (1) If not the etree -> exit */ + if( count($mc_m->fetch()) == 0 ) + return ['error' => new Error(Err::NoMatchFound)]; + + + /* (2) Get the motor count + ---------------------------------------------------------*/ + /* (1) Fetch count */ + $count = Table::get('motheure') + ->unique() + ->select('count') + ->whereIdMachine($id_machine) + ->fetch(); + + /* (2) If no result -> return 0 */ + if( !is_array($count) || !isset($count['count']) ) + return ['count' => 0]; + + /* (3) Else -> return the count */ + return [ 'count' => $count['count'] ]; + } + + + } + + +?> diff --git a/build/viewer/view/machine/view.php b/build/viewer/view/machine/view.php index fed5a38..88eaba1 100755 --- a/build/viewer/view/machine/view.php +++ b/build/viewer/view/machine/view.php @@ -13,7 +13,7 @@ =========================================================*/ $loader = new \Twig_Loader_Filesystem(__BUILD__.'/viewer/view'); $twig = new \Twig_Environment($loader, []); - + /* [2] Store variables =========================================================*/ @@ -21,7 +21,8 @@ 'p_icon' => [ 'remove' => file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/remove.svg' ), 'edit' => file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/edit.svg' ), - 'group' => file_get_contents( __PUBLIC__.'/src/static/container/group.svg' ) + 'group' => file_get_contents( __PUBLIC__.'/src/static/container/group.svg' ), + 'motor' => file_get_contents( __PUBLIC__.'/src/static/container/motor.svg' ) ], 'p_theme' => $_SESSION['WAREHOUSE']['theme'] @@ -32,14 +33,14 @@ $twig->addFunction(new \Twig_Function('f_machines', function(){ $request = new Request('machineDefault/getAll'); // On utilise la methode 'getAll' du module 'machineDefault' $answer = $request->dispatch(); // On recupere la reponse - // + // si erreur, on affiche rien par défaut if( $answer->error->get() != Err::Success ) return []; return $answer->get('machines'); })); - + $twig->addFunction(new \Twig_Function('f_getstate', function($id_machine){ /* (1) Write / Execute request */ $req = new Request('machineDefault/getState', ['id_machine' => $id_machine]); @@ -56,7 +57,7 @@ $request = new Request('machineDefault/getClusters', [ 'id_machine' => (int) $id_machine ]); - + $answer = $request->dispatch(); // si erreur, on affiche rien par défaut @@ -67,6 +68,25 @@ })); + $twig->addFunction(new \Twig_Function('f_motheure', function($id_machine){ + /* (1) Get its machine_clusters + ---------------------------------------------------------*/ + /* (1) Create request */ + $motheureReq = new Request('motheure/getCount', ['id_machine' => $id_machine]); + + /* (2) Execute */ + $motheureRes = $motheureReq->dispatch(); + + /* (3) Manage error */ + if( $motheureRes->error->get() != Err::Success ) + return null; + + + return $motheureRes->get('count'); + + })); + + /* [4] Build the whole stuff =========================================================*/ return $twig->render('machine/view.twig', [ diff --git a/build/viewer/view/machine/view.twig b/build/viewer/view/machine/view.twig index d7266c3..b9be7a6 100755 --- a/build/viewer/view/machine/view.twig +++ b/build/viewer/view/machine/view.twig @@ -9,6 +9,16 @@ {{ p_icon.edit | raw }} + {# List etrees #} + {% set motheure = f_motheure(machine.id_machine) %} + + {% if motheure %} + + {{ p_icon.motor | raw }} + {{ motheure }}h + + {% endif %} + {{ p_icon.group | raw }} diff --git a/build/viewer/view/user/view.twig b/build/viewer/view/user/view.twig index abef64a..7cea9cb 100755 --- a/build/viewer/view/user/view.twig +++ b/build/viewer/view/user/view.twig @@ -24,11 +24,11 @@ {{ p_icon.group | raw }} - + {% for cluster in f_clusters(user.id_user) %} - - + + {{ cluster.name }} diff --git a/config/modules.json b/config/modules.json index 18b02ea..ed9e25c 100755 --- a/config/modules.json +++ b/config/modules.json @@ -12,6 +12,22 @@ }, + "motheure": { + + "POST::getCount": { + "description": "Retourne le compteur horaire du moteur d'une machine donnée", + "permissions": [["admin"]], + "parameters": { + "id_machine": { "description": "UID de la machine.", "type": "id" } + }, + "output": { + "count": { "description": "Compte horaire (en secondes)", "type": "int" } + } + } + + }, + + "authentificationDefault": { "POST::warehouse": { "description": "Connexion de premier niveau : entrepot.", diff --git a/logauth.sql b/logauth.sql index 3c58abc..fa52be4 100644 --- a/logauth.sql +++ b/logauth.sql @@ -3,7 +3,7 @@ -- http://www.phpmyadmin.net -- -- Host: localhost --- Generation Time: Sep 25, 2017 at 04:37 PM +-- Generation Time: Oct 12, 2017 at 09:32 PM -- Server version: 5.7.19-0ubuntu0.16.04.1 -- PHP Version: 7.0.22-0ubuntu0.16.04.1 @@ -88,10 +88,16 @@ INSERT INTO `action_merge` (`id_action_merge`, `id_target`, `id_source`, `id_act (32, 5, 5, 2), (33, 5, 5, 3), (34, 5, 5, 5), -(38, 5, 6, 5), (39, 4, 6, 6), (40, 5, 6, 6), -(41, 5, 6, 1); +(41, 4, 8, 1), +(42, 4, 8, 2), +(43, 4, 8, 3), +(44, 4, 8, 5), +(45, 5, 8, 1), +(46, 5, 8, 2), +(47, 5, 8, 3), +(48, 5, 8, 5); -- -------------------------------------------------------- @@ -115,7 +121,8 @@ CREATE TABLE `admin` ( INSERT INTO `admin` (`id_admin`, `id_warehouse`, `username`, `mail`, `password`, `token`) VALUES (1, 7, 'adrien.marques', 'adminmail@gmail.com', 'eb35bccc794d3151b050285c3f6f6d084faadcc7345302b639fbb036cf623b7befcbf7ea08579c612f6201b22cdbc98d6d5d39354b3d31f51ba0426a5299371d', '434f3494ca228538463320eccf93ba67ca29e734073fbf7a9178ba7494b0e26365bb5ae2ead89428f515cdcb9ac75f0ec2200033c3911f4a49f133dfb6dd4aca'), -(2, 8, 'alexandre.marques', 'admin2mail@gmail.com', 'b70896036f6d717f938ca09f531364c17910fc6a2011166e2c2bac6f505bda52e8d8993fefb7a6fdf13b1fd5368280f064ff87e01ae74aadf7e14f582dede676', '287361328d110cbc2e78464563e005dc82a6a0d501b84cba6770dd3d173b65eef0b226fcb8326cc14fb4ee9dec5df6622a11fd8e6e8a6e518a7eca055e67e8c5'); +(2, 8, 'alexandre.marques', 'admin2mail@gmail.com', 'b70896036f6d717f938ca09f531364c17910fc6a2011166e2c2bac6f505bda52e8d8993fefb7a6fdf13b1fd5368280f064ff87e01ae74aadf7e14f582dede676', '287361328d110cbc2e78464563e005dc82a6a0d501b84cba6770dd3d173b65eef0b226fcb8326cc14fb4ee9dec5df6622a11fd8e6e8a6e518a7eca055e67e8c5'), +(4, 8, 'willy.fontaine', 'willy.fontaine@stef.com', '08678556fd8223eb5d6014deeec072b809df8ac1dd6e087150f2b9e3820640ed92e33db793b9a02f31615490cee7b01c659865a6322a9d784bf86747ec41d7aa', '728caa787cf2f567cfeacf682e64b36a6387955cc441dc62c59fc51df034760e76fccb934b82f4495cfe860c3092665811d93bd1549f7d286d0ad071ee45b6fd'); -- -------------------------------------------------------- @@ -126,7 +133,7 @@ INSERT INTO `admin` (`id_admin`, `id_warehouse`, `username`, `mail`, `password`, DROP TABLE IF EXISTS `chip`; CREATE TABLE `chip` ( `id_chip` int(11) NOT NULL, - `id_module` int(11) DEFAULT NULL COMMENT 'in global_state', + `id_module` int(11) DEFAULT NULL, `name` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `position` int(11) NOT NULL, `type` varchar(10) COLLATE utf8_unicode_ci NOT NULL, @@ -161,7 +168,8 @@ CREATE TABLE `etree` ( INSERT INTO `etree` (`id_etree`, `id_module`, `daemon`) VALUES (1, 1, 'read'), (2, 3, 'emitter'), -(3, 3, 'receiver'); +(3, 3, 'receiver'), +(4, 2, 'simple'); -- -------------------------------------------------------- @@ -206,24 +214,68 @@ CREATE TABLE `history` ( -- INSERT INTO `history` (`id_history`, `timestamp`, `id_user`, `id_machine`, `id_action`) VALUES -(139, 1491819479, 215, 127, 5), -(140, 1491819482, 215, 127, 1), -(141, 1491819484, 215, 127, 5), -(142, 1491819486, 215, 127, 1), -(143, 1491819487, 215, 127, 2), -(144, 1491819488, 215, 127, 3), -(145, 1491819497, 210, 127, 4), -(146, 1491819499, 210, 127, 1), -(147, 1491819501, 215, 127, 5), -(148, 1491819502, 215, 127, 2), -(149, 1491819506, 210, 127, 5), -(150, 1491819508, 215, 127, 1), -(151, 1491819511, 215, 127, 5), -(152, 1491819522, 215, 127, 1), -(153, 1491819522, 215, 127, 2), -(154, 1491819523, 215, 127, 3), -(155, 1491819526, 210, 127, 4), -(156, 1491819527, 215, 127, 1); +(285, 1506950713, 215, 126, 1), +(286, 1506950739, 215, 126, 5), +(287, 1506950740, 215, 126, 1), +(288, 1506950741, 215, 126, 5), +(289, 1506950742, 215, 126, 1), +(290, 1506950804, 215, 126, 5), +(291, 1506950807, 215, 126, 2), +(292, 1506950810, 215, 126, 5), +(293, 1506950811, 215, 126, 1), +(294, 1506950812, 215, 126, 5), +(295, 1506950813, 215, 126, 1), +(296, 1506950815, 210, 126, 6), +(297, 1506950819, 215, 126, 5), +(298, 1506950822, 215, 126, 2), +(299, 1506950824, 215, 126, 3), +(300, 1506950829, 210, 126, 4), +(301, 1506950831, 215, 126, 1), +(302, 1506951006, 215, 126, 5), +(303, 1506951006, 215, 126, 1), +(304, 1506951007, 215, 126, 5), +(305, 1506951188, 215, 126, 1), +(306, 1506951190, 215, 126, 5), +(307, 1506951201, 215, 126, 1), +(308, 1506951205, 215, 126, 5), +(309, 1506951209, 215, 126, 1), +(310, 1506951210, 215, 126, 5), +(311, 1506951211, 215, 126, 1), +(312, 1506951211, 215, 126, 5), +(313, 1506951212, 215, 126, 1), +(314, 1506951213, 215, 126, 5), +(315, 1506951218, 215, 126, 1), +(316, 1506951219, 215, 126, 5), +(317, 1506951219, 215, 126, 1), +(318, 1506951219, 215, 126, 5), +(319, 1506951220, 215, 126, 1), +(320, 1506951221, 215, 126, 5), +(321, 1506951221, 215, 126, 1), +(322, 1506951225, 215, 126, 5), +(323, 1506951235, 215, 126, 1), +(324, 1506951237, 215, 126, 5), +(325, 1506951271, 215, 126, 1), +(326, 1506951274, 215, 126, 2), +(327, 1506951276, 215, 126, 3), +(328, 1506951341, 210, 126, 4), +(329, 1506951345, 215, 126, 1), +(330, 1506951370, 215, 126, 5), +(331, 1506951372, 215, 126, 1), +(332, 1506951375, 215, 126, 2), +(333, 1506951377, 215, 126, 3), +(334, 1506951480, 210, 126, 4), +(335, 1507815648, 215, 127, 1), +(336, 1507815649, 215, 127, 5), +(337, 1507816917, 215, 127, 1), +(338, 1507820260, 215, 127, 5), +(339, 1507820263, 215, 127, 2), +(340, 1507830442, 215, 127, 5), +(341, 1507830445, 215, 127, 1), +(342, 1507830516, 215, 127, 5), +(343, 1507830518, 215, 127, 1), +(344, 1507830586, 215, 127, 5), +(345, 1507830587, 215, 127, 1), +(346, 1507830590, 210, 127, 6); -- -------------------------------------------------------- @@ -371,12 +423,12 @@ INSERT INTO `machine` (`id_machine`, `id_warehouse`, `name`, `token`, `unlock_co (115, 7, 'sd', NULL, NULL, NULL, NULL), (116, 7, 'machine13', NULL, NULL, NULL, NULL), (121, 7, 'dsad', NULL, NULL, NULL, NULL), -(122, 8, 'surgel1', NULL, NULL, NULL, NULL), +(122, 8, 'surgel1', NULL, '5f4769b43bba1ad8ee063b917a77a54569280cee4b04b65e251b3fa80a25867645356e99a1178830824be5ae4bd72196d2781d7324a6ca965406676f80e6c159', NULL, NULL), (123, 8, 'surgel2', NULL, NULL, NULL, NULL), (124, 8, 'surgel3', NULL, NULL, NULL, NULL), (125, 8, 'surgel4', NULL, NULL, NULL, NULL), -(126, 8, 'lait1', NULL, '159050986ee4fdeb3ead38f83b12511ca2223c4bc1939ee47edd1549393b1b5cf829803a392b1ce3ef03f45c705a90a0c5b07f4a435ade50586d2b2c8e29d490', NULL, NULL), -(127, 8, 'lait2', '2daca1d493c3cb95d067827483b64bc3f5c20c168401c4d3f2096b3b458c3a84c18fb3008fd6f9fc434e554f930d5bf7a043aee1b58c7661c74bccfd384fa4e0', '0d7e99166c23eb7e56dfe331f7e92535c9b1f4bc9103ed2b2f9d72c55dfa3d1601e60ded996bc2c0e7a152286f1b49f0644534154910eb3d7efb5d8588b73369', NULL, NULL), +(126, 8, 'lait1', 'd1607996880675c78ecdf3507540fdf6fbfb4a9fc10f350929e24e5c0b3cea03e444348f7aac7c77410a1fd61745c4f0a370a89621237174a575870d7108d8e4', NULL, '6452a1', '192.168.0.44'), +(127, 8, 'lait2', '14e7f5ba1e789b622bdc1a9770452b71bb8959d694b48fc65610649fdf57d6113b0d4c89216b08633beec11f14764b8854ba7962eb8516d5b90466148f2b8871', NULL, '6452a1', '192.168.0.44'), (128, 8, 'lait3', NULL, NULL, NULL, NULL), (129, 8, 'lait4', NULL, NULL, NULL, NULL); @@ -432,7 +484,6 @@ INSERT INTO `machine_cluster_merge` (`id_machine_cluster_merge`, `id_machine_clu (12, 4, 125), (13, 5, 126), (14, 5, 127), -(15, 5, 128), (16, 5, 129); -- -------------------------------------------------------- @@ -502,7 +553,22 @@ INSERT INTO `module_merge` (`id_module_merge`, `id_machine_cluster`, `id_etree`, (1, 4, 1, 8), (2, 5, 1, 8), (3, 4, 2, 8), -(4, 5, 2, 8); +(4, 5, 2, 8), +(5, 4, 4, 8), +(6, 5, 4, 8); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `motheure` +-- + +DROP TABLE IF EXISTS `motheure`; +CREATE TABLE `motheure` ( + `id_motheure` int(11) NOT NULL, + `id_machine` int(11) NOT NULL, + `count` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin; -- -------------------------------------------------------- @@ -638,11 +704,13 @@ INSERT INTO `user` (`id_user`, `id_warehouse`, `code`, `username`, `firstname`, (101, 7, '01-FB-DB-83', 'username', 'firstname', 'lastname', 'mail@mail.com'), (103, 7, '01-FB-DB-84', 'usernames', 'firstname', 'lastname', 'mail@mail.com'), (204, 7, 'A1-AD-CA-2D', 'user2x', 'firstname', 'lastnamex', 'mail2x@gmail.com'), -(206, 8, 'FD-60-13-3B', 'Carte1', 'Carte', 'RFID1', 'brussal.alain@lk.fr'), -(208, 8, '33-33-33-35', 'lucas.mascaro', 'Lucas', 'Mascaro', 'mascaro.lucas@yahoo.fr'), -(210, 8, '34-C2-A0-85', 'xdrm-brackets', 'Adrien', 'Ligou-Marquès', 'doowap31@gmail.com'), +(206, 8, 'FD-60-13-3B', 'Card-C', 'Carte', 'C-3', 'cardC@logauth.xdrm.io'), +(210, 8, '34-C2-A0-85', 'Card-B', 'Carte', 'B-2', 'cardB@logauth.xdrm.io'), (214, 7, '66-66-66-66', 'lucas.mascaro', 'Lucas', 'Mascaro', 'mascaro.lucas@yahoo.fr'), -(215, 8, 'F9-7D-5D-9E', 'Pass1', 'Pass', 'RFID', 'pass1@logauth.com'); +(215, 8, 'F9-7D-5D-9E', 'Pass-A', 'Pass', 'A-1', 'passA@logauth.xdrm.io'), +(216, 8, 'D2-E2-CA-12', 'Card-D', 'Carte', 'D-3', 'cardD@logauth.xdrm.io'), +(217, 8, 'D4-34-E8-AB', 'Pass-E', 'Pass', 'E-4', 'passE@logauth.xdrm.io'), +(218, 8, 'A9-5B-5D-9E', 'Pass-F', 'Pass', 'F-5', 'passF@logauth.xdrm.io'); -- -------------------------------------------------------- @@ -666,7 +734,8 @@ INSERT INTO `user_cluster` (`id_user_cluster`, `id_warehouse`, `name`) VALUES (4, 7, 'maintenance'), (5, 8, 'Conducteurs Lait'), (6, 8, 'Maintenance'), -(7, 8, 'Conducteurs Surgelé'); +(7, 8, 'Conducteurs Surgelé'), +(8, 8, 'Conducteurs complet'); -- -------------------------------------------------------- @@ -696,9 +765,11 @@ INSERT INTO `user_cluster_merge` (`id_user_cluster_merge`, `id_user_cluster`, `i (54, 2, 1), (55, 4, 1), (61, 7, 206), -(65, 7, 208), -(86, 6, 210), -(87, 5, 215); +(90, 5, 215), +(91, 5, 210), +(92, 7, 216), +(94, 6, 218), +(99, 8, 217); -- -------------------------------------------------------- @@ -831,6 +902,13 @@ ALTER TABLE `module_merge` ADD KEY `id_machine` (`id_etree`), ADD KEY `id_warehouse` (`id_warehouse`); +-- +-- Indexes for table `motheure` +-- +ALTER TABLE `motheure` + ADD PRIMARY KEY (`id_motheure`), + ADD KEY `id_machine` (`id_machine`); + -- -- Indexes for table `state` -- @@ -879,12 +957,12 @@ ALTER TABLE `action` -- AUTO_INCREMENT for table `action_merge` -- ALTER TABLE `action_merge` - MODIFY `id_action_merge` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=42; + MODIFY `id_action_merge` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=49; -- -- AUTO_INCREMENT for table `admin` -- ALTER TABLE `admin` - MODIFY `id_admin` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; + MODIFY `id_admin` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `chip` -- @@ -894,7 +972,7 @@ ALTER TABLE `chip` -- AUTO_INCREMENT for table `etree` -- ALTER TABLE `etree` - MODIFY `id_etree` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; + MODIFY `id_etree` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `global_state` -- @@ -904,7 +982,7 @@ ALTER TABLE `global_state` -- AUTO_INCREMENT for table `history` -- ALTER TABLE `history` - MODIFY `id_history` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=157; + MODIFY `id_history` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=347; -- -- AUTO_INCREMENT for table `log` -- @@ -924,7 +1002,7 @@ ALTER TABLE `machine_cluster` -- AUTO_INCREMENT for table `machine_cluster_merge` -- ALTER TABLE `machine_cluster_merge` - MODIFY `id_machine_cluster_merge` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; + MODIFY `id_machine_cluster_merge` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19; -- -- AUTO_INCREMENT for table `module` -- @@ -934,7 +1012,12 @@ ALTER TABLE `module` -- AUTO_INCREMENT for table `module_merge` -- ALTER TABLE `module_merge` - MODIFY `id_module_merge` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; + MODIFY `id_module_merge` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `motheure` +-- +ALTER TABLE `motheure` + MODIFY `id_motheure` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `state` -- @@ -944,17 +1027,17 @@ ALTER TABLE `state` -- AUTO_INCREMENT for table `user` -- ALTER TABLE `user` - MODIFY `id_user` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=216; + MODIFY `id_user` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=219; -- -- AUTO_INCREMENT for table `user_cluster` -- ALTER TABLE `user_cluster` - MODIFY `id_user_cluster` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; + MODIFY `id_user_cluster` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `user_cluster_merge` -- ALTER TABLE `user_cluster_merge` - MODIFY `id_user_cluster_merge` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=88; + MODIFY `id_user_cluster_merge` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=100; -- -- AUTO_INCREMENT for table `warehouse` -- @@ -1039,6 +1122,12 @@ ALTER TABLE `module_merge` ADD CONSTRAINT `fk_module_merge_id_machine_cluster` FOREIGN KEY (`id_machine_cluster`) REFERENCES `machine_cluster` (`id_machine_cluster`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `fk_module_merge_id_warehouse` FOREIGN KEY (`id_warehouse`) REFERENCES `warehouse` (`id_warehouse`) ON DELETE CASCADE ON UPDATE CASCADE; +-- +-- Constraints for table `motheure` +-- +ALTER TABLE `motheure` + ADD CONSTRAINT `fk_motheure_id_machine` FOREIGN KEY (`id_machine`) REFERENCES `machine` (`id_machine`) ON DELETE CASCADE ON UPDATE CASCADE; + -- -- Constraints for table `state` -- @@ -1066,4 +1155,4 @@ ALTER TABLE `user_cluster_merge` /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; \ No newline at end of file +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/public_html/css/container.scss b/public_html/css/container.scss index 4b54cf9..324053b 100755 --- a/public_html/css/container.scss +++ b/public_html/css/container.scss @@ -158,6 +158,7 @@ /* (2) Code RFID */ /* (3) Adresse mail */ + .motheure, .code, .option, .mail{ diff --git a/public_html/css/min/container.css b/public_html/css/min/container.css index e93f933..f37eef9 100644 --- a/public_html/css/min/container.css +++ b/public_html/css/min/container.css @@ -168,9 +168,11 @@ color: #333; } +#WRAPPER > #CONTAINER > section > .inline-box .motheure, #WRAPPER > #CONTAINER > section > .inline-box .code, #WRAPPER > #CONTAINER > section > .inline-box .option, #WRAPPER > #CONTAINER > section > .inline-box .mail, +#WRAPPER > #CONTAINER > section > .inline-row .motheure, #WRAPPER > #CONTAINER > section > .inline-row .code, #WRAPPER > #CONTAINER > section > .inline-row .option, #WRAPPER > #CONTAINER > section > .inline-row .mail { @@ -180,9 +182,11 @@ white-space: nowrap; } +#WRAPPER > #CONTAINER > section > .inline-box .motheure svg, #WRAPPER > #CONTAINER > section > .inline-box .code svg, #WRAPPER > #CONTAINER > section > .inline-box .option svg, #WRAPPER > #CONTAINER > section > .inline-box .mail svg, +#WRAPPER > #CONTAINER > section > .inline-row .motheure svg, #WRAPPER > #CONTAINER > section > .inline-row .code svg, #WRAPPER > #CONTAINER > section > .inline-row .option svg, #WRAPPER > #CONTAINER > section > .inline-row .mail svg { @@ -196,9 +200,11 @@ pointer-events: none; } +#WRAPPER > #CONTAINER > section > .inline-box .motheure svg path#stylisable, #WRAPPER > #CONTAINER > section > .inline-box .code svg path#stylisable, #WRAPPER > #CONTAINER > section > .inline-box .option svg path#stylisable, #WRAPPER > #CONTAINER > section > .inline-box .mail svg path#stylisable, +#WRAPPER > #CONTAINER > section > .inline-row .motheure svg path#stylisable, #WRAPPER > #CONTAINER > section > .inline-row .code svg path#stylisable, #WRAPPER > #CONTAINER > section > .inline-row .option svg path#stylisable, #WRAPPER > #CONTAINER > section > .inline-row .mail svg path#stylisable { @@ -206,9 +212,11 @@ pointer-events: none; } +#WRAPPER > #CONTAINER > section > .inline-box .motheure svg path#stroke-stylisable, #WRAPPER > #CONTAINER > section > .inline-box .code svg path#stroke-stylisable, #WRAPPER > #CONTAINER > section > .inline-box .option svg path#stroke-stylisable, #WRAPPER > #CONTAINER > section > .inline-box .mail svg path#stroke-stylisable, +#WRAPPER > #CONTAINER > section > .inline-row .motheure svg path#stroke-stylisable, #WRAPPER > #CONTAINER > section > .inline-row .code svg path#stroke-stylisable, #WRAPPER > #CONTAINER > section > .inline-row .option svg path#stroke-stylisable, #WRAPPER > #CONTAINER > section > .inline-row .mail svg path#stroke-stylisable { diff --git a/public_html/src/static/container/motor.svg b/public_html/src/static/container/motor.svg new file mode 100644 index 0000000..db8035a --- /dev/null +++ b/public_html/src/static/container/motor.svg @@ -0,0 +1,48 @@ + +image/svg+xml \ No newline at end of file