Changeset 2413
- Timestamp:
- 06/24/20 18:57:32 (4 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts-Web/MANIFEST
r2362 r2413 66 66 lib/LATMOS/Accounts/Web/Controller/Summary/Offices.pm 67 67 lib/LATMOS/Accounts/Web/Controller/Summary/Tree.pm 68 lib/LATMOS/Accounts/Web/Controller/Support.pm 68 69 lib/LATMOS/Accounts/Web/Controller/Templates.pm 69 70 lib/LATMOS/Accounts/Web/Controller/Tools/CSV.pm … … 162 163 root/html/summary/rh/index.tt 163 164 root/html/summary/tree/index.tt 165 root/html/support/default.tt 166 root/html/support/index.tt 164 167 root/html/sutype/default.tt 165 168 root/html/sutype/index.tt -
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/Accounts.pm
r2387 r2413 78 78 address => 'Adresse', 79 79 employement => 'Statut', 80 support => 'Support', 80 81 }->{$ref}; 81 82 } … … 91 92 aliases => 'aliases', 92 93 service => 'services', 94 support => 'support', 93 95 }->{$ref} || $ref; 94 96 -
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrForms.pm
r2389 r2413 182 182 endOfWarranty 183 183 serialNumber 184 support 184 185 inventoryNumber 185 186 expire … … 296 297 )], 297 298 }, 299 support => { 300 name => 'Support', 301 attrs => [ qw( 302 description 303 comment 304 phone 305 mail 306 address 307 ) ], 308 }, 298 309 }; 299 310 -
trunk/LATMOS-Accounts/Changes
r2410 r2413 1 1 6.1.2 2 # WARNING: database schema need to be upgraded 3 2 4 - Fix: account export when employment end later 3 5 - Fix ACL, replace $ROOT by @ROOT: '$' has special meaning here … … 15 17 - always try to create missing object in destination (regardless recent changes) 16 18 - Fix: dynamics attributes not properly compute after object creation 19 - add support objects (hardare support contact) 17 20 18 21 6.1.1 -
trunk/LATMOS-Accounts/MANIFEST
r2385 r2413 74 74 lib/LATMOS/Accounts/Bases/Ldap/Aliases.pm 75 75 lib/LATMOS/Accounts/Bases/Ldap/Group.pm 76 lib/LATMOS/Accounts/Bases/Ldap/Groupofnames.pm 76 77 lib/LATMOS/Accounts/Bases/Ldap/Onlyaddress.pm 77 78 lib/LATMOS/Accounts/Bases/Ldap/User.pm … … 94 95 lib/LATMOS/Accounts/Bases/Sql/Employmentsummary.pm 95 96 lib/LATMOS/Accounts/Bases/Sql/Group.pm 97 lib/LATMOS/Accounts/Bases/Sql/Groupofnames.pm 96 98 lib/LATMOS/Accounts/Bases/Sql/Nethost.pm 97 99 lib/LATMOS/Accounts/Bases/Sql/Netzone.pm … … 101 103 lib/LATMOS/Accounts/Bases/Sql/Site.pm 102 104 lib/LATMOS/Accounts/Bases/Sql/Stat.pm 105 lib/LATMOS/Accounts/Bases/Sql/Support.pm 103 106 lib/LATMOS/Accounts/Bases/Sql/Sutype.pm 104 107 lib/LATMOS/Accounts/Bases/Sql/Templates.pm -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql.pm
r2352 r2413 18 18 our $VERSION = (q$Rev$ =~ /^Rev: (\d+) /)[0]; 19 19 20 sub SCHEMA_VERSION { 3 7};20 sub SCHEMA_VERSION { 38 }; 21 21 22 22 =head1 NAME -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Nethost.pm
r2390 r2413 268 268 label => l('Locked'), 269 269 }, 270 270 support => { 271 reference => 'support', 272 label => l('Support'), 273 }, 271 274 } 272 275 ) -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/upgrade.pm
r2352 r2413 1351 1351 ], 1352 1352 }, 1353 { 1354 ver => 38, 1355 sql => [ 1356 q{ 1357 1358 CREATE TABLE public.support 1359 ( 1360 CONSTRAINT support_pkey PRIMARY KEY (name), 1361 CONSTRAINT support_ikey_uniq UNIQUE (ikey) 1362 ) 1363 INHERITS (public.objects) 1364 WITH ( 1365 OIDS=FALSE 1366 ); 1367 ALTER TABLE public.support 1368 OWNER TO latmos; 1369 1370 1371 CREATE TRIGGER support_update_rev_tg 1372 BEFORE INSERT OR UPDATE OR DELETE 1373 ON public.support 1374 FOR EACH ROW 1375 EXECUTE PROCEDURE public.rev_tg_f(); 1376 1377 1378 CREATE TABLE public.support_attributes 1379 ( 1380 CONSTRAINT support_attributes_pkey PRIMARY KEY (attr_key), 1381 CONSTRAINT support_attr_support_okey_fkey FOREIGN KEY (okey) 1382 REFERENCES public.support (ikey) MATCH SIMPLE 1383 ON UPDATE CASCADE ON DELETE CASCADE 1384 ) 1385 INHERITS (public.attributes) 1386 WITH ( 1387 OIDS=FALSE 1388 ); 1389 1390 CREATE OR REPLACE FUNCTION public.support_attr_update_ref() 1391 RETURNS trigger AS 1392 $BODY$begin 1393 1394 IF (TG_OP != 'INSERT') then 1395 update "support" set date = now() where "support".ikey = old.okey; 1396 end if; 1397 IF (TG_OP != 'DELETE') then 1398 update "support" set date = now() where "support".ikey = new.okey; 1399 end if; 1400 1401 IF (TG_OP = 'DELETE') then 1402 return old; 1403 ELSE 1404 return new; 1405 END IF; 1406 1407 END;$BODY$ 1408 LANGUAGE plpgsql VOLATILE 1409 COST 100; 1410 1411 CREATE INDEX fki_support_attributes_attr_fkey 1412 ON public.support_attributes 1413 USING btree 1414 (attr COLLATE pg_catalog."default"); 1415 1416 CREATE INDEX support_attr_value_idx 1417 ON public.support_attributes 1418 USING btree 1419 (value COLLATE pg_catalog."default"); 1420 1421 CREATE TRIGGER support_attr_update 1422 AFTER INSERT OR UPDATE OR DELETE 1423 ON public.support_attributes 1424 FOR EACH ROW 1425 EXECUTE PROCEDURE public.support_attr_update_ref(); 1426 1427 CREATE TABLE public.nethost_attributes_supports 1428 ( 1429 CONSTRAINT nethost_attributes_support_pkey PRIMARY KEY (attr_key), 1430 CONSTRAINT nethost_attr_support_okey_fkey FOREIGN KEY (okey) 1431 REFERENCES public.nethost (ikey) MATCH SIMPLE 1432 ON UPDATE CASCADE ON DELETE CASCADE, 1433 CONSTRAINT nethost_attributes_support_support_fkey FOREIGN KEY (value) 1434 REFERENCES public."support" (name) MATCH SIMPLE 1435 ON UPDATE CASCADE ON DELETE CASCADE, 1436 CONSTRAINT nethost_attributes_support_uniq UNIQUE (okey, attr, value) 1437 ) 1438 INHERITS (public.nethost_attributes) 1439 WITH ( 1440 OIDS=FALSE 1441 ); 1442 1443 CREATE INDEX fki_nethost_attr_support_okey_fkey 1444 ON public.nethost_attributes_supports 1445 USING btree 1446 (okey); 1447 1448 CREATE INDEX fki_nethost_attributes_support_attr_fkey 1449 ON public.nethost_attributes_supports 1450 USING btree 1451 (attr COLLATE pg_catalog."default"); 1452 1453 1454 CREATE INDEX fki_nethost_attributes_support_support_fkey 1455 ON public.nethost_attributes_supports 1456 USING btree 1457 (value COLLATE pg_catalog."default"); 1458 1459 CREATE TRIGGER nethost_attributes_support_update_ref 1460 AFTER INSERT OR UPDATE OR DELETE 1461 ON public.nethost_attributes_supports 1462 FOR EACH ROW 1463 EXECUTE PROCEDURE public.nethost_attr_update_ref(); 1464 1465 CREATE OR REPLACE FUNCTION public.nethost_sort_fields() 1466 RETURNS trigger AS 1467 $BODY$BEGIN 1468 1469 IF (TG_OP='INSERT') then 1470 IF (new.attr='ip') THEN 1471 insert into nethost_attributes_ips VALUES (new.*); 1472 RETURN NULL; 1473 END IF; 1474 1475 IF (new.attr='macaddr') THEN 1476 insert into nethost_attributes_macs VALUES (new.*); 1477 RETURN NULL; 1478 END IF; 1479 1480 IF (new.attr='owner') THEN 1481 insert into nethost_attributes_users VALUES (new.*); 1482 RETURN NULL; 1483 END IF; 1484 1485 IF (new.attr='user') THEN 1486 insert into nethost_attributes_users VALUES (new.*); 1487 RETURN NULL; 1488 END IF; 1489 1490 IF (new.attr='related') THEN 1491 insert into nethost_attributes_nethosts VALUES (new.*); 1492 RETURN NULL; 1493 END IF; 1494 1495 IF (new.attr='support') THEN 1496 insert into nethost_attributes_supports VALUES (new.*); 1497 RETURN NULL; 1498 END IF; 1499 1500 end if; 1501 1502 if (TG_OP='DELETE') THEN 1503 RETURN old; 1504 else 1505 RETURN new; 1506 end if; 1507 END;$BODY$ 1508 LANGUAGE plpgsql VOLATILE 1509 COST 100; 1510 1511 } 1512 ], 1513 }, 1353 1514 ); 1354 1515
Note: See TracChangeset
for help on using the changeset viewer.