mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
Compare commits
1564 Commits
support/3.
...
feature/47
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9872702f59 | ||
|
|
7e7b5874a6 | ||
|
|
11f142b782 | ||
|
|
af790269f0 | ||
|
|
86fe9d6a2b | ||
|
|
cdbe331c35 | ||
|
|
c14ac90a13 | ||
|
|
794a9afe3e | ||
|
|
a0a86782c7 | ||
|
|
ac2b787e09 | ||
|
|
1962cd7a88 | ||
|
|
f7b5091b39 | ||
|
|
a587bd68eb | ||
|
|
08c77f8106 | ||
|
|
61c2b71f1f | ||
|
|
f47309f535 | ||
|
|
79e1572c9e | ||
|
|
812e24b402 | ||
|
|
8af748bd3e | ||
|
|
788b23a485 | ||
|
|
6d80b2e5ed | ||
|
|
07d7995a51 | ||
|
|
1bc14f97e1 | ||
|
|
f03b008ebf | ||
|
|
7f98ef3478 | ||
|
|
d80e26791d | ||
|
|
e6a0d95cba | ||
|
|
965c9dba14 | ||
|
|
8bca3ac830 | ||
|
|
a975f67bd5 | ||
|
|
f5b86ff4d9 | ||
|
|
0deeeeb587 | ||
|
|
2011570b84 | ||
|
|
1458ba877b | ||
|
|
71386198cf | ||
|
|
5b9e0a1d4f | ||
|
|
1667f834b9 | ||
|
|
cdbcd14767 | ||
|
|
603340b852 | ||
|
|
820087e4d1 | ||
|
|
c5ee123f88 | ||
|
|
69d5015a24 | ||
|
|
1d1365d951 | ||
|
|
3da33c4c64 | ||
|
|
7b95d65f60 | ||
|
|
d3e450c54e | ||
|
|
5a50398dba | ||
|
|
387ca19ec2 | ||
|
|
c0651edaa1 | ||
|
|
b06f3cd13e | ||
|
|
5aeb408edd | ||
|
|
7456383d72 | ||
|
|
9c6b8f90f0 | ||
|
|
e6ea2fd541 | ||
|
|
7d94e6f1f8 | ||
|
|
2bd7c7a01a | ||
|
|
f1762845f0 | ||
|
|
3eb8437c32 | ||
|
|
9acc6a8bd4 | ||
|
|
4d794fe656 | ||
|
|
c9f88a16ef | ||
|
|
95f84a98cc | ||
|
|
6cb10ab13a | ||
|
|
048aaeb854 | ||
|
|
2b18ab9690 | ||
|
|
36dc71fdce | ||
|
|
db2ad86c70 | ||
|
|
56616ab08e | ||
|
|
f339498497 | ||
|
|
b24a359b36 | ||
|
|
78c63f7502 | ||
|
|
2f8b35c153 | ||
|
|
271a1f66c1 | ||
|
|
738c7e1b8e | ||
|
|
54278f8c02 | ||
|
|
00e117b05f | ||
|
|
504261a2c2 | ||
|
|
14a1a4e9c7 | ||
|
|
cfc4a43d0b | ||
|
|
503a5ec25a | ||
|
|
09364ccf84 | ||
|
|
4bbd1fea5c | ||
|
|
3c27847a04 | ||
|
|
8523da3329 | ||
|
|
c63e01e27b | ||
|
|
8580cb70a4 | ||
|
|
1438006861 | ||
|
|
700470dd29 | ||
|
|
bfbc939bac | ||
|
|
dffce3f2f7 | ||
|
|
497fc4978a | ||
|
|
e96095e02d | ||
|
|
6826ab509d | ||
|
|
8330582f86 | ||
|
|
5a4ad7b8c3 | ||
|
|
a116967b0a | ||
|
|
a13f353721 | ||
|
|
bd254e56d1 | ||
|
|
346bd5de47 | ||
|
|
41194ce9ab | ||
|
|
599e08f150 | ||
|
|
0e5bece5b6 | ||
|
|
0462298cd3 | ||
|
|
80abaec9a6 | ||
|
|
e987ea72bc | ||
|
|
a7877dc6a6 | ||
|
|
c8371f1c19 | ||
|
|
a2d6423f32 | ||
|
|
57d610fc16 | ||
|
|
740f83f43e | ||
|
|
d2d422afcf | ||
|
|
14791bf6b4 | ||
|
|
062d543b26 | ||
|
|
278ac66637 | ||
|
|
8cece0f0fd | ||
|
|
87db141c3c | ||
|
|
18871566d2 | ||
|
|
b565b700a9 | ||
|
|
3846087dc1 | ||
|
|
4f96246cbe | ||
|
|
ddd3dcdaf2 | ||
|
|
82ad9d4317 | ||
|
|
6dc48ad36d | ||
|
|
f062f994f0 | ||
|
|
84476a869f | ||
|
|
684f829581 | ||
|
|
fb81e54ed9 | ||
|
|
d1e6334629 | ||
|
|
047ba8c6c7 | ||
|
|
916467ea61 | ||
|
|
8a4ad87b06 | ||
|
|
2086052d60 | ||
|
|
f609010d7f | ||
|
|
9330b5ec9a | ||
|
|
18b85d4080 | ||
|
|
7214e5b43a | ||
|
|
3689a83953 | ||
|
|
a715ce1292 | ||
|
|
17d85fbb3f | ||
|
|
5e59aff74f | ||
|
|
9e1e81ccc1 | ||
|
|
c57c8d2af3 | ||
|
|
8a436f9760 | ||
|
|
2e77713772 | ||
|
|
0a4f9e95c5 | ||
|
|
975c554e91 | ||
|
|
ac6f642052 | ||
|
|
cf9ab2a83c | ||
|
|
282fb13973 | ||
|
|
0b92535fda | ||
|
|
3ff3dcba54 | ||
|
|
657fc912bf | ||
|
|
a0f4c62bcc | ||
|
|
5ae5221f6f | ||
|
|
b15ca2fbc9 | ||
|
|
cb382eab4e | ||
|
|
9723cde24c | ||
|
|
7ae49e2cf4 | ||
|
|
cb13a7a5b4 | ||
|
|
cd4e2608ee | ||
|
|
9618e47045 | ||
|
|
d84506ea9e | ||
|
|
13239c2751 | ||
|
|
d6c9a6d318 | ||
|
|
8b30e36dd1 | ||
|
|
80b290ab88 | ||
|
|
81b20ee583 | ||
|
|
ca937b829b | ||
|
|
e0b8ee2143 | ||
|
|
a5545b0084 | ||
|
|
d72e861dfe | ||
|
|
92385273ff | ||
|
|
61c25f85e7 | ||
|
|
20a7a945fc | ||
|
|
b1cf2ec137 | ||
|
|
0640c1e9b6 | ||
|
|
7549ded51d | ||
|
|
38683c20b1 | ||
|
|
81791dd253 | ||
|
|
e77e0eec9f | ||
|
|
cad40ed758 | ||
|
|
11d23ac99b | ||
|
|
1eeb98d2e2 | ||
|
|
92e2d22248 | ||
|
|
5811dc06e3 | ||
|
|
f5ddbbbe0e | ||
|
|
6811a82e1a | ||
|
|
960133c0df | ||
|
|
544c4ae888 | ||
|
|
6bd11fb9bf | ||
|
|
9ee18c2f36 | ||
|
|
624573d088 | ||
|
|
43a10e6944 | ||
|
|
b21a02dcb8 | ||
|
|
3b60e63c97 | ||
|
|
adc8b47945 | ||
|
|
5e6d96019d | ||
|
|
06cc64f6d6 | ||
|
|
a5c14c3a48 | ||
|
|
8f6f243716 | ||
|
|
3c574819b2 | ||
|
|
5b1ea20407 | ||
|
|
4d88ef6ed4 | ||
|
|
5cb1102e6e | ||
|
|
bf23e4d98d | ||
|
|
8645b28baa | ||
|
|
eff6fcff49 | ||
|
|
994b08f94a | ||
|
|
19495d8acf | ||
|
|
48a3ea1945 | ||
|
|
a11b2845f7 | ||
|
|
ee72325451 | ||
|
|
ebb59d3ddc | ||
|
|
0193db609d | ||
|
|
ea2caed98a | ||
|
|
09c092782c | ||
|
|
a4166f874e | ||
|
|
96382377ee | ||
|
|
84708fb327 | ||
|
|
bf8269fee1 | ||
|
|
02adca0a1f | ||
|
|
90370fce3b | ||
|
|
c99995563e | ||
|
|
7af1cdebfa | ||
|
|
a9fb5cd182 | ||
|
|
9010504902 | ||
|
|
2625b1ab54 | ||
|
|
b967338c48 | ||
|
|
10fbea5f4d | ||
|
|
e49b8fc480 | ||
|
|
4a415fdb59 | ||
|
|
5232694c04 | ||
|
|
2a87d0aa15 | ||
|
|
a103c458cb | ||
|
|
fe913524fd | ||
|
|
9a895a7fbd | ||
|
|
9f2375999a | ||
|
|
f5011bb200 | ||
|
|
29c75f626b | ||
|
|
4b86639d71 | ||
|
|
0562563cbb | ||
|
|
40068bd913 | ||
|
|
874a5fd2ce | ||
|
|
911a204f37 | ||
|
|
69f9a0b369 | ||
|
|
1ec139782e | ||
|
|
25e8ec38d6 | ||
|
|
9b1395db03 | ||
|
|
8fd9eb6a84 | ||
|
|
1574993a28 | ||
|
|
43120bfb60 | ||
|
|
9c1a1d08a1 | ||
|
|
f095f93326 | ||
|
|
c9c3b6c108 | ||
|
|
5aee7f4722 | ||
|
|
292701b71c | ||
|
|
5caddf81b8 | ||
|
|
533b57ab99 | ||
|
|
73fe07a745 | ||
|
|
2f699d355a | ||
|
|
1760727879 | ||
|
|
2ccd883c9a | ||
|
|
eabd68ff77 | ||
|
|
d982652228 | ||
|
|
2b493787b1 | ||
|
|
1d26cac8e3 | ||
|
|
cc47d27fd8 | ||
|
|
d74c850621 | ||
|
|
4e575e17a3 | ||
|
|
1e5334ab2b | ||
|
|
05419f3d7f | ||
|
|
a9bc4973b4 | ||
|
|
e93d909a38 | ||
|
|
534b087a2c | ||
|
|
14346e0895 | ||
|
|
6985e366c2 | ||
|
|
e85ec6bb47 | ||
|
|
cf57549370 | ||
|
|
7ddc593869 | ||
|
|
533fe0ae01 | ||
|
|
efd117eac7 | ||
|
|
01a17b5f9b | ||
|
|
695f357054 | ||
|
|
0088580798 | ||
|
|
92d49c6c47 | ||
|
|
f6298370a7 | ||
|
|
623d2823ff | ||
|
|
5d5849b724 | ||
|
|
bd6ccc55f8 | ||
|
|
3a497524dc | ||
|
|
902e2259a9 | ||
|
|
b87fb65ac4 | ||
|
|
4c1da328ce | ||
|
|
ab929571c7 | ||
|
|
8e0e01ad40 | ||
|
|
8a604c643e | ||
|
|
5851b2e1ff | ||
|
|
803ebfbe33 | ||
|
|
d12c8a183c | ||
|
|
7bbd4b4726 | ||
|
|
c8754725b0 | ||
|
|
f1594ad974 | ||
|
|
805e208e32 | ||
|
|
9e3f99a150 | ||
|
|
e9d21bca39 | ||
|
|
807283505d | ||
|
|
71244e5c15 | ||
|
|
a3c911e93e | ||
|
|
72e0750c1b | ||
|
|
38e0fb27f1 | ||
|
|
4b4197d910 | ||
|
|
ac8004561b | ||
|
|
c5189b7d33 | ||
|
|
b0288bc08e | ||
|
|
52097f5e12 | ||
|
|
65e49e2139 | ||
|
|
b1bf89807d | ||
|
|
766d3b51ad | ||
|
|
39c59f46fd | ||
|
|
3215bffbcb | ||
|
|
c2aecad9d2 | ||
|
|
986e900a99 | ||
|
|
bd93879ac4 | ||
|
|
133a4a8533 | ||
|
|
51bb0add8e | ||
|
|
1163a20cdd | ||
|
|
6f3fddf9bf | ||
|
|
4c8392b332 | ||
|
|
470f145747 | ||
|
|
2852d8ce49 | ||
|
|
fb180e8370 | ||
|
|
7e9a95fe93 | ||
|
|
2dd1224219 | ||
|
|
80244e2797 | ||
|
|
5ce1788d4a | ||
|
|
38fe31c9fc | ||
|
|
3b51124f1c | ||
|
|
e7b87128b1 | ||
|
|
19fa836758 | ||
|
|
e98c6637ac | ||
|
|
7d2a9d0bfc | ||
|
|
762d1162ca | ||
|
|
d0bdde30ad | ||
|
|
95dbe4c859 | ||
|
|
3fe8b6c696 | ||
|
|
ec6adee9c1 | ||
|
|
baa8bba926 | ||
|
|
8dc5411717 | ||
|
|
6539687f16 | ||
|
|
f1d448fd78 | ||
|
|
a4490e2b5f | ||
|
|
e0b12144cb | ||
|
|
efb7831a5a | ||
|
|
9fadbb5eb1 | ||
|
|
93dba0644d | ||
|
|
ec324bb28e | ||
|
|
dc8f521b12 | ||
|
|
bf6277fcd2 | ||
|
|
886db5d6ad | ||
|
|
79a46581ef | ||
|
|
0e8ddf990c | ||
|
|
346a8eadec | ||
|
|
6948c594c2 | ||
|
|
301a7a92a0 | ||
|
|
73bb80ebea | ||
|
|
1e674d7bdc | ||
|
|
1225ee1e78 | ||
|
|
a91de9fb36 | ||
|
|
71b3a415a6 | ||
|
|
b97c7433c8 | ||
|
|
5a59d16c99 | ||
|
|
11fc958a7b | ||
|
|
a63a3d3d9c | ||
|
|
a151e40b75 | ||
|
|
ed6e4f612a | ||
|
|
9a690861a3 | ||
|
|
16279233e0 | ||
|
|
7a09b3effc | ||
|
|
4f6d514694 | ||
|
|
07964cc404 | ||
|
|
8f8b65a71d | ||
|
|
49e72e83fe | ||
|
|
ea5473ad77 | ||
|
|
f0685e33e1 | ||
|
|
2a888cf5af | ||
|
|
42f391472b | ||
|
|
30ef2735b6 | ||
|
|
548131482a | ||
|
|
bbff0b72d3 | ||
|
|
5ac6c84813 | ||
|
|
0c3a35fc43 | ||
|
|
2dffab9ca0 | ||
|
|
881dbd3c01 | ||
|
|
1cbfa4f1b1 | ||
|
|
81887f480a | ||
|
|
d25bf4ef66 | ||
|
|
5f85757630 | ||
|
|
90f58721b1 | ||
|
|
56d3ac668c | ||
|
|
b20b4b7e82 | ||
|
|
eeabad895d | ||
|
|
9fdf183851 | ||
|
|
0a3b02bf45 | ||
|
|
74ebbc5fa4 | ||
|
|
a762b6a2bb | ||
|
|
32ef639ce1 | ||
|
|
8647a76dbf | ||
|
|
96414dcc98 | ||
|
|
47cd8bce31 | ||
|
|
86c677b2ca | ||
|
|
960129316d | ||
|
|
6ab19d29b9 | ||
|
|
5c5c5d769f | ||
|
|
fc388313d7 | ||
|
|
d544ee5498 | ||
|
|
ecce0a3376 | ||
|
|
ce187550f6 | ||
|
|
f8e761abe0 | ||
|
|
d3a9e30178 | ||
|
|
5d15a08824 | ||
|
|
0fd2cf85a2 | ||
|
|
8135316119 | ||
|
|
868c0ae836 | ||
|
|
d03d4fce5f | ||
|
|
aa55c2b30f | ||
|
|
9d3b46b919 | ||
|
|
01b4dbba71 | ||
|
|
72ac4096c1 | ||
|
|
19559b08a7 | ||
|
|
346564ca0e | ||
|
|
a64fed66a3 | ||
|
|
261106fa9d | ||
|
|
1556b95653 | ||
|
|
1bf53bae2a | ||
|
|
324cb5eb6c | ||
|
|
eedbf3d266 | ||
|
|
3b197692ec | ||
|
|
29ce042916 | ||
|
|
83539d6d4c | ||
|
|
e6a7b926f6 | ||
|
|
b30e053236 | ||
|
|
ecfc26f1ec | ||
|
|
afd96a0f49 | ||
|
|
a34baf840a | ||
|
|
6f9bd9bae5 | ||
|
|
a77765ec7b | ||
|
|
64b4b03ea9 | ||
|
|
c32b2f9dfe | ||
|
|
a797878b17 | ||
|
|
a1860c82fb | ||
|
|
1fa0f7bdd9 | ||
|
|
f718b4173d | ||
|
|
e057c0f081 | ||
|
|
5a49fc7654 | ||
|
|
6fca659c9d | ||
|
|
eacd08f31e | ||
|
|
d47d65df10 | ||
|
|
5f7d8f6cc0 | ||
|
|
b42297ad84 | ||
|
|
6cb1cf7b7e | ||
|
|
d7a8d335d5 | ||
|
|
a65dd1c27c | ||
|
|
bd1d447677 | ||
|
|
d85d611642 | ||
|
|
6a00786535 | ||
|
|
6490fe93a1 | ||
|
|
642a13ad0d | ||
|
|
e1bfe9a3b6 | ||
|
|
af8ff9b29f | ||
|
|
bb405d5173 | ||
|
|
fcfdac2844 | ||
|
|
4723fc885c | ||
|
|
19eae916f0 | ||
|
|
ce68e270c3 | ||
|
|
0d8a20c35e | ||
|
|
596e26a96f | ||
|
|
1f3780f338 | ||
|
|
85f6195a51 | ||
|
|
7e1b1779a9 | ||
|
|
ef42a49009 | ||
|
|
51e5f1e7de | ||
|
|
9cffd17e19 | ||
|
|
d95e7168aa | ||
|
|
e9f16935b6 | ||
|
|
e7488b2c89 | ||
|
|
8ac4086e71 | ||
|
|
6b5273fa1c | ||
|
|
a7c22c06af | ||
|
|
9b1e854bf7 | ||
|
|
a72d1ca1b3 | ||
|
|
926700856d | ||
|
|
be5e4458ba | ||
|
|
317cd585b2 | ||
|
|
ab93d59a77 | ||
|
|
5d8db176f4 | ||
|
|
82bc2f33f2 | ||
|
|
f5c29edee4 | ||
|
|
8fb450a6d4 | ||
|
|
311c5d0d51 | ||
|
|
c6039f4b51 | ||
|
|
f90bd81e15 | ||
|
|
a10e547420 | ||
|
|
d0f9e57bf1 | ||
|
|
2519456c98 | ||
|
|
57760528c9 | ||
|
|
385c60e993 | ||
|
|
561baf5771 | ||
|
|
f281fa7b14 | ||
|
|
58c68bade9 | ||
|
|
6ae8a72a35 | ||
|
|
eb992c7b45 | ||
|
|
0688405f86 | ||
|
|
694711b3f4 | ||
|
|
01d3f707e4 | ||
|
|
4e28856015 | ||
|
|
dd34fda42e | ||
|
|
8bb456df53 | ||
|
|
4886e2a7dc | ||
|
|
674dfebb0d | ||
|
|
6becd73ac2 | ||
|
|
72d6e251b8 | ||
|
|
9491c9102c | ||
|
|
a728cf312d | ||
|
|
e321e27899 | ||
|
|
96e8467e13 | ||
|
|
508918a684 | ||
|
|
8adef26d18 | ||
|
|
2d45abd12b | ||
|
|
bd5e55aad9 | ||
|
|
764eddd9f8 | ||
|
|
015ff8f179 | ||
|
|
9b651c2451 | ||
|
|
bb16f4ad57 | ||
|
|
7b3023ccce | ||
|
|
e6a3a95ff9 | ||
|
|
80e413c370 | ||
|
|
69fd9048fd | ||
|
|
7254bb7a2f | ||
|
|
7a4d29d561 | ||
|
|
c54909f2a3 | ||
|
|
b57e4fce07 | ||
|
|
23af649d7f | ||
|
|
4a78f8fb43 | ||
|
|
6c8388ea5e | ||
|
|
75520bfaf9 | ||
|
|
3a4d9e64f8 | ||
|
|
209e30f7ef | ||
|
|
b460705831 | ||
|
|
3aadccc2e8 | ||
|
|
5ae2fdee94 | ||
|
|
380512dcbe | ||
|
|
58c47f4c0a | ||
|
|
8e2a68887c | ||
|
|
a8f3c3054b | ||
|
|
c5fb4227bf | ||
|
|
f98ad6ccab | ||
|
|
0f1f2875ff | ||
|
|
a88b4ad06b | ||
|
|
f3a6b064c8 | ||
|
|
5e6fb33ed7 | ||
|
|
172fda2157 | ||
|
|
5e7137e0c4 | ||
|
|
4f0c45004a | ||
|
|
4cf5e47ec3 | ||
|
|
143a59a19d | ||
|
|
60de41e6fd | ||
|
|
cbbb4cdb8c | ||
|
|
8c5b919e72 | ||
|
|
61b247b156 | ||
|
|
47c05b75d0 | ||
|
|
2147ae9105 | ||
|
|
c1aa013053 | ||
|
|
4a99afae3b | ||
|
|
119dcf9c97 | ||
|
|
b7d14ca48e | ||
|
|
37cd12fb21 | ||
|
|
a3f9eed6e2 | ||
|
|
ffb61503dc | ||
|
|
fbda0e38e1 | ||
|
|
bfd8fb1c23 | ||
|
|
c6760371ba | ||
|
|
018f7808db | ||
|
|
1d3c71fd10 | ||
|
|
e8d059fa77 | ||
|
|
3b4a9dc368 | ||
|
|
244ae33ad6 | ||
|
|
21c9332a7f | ||
|
|
c1eb605195 | ||
|
|
0ee1818f12 | ||
|
|
ae6e0a08ea | ||
|
|
31758cbe2b | ||
|
|
a4a1fa4ec9 | ||
|
|
d9d2e851f4 | ||
|
|
c32e186133 | ||
|
|
3d325caa06 | ||
|
|
91c63cb12e | ||
|
|
22141aba7b | ||
|
|
9b066b3b88 | ||
|
|
7ea7f5a967 | ||
|
|
38041b25fb | ||
|
|
3adeea8172 | ||
|
|
10c3641307 | ||
|
|
af9b03cfa5 | ||
|
|
4ff354dd41 | ||
|
|
bd8c325306 | ||
|
|
9902cedc06 | ||
|
|
b64ee96636 | ||
|
|
806a2f0597 | ||
|
|
0cb9f7ab4f | ||
|
|
8c1ff2dc1c | ||
|
|
dc6c894cb8 | ||
|
|
3fa9b68882 | ||
|
|
0514f889d3 | ||
|
|
f2ab409c9c | ||
|
|
890841a818 | ||
|
|
aed71a6335 | ||
|
|
c910d35e25 | ||
|
|
0586a77043 | ||
|
|
b4b032693a | ||
|
|
054fd8798b | ||
|
|
35a7d907cd | ||
|
|
4c66cfe6e3 | ||
|
|
4360ad6502 | ||
|
|
841a2474af | ||
|
|
33b6f2cbc4 | ||
|
|
4680b6a497 | ||
|
|
db46763e13 | ||
|
|
c5727d366f | ||
|
|
7ee1af3cc8 | ||
|
|
a749a4654e | ||
|
|
3c8a71f39f | ||
|
|
ed7411294e | ||
|
|
aaecce7574 | ||
|
|
480e2a0fb5 | ||
|
|
a3a0f33ad4 | ||
|
|
089da40941 | ||
|
|
ce0d17e042 | ||
|
|
aba737ab48 | ||
|
|
a7c5d9e92a | ||
|
|
b2a377d7f1 | ||
|
|
1d65234073 | ||
|
|
38065791da | ||
|
|
086d2f0ba4 | ||
|
|
377e06d99a | ||
|
|
37cf1b2901 | ||
|
|
d9f280dc56 | ||
|
|
b207f9ea02 | ||
|
|
2690f8171e | ||
|
|
7136ac38d6 | ||
|
|
d4b5e98514 | ||
|
|
0ede0719c5 | ||
|
|
06124a0d94 | ||
|
|
d19d88e5dc | ||
|
|
b2d8b0bfe4 | ||
|
|
095ac3dfa5 | ||
|
|
a86edc69ac | ||
|
|
21bc4cdc9b | ||
|
|
b682ed7ad9 | ||
|
|
5e823d1f16 | ||
|
|
d32949d1d3 | ||
|
|
06c26c99bb | ||
|
|
22e599598a | ||
|
|
d666050e0c | ||
|
|
8018c586cd | ||
|
|
e73911c458 | ||
|
|
7e79b27823 | ||
|
|
5fa9ef05a6 | ||
|
|
f239b658e6 | ||
|
|
23651ae510 | ||
|
|
45a1efe2ae | ||
|
|
06c135aab1 | ||
|
|
2203694b3f | ||
|
|
f7ab9646d0 | ||
|
|
a4959cad15 | ||
|
|
1c0a7e9bd9 | ||
|
|
cc46761e34 | ||
|
|
e1c3e7a3a6 | ||
|
|
baf85e7a80 | ||
|
|
32b371eac1 | ||
|
|
147aad9221 | ||
|
|
41e0d39a5a | ||
|
|
91496b08bd | ||
|
|
b3d20effd6 | ||
|
|
2e0b9bd6b4 | ||
|
|
e497304b9d | ||
|
|
4b3e9432df | ||
|
|
1d67d50a20 | ||
|
|
f65cadd24c | ||
|
|
f0c37bd69e | ||
|
|
21513f8df0 | ||
|
|
40551b36e5 | ||
|
|
eb73b6b2f5 | ||
|
|
504378261b | ||
|
|
a5ceddc40a | ||
|
|
0fb23c4e5b | ||
|
|
40c7559905 | ||
|
|
edda622060 | ||
|
|
c0056e75d0 | ||
|
|
f1694707ee | ||
|
|
97ec9666ed | ||
|
|
7b91e9e164 | ||
|
|
ff0f1d8ce9 | ||
|
|
b2b5aeb08b | ||
|
|
01ab3be8d3 | ||
|
|
0d7ca88cc2 | ||
|
|
4fee774fe5 | ||
|
|
e5825b5fcd | ||
|
|
0d9f348e93 | ||
|
|
1ea0018a50 | ||
|
|
d3dc59c5da | ||
|
|
3bec8fe7d2 | ||
|
|
642a097b4b | ||
|
|
7cedc501f7 | ||
|
|
296c5bd3d2 | ||
|
|
a2bddea1e2 | ||
|
|
53cd9f8b5f | ||
|
|
b344826c44 | ||
|
|
a0dc68ab9a | ||
|
|
22f2b5d0e5 | ||
|
|
c411900efd | ||
|
|
592aa93c40 | ||
|
|
6c02dd75fa | ||
|
|
39853d4949 | ||
|
|
2404f5d00f | ||
|
|
1c615c42b6 | ||
|
|
f84746274f | ||
|
|
c3582f0aff | ||
|
|
8c4c0ff5e1 | ||
|
|
b1f708dcad | ||
|
|
7b6334d447 | ||
|
|
fd64be1dcd | ||
|
|
64974a2c54 | ||
|
|
e363692822 | ||
|
|
d5d93ed147 | ||
|
|
c3547f29d0 | ||
|
|
55f202b7cb | ||
|
|
989ba7bbe7 | ||
|
|
ac90d8036f | ||
|
|
644da707d2 | ||
|
|
247f1045fe | ||
|
|
8b35679fcf | ||
|
|
cb8af0a02b | ||
|
|
0b442a2e1a | ||
|
|
f98e92b255 | ||
|
|
eca1836bd8 | ||
|
|
17e8cad005 | ||
|
|
48e89dd27e | ||
|
|
e9ef48b79c | ||
|
|
42e78ad3a3 | ||
|
|
ab9df22e76 | ||
|
|
84f2ecd80f | ||
|
|
98f946c871 | ||
|
|
113826b2e7 | ||
|
|
452d97f2d0 | ||
|
|
7fe8da8590 | ||
|
|
3f0e46230f | ||
|
|
821251a53f | ||
|
|
fad3259290 | ||
|
|
d4b342a35d | ||
|
|
8c87f5a384 | ||
|
|
984f676d6e | ||
|
|
5334bbb303 | ||
|
|
0f213b08a6 | ||
|
|
f88e231780 | ||
|
|
fff95fcebd | ||
|
|
de17664c49 | ||
|
|
2b1826d2e6 | ||
|
|
b8d8ec640d | ||
|
|
e2c01e9e5d | ||
|
|
a55efdff18 | ||
|
|
3c1af200f8 | ||
|
|
dc8f676f75 | ||
|
|
a160f2e212 | ||
|
|
012d5e7ae0 | ||
|
|
c1ce4f9a9f | ||
|
|
e800946898 | ||
|
|
e189034436 | ||
|
|
4590013adc | ||
|
|
b8b35194c9 | ||
|
|
fdef394070 | ||
|
|
a3a5630e88 | ||
|
|
9f7fd6a3a1 | ||
|
|
112a6f9942 | ||
|
|
60110a4302 | ||
|
|
4426e2adfe | ||
|
|
0028b3cf17 | ||
|
|
4867810ebe | ||
|
|
03f4e9f621 | ||
|
|
6b2476d220 | ||
|
|
a3309365fc | ||
|
|
9dcdb1bc8c | ||
|
|
2275daf3b0 | ||
|
|
d145cb508a | ||
|
|
7028fd21bc | ||
|
|
51adfd0254 | ||
|
|
6e2ed188eb | ||
|
|
2a3516d593 | ||
|
|
c2d984d470 | ||
|
|
1de2502fe9 | ||
|
|
6647575965 | ||
|
|
e5a60beba0 | ||
|
|
2804076bf6 | ||
|
|
f63abd9b6f | ||
|
|
4ebdc9d6ed | ||
|
|
6e364a0ab9 | ||
|
|
3233b9776f | ||
|
|
905bbf9118 | ||
|
|
9514977ce2 | ||
|
|
62d08dce56 | ||
|
|
71e36d264e | ||
|
|
055968bea9 | ||
|
|
7dc1672b24 | ||
|
|
d0457b73ec | ||
|
|
50e40879de | ||
|
|
1c00461f4d | ||
|
|
7e8ff50886 | ||
|
|
6cc24e475a | ||
|
|
6c0dfd13eb | ||
|
|
4232284dae | ||
|
|
b8c4be7a3d | ||
|
|
6958fd0965 | ||
|
|
1f8726669b | ||
|
|
47d65931e6 | ||
|
|
b8a9ea452f | ||
|
|
c8a1f7f534 | ||
|
|
cbb78056c3 | ||
|
|
bfbb046b10 | ||
|
|
c34dc34e3e | ||
|
|
a1e48cc438 | ||
|
|
36a6ee4fc9 | ||
|
|
8b256caa6c | ||
|
|
d4b41d892c | ||
|
|
09a5d7a35f | ||
|
|
ae83a11a8c | ||
|
|
291c513d3b | ||
|
|
8935de0809 | ||
|
|
db8b00e8df | ||
|
|
4c0a55dbbb | ||
|
|
5d31c372fa | ||
|
|
6080e456c5 | ||
|
|
cd065cc0db | ||
|
|
46929ce43f | ||
|
|
0497122e25 | ||
|
|
bda7f58ddd | ||
|
|
645d68d5d0 | ||
|
|
c940295663 | ||
|
|
8d2adfbbd2 | ||
|
|
d3b39048d8 | ||
|
|
02a5630f62 | ||
|
|
9d1c66296b | ||
|
|
be3e55acee | ||
|
|
3fd6f47f8b | ||
|
|
bbebca7951 | ||
|
|
07702379c3 | ||
|
|
7c8fa10be9 | ||
|
|
ffcc8ff32a | ||
|
|
6f42b4aafc | ||
|
|
f04b8368aa | ||
|
|
f9fd4f1e2a | ||
|
|
ecd8890c0b | ||
|
|
f568aaf732 | ||
|
|
55ed552ba7 | ||
|
|
fbf98aa4d9 | ||
|
|
0f5ee780bc | ||
|
|
7bfa23fab7 | ||
|
|
12ccbd48b9 | ||
|
|
7bd427b4e7 | ||
|
|
67762458e4 | ||
|
|
a9a9fb1da2 | ||
|
|
fa43aaba49 | ||
|
|
12fc7fbfd9 | ||
|
|
6653b13144 | ||
|
|
6969013439 | ||
|
|
37f0a7e6d9 | ||
|
|
8bea29f0e7 | ||
|
|
e750ad8755 | ||
|
|
22882e35b4 | ||
|
|
afc40d9cca | ||
|
|
7cf607c34e | ||
|
|
d556564ee1 | ||
|
|
e6c3744aaa | ||
|
|
2286a9e2a4 | ||
|
|
7769e5e116 | ||
|
|
11502d2e92 | ||
|
|
fc428eeb2b | ||
|
|
30c10cb67f | ||
|
|
a956627187 | ||
|
|
c178fa4677 | ||
|
|
25af60d8df | ||
|
|
74a42a4d4f | ||
|
|
9bf0addc9c | ||
|
|
c31443cb79 | ||
|
|
094a9ed82f | ||
|
|
4764553e08 | ||
|
|
f87b4f6154 | ||
|
|
4ccec53e8d | ||
|
|
e7728ee7dd | ||
|
|
c06aa66854 | ||
|
|
7dd913b0dd | ||
|
|
6fb1afaa2f | ||
|
|
8cb92e3bd3 | ||
|
|
d9fcde8dbb | ||
|
|
a698aec7a5 | ||
|
|
2389a5d720 | ||
|
|
04d2aaf05c | ||
|
|
bc77c6589d | ||
|
|
1de179f683 | ||
|
|
8823068608 | ||
|
|
48857631a4 | ||
|
|
5103f898e1 | ||
|
|
fd6796aae3 | ||
|
|
b9b28e31f4 | ||
|
|
0489235c67 | ||
|
|
68ee3231f4 | ||
|
|
365d948a59 | ||
|
|
5bc8717d2b | ||
|
|
912b6b4a0d | ||
|
|
fb96184401 | ||
|
|
d2c7b13454 | ||
|
|
1366acd001 | ||
|
|
bdd2e9ab4d | ||
|
|
08b8be1ab2 | ||
|
|
5c46cb7c9b | ||
|
|
ad36066126 | ||
|
|
a642ad6db9 | ||
|
|
e680259728 | ||
|
|
7b8887a9c8 | ||
|
|
1ce81fe466 | ||
|
|
3cf3159469 | ||
|
|
188a3fe3cc | ||
|
|
848c4bb979 | ||
|
|
b6ea73747d | ||
|
|
635c1bda6e | ||
|
|
0d1c3aa464 | ||
|
|
e1246ad375 | ||
|
|
62a7850a0b | ||
|
|
8305cfed24 | ||
|
|
f7bbbbbe87 | ||
|
|
7b35692ce6 | ||
|
|
22fbb0ca13 | ||
|
|
20f1ec42b1 | ||
|
|
3dccf9ee3f | ||
|
|
e51e55b634 | ||
|
|
24cf28f09a | ||
|
|
b1290072b5 | ||
|
|
c82f169248 | ||
|
|
bc7db973ad | ||
|
|
a481992c8e | ||
|
|
0489103e11 | ||
|
|
0434579ef5 | ||
|
|
b99249d2d2 | ||
|
|
d1ff87c0e6 | ||
|
|
47248bf0b7 | ||
|
|
0f49154b5d | ||
|
|
0507f95971 | ||
|
|
82220c801b | ||
|
|
e409ee8337 | ||
|
|
973a716481 | ||
|
|
cfbc75b564 | ||
|
|
78215439ee | ||
|
|
23aed5415c | ||
|
|
028c7f0604 | ||
|
|
2adbcf5e6f | ||
|
|
6a99e3c1c9 | ||
|
|
e3173810fd | ||
|
|
3b7f26d794 | ||
|
|
8e1de5bf2d | ||
|
|
6ff60080a1 | ||
|
|
f6808ee522 | ||
|
|
4f650d3c5b | ||
|
|
9d195d6fa0 | ||
|
|
ba641d96d5 | ||
|
|
e669f0e6b9 | ||
|
|
3dc514c67d | ||
|
|
d9c0c3cdbe | ||
|
|
5df7c58b1b | ||
|
|
3a8ad59e6c | ||
|
|
62f5f2c942 | ||
|
|
bb680ac514 | ||
|
|
c56aeb08f5 | ||
|
|
ddc004a147 | ||
|
|
e4a3a7d0ca | ||
|
|
e18018cacd | ||
|
|
6ae813221e | ||
|
|
dc553ca83c | ||
|
|
14c637c7f3 | ||
|
|
5d91c8832b | ||
|
|
3ce6c8b7cf | ||
|
|
331e66e594 | ||
|
|
c96c8ac30d | ||
|
|
de5a9261df | ||
|
|
f930533d8b | ||
|
|
dad406d208 | ||
|
|
a6d01739ba | ||
|
|
e3501447ad | ||
|
|
93e1f6ae03 | ||
|
|
29bfb8a8bf | ||
|
|
2a9add241e | ||
|
|
f04359f398 | ||
|
|
8a4e144725 | ||
|
|
c24052e976 | ||
|
|
6a6dacc8ce | ||
|
|
5f8e43fc67 | ||
|
|
28feddb6c9 | ||
|
|
5427b146cf | ||
|
|
c24e7ef318 | ||
|
|
6f231ce800 | ||
|
|
3f773539fe | ||
|
|
d66d1c8739 | ||
|
|
233bbebd93 | ||
|
|
50b4388b8d | ||
|
|
793f5c7cbe | ||
|
|
1d4cb6034d | ||
|
|
9cc8b75ffb | ||
|
|
628a7319d1 | ||
|
|
e715342f7a | ||
|
|
b9dd891aac | ||
|
|
c86ac4f9a7 | ||
|
|
8fa56a6f3f | ||
|
|
5e15fbec45 | ||
|
|
b79fe06be4 | ||
|
|
3a6a5ca49d | ||
|
|
e5764ac495 | ||
|
|
3d6509e246 | ||
|
|
d48b5d7d21 | ||
|
|
efe61201e5 | ||
|
|
2ff7cb8956 | ||
|
|
a458d98688 | ||
|
|
3064ab4b25 | ||
|
|
a3553202d9 | ||
|
|
d2f8d2e903 | ||
|
|
4ca92affcf | ||
|
|
3f401e4de0 | ||
|
|
9b198bc76e | ||
|
|
f7230de6d6 | ||
|
|
036c7796e5 | ||
|
|
a4aa494e5d | ||
|
|
356dd46537 | ||
|
|
d9b87064a1 | ||
|
|
bb30e1abb8 | ||
|
|
0853645264 | ||
|
|
e6162fe958 | ||
|
|
84d225e389 | ||
|
|
fee07960ca | ||
|
|
dcf2780cac | ||
|
|
2c68f78027 | ||
|
|
3e421c770b | ||
|
|
816df1b551 | ||
|
|
739afdb1ec | ||
|
|
75a01db959 | ||
|
|
c29bff4d91 | ||
|
|
69e481dbc1 | ||
|
|
19cb0e873a | ||
|
|
279b29a98c | ||
|
|
12b30c1531 | ||
|
|
bcfbacc625 | ||
|
|
36d6c13941 | ||
|
|
4952fc5575 | ||
|
|
7b8634e9e7 | ||
|
|
c86ebba60d | ||
|
|
db4c70cea3 | ||
|
|
e8c4c45c5c | ||
|
|
a3d5712087 | ||
|
|
5b8a3459f5 | ||
|
|
8a983ecbb7 | ||
|
|
e62473d4e9 | ||
|
|
054520cdac | ||
|
|
b38a7c8ab6 | ||
|
|
3588a50597 | ||
|
|
babdd9f163 | ||
|
|
5d8a0f8e9f | ||
|
|
52106fe48c | ||
|
|
e7a04e0e70 | ||
|
|
3a990f46d3 | ||
|
|
ed81dbc4a2 | ||
|
|
673b01585d | ||
|
|
d57fd05552 | ||
|
|
d9232a645d | ||
|
|
def10a9877 | ||
|
|
b29597110e | ||
|
|
a93d5b87e1 | ||
|
|
c7a8d90364 | ||
|
|
d40a52e403 | ||
|
|
86489dbbe1 | ||
|
|
a4a3797cc1 | ||
|
|
6098842d9f | ||
|
|
bd29e5f13a | ||
|
|
193af6c759 | ||
|
|
ce13ee8a55 | ||
|
|
561e743fc3 | ||
|
|
7b5fa0a912 | ||
|
|
5f88391935 | ||
|
|
e5ed5fbc6a | ||
|
|
ff7eca2f08 | ||
|
|
29300fd91e | ||
|
|
2c8b2f6c71 | ||
|
|
4cde461876 | ||
|
|
5a3bfa8043 | ||
|
|
c5544a7a1e | ||
|
|
912c7fa956 | ||
|
|
db2ea617d3 | ||
|
|
7499e41e40 | ||
|
|
dc6ea37f23 | ||
|
|
c2f72f713a | ||
|
|
700c4d0b04 | ||
|
|
43a8152de1 | ||
|
|
8c1d986a03 | ||
|
|
f3dd414a51 | ||
|
|
d1a4d333eb | ||
|
|
06be217030 | ||
|
|
b934cbe89e | ||
|
|
4880052559 | ||
|
|
61e04c5a73 | ||
|
|
147043857b | ||
|
|
27ac1fe276 | ||
|
|
1bfa1a7746 | ||
|
|
6450b52697 | ||
|
|
b1e1a66496 | ||
|
|
d7270c56cd | ||
|
|
3747a6a454 | ||
|
|
7a7b7381c9 | ||
|
|
da32362ef6 | ||
|
|
5569df5950 | ||
|
|
f1e6246962 | ||
|
|
d2c6190b59 | ||
|
|
9470d9b9ec | ||
|
|
0f8247ce69 | ||
|
|
8588757da9 | ||
|
|
f894cb24c6 | ||
|
|
722765c0aa | ||
|
|
dae3be99ce | ||
|
|
5e9b4da68c | ||
|
|
0176905c20 | ||
|
|
5e4f76bde9 | ||
|
|
0c3e839381 | ||
|
|
5be386d03e | ||
|
|
6e625e0cc9 | ||
|
|
a602101695 | ||
|
|
2ced460ec6 | ||
|
|
ae9bda8bbb | ||
|
|
9566963835 | ||
|
|
48d86fdbf5 | ||
|
|
2aa1385958 | ||
|
|
509df0939e | ||
|
|
fee1897932 | ||
|
|
093a4cec75 | ||
|
|
892a7fa95f | ||
|
|
48f7ae8476 | ||
|
|
10ef277982 | ||
|
|
ebe7da7acb | ||
|
|
d6cfde0f94 | ||
|
|
1b9b4fdd39 | ||
|
|
9fa036df7e | ||
|
|
c24c1ba73c | ||
|
|
3650cf761d | ||
|
|
8bb551eb10 | ||
|
|
34c4d753d3 | ||
|
|
6177035f84 | ||
|
|
4d1f8e5704 | ||
|
|
e6d3ce5918 | ||
|
|
7ac283bffb | ||
|
|
8e8d586dcc | ||
|
|
e05b4e772c | ||
|
|
02efea4e55 | ||
|
|
17bab06ff5 | ||
|
|
ab4f224a00 | ||
|
|
9e08143981 | ||
|
|
fe6ee083f6 | ||
|
|
655539c289 | ||
|
|
33ba754277 | ||
|
|
7948793674 | ||
|
|
8c7b33fb06 | ||
|
|
db4dfe1ba3 | ||
|
|
e00112d6e1 | ||
|
|
3404306de8 | ||
|
|
ff7e4d3db6 | ||
|
|
2014a48d22 | ||
|
|
b7e1202cf1 | ||
|
|
e371db846a | ||
|
|
5bbf3c9c35 | ||
|
|
fe4233e218 | ||
|
|
8490c2a22f | ||
|
|
e758527ca9 | ||
|
|
3e9f4df1bf | ||
|
|
f3fbce7459 | ||
|
|
ff079f7d01 | ||
|
|
d4c54b6e1c | ||
|
|
39d1ddeab8 | ||
|
|
fada9793f0 | ||
|
|
44b994414d | ||
|
|
45a8e6d1c8 | ||
|
|
1848b5f231 | ||
|
|
9fa53d43ab | ||
|
|
646e86b207 | ||
|
|
a7265c2493 | ||
|
|
e93c9b8537 | ||
|
|
261ec270c5 | ||
|
|
2d5cd7042a | ||
|
|
356be511a8 | ||
|
|
7b01108c91 | ||
|
|
59129bc3ce | ||
|
|
f896e72013 | ||
|
|
90a5a7a9a7 | ||
|
|
5574952033 | ||
|
|
1a8de82be5 | ||
|
|
187a895265 | ||
|
|
d15a0a0070 | ||
|
|
6224f8ca51 | ||
|
|
76167a3d54 | ||
|
|
2a5337d84c | ||
|
|
3b27e6e466 | ||
|
|
fbe7f559d2 | ||
|
|
c8810708ef | ||
|
|
4e53deec9d | ||
|
|
e8c11f38d2 | ||
|
|
1394bc221d | ||
|
|
baa05ba8d4 | ||
|
|
e7b493dafa | ||
|
|
940833a66f | ||
|
|
2b172d6e19 | ||
|
|
69677954b4 | ||
|
|
2cafa78339 | ||
|
|
f3f86017b6 | ||
|
|
9c35cddfc0 | ||
|
|
5479080eb2 | ||
|
|
b67057c863 | ||
|
|
0546a7b82b | ||
|
|
3d360e99da | ||
|
|
3cb3e8a7f9 | ||
|
|
b6230ed486 | ||
|
|
6a907f1fed | ||
|
|
123dfd8dd3 | ||
|
|
e9bd76f2cd | ||
|
|
47f7dfeb47 | ||
|
|
405919f204 | ||
|
|
b813a32225 | ||
|
|
a6e5f95ff4 | ||
|
|
2e5f0b064c | ||
|
|
a9f6e86381 | ||
|
|
c6548ace61 | ||
|
|
478afb88e3 | ||
|
|
7c17957ec7 | ||
|
|
241f845c08 | ||
|
|
ba0a585256 | ||
|
|
d7e9ae1a77 | ||
|
|
dd6a138ea1 | ||
|
|
623f63abb3 | ||
|
|
b6caa51552 | ||
|
|
293adc3a99 | ||
|
|
8a67ceff57 | ||
|
|
829d82dfe3 | ||
|
|
5fdf8d7687 | ||
|
|
dee9f90a0b | ||
|
|
1ddf8b419a | ||
|
|
a7348f0eb9 | ||
|
|
c718fcf176 | ||
|
|
7457735c04 | ||
|
|
2982911df7 | ||
|
|
c7cb7c0b68 | ||
|
|
0f389b2a48 | ||
|
|
68f229f91c | ||
|
|
ceba1ad1e9 | ||
|
|
efe5f004a1 | ||
|
|
b716a3965c | ||
|
|
15fa495458 | ||
|
|
1dfb2e0a1a | ||
|
|
d775658980 | ||
|
|
2bd40bef47 | ||
|
|
bfe01899a4 | ||
|
|
9531762c44 | ||
|
|
e59a35e804 | ||
|
|
67d43c19ec | ||
|
|
21f5f5fe5e | ||
|
|
2695aeb64b | ||
|
|
9e24447835 | ||
|
|
e6483fed98 | ||
|
|
296250b20f | ||
|
|
38601bf0cf | ||
|
|
9f46aad80a | ||
|
|
98bc04697e | ||
|
|
a492f7a664 | ||
|
|
85a49262e9 | ||
|
|
955d04252e | ||
|
|
38e9b59b89 | ||
|
|
95c4a93f2e | ||
|
|
118b22fe56 | ||
|
|
85dac470aa | ||
|
|
41eb927480 | ||
|
|
bec5e250a5 | ||
|
|
9fe45e9472 | ||
|
|
78133418d7 | ||
|
|
8275de8fa7 | ||
|
|
ba7c154e84 | ||
|
|
d2b0140fa4 | ||
|
|
8062694331 | ||
|
|
5c4ba74237 | ||
|
|
e576235307 | ||
|
|
7f4b50ca7f | ||
|
|
e7687a0fe6 | ||
|
|
e87502e7bf | ||
|
|
5dd5986b88 | ||
|
|
400ed9e999 | ||
|
|
3e0ca6a70a | ||
|
|
3b08ed5f51 | ||
|
|
5b01ad23c4 | ||
|
|
41dcb26283 | ||
|
|
d4879b9bd8 | ||
|
|
87856fe382 | ||
|
|
205a37a879 | ||
|
|
e830c90314 | ||
|
|
9a06fa4704 | ||
|
|
5308b49cd2 | ||
|
|
216ea34a3c | ||
|
|
c5555ad365 | ||
|
|
0a9c5250f8 | ||
|
|
0e91c75dc2 | ||
|
|
cf996dda0b | ||
|
|
21638e6a9e | ||
|
|
9c6db1d730 | ||
|
|
272d6e9b66 | ||
|
|
87b08669d7 | ||
|
|
de86682562 | ||
|
|
30cfe69e26 | ||
|
|
25c2e34eed | ||
|
|
e45049a602 | ||
|
|
e92b006f70 | ||
|
|
962eb08e40 | ||
|
|
82129ff3bd | ||
|
|
6342e0065a | ||
|
|
ac44ffcdff | ||
|
|
dfb5a4875a | ||
|
|
ddce3058be | ||
|
|
9235c395b4 | ||
|
|
e1296105f9 | ||
|
|
38cdcf4f61 | ||
|
|
5623decdb3 | ||
|
|
0f39ea8ac7 | ||
|
|
f3d3ec6ef7 | ||
|
|
fde01d5004 | ||
|
|
71d9710322 | ||
|
|
593b603295 | ||
|
|
7a5ce8cd6b | ||
|
|
54b2e41afd | ||
|
|
16b3e62587 | ||
|
|
6c1edadc55 | ||
|
|
8928a87b14 | ||
|
|
8eca200023 | ||
|
|
865b6d14f0 | ||
|
|
ede6e6dd87 | ||
|
|
b63af9b919 | ||
|
|
e18ea88735 | ||
|
|
750dfe746e | ||
|
|
1e3ef6846d | ||
|
|
53404f1002 | ||
|
|
31225b9e23 | ||
|
|
5623784c59 | ||
|
|
436b6808b5 | ||
|
|
d122de04e4 | ||
|
|
aecc34a78b | ||
|
|
2fa9774955 | ||
|
|
ed99433448 | ||
|
|
df9d71e2f5 | ||
|
|
5935800b21 | ||
|
|
9ddb82073c | ||
|
|
51fdd04881 | ||
|
|
d721632f2b | ||
|
|
dfd5a5bebc | ||
|
|
490f8600e5 | ||
|
|
b3be796277 | ||
|
|
b3f2232ba4 | ||
|
|
ef083d5e8f | ||
|
|
73c989ee67 | ||
|
|
bfb05d331e | ||
|
|
a32dd779cb | ||
|
|
3607748f49 | ||
|
|
96d4aac650 | ||
|
|
5726a61861 | ||
|
|
5619586645 | ||
|
|
773762bb99 | ||
|
|
26f600542b | ||
|
|
6724658181 | ||
|
|
3f365885f0 | ||
|
|
48fe808adf | ||
|
|
c61fa7b92f | ||
|
|
135d410a6b | ||
|
|
cb64dbe79f | ||
|
|
f1d5f8635c | ||
|
|
9af08fa693 | ||
|
|
05db99aa69 | ||
|
|
2681abbeed | ||
|
|
031c90e797 | ||
|
|
34f0053db7 | ||
|
|
afbdff928d | ||
|
|
34ad18eee8 | ||
|
|
e73fcc5903 | ||
|
|
0c467e7115 | ||
|
|
300ec74f76 | ||
|
|
326a115936 | ||
|
|
b962488954 | ||
|
|
b5c8c75c4e | ||
|
|
0c100ea2de | ||
|
|
be99a7c02d | ||
|
|
4a164f9c01 | ||
|
|
45c50995e3 | ||
|
|
fb29ff29cf | ||
|
|
62d7e10257 | ||
|
|
9ac823c0ba | ||
|
|
1c09a7c38e | ||
|
|
8e2e155e65 | ||
|
|
45a806ac77 | ||
|
|
427646a0c3 | ||
|
|
34e6e921ec | ||
|
|
a41c58ebb4 | ||
|
|
beb015b082 | ||
|
|
4dfd9b062e | ||
|
|
27ce51ab07 | ||
|
|
863ab4560c | ||
|
|
c27c99b245 | ||
|
|
d1531c5a80 | ||
|
|
75f8c428b3 | ||
|
|
4fb581c784 | ||
|
|
7b15103880 | ||
|
|
bf3de38214 | ||
|
|
8c4c2b2ee4 | ||
|
|
add500193b | ||
|
|
8dff590fe2 | ||
|
|
ccfc29a6a9 | ||
|
|
f0ce091809 | ||
|
|
5aaaeda6c5 | ||
|
|
3bdb883f1c | ||
|
|
fbd69f6d3a | ||
|
|
f736634c3e | ||
|
|
4b19911e12 | ||
|
|
e73f2c9a30 | ||
|
|
87bb3d17a9 | ||
|
|
33596249a1 | ||
|
|
26beeb6a80 | ||
|
|
982b3aa5f3 | ||
|
|
8e179f0563 | ||
|
|
95e0f02cae | ||
|
|
c0b1e877ad | ||
|
|
444c9e0589 | ||
|
|
fb0f692c73 | ||
|
|
90a0e50e75 | ||
|
|
ad0795da02 | ||
|
|
65674b9cc4 | ||
|
|
ad0fa6636b | ||
|
|
67650012ce | ||
|
|
d00137026a | ||
|
|
12a1321bc1 | ||
|
|
c41ecb1b9d | ||
|
|
770bf4c42a | ||
|
|
d5f054b739 | ||
|
|
473c4cf3fa | ||
|
|
347156f900 | ||
|
|
76b70684cd | ||
|
|
336b5da2a7 | ||
|
|
6f39ae5d76 | ||
|
|
078fc7bfb8 | ||
|
|
a67d095c70 | ||
|
|
647f43882b | ||
|
|
ca47f5458c | ||
|
|
3027bb5092 | ||
|
|
893efa8e2d | ||
|
|
1ea9659227 | ||
|
|
31e58d7597 | ||
|
|
3b21ed8fe8 | ||
|
|
0ad8db565d | ||
|
|
a1a83a1ba3 | ||
|
|
e7d11e4bec | ||
|
|
e3c26c97f2 | ||
|
|
d6e132fbda | ||
|
|
74c4c642eb | ||
|
|
af3be19175 | ||
|
|
ee49d64120 | ||
|
|
58257fa25e | ||
|
|
cb3d8120bd | ||
|
|
ace88cb709 | ||
|
|
8ca20e3135 | ||
|
|
4e13cce770 | ||
|
|
f408e14d4b | ||
|
|
543daac06d | ||
|
|
800d1b03c1 | ||
|
|
9b970a472f | ||
|
|
593131a7ea | ||
|
|
148f708360 | ||
|
|
7d0feab078 | ||
|
|
aae2db8ad8 | ||
|
|
f3d488de26 | ||
|
|
ebc15db75e | ||
|
|
dd28aca260 | ||
|
|
2a6e5b21a9 | ||
|
|
14f6ce3626 | ||
|
|
34a2a6ce03 | ||
|
|
db940e3bba | ||
|
|
9f3a6be255 | ||
|
|
b6ac92d192 | ||
|
|
ce1c517a9f | ||
|
|
75b6a3ede8 | ||
|
|
3818bc3f98 | ||
|
|
d8ec900933 | ||
|
|
29ba5e73fa | ||
|
|
acf449c03a | ||
|
|
ecb4cb7435 | ||
|
|
3200b5dc86 | ||
|
|
e20d4cecd5 | ||
|
|
36177e09f7 | ||
|
|
9ae62adff1 | ||
|
|
73a2c935a7 | ||
|
|
42acbe66c3 | ||
|
|
22a9299d97 | ||
|
|
b9acd0a9a6 | ||
|
|
c761364bed | ||
|
|
d79dacf8a3 | ||
|
|
efc36e12bc | ||
|
|
5a0b12f078 | ||
|
|
22d04cb9fc | ||
|
|
d8da119c56 | ||
|
|
a24d50d7e3 | ||
|
|
e5716e66bb | ||
|
|
c6c2bb33ed | ||
|
|
0d0ef86550 | ||
|
|
ca0bd674a7 | ||
|
|
260b2e0bd6 | ||
|
|
90413ae4fe | ||
|
|
b7466e3206 | ||
|
|
f2812cdbe5 | ||
|
|
95a2fdec99 | ||
|
|
6880c49a32 | ||
|
|
1b48b4a1e1 | ||
|
|
0516100aae | ||
|
|
5b4079ab7e | ||
|
|
d284d629a4 | ||
|
|
c52195e6cd | ||
|
|
a61734a6f8 | ||
|
|
750ecd4804 | ||
|
|
781c15d1ee | ||
|
|
a1499a04d4 | ||
|
|
fb23bddeb2 | ||
|
|
aa6fa4c674 | ||
|
|
19e7fc9cb9 | ||
|
|
a0a66f3b54 | ||
|
|
3c9c13a371 | ||
|
|
96d04e35f9 | ||
|
|
629a8412dc | ||
|
|
19a83bc944 | ||
|
|
a59dacf679 | ||
|
|
8b93a404ef | ||
|
|
ded204344d | ||
|
|
b3121d46c4 | ||
|
|
f60d03ddd3 | ||
|
|
3d8345b92c | ||
|
|
9ab928e92e | ||
|
|
ea56939b7a | ||
|
|
6caddb65e9 | ||
|
|
8df0d66fb6 | ||
|
|
a80aa20b23 | ||
|
|
fd336ffd92 | ||
|
|
be1c559ad4 | ||
|
|
2dce37f289 | ||
|
|
22b5eef4ce | ||
|
|
63426e459a | ||
|
|
8393172ad2 | ||
|
|
cc06afc6df |
@@ -79,6 +79,8 @@ Then, **for a method** of an eligible class:
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
Note : PHP7 is required. Migrating to PHP8 requires some additional work which is questionable as an alternative way to generate a documentation is being considered.
|
||||||
|
|
||||||
```
|
```
|
||||||
cd .doc
|
cd .doc
|
||||||
composer require phpdocumentor/phpdocumentor:~2 --dev
|
composer require phpdocumentor/phpdocumentor:~2 --dev
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 4.8 MiB |
@@ -1,7 +1,14 @@
|
|||||||
# iTop version history
|
# iTop version history
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
%%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'showBranches': true,'mainBranchName': 'develop','rotateCommitLabel': true}} }%%
|
%%{init: { 'logLevel': 'debug', 'theme': 'base', 'themeVariables': {
|
||||||
|
'git0': 'lawngreen',
|
||||||
|
'git3': 'dodgerblue',
|
||||||
|
'git4': 'grey',
|
||||||
|
'git5': 'grey',
|
||||||
|
'git6': 'grey',
|
||||||
|
'git7': 'grey'
|
||||||
|
}, 'gitGraph': {'showBranches': true,'mainBranchName': 'develop','rotateCommitLabel': true}} }%%
|
||||||
gitGraph
|
gitGraph
|
||||||
commit id: "2016-07-06" tag: "2.3.0" type: HIGHLIGHT
|
commit id: "2016-07-06" tag: "2.3.0" type: HIGHLIGHT
|
||||||
branch support/2.3 order: 900
|
branch support/2.3 order: 900
|
||||||
@@ -68,6 +75,30 @@ gitGraph
|
|||||||
branch support/3.1 order: 840
|
branch support/3.1 order: 840
|
||||||
checkout support/3.1
|
checkout support/3.1
|
||||||
commit id: "2023-08-09" tag: "3.1.0-2"
|
commit id: "2023-08-09" tag: "3.1.0-2"
|
||||||
|
checkout support/2.7
|
||||||
|
commit id: "2023-08-10" tag: "2.7.9"
|
||||||
|
checkout support/3.1
|
||||||
|
commit id: "2023-12-20" tag: "3.1.1"
|
||||||
|
checkout develop
|
||||||
|
commit id: "2024-01-15" tag: "Start 3.2" type: HIGHLIGHT
|
||||||
|
branch support/3.2 order: 830
|
||||||
|
checkout support/2.7
|
||||||
|
commit id: "2024-01-17a" tag: "2.7.10"
|
||||||
|
checkout support/3.0
|
||||||
|
commit id: "2024-01-17b" tag: "3.0.4"
|
||||||
|
checkout support/2.7
|
||||||
|
commit id: "2024-09-28" tag: "2.7.11"
|
||||||
|
checkout support/3.1
|
||||||
|
commit id: "2024-09-27" tag: "3.1.2"
|
||||||
|
checkout support/3.2
|
||||||
|
commit id: "2024-06-25" tag: "3.2.0-beta1" type: REVERSE
|
||||||
|
commit id: "2024-08-07" tag: "3.2.0"
|
||||||
|
checkout support/2.7
|
||||||
|
commit id: "2025-02-25" tag: "2.7.12"
|
||||||
|
checkout support/3.1
|
||||||
|
commit id: "2025-02-25 " tag: "3.1.3"
|
||||||
|
checkout support/3.2
|
||||||
|
commit id: "2025-02-25 " tag: "3.2.1"
|
||||||
```
|
```
|
||||||
|
|
||||||
To learn more, check the [iTop community versions history on the official wiki](https://www.itophub.io/wiki/page?id=latest:release:start).
|
To learn more, check the [iTop community versions history on the official wiki](https://www.itophub.io/wiki/page?id=latest:release:start).
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#viewer").iviewer({src: '{{ path('graphs/classes.svg') }}', zoom_animation: false});
|
$("#viewer").iviewer({src: '{{ path('graphs/classes.svg') }}', zoom_animation: false});
|
||||||
$('#viewer img').bind('dragstart', function(event){
|
$('#viewer img').on('dragstart', function(event){
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
});
|
});
|
||||||
$(window).resize();
|
$(window).resize();
|
||||||
|
|||||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -47,6 +47,12 @@ tests/*/vendor/*
|
|||||||
!/log/index.php
|
!/log/index.php
|
||||||
!/log/web.config
|
!/log/web.config
|
||||||
|
|
||||||
|
# NPM: `jquery-ui` package is just there for vulnerability scans, so we don't want to version its files (only `jquery-ui-dist` is used within the code base)
|
||||||
|
/node_modules/jquery-ui/**
|
||||||
|
|
||||||
|
# Symfony: Local env file
|
||||||
|
/resources/symfony/.env.local
|
||||||
|
|
||||||
# PHPUnit: Cache file, local XML working copies
|
# PHPUnit: Cache file, local XML working copies
|
||||||
/tests/php-unit-tests/.phpunit.result.cache
|
/tests/php-unit-tests/.phpunit.result.cache
|
||||||
/tests/php-unit-tests/phpunit.xml
|
/tests/php-unit-tests/phpunit.xml
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ $iBeginTime = time();
|
|||||||
chdir(__DIR__);
|
chdir(__DIR__);
|
||||||
|
|
||||||
$aCommands = [
|
$aCommands = [
|
||||||
'php composer/rmDeniedTestDir.php',
|
'php composer/rmUnnecessaryFolders.php',
|
||||||
'php build/commands/setupCssCompiler.php',
|
'php build/commands/setupCssCompiler.php',
|
||||||
// 'bash /tmp/gabuzomeu.sh',
|
// 'bash /tmp/gabuzomeu.sh',
|
||||||
];
|
];
|
||||||
@@ -22,13 +22,13 @@ $iElapsed = time() - $iBeginTime;
|
|||||||
|
|
||||||
if (count($aFailedCommands))
|
if (count($aFailedCommands))
|
||||||
{
|
{
|
||||||
fwrite(STDERR, "\nafterBuild execution failed! (in ${iElapsed}s)\n");
|
fwrite(STDERR, "\nafterBuild execution failed! (in {$iElapsed}s)\n");
|
||||||
fwrite(STDERR, "List of failling commands:\n - " . implode("\n - ", $aFailedCommands) . "\n");
|
fwrite(STDERR, "List of failling commands:\n - " . implode("\n - ", $aFailedCommands) . "\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
echo "\nDone (${iElapsed}s)\n";
|
echo "\nDone ({$iElapsed}s)\n";
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -74,7 +74,7 @@ function ExecCommand($cmd) {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo "| elapsed:${iElapsed}s \n";
|
echo "| elapsed:{$iElapsed}s \n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($stderr))
|
if (!empty($stderr))
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2010-2023 Combodo SARL
|
* Copyright (C) 2010-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* Copyright (C) 2010-2023 Combodo SARL
|
|
||||||
*
|
|
||||||
* This file is part of iTop.
|
|
||||||
*
|
|
||||||
* iTop is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* iTop is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with iTop. If not, see <http: *www.gnu.org/licenses/>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
use Combodo\iTop\Composer\iTopComposer;
|
|
||||||
|
|
||||||
$iTopFolder = __DIR__ . "/../../" ;
|
|
||||||
|
|
||||||
require_once ("$iTopFolder/approot.inc.php");
|
|
||||||
require_once (APPROOT."/setup/setuputils.class.inc.php");
|
|
||||||
|
|
||||||
if (PHP_SAPI !== 'cli')
|
|
||||||
{
|
|
||||||
throw new \Exception('This script can only run from CLI');
|
|
||||||
}
|
|
||||||
|
|
||||||
clearstatcache();
|
|
||||||
|
|
||||||
$oiTopComposer = new iTopComposer();
|
|
||||||
$aDeniedButStillPresent = $oiTopComposer->ListDeniedButStillPresent();
|
|
||||||
|
|
||||||
echo "\n";
|
|
||||||
foreach ($aDeniedButStillPresent as $sDir)
|
|
||||||
{
|
|
||||||
if (false === iTopComposer::IsTestDir($sDir))
|
|
||||||
{
|
|
||||||
echo "ERROR found INVALID denied test dir: '$sDir'\n";
|
|
||||||
throw new \Exception("$sDir must end with /Test/ or /test/");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (false === file_exists($sDir)) {
|
|
||||||
echo "INFO $sDir is in denied list, but not existing on disk => skipping !\n";
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
SetupUtils::rrmdir($sDir);
|
|
||||||
echo "OK Remove denied test dir: '$sDir'\n";
|
|
||||||
}
|
|
||||||
catch (\Exception $e) {
|
|
||||||
echo "\nFAILED to remove denied test dir: '$sDir'\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$aAllowedAndDeniedDirs = array_merge(
|
|
||||||
$oiTopComposer->ListAllowedTestDir(),
|
|
||||||
$oiTopComposer->ListDeniedTestDir()
|
|
||||||
);
|
|
||||||
$aExistingDirs = $oiTopComposer->ListAllTestDir();
|
|
||||||
$aMissing = array_diff($aExistingDirs, $aAllowedAndDeniedDirs);
|
|
||||||
if (false === empty($aMissing)) {
|
|
||||||
echo "Some new tests dirs exists !\n"
|
|
||||||
.' They must be declared either in the allowed or denied list in '.iTopComposer::class." (see N°2651).\n"
|
|
||||||
.' List of dirs:'."\n".var_export($aMissing, true);
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2010-2023 Combodo SARL
|
* Copyright (C) 2010-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
* @link https://getcomposer.org/doc/03-cli.md#show
|
* @link https://getcomposer.org/doc/03-cli.md#show
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$iTopFolder = __DIR__."/../../";
|
$iTopFolder = __DIR__."/../../../";
|
||||||
|
|
||||||
require_once("$iTopFolder/approot.inc.php");
|
require_once("$iTopFolder/approot.inc.php");
|
||||||
$sApproot = APPROOT;
|
$sApproot = APPROOT;
|
||||||
2975
.make/dependencies/composer/tcpdf/droidsansfallback.php
Normal file
2975
.make/dependencies/composer/tcpdf/droidsansfallback.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,56 @@
|
|||||||
|
courier.php
|
||||||
|
courierb.php
|
||||||
|
courierbi.php
|
||||||
|
courieri.php
|
||||||
|
dejavusans.ctg.z
|
||||||
|
dejavusans.php
|
||||||
|
dejavusans.z
|
||||||
|
dejavusansb.ctg.z
|
||||||
|
dejavusansb.php
|
||||||
|
dejavusansb.z
|
||||||
|
dejavusansbi.ctg.z
|
||||||
|
dejavusansbi.php
|
||||||
|
dejavusansbi.z
|
||||||
|
dejavusanscondensed.ctg.z
|
||||||
|
dejavusanscondensed.php
|
||||||
|
dejavusanscondensed.z
|
||||||
|
dejavusanscondensedb.ctg.z
|
||||||
|
dejavusanscondensedb.php
|
||||||
|
dejavusanscondensedb.z
|
||||||
|
dejavusanscondensedbi.ctg.z
|
||||||
|
dejavusanscondensedbi.php
|
||||||
|
dejavusanscondensedbi.z
|
||||||
|
dejavusanscondensedi.ctg.z
|
||||||
|
dejavusanscondensedi.php
|
||||||
|
dejavusanscondensedi.z
|
||||||
|
dejavusansextralight.ctg.z
|
||||||
|
dejavusansextralight.php
|
||||||
|
dejavusansextralight.z
|
||||||
|
dejavusansi.ctg.z
|
||||||
|
dejavusansi.php
|
||||||
|
dejavusansi.z
|
||||||
|
dejavusansmono.ctg.z
|
||||||
|
dejavusansmono.php
|
||||||
|
dejavusansmono.z
|
||||||
|
dejavusansmonob.ctg.z
|
||||||
|
dejavusansmonob.php
|
||||||
|
dejavusansmonob.z
|
||||||
|
dejavusansmonobi.ctg.z
|
||||||
|
dejavusansmonobi.php
|
||||||
|
dejavusansmonobi.z
|
||||||
|
dejavusansmonoi.ctg.z
|
||||||
|
dejavusansmonoi.php
|
||||||
|
dejavusansmonoi.z
|
||||||
|
droidsansfallback.ctg.z
|
||||||
|
droidsansfallback.php
|
||||||
|
droidsansfallback.z
|
||||||
|
helvetica.php
|
||||||
|
helveticab.php
|
||||||
|
helveticabi.php
|
||||||
|
helveticai.php
|
||||||
|
symbol.php
|
||||||
|
times.php
|
||||||
|
timesb.php
|
||||||
|
timesbi.php
|
||||||
|
timesi.php
|
||||||
|
zapfdingbats.php
|
||||||
101
.make/dependencies/composer/tcpdf/tcpdfUpdateFonts.php
Normal file
101
.make/dependencies/composer/tcpdf/tcpdfUpdateFonts.php
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This script will copy custom fonts in the TCPDF lib fonts directory.
|
||||||
|
* If you need to add other files :
|
||||||
|
* - add the corresponding files in this script directory
|
||||||
|
* - modify this script to copy also your files
|
||||||
|
*
|
||||||
|
* @since 2.7.0 N°1947 add DroidSansFallback font (see also PR #49 in the links below)
|
||||||
|
* @since 2.7.0 N°2435 TCPPDF lib forked and added in composer.json (at that time the lib was announced as deprecated and rewritten in tecnickcom/tc-lib-pdf)
|
||||||
|
* @since 3.2.0 N°7175 switch back to TCPDF original lib (which is finally still maintained, tecnickcom/tc-lib-pdf us still under dev), script creation to keep custom DroidSansFallback font
|
||||||
|
*
|
||||||
|
* @link https://github.com/Combodo/iTop/pull/49 add DroidSansFallback font
|
||||||
|
* @link https://github.com/tecnickcom/TCPDF?tab=readme-ov-file#note TCPDF is in support only mode
|
||||||
|
*/
|
||||||
|
|
||||||
|
$sItopRootFolder = realpath(__DIR__ . "/../../../../");
|
||||||
|
$sCurrentScriptFileName = basename(__FILE__);
|
||||||
|
|
||||||
|
|
||||||
|
require_once ("$sItopRootFolder/lib/autoload.php");
|
||||||
|
|
||||||
|
|
||||||
|
$sTcPdfRootFolder = $sItopRootFolder.'/lib/tecnickcom/tcpdf';
|
||||||
|
if (false === file_exists($sTcPdfRootFolder)) {
|
||||||
|
echo $sCurrentScriptFileName.": No TCPDF lib detected, exiting !\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$sTcPdfFontsFolder = $sTcPdfRootFolder.'/fonts/';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1) Cleaning up the fonts directory to keep only the ones we want in iTop
|
||||||
|
*/
|
||||||
|
echo $sCurrentScriptFileName.": ---1) Cleaning up the fonts files\n";
|
||||||
|
$aTcpdfDefaultFontsToKeepInItop = file(__DIR__.'/tcpdfDefaultFontsToKeepInItop.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||||
|
|
||||||
|
$aTcpdfFontsDirContent = scandir($sTcPdfFontsFolder);
|
||||||
|
foreach ($aTcpdfFontsDirContent as $sTcpdfFontResourceName) {
|
||||||
|
if ($sTcpdfFontResourceName === '.') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ($sTcpdfFontResourceName === '..') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!in_array($sTcpdfFontResourceName, $aTcpdfDefaultFontsToKeepInItop, true)) {
|
||||||
|
echo $sCurrentScriptFileName.": Removing $sTcpdfFontResourceName !\n";
|
||||||
|
|
||||||
|
$sTcpdfFontResourceFullPath = $sTcPdfFontsFolder.$sTcpdfFontResourceName;
|
||||||
|
if (is_file($sTcpdfFontResourceFullPath)) {
|
||||||
|
unlink($sTcpdfFontResourceFullPath);
|
||||||
|
} elseif (is_dir($sTcpdfFontResourceFullPath)) {
|
||||||
|
rrmdir($sTcpdfFontResourceFullPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 2) Then adding the DroidSansFallback font (useful for CJK data for example)
|
||||||
|
*/
|
||||||
|
echo $sCurrentScriptFileName.": ---2) Copying font files to TCPDF ($sTcPdfFontsFolder)...\n";
|
||||||
|
$aFontFilesToCopy = glob(__DIR__.'\droidsansfallback.*');
|
||||||
|
foreach ($aFontFilesToCopy as $sFontFileToCopy) {
|
||||||
|
$sFontFileName = basename($sFontFileToCopy);
|
||||||
|
echo $sCurrentScriptFileName.': copying '.$sFontFileName."\n";
|
||||||
|
copy($sFontFileToCopy, $sTcPdfFontsFolder.$sFontFileName);
|
||||||
|
}
|
||||||
|
echo $sCurrentScriptFileName.": Done !\n";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recursively delete a directory and its content
|
||||||
|
*
|
||||||
|
* @param $sDirToRemovePath
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function rrmdir($sDirToRemovePath):void
|
||||||
|
{
|
||||||
|
if (is_dir($sDirToRemovePath)) {
|
||||||
|
$objects = scandir($sDirToRemovePath);
|
||||||
|
foreach ($objects as $object) {
|
||||||
|
if ($object != "." && $object != "..") {
|
||||||
|
if (filetype($sDirToRemovePath."/".$object) == "dir") {
|
||||||
|
rrmdir($sDirToRemovePath."/".$object);
|
||||||
|
} else {
|
||||||
|
unlink($sDirToRemovePath."/".$object);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
reset($objects);
|
||||||
|
rmdir($sDirToRemovePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
51
.make/dependencies/npm/restoreFolderBrowsingProtection.php
Normal file
51
.make/dependencies/npm/restoreFolderBrowsingProtection.php
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Copyright (C) 2010-2024 Combodo SAS
|
||||||
|
*
|
||||||
|
* This file is part of iTop.
|
||||||
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with iTop. If not, see <http: *www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ensure that the files for folder browsing protection (.htaccess, web.config) are kept after an "npm install/update" command
|
||||||
|
*/
|
||||||
|
|
||||||
|
$iTopFolder = __DIR__."/../../../";
|
||||||
|
|
||||||
|
require_once("$iTopFolder/approot.inc.php");
|
||||||
|
|
||||||
|
$sDependenciesRootFolderAbsPath = APPROOT . "node_modules/";
|
||||||
|
$aFilesToCheck = [
|
||||||
|
".htaccess",
|
||||||
|
"web.config",
|
||||||
|
];
|
||||||
|
|
||||||
|
echo "This command aims at ensuring that folder browsing protection files (.htaccess, web.config) are present in the dependencies folder even after an install/upgrade command\n";
|
||||||
|
echo "Checking files:\n";
|
||||||
|
|
||||||
|
foreach($aFilesToCheck as $sFileToCheck) {
|
||||||
|
if (file_exists($sDependenciesRootFolderAbsPath . $sFileToCheck)) {
|
||||||
|
echo "✔️ $sFileToCheck is present\n";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If missing, copy the one from /lib as it contains the necessary allow/deny directives for third-parties
|
||||||
|
copy(APPROOT . "lib/$sFileToCheck", $sDependenciesRootFolderAbsPath . $sFileToCheck);
|
||||||
|
echo "✔️ $sFileToCheck was missing and has been re-created\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ensure separation with following scripts
|
||||||
|
echo "\n";
|
||||||
100
.make/dependencies/rmUnnecessaryFolders.php
Normal file
100
.make/dependencies/rmUnnecessaryFolders.php
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Copyright (C) 2010-2024 Combodo SAS
|
||||||
|
*
|
||||||
|
* This file is part of iTop.
|
||||||
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with iTop. If not, see <http: *www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
$iTopFolder = __DIR__ . "/../../" ;
|
||||||
|
|
||||||
|
require_once ("$iTopFolder/approot.inc.php");
|
||||||
|
require_once (APPROOT."/setup/setuputils.class.inc.php");
|
||||||
|
|
||||||
|
if (php_sapi_name() !== 'cli')
|
||||||
|
{
|
||||||
|
throw new \Exception('This script can only run from CLI');
|
||||||
|
}
|
||||||
|
|
||||||
|
clearstatcache();
|
||||||
|
|
||||||
|
// Read params
|
||||||
|
$key = array_search("--manager", $argv);
|
||||||
|
if (false === $key || false === isset($argv[$key + 1]) ) {
|
||||||
|
throw new \InvalidArgumentException("Usage: " . __FILE__ . " --manager composer|npm");
|
||||||
|
}
|
||||||
|
$sDependenciesHandlerCode = $argv[$key + 1];
|
||||||
|
|
||||||
|
switch ($sDependenciesHandlerCode) {
|
||||||
|
case "composer":
|
||||||
|
$sDependenciesHandlerFQCN = \Combodo\iTop\Dependencies\Composer\iTopComposer::class;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "npm":
|
||||||
|
$sDependenciesHandlerFQCN = \Combodo\iTop\Dependencies\NPM\iTopNPM::class;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new \Exception("Invalid dependencies handler code, $sDependenciesHandlerCode given, expected composer|npm");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start handler
|
||||||
|
$oDependenciesHandler = new $sDependenciesHandlerFQCN();
|
||||||
|
$aDeniedButStillPresent = $oDependenciesHandler->ListDeniedButStillPresentFilesAbsPaths();
|
||||||
|
|
||||||
|
echo "\n";
|
||||||
|
foreach ($aDeniedButStillPresent as $sDir)
|
||||||
|
{
|
||||||
|
if (false === $oDependenciesHandler::IsQuestionnableFile($sDir))
|
||||||
|
{
|
||||||
|
echo "ERROR found INVALID denied test dir: '$sDir'\n";
|
||||||
|
throw new \RuntimeException("$sDir is in the denied list but doesn't comply with the rule (see IsQuestionnableFolder method)");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (false === file_exists($sDir)) {
|
||||||
|
echo "INFO $sDir is in denied list, but not existing on disk => skipping !\n";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
if(is_dir($sDir)){
|
||||||
|
SetupUtils::rrmdir($sDir);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
unlink($sDir);
|
||||||
|
}
|
||||||
|
echo "✔️ Remove denied test dir: '$sDir'\n";
|
||||||
|
}
|
||||||
|
catch (\Exception $e) {
|
||||||
|
echo "\n❌ FAILED to remove denied test dir: '$sDir'\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$aAllowedAndDeniedDirs = array_merge(
|
||||||
|
$oDependenciesHandler->ListAllowedFilesAbsPaths(),
|
||||||
|
$oDependenciesHandler->ListDeniedFilesAbsPaths()
|
||||||
|
);
|
||||||
|
$aExistingDirs = $oDependenciesHandler->ListAllFilesAbsPaths();
|
||||||
|
$aMissing = array_diff($aExistingDirs, $aAllowedAndDeniedDirs);
|
||||||
|
if (false === empty($aMissing)) {
|
||||||
|
echo "Some new tests dirs exists !\n"
|
||||||
|
." They must be declared either in the allowed or denied list in {$sDependenciesHandlerFQCN}\n"
|
||||||
|
.' List of dirs:'."\n".var_export($aMissing, true)."\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ensure separation with following scripts
|
||||||
|
echo "\n";
|
||||||
@@ -25,12 +25,34 @@
|
|||||||
|
|
||||||
|
|
||||||
if (count($argv) === 1) {
|
if (count($argv) === 1) {
|
||||||
echo '⚠ You must pass the base tag/sha1 as parameter';
|
echo "⚠ You must pass the base tag/sha1 as parameter\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
$sBaseReference = $argv[1];
|
$sBaseReference = $argv[1];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replace the Github emojis codes by their UTF-8 character equivalent
|
||||||
|
*/
|
||||||
|
function ReplaceGitmojis(string $sLine)
|
||||||
|
{
|
||||||
|
static $aGitmojis = null;
|
||||||
|
|
||||||
|
if ($aGitmojis === null) {
|
||||||
|
$aRawGitmojis = json_decode(trim(file_get_contents(__DIR__.'/gitmojis.json')), true);
|
||||||
|
if ($aRawGitmojis === false) {
|
||||||
|
echo "\nFailed to parse ".__DIR__."/gitmojis.json, emoji codes will not be replaced by their unicode equivalent.\n";
|
||||||
|
} else {
|
||||||
|
foreach($aRawGitmojis["gitmojis"] as $aGitmoji) {
|
||||||
|
$aGitmojis[$aGitmoji['code']] = $aGitmoji['emoji'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (is_array($aGitmojis)) {
|
||||||
|
return str_replace(array_keys($aGitmojis), array_values($aGitmojis), $sLine);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--- Get log
|
//--- Get log
|
||||||
$sGitLogCommand = 'git log --decorate --pretty="%h;%s" --date-order --no-merges '.$sBaseReference.'..HEAD';
|
$sGitLogCommand = 'git log --decorate --pretty="%h;%s" --date-order --no-merges '.$sBaseReference.'..HEAD';
|
||||||
$sGitLogRaw = shell_exec($sGitLogCommand);
|
$sGitLogRaw = shell_exec($sGitLogCommand);
|
||||||
@@ -73,5 +95,5 @@ echo "\n";
|
|||||||
echo "# Logs line without bug referenced\n";
|
echo "# Logs line without bug referenced\n";
|
||||||
echo "sha1;subject\n";
|
echo "sha1;subject\n";
|
||||||
foreach ($aLogLineNoBug as $sLogLine) {
|
foreach ($aLogLineNoBug as $sLogLine) {
|
||||||
echo "$sLogLine\n";
|
echo ReplaceGitmojis($sLogLine)."\n";
|
||||||
}
|
}
|
||||||
|
|||||||
589
.make/release/gitmojis.json
Normal file
589
.make/release/gitmojis.json
Normal file
@@ -0,0 +1,589 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://gitmoji.dev/api/gitmojis/schema",
|
||||||
|
"gitmojis": [
|
||||||
|
{
|
||||||
|
"emoji": "🎨",
|
||||||
|
"entity": "🎨",
|
||||||
|
"code": ":art:",
|
||||||
|
"description": "Improve structure / format of the code.",
|
||||||
|
"name": "art",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "⚡️",
|
||||||
|
"entity": "⚡",
|
||||||
|
"code": ":zap:",
|
||||||
|
"description": "Improve performance.",
|
||||||
|
"name": "zap",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🔥",
|
||||||
|
"entity": "🔥",
|
||||||
|
"code": ":fire:",
|
||||||
|
"description": "Remove code or files.",
|
||||||
|
"name": "fire",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🐛",
|
||||||
|
"entity": "🐛",
|
||||||
|
"code": ":bug:",
|
||||||
|
"description": "Fix a bug.",
|
||||||
|
"name": "bug",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🚑️",
|
||||||
|
"entity": "🚑",
|
||||||
|
"code": ":ambulance:",
|
||||||
|
"description": "Critical hotfix.",
|
||||||
|
"name": "ambulance",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "✨",
|
||||||
|
"entity": "✨",
|
||||||
|
"code": ":sparkles:",
|
||||||
|
"description": "Introduce new features.",
|
||||||
|
"name": "sparkles",
|
||||||
|
"semver": "minor"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "📝",
|
||||||
|
"entity": "📝",
|
||||||
|
"code": ":memo:",
|
||||||
|
"description": "Add or update documentation.",
|
||||||
|
"name": "memo",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🚀",
|
||||||
|
"entity": "🚀",
|
||||||
|
"code": ":rocket:",
|
||||||
|
"description": "Deploy stuff.",
|
||||||
|
"name": "rocket",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "💄",
|
||||||
|
"entity": "&#ff99cc;",
|
||||||
|
"code": ":lipstick:",
|
||||||
|
"description": "Add or update the UI and style files.",
|
||||||
|
"name": "lipstick",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🎉",
|
||||||
|
"entity": "🎉",
|
||||||
|
"code": ":tada:",
|
||||||
|
"description": "Begin a project.",
|
||||||
|
"name": "tada",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "✅",
|
||||||
|
"entity": "✅",
|
||||||
|
"code": ":white_check_mark:",
|
||||||
|
"description": "Add, update, or pass tests.",
|
||||||
|
"name": "white-check-mark",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🔒️",
|
||||||
|
"entity": "🔒",
|
||||||
|
"code": ":lock:",
|
||||||
|
"description": "Fix security or privacy issues.",
|
||||||
|
"name": "lock",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🔐",
|
||||||
|
"entity": "🔐",
|
||||||
|
"code": ":closed_lock_with_key:",
|
||||||
|
"description": "Add or update secrets.",
|
||||||
|
"name": "closed-lock-with-key",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🔖",
|
||||||
|
"entity": "🔖",
|
||||||
|
"code": ":bookmark:",
|
||||||
|
"description": "Release / Version tags.",
|
||||||
|
"name": "bookmark",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🚨",
|
||||||
|
"entity": "🚨",
|
||||||
|
"code": ":rotating_light:",
|
||||||
|
"description": "Fix compiler / linter warnings.",
|
||||||
|
"name": "rotating-light",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🚧",
|
||||||
|
"entity": "🚧",
|
||||||
|
"code": ":construction:",
|
||||||
|
"description": "Work in progress.",
|
||||||
|
"name": "construction",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "💚",
|
||||||
|
"entity": "💚",
|
||||||
|
"code": ":green_heart:",
|
||||||
|
"description": "Fix CI Build.",
|
||||||
|
"name": "green-heart",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "⬇️",
|
||||||
|
"entity": "⬇️",
|
||||||
|
"code": ":arrow_down:",
|
||||||
|
"description": "Downgrade dependencies.",
|
||||||
|
"name": "arrow-down",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "⬆️",
|
||||||
|
"entity": "⬆️",
|
||||||
|
"code": ":arrow_up:",
|
||||||
|
"description": "Upgrade dependencies.",
|
||||||
|
"name": "arrow-up",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "📌",
|
||||||
|
"entity": "📌",
|
||||||
|
"code": ":pushpin:",
|
||||||
|
"description": "Pin dependencies to specific versions.",
|
||||||
|
"name": "pushpin",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "👷",
|
||||||
|
"entity": "👷",
|
||||||
|
"code": ":construction_worker:",
|
||||||
|
"description": "Add or update CI build system.",
|
||||||
|
"name": "construction-worker",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "📈",
|
||||||
|
"entity": "📈",
|
||||||
|
"code": ":chart_with_upwards_trend:",
|
||||||
|
"description": "Add or update analytics or track code.",
|
||||||
|
"name": "chart-with-upwards-trend",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "♻️",
|
||||||
|
"entity": "♻",
|
||||||
|
"code": ":recycle:",
|
||||||
|
"description": "Refactor code.",
|
||||||
|
"name": "recycle",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "➕",
|
||||||
|
"entity": "➕",
|
||||||
|
"code": ":heavy_plus_sign:",
|
||||||
|
"description": "Add a dependency.",
|
||||||
|
"name": "heavy-plus-sign",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "➖",
|
||||||
|
"entity": "➖",
|
||||||
|
"code": ":heavy_minus_sign:",
|
||||||
|
"description": "Remove a dependency.",
|
||||||
|
"name": "heavy-minus-sign",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🔧",
|
||||||
|
"entity": "🔧",
|
||||||
|
"code": ":wrench:",
|
||||||
|
"description": "Add or update configuration files.",
|
||||||
|
"name": "wrench",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🔨",
|
||||||
|
"entity": "🔨",
|
||||||
|
"code": ":hammer:",
|
||||||
|
"description": "Add or update development scripts.",
|
||||||
|
"name": "hammer",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🌐",
|
||||||
|
"entity": "🌐",
|
||||||
|
"code": ":globe_with_meridians:",
|
||||||
|
"description": "Internationalization and localization.",
|
||||||
|
"name": "globe-with-meridians",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "✏️",
|
||||||
|
"entity": "",
|
||||||
|
"code": ":pencil2:",
|
||||||
|
"description": "Fix typos.",
|
||||||
|
"name": "pencil2",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "💩",
|
||||||
|
"entity": "",
|
||||||
|
"code": ":poop:",
|
||||||
|
"description": "Write bad code that needs to be improved.",
|
||||||
|
"name": "poop",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "⏪️",
|
||||||
|
"entity": "⏪",
|
||||||
|
"code": ":rewind:",
|
||||||
|
"description": "Revert changes.",
|
||||||
|
"name": "rewind",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🔀",
|
||||||
|
"entity": "🔀",
|
||||||
|
"code": ":twisted_rightwards_arrows:",
|
||||||
|
"description": "Merge branches.",
|
||||||
|
"name": "twisted-rightwards-arrows",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "📦️",
|
||||||
|
"entity": "F4E6;",
|
||||||
|
"code": ":package:",
|
||||||
|
"description": "Add or update compiled files or packages.",
|
||||||
|
"name": "package",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "👽️",
|
||||||
|
"entity": "F47D;",
|
||||||
|
"code": ":alien:",
|
||||||
|
"description": "Update code due to external API changes.",
|
||||||
|
"name": "alien",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🚚",
|
||||||
|
"entity": "F69A;",
|
||||||
|
"code": ":truck:",
|
||||||
|
"description": "Move or rename resources (e.g.: files, paths, routes).",
|
||||||
|
"name": "truck",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "📄",
|
||||||
|
"entity": "F4C4;",
|
||||||
|
"code": ":page_facing_up:",
|
||||||
|
"description": "Add or update license.",
|
||||||
|
"name": "page-facing-up",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "💥",
|
||||||
|
"entity": "💥",
|
||||||
|
"code": ":boom:",
|
||||||
|
"description": "Introduce breaking changes.",
|
||||||
|
"name": "boom",
|
||||||
|
"semver": "major"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🍱",
|
||||||
|
"entity": "F371",
|
||||||
|
"code": ":bento:",
|
||||||
|
"description": "Add or update assets.",
|
||||||
|
"name": "bento",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "♿️",
|
||||||
|
"entity": "♿",
|
||||||
|
"code": ":wheelchair:",
|
||||||
|
"description": "Improve accessibility.",
|
||||||
|
"name": "wheelchair",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "💡",
|
||||||
|
"entity": "💡",
|
||||||
|
"code": ":bulb:",
|
||||||
|
"description": "Add or update comments in source code.",
|
||||||
|
"name": "bulb",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🍻",
|
||||||
|
"entity": "🍻",
|
||||||
|
"code": ":beers:",
|
||||||
|
"description": "Write code drunkenly.",
|
||||||
|
"name": "beers",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "💬",
|
||||||
|
"entity": "💬",
|
||||||
|
"code": ":speech_balloon:",
|
||||||
|
"description": "Add or update text and literals.",
|
||||||
|
"name": "speech-balloon",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🗃️",
|
||||||
|
"entity": "🗃",
|
||||||
|
"code": ":card_file_box:",
|
||||||
|
"description": "Perform database related changes.",
|
||||||
|
"name": "card-file-box",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🔊",
|
||||||
|
"entity": "🔊",
|
||||||
|
"code": ":loud_sound:",
|
||||||
|
"description": "Add or update logs.",
|
||||||
|
"name": "loud-sound",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🔇",
|
||||||
|
"entity": "🔇",
|
||||||
|
"code": ":mute:",
|
||||||
|
"description": "Remove logs.",
|
||||||
|
"name": "mute",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "👥",
|
||||||
|
"entity": "👥",
|
||||||
|
"code": ":busts_in_silhouette:",
|
||||||
|
"description": "Add or update contributor(s).",
|
||||||
|
"name": "busts-in-silhouette",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🚸",
|
||||||
|
"entity": "🚸",
|
||||||
|
"code": ":children_crossing:",
|
||||||
|
"description": "Improve user experience / usability.",
|
||||||
|
"name": "children-crossing",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🏗️",
|
||||||
|
"entity": "f3d7;",
|
||||||
|
"code": ":building_construction:",
|
||||||
|
"description": "Make architectural changes.",
|
||||||
|
"name": "building-construction",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "📱",
|
||||||
|
"entity": "📱",
|
||||||
|
"code": ":iphone:",
|
||||||
|
"description": "Work on responsive design.",
|
||||||
|
"name": "iphone",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🤡",
|
||||||
|
"entity": "🤡",
|
||||||
|
"code": ":clown_face:",
|
||||||
|
"description": "Mock things.",
|
||||||
|
"name": "clown-face",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🥚",
|
||||||
|
"entity": "🥚",
|
||||||
|
"code": ":egg:",
|
||||||
|
"description": "Add or update an easter egg.",
|
||||||
|
"name": "egg",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🙈",
|
||||||
|
"entity": "bdfe7;",
|
||||||
|
"code": ":see_no_evil:",
|
||||||
|
"description": "Add or update a .gitignore file.",
|
||||||
|
"name": "see-no-evil",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "📸",
|
||||||
|
"entity": "📸",
|
||||||
|
"code": ":camera_flash:",
|
||||||
|
"description": "Add or update snapshots.",
|
||||||
|
"name": "camera-flash",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "⚗️",
|
||||||
|
"entity": "⚗",
|
||||||
|
"code": ":alembic:",
|
||||||
|
"description": "Perform experiments.",
|
||||||
|
"name": "alembic",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🔍️",
|
||||||
|
"entity": "🔍",
|
||||||
|
"code": ":mag:",
|
||||||
|
"description": "Improve SEO.",
|
||||||
|
"name": "mag",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🏷️",
|
||||||
|
"entity": "🏷",
|
||||||
|
"code": ":label:",
|
||||||
|
"description": "Add or update types.",
|
||||||
|
"name": "label",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🌱",
|
||||||
|
"entity": "🌱",
|
||||||
|
"code": ":seedling:",
|
||||||
|
"description": "Add or update seed files.",
|
||||||
|
"name": "seedling",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🚩",
|
||||||
|
"entity": "🚩",
|
||||||
|
"code": ":triangular_flag_on_post:",
|
||||||
|
"description": "Add, update, or remove feature flags.",
|
||||||
|
"name": "triangular-flag-on-post",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🥅",
|
||||||
|
"entity": "🥅",
|
||||||
|
"code": ":goal_net:",
|
||||||
|
"description": "Catch errors.",
|
||||||
|
"name": "goal-net",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "💫",
|
||||||
|
"entity": "💫",
|
||||||
|
"code": ":dizzy:",
|
||||||
|
"description": "Add or update animations and transitions.",
|
||||||
|
"name": "dizzy",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🗑️",
|
||||||
|
"entity": "🗑",
|
||||||
|
"code": ":wastebasket:",
|
||||||
|
"description": "Deprecate code that needs to be cleaned up.",
|
||||||
|
"name": "wastebasket",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🛂",
|
||||||
|
"entity": "🛂",
|
||||||
|
"code": ":passport_control:",
|
||||||
|
"description": "Work on code related to authorization, roles and permissions.",
|
||||||
|
"name": "passport-control",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🩹",
|
||||||
|
"entity": "🩹",
|
||||||
|
"code": ":adhesive_bandage:",
|
||||||
|
"description": "Simple fix for a non-critical issue.",
|
||||||
|
"name": "adhesive-bandage",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🧐",
|
||||||
|
"entity": "🧐",
|
||||||
|
"code": ":monocle_face:",
|
||||||
|
"description": "Data exploration/inspection.",
|
||||||
|
"name": "monocle-face",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "⚰️",
|
||||||
|
"entity": "⚰",
|
||||||
|
"code": ":coffin:",
|
||||||
|
"description": "Remove dead code.",
|
||||||
|
"name": "coffin",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🧪",
|
||||||
|
"entity": "🧪",
|
||||||
|
"code": ":test_tube:",
|
||||||
|
"description": "Add a failing test.",
|
||||||
|
"name": "test-tube",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "👔",
|
||||||
|
"entity": "👔",
|
||||||
|
"code": ":necktie:",
|
||||||
|
"description": "Add or update business logic.",
|
||||||
|
"name": "necktie",
|
||||||
|
"semver": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🩺",
|
||||||
|
"entity": "🩺",
|
||||||
|
"code": ":stethoscope:",
|
||||||
|
"description": "Add or update healthcheck.",
|
||||||
|
"name": "stethoscope",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🧱",
|
||||||
|
"entity": "🧱",
|
||||||
|
"code": ":bricks:",
|
||||||
|
"description": "Infrastructure related changes.",
|
||||||
|
"name": "bricks",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🧑💻",
|
||||||
|
"entity": "🧑‍💻",
|
||||||
|
"code": ":technologist:",
|
||||||
|
"description": "Improve developer experience.",
|
||||||
|
"name": "technologist",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "💸",
|
||||||
|
"entity": "💸",
|
||||||
|
"code": ":money_with_wings:",
|
||||||
|
"description": "Add sponsorships or money related infrastructure.",
|
||||||
|
"name": "money-with-wings",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🧵",
|
||||||
|
"entity": "🧵",
|
||||||
|
"code": ":thread:",
|
||||||
|
"description": "Add or update code related to multithreading or concurrency.",
|
||||||
|
"name": "thread",
|
||||||
|
"semver": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emoji": "🦺",
|
||||||
|
"entity": "🦺",
|
||||||
|
"code": ":safety_vest:",
|
||||||
|
"description": "Add or update code related to validation.",
|
||||||
|
"name": "safety-vest",
|
||||||
|
"semver": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -140,7 +140,7 @@ When your code is working, please:
|
|||||||
* Pull request description: mind to add all the information useful to understand why you're suggesting this modification and anything necessary to dive into your work. Especially:
|
* Pull request description: mind to add all the information useful to understand why you're suggesting this modification and anything necessary to dive into your work. Especially:
|
||||||
- Bugfixes: exact steps to reproduce the bug (given/when/then), description of the bug cause and what solution is implemented
|
- Bugfixes: exact steps to reproduce the bug (given/when/then), description of the bug cause and what solution is implemented
|
||||||
- Enhancements: use cases, implementation details if needed
|
- Enhancements: use cases, implementation details if needed
|
||||||
* Mind to check the "[Allow edits from maintainers](https://docs.github.com/en/github-ae@latest/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork)" option !
|
* Mind to check the "[Allow edits from maintainers](https://docs.github.com/en/github-ae@latest/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork)" option ! (note that if you are working with an org fork, this option [won't be available](https://github.com/orgs/community/discussions/5634))
|
||||||
|
|
||||||
|
|
||||||
## 🙏 We are thankful
|
## 🙏 We are thankful
|
||||||
@@ -159,6 +159,6 @@ We have one sticker per contribution type. You might get multiple stickers with
|
|||||||
* Beta tester: Test and give feedback on beta releases
|
* Beta tester: Test and give feedback on beta releases
|
||||||
* Extension developer: Develop and publish an extension
|
* Extension developer: Develop and publish an extension
|
||||||
|
|
||||||
Here is the design of each stickers for year 2022:
|
Here is the design of each stickers for year 2024:
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
31
README.md
31
README.md
@@ -1,5 +1,9 @@
|
|||||||
<p align="center"><a href="https://www.combodo.com/itop-193" target="_blank">
|
<p align="center"><a href="https://combodo.com" target="_blank">
|
||||||
<img src="https://www.combodo.com/logos/logo-itop-baseline.svg" width=350>
|
<picture>
|
||||||
|
<source media="(prefers-color-scheme: dark)" srcset="/images/logos/logo-itop-baseline-light.svg">
|
||||||
|
<source media="(prefers-color-scheme: light)" srcset="/images/logos/logo-itop-baseline-dark.svg">
|
||||||
|
<img src="/images/logos/logo-itop-baseline-light.svg" width="350" alt="Logo iTop with baseline" />
|
||||||
|
</picture>
|
||||||
</a></p>
|
</a></p>
|
||||||
|
|
||||||
|
|
||||||
@@ -76,7 +80,9 @@ We would like to give a special thank you 🤗 to the people from the community
|
|||||||
|
|
||||||
### Names
|
### Names
|
||||||
|
|
||||||
|
- Al Hallak, Amr (a.k.a [@v4yne1](https://github.com/v4yne1))
|
||||||
- Alves, David
|
- Alves, David
|
||||||
|
- Audon, Florian
|
||||||
- Beck, Pedro
|
- Beck, Pedro
|
||||||
- Beer, Christian (a.k.a [@ChristianBeer](https://www.github.com/ChristianBeer))
|
- Beer, Christian (a.k.a [@ChristianBeer](https://www.github.com/ChristianBeer))
|
||||||
- Bilger, Jean-François
|
- Bilger, Jean-François
|
||||||
@@ -87,30 +93,45 @@ We would like to give a special thank you 🤗 to the people from the community
|
|||||||
- Castro, Randall Badilla
|
- Castro, Randall Badilla
|
||||||
- Colantoni, Maria Laura
|
- Colantoni, Maria Laura
|
||||||
- Couronné, Guy
|
- Couronné, Guy
|
||||||
|
- Dejin, Bie (a.k.a [@bdejin](https://github.com/bdejin))
|
||||||
|
- Delicado, Elodie
|
||||||
- Dvořák, Lukáš
|
- Dvořák, Lukáš
|
||||||
- Goethals, Stefan
|
- Goethals, Stefan
|
||||||
|
- Giuva, Vincenzo Katriel (a.k.a [@DarkNight97boss](https://github.com/DarkNight97boss))
|
||||||
- Gumble, David
|
- Gumble, David
|
||||||
|
- Heloir, Arthur
|
||||||
|
- Janssens, Jelle (a.k.a [@janssensjelle](https://github.com/janssensjelle))
|
||||||
|
- Ji, Leeb (冀利斌) (a.k.a [@chileeb](https://github.com/chileeb))
|
||||||
- Kaltefleiter, Lars (a.k.a [@larhip](https://www.github.com/larhip))
|
- Kaltefleiter, Lars (a.k.a [@larhip](https://www.github.com/larhip))
|
||||||
- Khamit, Shamil
|
- Khamit, Shamil
|
||||||
- Kincel, Martin
|
- Kincel, Martin
|
||||||
- Konečný, Kamil
|
- Konečný, Kamil
|
||||||
- Kunin, Vladimir
|
- Kunin, Vladimir
|
||||||
- Lassiter, Dennis
|
- Lassiter, Denis (a.k.a [@delassiter](https://github.com/delassiter))
|
||||||
- Lazcano, Federico
|
- Lazcano, Federico
|
||||||
- Lucas, Jonathan
|
- Lucas, Jonathan
|
||||||
- Malik, Remie
|
- Malik, Remie
|
||||||
|
- Mantel, Ina
|
||||||
|
- Martin, Pierre (a.k.a [@Worty](https://github.com/worty-syn))
|
||||||
|
- Melchiorre, Romain
|
||||||
- Mindêllo de Andrade, Lucas (a.k.a [@rokam](https://www.github.com/rokam))
|
- Mindêllo de Andrade, Lucas (a.k.a [@rokam](https://www.github.com/rokam))
|
||||||
- Mozart de Oliveira, Eduardo (a.k.a [@eduardomozart](https://github.com/eduardomozart))
|
- Mozart de Oliveira, Eduardo (a.k.a [@eduardomozart](https://github.com/eduardomozart))
|
||||||
- Raenker, Martin
|
- Raenker, Martin
|
||||||
- Roháč, Richard (a.k.a [@RohacRichard](https://github.com/RohacRichard))
|
- Roháč, Richard (a.k.a [@RohacRichard](https://github.com/RohacRichard))
|
||||||
- Rosenke, Stephan
|
- Rosenke, Stephan
|
||||||
|
- Rossi, Tommaso (a.k.a [@tomrss](https://www.github.com/tomrss))
|
||||||
- Rudner, Björn (a.k.a [@rudnerbjoern](https://github.com/rudnerbjoern))
|
- Rudner, Björn (a.k.a [@rudnerbjoern](https://github.com/rudnerbjoern))
|
||||||
|
- Šafránek, Jaroslav (a.k.a [jkcinik](https://sourceforge.net/u/jkcinik/profile/) on SourceForge)
|
||||||
- Seki, Shoji
|
- Seki, Shoji
|
||||||
- Shilov, Vladimir
|
- Shilov, Vladimir
|
||||||
|
- Stetina, Pavel (a.k.a [@Stetinac](https://github.com/Stetinac))
|
||||||
- Stukalov, Ilya (a.k.a [@ilya](https://www.github.com/ilya-stukalov))
|
- Stukalov, Ilya (a.k.a [@ilya](https://www.github.com/ilya-stukalov))
|
||||||
- Tarjányi, Csaba (a.k.a [@tacsaby](https://github.com/tacsaby))
|
- Tarjányi, Csaba (a.k.a [@tacsaby](https://github.com/tacsaby))
|
||||||
|
- Toraya, Chairat (a.k.a [@Kyokito1412](https://github.com/Kyokito1412))
|
||||||
- Tulio, Marco
|
- Tulio, Marco
|
||||||
- Turrubiates, Miguel
|
- Turrubiates, Miguel
|
||||||
|
- Višnjić, Aldin (a.k.a[@viliald](https://github.com/viliald))
|
||||||
|
- Vlk, Karel (a.k.a [@vlk-charles](https://www.github.com/vlk-charles))
|
||||||
|
|
||||||
### Aliases
|
### Aliases
|
||||||
|
|
||||||
@@ -131,4 +152,6 @@ We would like to give a special thank you 🤗 to the people from the community
|
|||||||
- [ITOMIG](https://www.itomig.de/)
|
- [ITOMIG](https://www.itomig.de/)
|
||||||
- [Pimkie](https://www.pimkie.com/)
|
- [Pimkie](https://www.pimkie.com/)
|
||||||
- [Super-Visions](https://www.super-visions.com/)
|
- [Super-Visions](https://www.super-visions.com/)
|
||||||
|
- [Defence Tech Cyber Security - Malware Lab](https://github.com/DefenceTechSecurity)
|
||||||
|
- Orange Cyberdefense
|
||||||
|
- MipihSIB
|
||||||
|
|||||||
@@ -1,362 +0,0 @@
|
|||||||
<?php
|
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
|
||||||
//
|
|
||||||
// This file is part of iTop.
|
|
||||||
//
|
|
||||||
// iTop is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// iTop is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* UserRightsMatrix (User management Module)
|
|
||||||
*
|
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
class UserRightsMatrixClassGrant extends DBObject
|
|
||||||
{
|
|
||||||
public static function Init()
|
|
||||||
{
|
|
||||||
$aParams = array
|
|
||||||
(
|
|
||||||
"category" => "addon/userrights",
|
|
||||||
"key_type" => "autoincrement",
|
|
||||||
"name_attcode" => "",
|
|
||||||
"state_attcode" => "",
|
|
||||||
"reconc_keys" => array(),
|
|
||||||
"db_table" => "priv_ur_matrixclasses",
|
|
||||||
"db_key_field" => "id",
|
|
||||||
"db_finalclass_field" => "",
|
|
||||||
);
|
|
||||||
MetaModel::Init_Params($aParams);
|
|
||||||
//MetaModel::Init_InheritAttributes();
|
|
||||||
MetaModel::Init_AddAttribute(new AttributeExternalKey("userid", array("targetclass"=>"User", "jointype"=> "", "allowed_values"=>null, "sql"=>"userid", "is_null_allowed"=>false, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array())));
|
|
||||||
MetaModel::Init_AddAttribute(new AttributeExternalField("login", array("allowed_values"=>null, "extkey_attcode"=> 'userid', "target_attcode"=>"login")));
|
|
||||||
MetaModel::Init_AddAttribute(new AttributeString("class", array("allowed_values"=>null, "sql"=>"class", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
|
|
||||||
|
|
||||||
MetaModel::Init_AddAttribute(new AttributeString("action", array("allowed_values"=>null, "sql"=>"action", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
|
|
||||||
MetaModel::Init_AddAttribute(new AttributeEnum("permission", array("allowed_values"=>new ValueSetEnum('yes,no'), "sql"=>"permission", "default_value"=>"yes", "is_null_allowed"=>false, "depends_on"=>array())));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class UserRightsMatrixClassStimulusGrant extends DBObject
|
|
||||||
{
|
|
||||||
public static function Init()
|
|
||||||
{
|
|
||||||
$aParams = array
|
|
||||||
(
|
|
||||||
"category" => "addon/userrights",
|
|
||||||
"key_type" => "autoincrement",
|
|
||||||
"name_attcode" => "",
|
|
||||||
"state_attcode" => "",
|
|
||||||
"reconc_keys" => array(),
|
|
||||||
"db_table" => "priv_ur_matrixclassesstimulus",
|
|
||||||
"db_key_field" => "id",
|
|
||||||
"db_finalclass_field" => "",
|
|
||||||
);
|
|
||||||
MetaModel::Init_Params($aParams);
|
|
||||||
//MetaModel::Init_InheritAttributes();
|
|
||||||
MetaModel::Init_AddAttribute(new AttributeExternalKey("userid", array("targetclass"=>"User", "jointype"=> "", "allowed_values"=>null, "sql"=>"userid", "is_null_allowed"=>false, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array())));
|
|
||||||
MetaModel::Init_AddAttribute(new AttributeExternalField("login", array("allowed_values"=>null, "extkey_attcode"=> 'userid', "target_attcode"=>"login")));
|
|
||||||
MetaModel::Init_AddAttribute(new AttributeString("class", array("allowed_values"=>null, "sql"=>"class", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
|
|
||||||
|
|
||||||
MetaModel::Init_AddAttribute(new AttributeString("stimulus", array("allowed_values"=>null, "sql"=>"action", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
|
|
||||||
MetaModel::Init_AddAttribute(new AttributeEnum("permission", array("allowed_values"=>new ValueSetEnum('yes,no'), "sql"=>"permission", "default_value"=>"yes", "is_null_allowed"=>false, "depends_on"=>array())));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class UserRightsMatrixAttributeGrant extends DBObject
|
|
||||||
{
|
|
||||||
public static function Init()
|
|
||||||
{
|
|
||||||
$aParams = array
|
|
||||||
(
|
|
||||||
"category" => "addon/userrights",
|
|
||||||
"key_type" => "autoincrement",
|
|
||||||
"name_attcode" => "",
|
|
||||||
"state_attcode" => "",
|
|
||||||
"reconc_keys" => array(),
|
|
||||||
"db_table" => "priv_ur_matrixattributes",
|
|
||||||
"db_key_field" => "id",
|
|
||||||
"db_finalclass_field" => "",
|
|
||||||
);
|
|
||||||
MetaModel::Init_Params($aParams);
|
|
||||||
//MetaModel::Init_InheritAttributes();
|
|
||||||
MetaModel::Init_AddAttribute(new AttributeExternalKey("userid", array("targetclass"=>"User", "jointype"=> "", "allowed_values"=>null, "sql"=>"userid", "is_null_allowed"=>false, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array())));
|
|
||||||
MetaModel::Init_AddAttribute(new AttributeExternalField("login", array("allowed_values"=>null, "extkey_attcode"=> 'userid', "target_attcode"=>"login")));
|
|
||||||
MetaModel::Init_AddAttribute(new AttributeString("class", array("allowed_values"=>null, "sql"=>"class", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
|
|
||||||
MetaModel::Init_AddAttribute(new AttributeString("attcode", array("allowed_values"=>null, "sql"=>"attcode", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
|
|
||||||
|
|
||||||
MetaModel::Init_AddAttribute(new AttributeString("action", array("allowed_values"=>null, "sql"=>"action", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
|
|
||||||
MetaModel::Init_AddAttribute(new AttributeEnum("permission", array("allowed_values"=>new ValueSetEnum('yes,no'), "sql"=>"permission", "default_value"=>"yes", "is_null_allowed"=>false, "depends_on"=>array())));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class UserRightsMatrix extends UserRightsAddOnAPI
|
|
||||||
{
|
|
||||||
static public $m_aActionCodes = array(
|
|
||||||
UR_ACTION_READ => 'read',
|
|
||||||
UR_ACTION_MODIFY => 'modify',
|
|
||||||
UR_ACTION_DELETE => 'delete',
|
|
||||||
UR_ACTION_BULK_READ => 'bulk read',
|
|
||||||
UR_ACTION_BULK_MODIFY => 'bulk modify',
|
|
||||||
UR_ACTION_BULK_DELETE => 'bulk delete',
|
|
||||||
);
|
|
||||||
|
|
||||||
// Installation: create the very first user
|
|
||||||
public function CreateAdministrator($sAdminUser, $sAdminPwd, $sLanguage = 'EN US')
|
|
||||||
{
|
|
||||||
// Maybe we should check that no other user with userid == 0 exists
|
|
||||||
$oUser = new UserLocal();
|
|
||||||
$oUser->Set('login', $sAdminUser);
|
|
||||||
$oUser->Set('password', $sAdminPwd);
|
|
||||||
$oUser->Set('contactid', 1); // one is for root !
|
|
||||||
$oUser->Set('language', $sLanguage); // Language was chosen during the installation
|
|
||||||
|
|
||||||
// Now record the admin user object
|
|
||||||
$iUserId = $oUser->DBInsertNoReload();
|
|
||||||
$this->SetupUser($iUserId, true);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function IsAdministrator($oUser)
|
|
||||||
{
|
|
||||||
return ($oUser->GetKey() == 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function IsPortalUser($oUser)
|
|
||||||
{
|
|
||||||
return ($oUser->GetKey() == 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated - create a new module !
|
|
||||||
public function Setup()
|
|
||||||
{
|
|
||||||
// Users must be added manually
|
|
||||||
// This procedure will then update the matrix when a new user is found or a new class/attribute appears
|
|
||||||
$oUserSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT User"));
|
|
||||||
while ($oUser = $oUserSet->Fetch())
|
|
||||||
{
|
|
||||||
$this->SetupUser($oUser->GetKey());
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function SetupUser($iUserId, $bNewUser = false)
|
|
||||||
{
|
|
||||||
foreach(array('bizmodel', 'application', 'gui', 'core/cmdb') as $sCategory)
|
|
||||||
{
|
|
||||||
foreach (MetaModel::GetClasses($sCategory) as $sClass)
|
|
||||||
{
|
|
||||||
foreach (self::$m_aActionCodes as $iActionCode => $sAction)
|
|
||||||
{
|
|
||||||
if ($bNewUser)
|
|
||||||
{
|
|
||||||
$bAddCell = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT UserRightsMatrixClassGrant WHERE class = '$sClass' AND action = '$sAction' AND userid = $iUserId"));
|
|
||||||
$bAddCell = ($oSet->Count() < 1);
|
|
||||||
}
|
|
||||||
if ($bAddCell)
|
|
||||||
{
|
|
||||||
// Create a new entry
|
|
||||||
$oMyClassGrant = MetaModel::NewObject("UserRightsMatrixClassGrant");
|
|
||||||
$oMyClassGrant->Set("userid", $iUserId);
|
|
||||||
$oMyClassGrant->Set("class", $sClass);
|
|
||||||
$oMyClassGrant->Set("action", $sAction);
|
|
||||||
$oMyClassGrant->Set("permission", "yes");
|
|
||||||
$iId = $oMyClassGrant->DBInsertNoReload();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach (MetaModel::EnumStimuli($sClass) as $sStimulusCode => $oStimulus)
|
|
||||||
{
|
|
||||||
if ($bNewUser)
|
|
||||||
{
|
|
||||||
$bAddCell = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT UserRightsMatrixClassStimulusGrant WHERE class = '$sClass' AND stimulus = '$sStimulusCode' AND userid = $iUserId"));
|
|
||||||
$bAddCell = ($oSet->Count() < 1);
|
|
||||||
}
|
|
||||||
if ($bAddCell)
|
|
||||||
{
|
|
||||||
// Create a new entry
|
|
||||||
$oMyClassGrant = MetaModel::NewObject("UserRightsMatrixClassStimulusGrant");
|
|
||||||
$oMyClassGrant->Set("userid", $iUserId);
|
|
||||||
$oMyClassGrant->Set("class", $sClass);
|
|
||||||
$oMyClassGrant->Set("stimulus", $sStimulusCode);
|
|
||||||
$oMyClassGrant->Set("permission", "yes");
|
|
||||||
$iId = $oMyClassGrant->DBInsertNoReload();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach (MetaModel::GetAttributesList($sClass) as $sAttCode)
|
|
||||||
{
|
|
||||||
if ($bNewUser)
|
|
||||||
{
|
|
||||||
$bAddCell = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT UserRightsMatrixAttributeGrant WHERE class = '$sClass' AND attcode = '$sAttCode' AND userid = $iUserId"));
|
|
||||||
$bAddCell = ($oSet->Count() < 1);
|
|
||||||
}
|
|
||||||
if ($bAddCell)
|
|
||||||
{
|
|
||||||
foreach (array('read', 'modify') as $sAction)
|
|
||||||
{
|
|
||||||
// Create a new entry
|
|
||||||
$oMyAttGrant = MetaModel::NewObject("UserRightsMatrixAttributeGrant");
|
|
||||||
$oMyAttGrant->Set("userid", $iUserId);
|
|
||||||
$oMyAttGrant->Set("class", $sClass);
|
|
||||||
$oMyAttGrant->Set("attcode", $sAttCode);
|
|
||||||
$oMyAttGrant->Set("action", $sAction);
|
|
||||||
$oMyAttGrant->Set("permission", "yes");
|
|
||||||
$iId = $oMyAttGrant->DBInsertNoReload();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
// Create the "My Bookmarks" menu item (parent_id = 0, rank = 6)
|
|
||||||
if ($bNewUser)
|
|
||||||
{
|
|
||||||
$bAddMenu = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT menuNode WHERE type = 'user' AND parent_id = 0 AND user_id = $iUserId"));
|
|
||||||
$bAddMenu = ($oSet->Count() < 1);
|
|
||||||
}
|
|
||||||
if ($bAddMenu)
|
|
||||||
{
|
|
||||||
$oMenu = MetaModel::NewObject('menuNode');
|
|
||||||
$oMenu->Set('type', 'user');
|
|
||||||
$oMenu->Set('parent_id', 0); // It's a toplevel entry
|
|
||||||
$oMenu->Set('rank', 6); // Located just above the Admin Tools section (=7)
|
|
||||||
$oMenu->Set('name', 'My Bookmarks');
|
|
||||||
$oMenu->Set('label', 'My Favorite Items');
|
|
||||||
$oMenu->Set('hyperlink', 'UI.php');
|
|
||||||
$oMenu->Set('template', '<p></p><p></p><p style="text-align:center; font-family:Georgia, Times, serif; font-size:32px;">My bookmarks</p><p style="text-align:center; font-family:Georgia, Times, serif; font-size:14px;"><i>This section contains my most favorite search results</i></p>');
|
|
||||||
$oMenu->Set('user_id', $iUserId);
|
|
||||||
$oMenu->DBInsert();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function Init()
|
|
||||||
{
|
|
||||||
// Could be loaded in a shared memory (?)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function GetSelectFilter($oUser, $sClass, $aSettings = array())
|
|
||||||
{
|
|
||||||
$oNullFilter = new DBObjectSearch($sClass);
|
|
||||||
return $oNullFilter;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function IsActionAllowed($oUser, $sClass, $iActionCode, $oInstanceSet = null)
|
|
||||||
{
|
|
||||||
if (!array_key_exists($iActionCode, self::$m_aActionCodes))
|
|
||||||
{
|
|
||||||
return UR_ALLOWED_NO;
|
|
||||||
}
|
|
||||||
$sAction = self::$m_aActionCodes[$iActionCode];
|
|
||||||
|
|
||||||
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT UserRightsMatrixClassGrant WHERE class = '$sClass' AND action = '$sAction' AND userid = '{$oUser->GetKey()}'"));
|
|
||||||
if ($oSet->Count() < 1)
|
|
||||||
{
|
|
||||||
return UR_ALLOWED_NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
$oGrantRecord = $oSet->Fetch();
|
|
||||||
switch ($oGrantRecord->Get('permission'))
|
|
||||||
{
|
|
||||||
case 'yes':
|
|
||||||
$iRetCode = UR_ALLOWED_YES;
|
|
||||||
break;
|
|
||||||
case 'no':
|
|
||||||
default:
|
|
||||||
$iRetCode = UR_ALLOWED_NO;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return $iRetCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function IsActionAllowedOnAttribute($oUser, $sClass, $sAttCode, $iActionCode, $oInstanceSet = null)
|
|
||||||
{
|
|
||||||
if (!array_key_exists($iActionCode, self::$m_aActionCodes))
|
|
||||||
{
|
|
||||||
return UR_ALLOWED_NO;
|
|
||||||
}
|
|
||||||
$sAction = self::$m_aActionCodes[$iActionCode];
|
|
||||||
|
|
||||||
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT UserRightsMatrixAttributeGrant WHERE class = '$sClass' AND attcode = '$sAttCode' AND action = '$sAction' AND userid = '{$oUser->GetKey()}'"));
|
|
||||||
if ($oSet->Count() < 1)
|
|
||||||
{
|
|
||||||
return UR_ALLOWED_NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
$oGrantRecord = $oSet->Fetch();
|
|
||||||
switch ($oGrantRecord->Get('permission'))
|
|
||||||
{
|
|
||||||
case 'yes':
|
|
||||||
$iRetCode = UR_ALLOWED_YES;
|
|
||||||
break;
|
|
||||||
case 'no':
|
|
||||||
default:
|
|
||||||
$iRetCode = UR_ALLOWED_NO;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return $iRetCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function IsStimulusAllowed($oUser, $sClass, $sStimulusCode, $oInstanceSet = null)
|
|
||||||
{
|
|
||||||
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT UserRightsMatrixClassStimulusGrant WHERE class = '$sClass' AND stimulus = '$sStimulusCode' AND userid = '{$oUser->GetKey()}'"));
|
|
||||||
if ($oSet->Count() < 1)
|
|
||||||
{
|
|
||||||
return UR_ALLOWED_NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
$oGrantRecord = $oSet->Fetch();
|
|
||||||
switch ($oGrantRecord->Get('permission'))
|
|
||||||
{
|
|
||||||
case 'yes':
|
|
||||||
$iRetCode = UR_ALLOWED_YES;
|
|
||||||
break;
|
|
||||||
case 'no':
|
|
||||||
default:
|
|
||||||
$iRetCode = UR_ALLOWED_NO;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return $iRetCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function FlushPrivileges()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
UserRights::SelectModule('UserRightsMatrix');
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
<?php
|
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
|
||||||
//
|
|
||||||
// This file is part of iTop.
|
|
||||||
//
|
|
||||||
// iTop is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// iTop is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* UserRightsNull
|
|
||||||
* User management Module - say Yeah! to everything
|
|
||||||
*
|
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
class UserRightsNull extends UserRightsAddOnAPI
|
|
||||||
{
|
|
||||||
// Installation: create the very first user
|
|
||||||
public function CreateAdministrator($sAdminUser, $sAdminPwd, $sLanguage = 'EN US')
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function IsAdministrator($oUser)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function IsPortalUser($oUser)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function Init()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function GetSelectFilter($oUser, $sClass, $aSettings = array())
|
|
||||||
{
|
|
||||||
$oNullFilter = new DBObjectSearch($sClass);
|
|
||||||
return $oNullFilter;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function IsActionAllowed($oUser, $sClass, $iActionCode, $oInstanceSet = null)
|
|
||||||
{
|
|
||||||
return UR_ALLOWED_YES;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function IsStimulusAllowed($oUser, $sClass, $sStimulusCode, $oInstanceSet = null)
|
|
||||||
{
|
|
||||||
return UR_ALLOWED_YES;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function IsActionAllowedOnAttribute($oUser, $sClass, $sAttCode, $iActionCode, $oInstanceSet = null)
|
|
||||||
{
|
|
||||||
return UR_ALLOWED_YES;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function FlushPrivileges()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
UserRights::SelectModule('UserRightsNull');
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use Combodo\iTop\Application\WebPage\WebPage;
|
||||||
|
|
||||||
define('ADMIN_PROFILE_NAME', 'Administrator');
|
define('ADMIN_PROFILE_NAME', 'Administrator');
|
||||||
define('PORTAL_PROFILE_NAME', 'Portal user');
|
define('PORTAL_PROFILE_NAME', 'Portal user');
|
||||||
|
|
||||||
@@ -823,49 +825,38 @@ class UserRightsProfile extends UserRightsAddOnAPI
|
|||||||
{
|
{
|
||||||
// We are protected by GetSelectFilter: the object set contains objects allowed or shared for reading
|
// We are protected by GetSelectFilter: the object set contains objects allowed or shared for reading
|
||||||
// We have to answer NO for objects shared for reading purposes
|
// We have to answer NO for objects shared for reading purposes
|
||||||
if (self::HasSharing())
|
if (self::HasSharing() && SharedObject::GetSharedClassProperties($sClass)) {
|
||||||
{
|
// This class is shared, GetSelectFilter may allow some objects for read only
|
||||||
$aClassProps = SharedObject::GetSharedClassProperties($sClass);
|
// But currently we are checking whether the objects might be written...
|
||||||
if ($aClassProps)
|
// Let's exclude the objects based on the relevant criteria
|
||||||
{
|
|
||||||
// This class is shared, GetSelectFilter may allow some objects for read only
|
|
||||||
// But currently we are checking wether the objects might be written...
|
|
||||||
// Let's exclude the objects based on the relevant criteria
|
|
||||||
|
|
||||||
$sOrgAttCode = self::GetOwnerOrganizationAttCode($sClass);
|
// Use $oInstanceSet only if sClass is the main class
|
||||||
if (!is_null($sOrgAttCode))
|
if (!is_a($oInstanceSet->GetClass(), $sClass, true)) {
|
||||||
{
|
/** @var \DBObjectSet $oInstanceSet */
|
||||||
$aUserOrgs = $this->GetUserOrgs($oUser, $sClass);
|
throw new CoreException(__FUNCTION__.': Expecting object set to be of class '.$sClass.' but it is of class '.$oInstanceSet->GetClass(), ['OQL_Query' => $oInstanceSet->GetFilter()->ToOQL(), 'classes' => $oInstanceSet->GetSelectedClasses()]);
|
||||||
if (!is_null($aUserOrgs) && count($aUserOrgs) > 0)
|
}
|
||||||
{
|
$sOrgAttCode = self::GetOwnerOrganizationAttCode($sClass);
|
||||||
$iCountNO = 0;
|
if (!is_null($sOrgAttCode)) {
|
||||||
$iCountYES = 0;
|
$aUserOrgs = $this->GetUserOrgs($oUser, $sClass);
|
||||||
$oInstanceSet->Rewind();
|
if (!is_null($aUserOrgs) && count($aUserOrgs) > 0) {
|
||||||
while($oObject = $oInstanceSet->Fetch())
|
$iCountNO = 0;
|
||||||
{
|
$iCountYES = 0;
|
||||||
$iOrg = $oObject->Get($sOrgAttCode);
|
$oInstanceSet->Rewind();
|
||||||
if (in_array($iOrg, $aUserOrgs))
|
while ($oObject = $oInstanceSet->Fetch()) {
|
||||||
{
|
$iOrg = $oObject->Get($sOrgAttCode);
|
||||||
$iCountYES++;
|
if (in_array($iOrg, $aUserOrgs)) {
|
||||||
}
|
$iCountYES++;
|
||||||
else
|
} else {
|
||||||
{
|
$iCountNO++;
|
||||||
$iCountNO++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($iCountNO == 0)
|
|
||||||
{
|
|
||||||
$iPermission = UR_ALLOWED_YES;
|
|
||||||
}
|
|
||||||
elseif ($iCountYES == 0)
|
|
||||||
{
|
|
||||||
$iPermission = UR_ALLOWED_NO;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$iPermission = UR_ALLOWED_DEPENDS;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($iCountNO == 0) {
|
||||||
|
$iPermission = UR_ALLOWED_YES;
|
||||||
|
} elseif ($iCountYES == 0) {
|
||||||
|
$iPermission = UR_ALLOWED_NO;
|
||||||
|
} else {
|
||||||
|
$iPermission = UR_ALLOWED_DEPENDS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -980,4 +971,3 @@ class UserRightsProfile extends UserRightsAddOnAPI
|
|||||||
|
|
||||||
UserRights::SelectModule('UserRightsProfile');
|
UserRights::SelectModule('UserRightsProfile');
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
29
app.php
Normal file
29
app.php
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Copyright (C) 2013-2024 Combodo SAS
|
||||||
|
*
|
||||||
|
* This file is part of iTop.
|
||||||
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Combodo\iTop\Kernel;
|
||||||
|
|
||||||
|
require_once __DIR__.'/lib/autoload_runtime.php';
|
||||||
|
|
||||||
|
require_once('approot.inc.php');
|
||||||
|
require_once('application/startup.inc.php');
|
||||||
|
|
||||||
|
return function (array $context) {
|
||||||
|
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
|
||||||
|
};
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,331 +0,0 @@
|
|||||||
<?php
|
|
||||||
namespace Html2Text;
|
|
||||||
|
|
||||||
if (!function_exists('mb_split'))
|
|
||||||
{
|
|
||||||
function mb_split($pattern, $subject, $limit = -1)
|
|
||||||
{
|
|
||||||
return preg_split('/'.$pattern.'/', $subject, $limit);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Replace all occurrences of the search string with the replacement string.
|
|
||||||
*
|
|
||||||
* @author Sean Murphy <sean@iamseanmurphy.com>
|
|
||||||
* @copyright Copyright 2012 Sean Murphy. All rights reserved.
|
|
||||||
* @license http://creativecommons.org/publicdomain/zero/1.0/
|
|
||||||
* @link http://php.net/manual/function.str-replace.php
|
|
||||||
*
|
|
||||||
* @param mixed $search
|
|
||||||
* @param mixed $replace
|
|
||||||
* @param mixed $subject
|
|
||||||
* @param int $count
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
function mb_str_replace($search, $replace, $subject, &$count = 0) {
|
|
||||||
if (!is_array($subject)) {
|
|
||||||
// Normalize $search and $replace so they are both arrays of the same length
|
|
||||||
$searches = is_array($search) ? array_values($search) : array($search);
|
|
||||||
$replacements = is_array($replace) ? array_values($replace) : array($replace);
|
|
||||||
$replacements = array_pad($replacements, count($searches), '');
|
|
||||||
foreach ($searches as $key => $search) {
|
|
||||||
$parts = mb_split(preg_quote($search), $subject);
|
|
||||||
if (is_array($parts))
|
|
||||||
{
|
|
||||||
$count += count($parts) - 1;
|
|
||||||
$subject = implode($replacements[$key], $parts);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Call mb_str_replace for each subject in array, recursively
|
|
||||||
foreach ($subject as $key => $value) {
|
|
||||||
$subject[$key] = mb_str_replace($search, $replace, $value, $count);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $subject;
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* Copyright (c) 2010 Jevon Wright and others.
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
|
||||||
*
|
|
||||||
* or
|
|
||||||
*
|
|
||||||
* LGPL which is available at http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Jevon Wright - initial API and implementation
|
|
||||||
* Denis Flaven - some fixes for properly handling UTF-8 characters
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
class Html2Text {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tries to convert the given HTML into a plain text format - best suited for
|
|
||||||
* e-mail display, etc.
|
|
||||||
*
|
|
||||||
* <p>In particular, it tries to maintain the following features:
|
|
||||||
* <ul>
|
|
||||||
* <li>Links are maintained, with the 'href' copied over
|
|
||||||
* <li>Information in the <head> is lost
|
|
||||||
* </ul>
|
|
||||||
*
|
|
||||||
* @param string html the input HTML
|
|
||||||
* @return string the HTML converted, as best as possible, to text
|
|
||||||
* @throws Html2TextException if the HTML could not be loaded as a {@link DOMDocument}
|
|
||||||
*/
|
|
||||||
static function convert($html) {
|
|
||||||
// replace with spaces
|
|
||||||
|
|
||||||
$html = str_replace(" ", " ", $html);
|
|
||||||
$html = mb_str_replace("\xc2\xa0", " ", $html); // DO NOT USE str_replace since it breaks the "à" character which is \xc3 \xa0 in UTF-8
|
|
||||||
|
|
||||||
$html = static::fixNewlines($html);
|
|
||||||
|
|
||||||
$doc = new \DOMDocument();
|
|
||||||
if (!@$doc->loadHTML('<?xml encoding="UTF-8">'.$html)) // Forces the UTF-8 character set for HTML fragments
|
|
||||||
{
|
|
||||||
throw new Html2TextException("Could not load HTML - badly formed?", $html);
|
|
||||||
}
|
|
||||||
|
|
||||||
$output = static::iterateOverNode($doc);
|
|
||||||
|
|
||||||
// remove leading and trailing spaces on each line
|
|
||||||
$output = preg_replace("/[ \t]*\n[ \t]*/im", "\n", $output);
|
|
||||||
$output = preg_replace("/ *\t */im", "\t", $output);
|
|
||||||
|
|
||||||
// remove unnecessary empty lines
|
|
||||||
$output = preg_replace("/\n\n\n*/im", "\n\n", $output);
|
|
||||||
|
|
||||||
// remove leading and trailing whitespace
|
|
||||||
$output = trim($output);
|
|
||||||
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unify newlines; in particular, \r\n becomes \n, and
|
|
||||||
* then \r becomes \n. This means that all newlines (Unix, Windows, Mac)
|
|
||||||
* all become \ns.
|
|
||||||
*
|
|
||||||
* @param string text text with any number of \r, \r\n and \n combinations
|
|
||||||
* @return string the fixed text
|
|
||||||
*/
|
|
||||||
static function fixNewlines($text) {
|
|
||||||
// replace \r\n to \n
|
|
||||||
$text = str_replace("\r\n", "\n", $text);
|
|
||||||
// remove \rs
|
|
||||||
$text = str_replace("\r", "\n", $text);
|
|
||||||
|
|
||||||
return $text;
|
|
||||||
}
|
|
||||||
|
|
||||||
static function nextChildName($node) {
|
|
||||||
// get the next child
|
|
||||||
$nextNode = $node->nextSibling;
|
|
||||||
while ($nextNode != null) {
|
|
||||||
if ($nextNode instanceof \DOMElement) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$nextNode = $nextNode->nextSibling;
|
|
||||||
}
|
|
||||||
$nextName = null;
|
|
||||||
if ($nextNode instanceof \DOMElement && $nextNode != null) {
|
|
||||||
$nextName = strtolower($nextNode->nodeName);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $nextName;
|
|
||||||
}
|
|
||||||
|
|
||||||
static function prevChildName($node) {
|
|
||||||
// get the previous child
|
|
||||||
$nextNode = $node->previousSibling;
|
|
||||||
while ($nextNode != null) {
|
|
||||||
if ($nextNode instanceof \DOMElement) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$nextNode = $nextNode->previousSibling;
|
|
||||||
}
|
|
||||||
$nextName = null;
|
|
||||||
if ($nextNode instanceof \DOMElement && $nextNode != null) {
|
|
||||||
$nextName = strtolower($nextNode->nodeName);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $nextName;
|
|
||||||
}
|
|
||||||
|
|
||||||
static function iterateOverNode($node) {
|
|
||||||
if ($node instanceof \DOMText) {
|
|
||||||
// Replace whitespace characters with a space (equivilant to \s)
|
|
||||||
return preg_replace("/[\\t\\n\\f\\r ]+/im", " ", $node->wholeText);
|
|
||||||
}
|
|
||||||
if ($node instanceof \DOMDocumentType) {
|
|
||||||
// ignore
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
$nextName = static::nextChildName($node);
|
|
||||||
$prevName = static::prevChildName($node);
|
|
||||||
|
|
||||||
$name = strtolower($node->nodeName);
|
|
||||||
|
|
||||||
// start whitespace
|
|
||||||
switch ($name) {
|
|
||||||
case "hr":
|
|
||||||
return "---------------------------------------------------------------\n";
|
|
||||||
|
|
||||||
case "style":
|
|
||||||
case "head":
|
|
||||||
case "title":
|
|
||||||
case "meta":
|
|
||||||
case "script":
|
|
||||||
// ignore these tags
|
|
||||||
return "";
|
|
||||||
|
|
||||||
case "h1":
|
|
||||||
case "h2":
|
|
||||||
case "h3":
|
|
||||||
case "h4":
|
|
||||||
case "h5":
|
|
||||||
case "h6":
|
|
||||||
case "ol":
|
|
||||||
case "ul":
|
|
||||||
// add two newlines, second line is added below
|
|
||||||
$output = "\n";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "td":
|
|
||||||
case "th":
|
|
||||||
// add tab char to separate table fields
|
|
||||||
$output = "\t";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "tr":
|
|
||||||
case "p":
|
|
||||||
case "div":
|
|
||||||
// add one line
|
|
||||||
$output = "\n";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "li":
|
|
||||||
$output = "- ";
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
// print out contents of unknown tags
|
|
||||||
$output = "";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// debug
|
|
||||||
//$output .= "[$name,$nextName]";
|
|
||||||
|
|
||||||
if (isset($node->childNodes)) {
|
|
||||||
for ($i = 0; $i < $node->childNodes->length; $i++) {
|
|
||||||
$n = $node->childNodes->item($i);
|
|
||||||
|
|
||||||
$text = static::iterateOverNode($n);
|
|
||||||
|
|
||||||
$output .= $text;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// end whitespace
|
|
||||||
switch ($name) {
|
|
||||||
case "h1":
|
|
||||||
case "h2":
|
|
||||||
case "h3":
|
|
||||||
case "h4":
|
|
||||||
case "h5":
|
|
||||||
case "h6":
|
|
||||||
$output .= "\n";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "p":
|
|
||||||
case "br":
|
|
||||||
// add one line
|
|
||||||
if ($nextName != "div")
|
|
||||||
$output .= "\n";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "div":
|
|
||||||
// add one line only if the next child isn't a div
|
|
||||||
if ($nextName != "div" && $nextName != null)
|
|
||||||
$output .= "\n";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "a":
|
|
||||||
// links are returned in [text](link) format
|
|
||||||
$href = $node->getAttribute("href");
|
|
||||||
|
|
||||||
$output = trim($output);
|
|
||||||
|
|
||||||
// remove double [[ ]] s from linking images
|
|
||||||
if (substr($output, 0, 1) == "[" && substr($output, -1) == "]") {
|
|
||||||
$output = substr($output, 1, strlen($output) - 2);
|
|
||||||
|
|
||||||
// for linking images, the title of the <a> overrides the title of the <img>
|
|
||||||
if ($node->getAttribute("title")) {
|
|
||||||
$output = $node->getAttribute("title");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// if there is no link text, but a title attr
|
|
||||||
if (!$output && $node->getAttribute("title")) {
|
|
||||||
$output = $node->getAttribute("title");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($href == null) {
|
|
||||||
// it doesn't link anywhere
|
|
||||||
if ($node->getAttribute("name") != null) {
|
|
||||||
$output = "[$output]";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if ($href == $output || $href == "mailto:$output" || $href == "http://$output" || $href == "https://$output") {
|
|
||||||
// link to the same address: just use link
|
|
||||||
$output;
|
|
||||||
} else {
|
|
||||||
// replace it
|
|
||||||
if ($output) {
|
|
||||||
$output = "[$output]($href)";
|
|
||||||
} else {
|
|
||||||
// empty string
|
|
||||||
$output = $href;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// does the next node require additional whitespace?
|
|
||||||
switch ($nextName) {
|
|
||||||
case "h1": case "h2": case "h3": case "h4": case "h5": case "h6":
|
|
||||||
$output .= "\n";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "img":
|
|
||||||
if ($node->getAttribute("title")) {
|
|
||||||
$output = "[" . $node->getAttribute("title") . "]";
|
|
||||||
} elseif ($node->getAttribute("alt")) {
|
|
||||||
$output = "[" . $node->getAttribute("alt") . "]";
|
|
||||||
} else {
|
|
||||||
$output = "";
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "li":
|
|
||||||
$output .= "\n";
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* Copyright (c) 2010 Jevon Wright and others.
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
|
||||||
*
|
|
||||||
* or
|
|
||||||
*
|
|
||||||
* LGPL which is available at http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Jevon Wright - initial API and implementation
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
namespace Html2Text;
|
|
||||||
|
|
||||||
class Html2TextException extends \Exception {
|
|
||||||
var $more_info;
|
|
||||||
|
|
||||||
public function __construct($message = "", $more_info = "") {
|
|
||||||
parent::__construct($message);
|
|
||||||
$this->more_info = $more_info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/AjaxPage.php, now loadable using autoloader
|
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
|
||||||
*/
|
|
||||||
|
|
||||||
// cannot notify depreciation for now as this is still load in autoloader
|
|
||||||
//DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/AjaxPage.php, now loadable using autoloader');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class ajax_page
|
|
||||||
*
|
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to AjaxPage
|
|
||||||
*/
|
|
||||||
class ajax_page extends AjaxPage
|
|
||||||
{
|
|
||||||
function __construct($s_title)
|
|
||||||
{
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedPhpMethod('ajax_page is deprecated. Please use AjaxPage instead');
|
|
||||||
parent::__construct($s_title);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* Class ApplicationContext
|
* Class ApplicationContext
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -195,16 +195,31 @@ class ApplicationContext
|
|||||||
/**
|
/**
|
||||||
* Returns the context as string with the format name1=value1&name2=value2....
|
* Returns the context as string with the format name1=value1&name2=value2....
|
||||||
* @return string The context as a string to be appended to an href property
|
* @return string The context as a string to be appended to an href property
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public function GetForLink()
|
public function GetForLink(bool $bWithLeadingAmpersand = false)
|
||||||
{
|
{
|
||||||
|
// If there are no parameters, return an empty string
|
||||||
|
if(empty($this->aValues)){
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Build the query string with ampersand separated parameters
|
||||||
$aParams = array();
|
$aParams = array();
|
||||||
foreach($this->aValues as $sName => $sValue)
|
foreach($this->aValues as $sName => $sValue)
|
||||||
{
|
{
|
||||||
$aParams[] = "c[$sName]".'='.urlencode($sValue);
|
$aParams[] = "c[$sName]".'='.urlencode($sValue);
|
||||||
}
|
}
|
||||||
return implode("&", $aParams);
|
$sReturnValue = implode('&', $aParams);
|
||||||
|
|
||||||
|
// add the leading ampersand if requested
|
||||||
|
if($bWithLeadingAmpersand){
|
||||||
|
$sReturnValue = '&' . $sReturnValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $sReturnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 3.0.0 N°2534 - dashboard: bug with autorefresh that deactivates filtering on organisation
|
* @since 3.0.0 N°2534 - dashboard: bug with autorefresh that deactivates filtering on organisation
|
||||||
* Returns the params as c[menu]:..., c[org_id]:....
|
* Returns the params as c[menu]:..., c[org_id]:....
|
||||||
@@ -382,7 +397,7 @@ class ApplicationContext
|
|||||||
$sUrl = call_user_func(array($sUrlMakerClass, 'MakeObjectUrl'), $sObjClass, $sObjKey);
|
$sUrl = call_user_func(array($sUrlMakerClass, 'MakeObjectUrl'), $sObjClass, $sObjKey);
|
||||||
if (utils::StrLen($sUrl) > 0) {
|
if (utils::StrLen($sUrl) > 0) {
|
||||||
if ($bWithNavigationContext) {
|
if ($bWithNavigationContext) {
|
||||||
return $sUrl."&".$oAppContext->GetForLink();
|
return $sUrl.$oAppContext->GetForLink(true);
|
||||||
} else {
|
} else {
|
||||||
return $sUrl;
|
return $sUrl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2023 Combodo SARL
|
* Copyright (C) 2013-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
@@ -19,6 +19,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
use Combodo\iTop\Application\UI\Base\iUIBlock;
|
use Combodo\iTop\Application\UI\Base\iUIBlock;
|
||||||
|
use Combodo\iTop\Application\WebPage\iTopWebPage;
|
||||||
|
use Combodo\iTop\Application\WebPage\WebPage;
|
||||||
use Symfony\Component\DependencyInjection\Container;
|
use Symfony\Component\DependencyInjection\Container;
|
||||||
|
|
||||||
require_once(APPROOT.'application/newsroomprovider.class.inc.php');
|
require_once(APPROOT.'application/newsroomprovider.class.inc.php');
|
||||||
@@ -29,7 +31,7 @@ require_once(APPROOT.'application/newsroomprovider.class.inc.php');
|
|||||||
* Definition of interfaces that can be implemented to customize iTop.
|
* Definition of interfaces that can be implemented to customize iTop.
|
||||||
* You may implement such interfaces in a module file (e.g. main.mymodule.php)
|
* You may implement such interfaces in a module file (e.g. main.mymodule.php)
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*/
|
*/
|
||||||
@@ -62,13 +64,13 @@ interface iLoginFSMExtension extends iLoginExtension
|
|||||||
* If a page is displayed, the action must exit at this point
|
* If a page is displayed, the action must exit at this point
|
||||||
* if LoginWebPage::LOGIN_FSM_RETURN_ERROR is returned $iErrorCode must be set
|
* if LoginWebPage::LOGIN_FSM_RETURN_ERROR is returned $iErrorCode must be set
|
||||||
* if LoginWebPage::LOGIN_FSM_RETURN_OK is returned then the login is OK and terminated
|
* if LoginWebPage::LOGIN_FSM_RETURN_OK is returned then the login is OK and terminated
|
||||||
* if LoginWebPage::LOGIN_FSM_RETURN_IGNORE is returned then the FSM will proceed to next plugin or state
|
* if LoginWebPage::LOGIN_FSM_CONTINUE is returned then the FSM will proceed to next plugin or state
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
* @param string $sLoginState (see LoginWebPage::LOGIN_STATE_...)
|
* @param string $sLoginState (see LoginWebPage::LOGIN_STATE_...)
|
||||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||||
*
|
*
|
||||||
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_RETURN_IGNORE
|
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_CONTINUE
|
||||||
*/
|
*/
|
||||||
public function LoginAction($sLoginState, &$iErrorCode);
|
public function LoginAction($sLoginState, &$iErrorCode);
|
||||||
}
|
}
|
||||||
@@ -81,7 +83,7 @@ interface iLoginFSMExtension extends iLoginExtension
|
|||||||
* * If a page is displayed, the action must exit at this point
|
* * If a page is displayed, the action must exit at this point
|
||||||
* * if LoginWebPage::LOGIN_FSM_RETURN_ERROR is returned $iErrorCode must be set
|
* * if LoginWebPage::LOGIN_FSM_RETURN_ERROR is returned $iErrorCode must be set
|
||||||
* * if LoginWebPage::LOGIN_FSM_RETURN_OK is returned then the login is OK and terminated
|
* * if LoginWebPage::LOGIN_FSM_RETURN_OK is returned then the login is OK and terminated
|
||||||
* * if LoginWebPage::LOGIN_FSM_RETURN_IGNORE is returned then the FSM will proceed to next plugin or to next state
|
* * if LoginWebPage::LOGIN_FSM_CONTINUE is returned then the FSM will proceed to next plugin or to next state
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
* @package LoginExtensibilityAPI
|
* @package LoginExtensibilityAPI
|
||||||
@@ -134,7 +136,7 @@ abstract class AbstractLoginFSMExtension implements iLoginFSMExtension
|
|||||||
* @api
|
* @api
|
||||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||||
*
|
*
|
||||||
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_RETURN_IGNORE
|
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_CONTINUE
|
||||||
*/
|
*/
|
||||||
protected function OnStart(&$iErrorCode)
|
protected function OnStart(&$iErrorCode)
|
||||||
{
|
{
|
||||||
@@ -148,7 +150,7 @@ abstract class AbstractLoginFSMExtension implements iLoginFSMExtension
|
|||||||
* @api
|
* @api
|
||||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||||
*
|
*
|
||||||
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_RETURN_IGNORE
|
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_CONTINUE
|
||||||
*/
|
*/
|
||||||
protected function OnModeDetection(&$iErrorCode)
|
protected function OnModeDetection(&$iErrorCode)
|
||||||
{
|
{
|
||||||
@@ -165,7 +167,7 @@ abstract class AbstractLoginFSMExtension implements iLoginFSMExtension
|
|||||||
* @api
|
* @api
|
||||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||||
*
|
*
|
||||||
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_RETURN_IGNORE
|
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_CONTINUE
|
||||||
*/
|
*/
|
||||||
protected function OnReadCredentials(&$iErrorCode)
|
protected function OnReadCredentials(&$iErrorCode)
|
||||||
{
|
{
|
||||||
@@ -179,7 +181,7 @@ abstract class AbstractLoginFSMExtension implements iLoginFSMExtension
|
|||||||
* @api
|
* @api
|
||||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||||
*
|
*
|
||||||
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_RETURN_IGNORE
|
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_CONTINUE
|
||||||
*/
|
*/
|
||||||
protected function OnCheckCredentials(&$iErrorCode)
|
protected function OnCheckCredentials(&$iErrorCode)
|
||||||
{
|
{
|
||||||
@@ -190,7 +192,7 @@ abstract class AbstractLoginFSMExtension implements iLoginFSMExtension
|
|||||||
* @api
|
* @api
|
||||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||||
*
|
*
|
||||||
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_RETURN_IGNORE
|
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_CONTINUE
|
||||||
*/
|
*/
|
||||||
protected function OnCredentialsOK(&$iErrorCode)
|
protected function OnCredentialsOK(&$iErrorCode)
|
||||||
{
|
{
|
||||||
@@ -201,7 +203,7 @@ abstract class AbstractLoginFSMExtension implements iLoginFSMExtension
|
|||||||
* @api
|
* @api
|
||||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||||
*
|
*
|
||||||
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_RETURN_IGNORE
|
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_CONTINUE
|
||||||
*/
|
*/
|
||||||
protected function OnUsersOK(&$iErrorCode)
|
protected function OnUsersOK(&$iErrorCode)
|
||||||
{
|
{
|
||||||
@@ -212,7 +214,7 @@ abstract class AbstractLoginFSMExtension implements iLoginFSMExtension
|
|||||||
* @api
|
* @api
|
||||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||||
*
|
*
|
||||||
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_RETURN_IGNORE
|
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_CONTINUE
|
||||||
*/
|
*/
|
||||||
protected function OnConnected(&$iErrorCode)
|
protected function OnConnected(&$iErrorCode)
|
||||||
{
|
{
|
||||||
@@ -223,7 +225,7 @@ abstract class AbstractLoginFSMExtension implements iLoginFSMExtension
|
|||||||
* @api
|
* @api
|
||||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||||
*
|
*
|
||||||
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_RETURN_IGNORE
|
* @return int LoginWebPage::LOGIN_FSM_RETURN_ERROR, LoginWebPage::LOGIN_FSM_RETURN_OK or LoginWebPage::LOGIN_FSM_CONTINUE
|
||||||
*/
|
*/
|
||||||
protected function OnError(&$iErrorCode)
|
protected function OnError(&$iErrorCode)
|
||||||
{
|
{
|
||||||
@@ -270,14 +272,14 @@ interface iPreferencesExtension
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @api
|
* @api
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function DisplayPreferences(WebPage $oPage);
|
public function DisplayPreferences(WebPage $oPage);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @api
|
* @api
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param string $sOperation
|
* @param string $sOperation
|
||||||
*
|
*
|
||||||
* @return bool true if the operation has been used
|
* @return bool true if the operation has been used
|
||||||
@@ -1156,61 +1158,6 @@ class JSButtonItem extends JSPopupMenuItem
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Implement this interface to add content to any iTopWebPage
|
|
||||||
*
|
|
||||||
* There are 3 places where content can be added:
|
|
||||||
*
|
|
||||||
* * The north pane: (normaly empty/hidden) at the top of the page, spanning the whole
|
|
||||||
* width of the page
|
|
||||||
* * The south pane: (normaly empty/hidden) at the bottom of the page, spanning the whole
|
|
||||||
* width of the page
|
|
||||||
* * The admin banner (two tones gray background) at the left of the global search.
|
|
||||||
* Limited space, use it for short messages
|
|
||||||
*
|
|
||||||
* Each of the methods of this interface is supposed to return the HTML to be inserted at
|
|
||||||
* the specified place and can use the passed iTopWebPage object to add javascript or CSS definitions
|
|
||||||
*
|
|
||||||
* @api
|
|
||||||
* @package UIExtensibilityAPI
|
|
||||||
* @since 2.0
|
|
||||||
* @deprecated 3.0.0 If you need to include:
|
|
||||||
* * JS/CSS files/snippets, use {@see \iBackofficeLinkedScriptsExtension}, {@see \iBackofficeLinkedStylesheetsExtension}, etc instead
|
|
||||||
* * HTML (and optionally JS/CSS), use {@see \iPageUIBlockExtension} to manipulate {@see \Combodo\iTop\Application\UI\Base\UIBlock} instead
|
|
||||||
*/
|
|
||||||
interface iPageUIExtension
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Add content to the header of the page
|
|
||||||
*
|
|
||||||
* @api
|
|
||||||
* @param iTopWebPage $oPage The page to insert stuff into.
|
|
||||||
*
|
|
||||||
* @return string The HTML content to add into the page
|
|
||||||
*/
|
|
||||||
public function GetNorthPaneHtml(iTopWebPage $oPage);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add content to the footer of the page
|
|
||||||
*
|
|
||||||
* @api
|
|
||||||
* @param iTopWebPage $oPage The page to insert stuff into.
|
|
||||||
*
|
|
||||||
* @return string The HTML content to add into the page
|
|
||||||
*/
|
|
||||||
public function GetSouthPaneHtml(iTopWebPage $oPage);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add content to the "admin banner"
|
|
||||||
*
|
|
||||||
* @api
|
|
||||||
* @param iTopWebPage $oPage The page to insert stuff into.
|
|
||||||
*
|
|
||||||
* @return string The HTML content to add into the page
|
|
||||||
*/
|
|
||||||
public function GetBannerHtml(iTopWebPage $oPage);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implement this interface to add content to any iTopWebPage
|
* Implement this interface to add content to any iTopWebPage
|
||||||
*
|
*
|
||||||
@@ -1258,49 +1205,7 @@ interface iPageUIBlockExtension
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend this class instead of iPageUIExtension if you don't need to overload all methods
|
* Extend this class instead of iPageUIBlockExtension if you don't need to overload all methods
|
||||||
*
|
|
||||||
* @api
|
|
||||||
* @package UIExtensibilityAPI
|
|
||||||
* @since 2.7.0
|
|
||||||
* @deprecated 3.0.0 use AbstractPageUIBlockExtension instead
|
|
||||||
*/
|
|
||||||
abstract class AbstractPageUIExtension implements iPageUIExtension
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
public function GetNorthPaneHtml(iTopWebPage $oPage)
|
|
||||||
{
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedPhpMethod('use iPageUIBlockExtension instead');
|
|
||||||
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
public function GetSouthPaneHtml(iTopWebPage $oPage)
|
|
||||||
{
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedPhpMethod('use iPageUIBlockExtension instead');
|
|
||||||
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
public function GetBannerHtml(iTopWebPage $oPage)
|
|
||||||
{
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedPhpMethod('use iPageUIBlockExtension instead');
|
|
||||||
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Extend this class instead of iPageUIExtension if you don't need to overload all methods
|
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
* @package UIBlockExtensibilityAPI
|
* @package UIBlockExtensibilityAPI
|
||||||
@@ -1461,6 +1366,23 @@ interface iBackofficeStyleExtension
|
|||||||
public function GetStyle(): string;
|
public function GetStyle(): string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implement this interface to add sass file (SCSS) to the backoffice pages.
|
||||||
|
* example: return "css/setup.scss"
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
* @package BackofficeUIExtensibilityAPI
|
||||||
|
* @since 3.3.0
|
||||||
|
*/
|
||||||
|
interface iBackofficeSassExtension
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @api
|
||||||
|
* @see \iTopWebPage::$a_styles
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function GetSass(): string;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Implement this interface to add Dict entries
|
* Implement this interface to add Dict entries
|
||||||
*
|
*
|
||||||
@@ -1715,6 +1637,11 @@ interface iRestServiceProvider
|
|||||||
public function ExecOperation($sVersion, $sVerb, $aParams);
|
public function ExecOperation($sVersion, $sVerb, $aParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A REST service provider implementing this interface will have its input JSON data sanitized for logging purposes
|
||||||
|
* @since 2.7.13, 3.2.1-1
|
||||||
|
* @see \iRestServiceProvider
|
||||||
|
*/
|
||||||
interface iRestInputSanitizer
|
interface iRestInputSanitizer
|
||||||
{
|
{
|
||||||
public function SanitizeJsonInput(string $sJsonInput): string;
|
public function SanitizeJsonInput(string $sJsonInput): string;
|
||||||
@@ -2298,4 +2225,91 @@ interface iKPILoggerExtension
|
|||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function LogOperation($oKpiLogData);
|
public function LogOperation($oKpiLogData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implement this interface to add files to the backup
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
interface iBackupExtraFilesExtension
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @api
|
||||||
|
* @return string[] Array of relative paths (from app root) for files and directories to be included in the backup
|
||||||
|
*/
|
||||||
|
public function GetExtraFilesRelPaths(): array;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface to provide messages to be displayed in the "Welcome Popup"
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
interface iWelcomePopupExtension
|
||||||
|
{
|
||||||
|
// Importance for ordering messages
|
||||||
|
// Just two levels since less important messages have nothing to do in the welcome popup
|
||||||
|
public const ENUM_IMPORTANCE_CRITICAL = 0;
|
||||||
|
public const ENUM_IMPORTANCE_HIGH = 1;
|
||||||
|
public const DEFAULT_IMPORTANCE = self::ENUM_IMPORTANCE_HIGH;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overload this method if you need to display an icon representing the provider (eg. your own company logo, module icon, ...)
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
* @return string Relative path (from app. root) of the icon representing the provider
|
||||||
|
*/
|
||||||
|
public function GetIconRelPath(): string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @api
|
||||||
|
* @return \Combodo\iTop\Application\WelcomePopup\Message[]
|
||||||
|
*/
|
||||||
|
public function GetMessages(): array;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overload this method if the provider needs to do some additional processing after the message ($sMessageId) has been acknowledged by the current user
|
||||||
|
*
|
||||||
|
* @param string $sMessageId
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
public function AcknowledgeMessage(string $sMessageId): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inherit from this class to provide messages to be displayed in the "Welcome Popup"
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
abstract class AbstractWelcomePopupExtension implements iWelcomePopupExtension
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function GetIconRelPath(): string
|
||||||
|
{
|
||||||
|
return \Combodo\iTop\Application\Branding::$aLogoPaths[\Combodo\iTop\Application\Branding::ENUM_LOGO_TYPE_MAIN_LOGO_COMPACT]['default'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function GetMessages(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function AcknowledgeMessage(string $sMessageId): void
|
||||||
|
{
|
||||||
|
// No need to process the acknowledgment notice by default
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
* to check and is linked to a set of rules that determine the valid or invalid objects
|
* to check and is linked to a set of rules that determine the valid or invalid objects
|
||||||
* inside the set
|
* inside the set
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
* to check and is linked to a set of rules that determine the valid or invalid objects
|
* to check and is linked to a set of rules that determine the valid or invalid objects
|
||||||
* inside the set
|
* inside the set
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
* or the "bad" ones. The core audit engines computes the complement to the definition
|
* or the "bad" ones. The core audit engines computes the complement to the definition
|
||||||
* set when needed to obtain either the valid objects, or the ones with an error
|
* set when needed to obtain either the valid objects, or the ones with an error
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/CaptureWebPage.php, now loadable using autoloader
|
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
|
||||||
*/
|
|
||||||
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/CaptureWebPage.php, now loadable using autoloader');
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/CLIPage.php, now loadable using autoloader
|
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
|
||||||
*/
|
|
||||||
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/CLIPage.php, now loadable using autoloader');
|
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use Combodo\iTop\Application\Helper\CKEditorHelper;
|
||||||
use Combodo\iTop\Application\Helper\FormHelper;
|
use Combodo\iTop\Application\Helper\FormHelper;
|
||||||
use Combodo\iTop\Application\Helper\Session;
|
use Combodo\iTop\Application\Helper\Session;
|
||||||
use Combodo\iTop\Application\Helper\WebResourcesHelper;
|
use Combodo\iTop\Application\Helper\WebResourcesHelper;
|
||||||
@@ -26,7 +27,7 @@ use Combodo\iTop\Application\UI\Base\Component\Html\Html;
|
|||||||
use Combodo\iTop\Application\UI\Base\Component\Html\HtmlFactory;
|
use Combodo\iTop\Application\UI\Base\Component\Html\HtmlFactory;
|
||||||
use Combodo\iTop\Application\UI\Base\Component\Input\InputUIBlockFactory;
|
use Combodo\iTop\Application\UI\Base\Component\Input\InputUIBlockFactory;
|
||||||
use Combodo\iTop\Application\UI\Base\Component\Input\Select\SelectOptionUIBlockFactory;
|
use Combodo\iTop\Application\UI\Base\Component\Input\Select\SelectOptionUIBlockFactory;
|
||||||
use Combodo\iTop\Application\UI\Base\Component\Input\SelectUIBlockFactory;
|
use Combodo\iTop\Application\UI\Base\Component\Input\Select\SelectUIBlockFactory;
|
||||||
use Combodo\iTop\Application\UI\Base\Component\Panel\PanelUIBlockFactory;
|
use Combodo\iTop\Application\UI\Base\Component\Panel\PanelUIBlockFactory;
|
||||||
use Combodo\iTop\Application\UI\Base\Component\PopoverMenu\PopoverMenu;
|
use Combodo\iTop\Application\UI\Base\Component\PopoverMenu\PopoverMenu;
|
||||||
use Combodo\iTop\Application\UI\Base\Component\PopoverMenu\PopoverMenuItem\JsPopoverMenuItem;
|
use Combodo\iTop\Application\UI\Base\Component\PopoverMenu\PopoverMenuItem\JsPopoverMenuItem;
|
||||||
@@ -42,6 +43,9 @@ use Combodo\iTop\Application\UI\Base\Layout\UIContentBlockUIBlockFactory;
|
|||||||
use Combodo\iTop\Application\UI\Links\Direct\BlockDirectLinkSetViewTable;
|
use Combodo\iTop\Application\UI\Links\Direct\BlockDirectLinkSetViewTable;
|
||||||
use Combodo\iTop\Application\UI\Links\Indirect\BlockIndirectLinkSetViewTable;
|
use Combodo\iTop\Application\UI\Links\Indirect\BlockIndirectLinkSetViewTable;
|
||||||
use Combodo\iTop\Application\UI\Links\Set\LinkSetUIBlockFactory;
|
use Combodo\iTop\Application\UI\Links\Set\LinkSetUIBlockFactory;
|
||||||
|
use Combodo\iTop\Application\WebPage\AjaxPage;
|
||||||
|
use Combodo\iTop\Application\WebPage\iTopWebPage;
|
||||||
|
use Combodo\iTop\Application\WebPage\WebPage;
|
||||||
use Combodo\iTop\Renderer\BlockRenderer;
|
use Combodo\iTop\Renderer\BlockRenderer;
|
||||||
use Combodo\iTop\Renderer\Console\ConsoleBlockRenderer;
|
use Combodo\iTop\Renderer\Console\ConsoleBlockRenderer;
|
||||||
use Combodo\iTop\Renderer\Console\ConsoleFormRenderer;
|
use Combodo\iTop\Renderer\Console\ConsoleFormRenderer;
|
||||||
@@ -287,7 +291,7 @@ abstract class cmdbAbstractObject extends CMDBObject implements iDisplay
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param \cmdbAbstractObject $oObj
|
* @param \cmdbAbstractObject $oObj
|
||||||
* @param array $aParams
|
* @param array $aParams
|
||||||
*
|
*
|
||||||
@@ -307,7 +311,7 @@ abstract class cmdbAbstractObject extends CMDBObject implements iDisplay
|
|||||||
{
|
{
|
||||||
$sParams .= $sName.'='.urlencode($value).'&'; // Always add a trailing &
|
$sParams .= $sName.'='.urlencode($value).'&'; // Always add a trailing &
|
||||||
}
|
}
|
||||||
$sUrl = utils::GetAbsoluteUrlAppRoot().'pages/'.$oObj->GetUIPage().'?'.$sParams.'class='.get_class($oObj).'&id='.$oObj->getKey().'&'.$oAppContext->GetForLink().'&a=1';
|
$sUrl = utils::GetAbsoluteUrlAppRoot().'pages/'.$oObj->GetUIPage().'?'.$sParams.'class='.get_class($oObj).'&id='.$oObj->getKey().$oAppContext->GetForLink(true).'&a=1';
|
||||||
$oPage->add_early_script(<<<JS
|
$oPage->add_early_script(<<<JS
|
||||||
if (!sessionStorage.getItem('$sSessionStorageKey'))
|
if (!sessionStorage.getItem('$sSessionStorageKey'))
|
||||||
{
|
{
|
||||||
@@ -356,7 +360,7 @@ JS
|
|||||||
* @param int $iKey The identifier of the object
|
* @param int $iKey The identifier of the object
|
||||||
* @param string $sMessageId Your id or one of the well-known ids: 'create', 'update' and 'apply_stimulus'
|
* @param string $sMessageId Your id or one of the well-known ids: 'create', 'update' and 'apply_stimulus'
|
||||||
* @param string $sMessage The HTML message (must be correctly escaped)
|
* @param string $sMessage The HTML message (must be correctly escaped)
|
||||||
* @param string $sSeverity Any of the \WebPage::ENUM_SESSION_MESSAGE_SEVERITY_XXX constants
|
* @param string $sSeverity Any of the WebPage::ENUM_SESSION_MESSAGE_SEVERITY_XXX constants
|
||||||
* @param float $fRank Ordering of the message: smallest displayed first (can be negative)
|
* @param float $fRank Ordering of the message: smallest displayed first (can be negative)
|
||||||
* @param bool $bMustNotExist Do not alter any existing message (considering the id)
|
* @param bool $bMustNotExist Do not alter any existing message (considering the id)
|
||||||
*
|
*
|
||||||
@@ -378,7 +382,7 @@ JS
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage Warning, since 3.0.0 this parameter was kept for compatibility reason. You shouldn't write directly on the page!
|
* @param WebPage $oPage Warning, since 3.0.0 this parameter was kept for compatibility reason. You shouldn't write directly on the page!
|
||||||
* When writing to the page, markup will be put above the real header of the panel.
|
* When writing to the page, markup will be put above the real header of the panel.
|
||||||
* To insert something IN the panel, we now need to add UIBlocks in either the "subtitle" or "toolbar" sections of the array that will be returned.
|
* To insert something IN the panel, we now need to add UIBlocks in either the "subtitle" or "toolbar" sections of the array that will be returned.
|
||||||
* @param bool $bEditMode Deprecated parameter in iTop 3.0.0, use {@see GetDisplayMode()} and ENUM_DISPLAY_MODE_* constants instead
|
* @param bool $bEditMode Deprecated parameter in iTop 3.0.0, use {@see GetDisplayMode()} and ENUM_DISPLAY_MODE_* constants instead
|
||||||
@@ -556,7 +560,7 @@ HTML
|
|||||||
/**
|
/**
|
||||||
* Display properties tab of an object
|
* Display properties tab of an object
|
||||||
*
|
*
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param bool $bEditMode Note that this parameter is no longer used in this method. Use {@see static::$sDisplayMode} instead
|
* @param bool $bEditMode Note that this parameter is no longer used in this method. Use {@see static::$sDisplayMode} instead
|
||||||
* @param string $sPrefix
|
* @param string $sPrefix
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
@@ -595,7 +599,7 @@ HTML
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param $sAttCode
|
* @param $sAttCode
|
||||||
*
|
*
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
@@ -636,7 +640,7 @@ HTML
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param bool $bEditMode Note that this parameter is no longer used in this method. Use {@see static::$sDisplayMode} instead
|
* @param bool $bEditMode Note that this parameter is no longer used in this method. Use {@see static::$sDisplayMode} instead
|
||||||
*
|
*
|
||||||
* @throws \CoreException
|
* @throws \CoreException
|
||||||
@@ -694,10 +698,10 @@ HTML
|
|||||||
$sLinkedClass = $oAttDef->GetLinkedClass();
|
$sLinkedClass = $oAttDef->GetLinkedClass();
|
||||||
|
|
||||||
// Filter out links pointing to obsolete objects (if relevant)
|
// Filter out links pointing to obsolete objects (if relevant)
|
||||||
$oOrmLinkSet = $this->Get($sAttCode);
|
$oOrmLinkSet = $this->Get($sAttCode);
|
||||||
$oLinkSet = $oOrmLinkSet->ToDBObjectSet(utils::ShowObsoleteData());
|
$oLinkSet = $oOrmLinkSet->ToDBObjectSet(utils::ShowObsoleteData());
|
||||||
|
$iCount = $oLinkSet->Count();
|
||||||
|
|
||||||
$iCount = $oLinkSet->Count();
|
|
||||||
if ($this->IsNew()) {
|
if ($this->IsNew()) {
|
||||||
$iFlags = $this->GetInitialStateAttributeFlags($sAttCode);
|
$iFlags = $this->GetInitialStateAttributeFlags($sAttCode);
|
||||||
} else {
|
} else {
|
||||||
@@ -762,9 +766,9 @@ HTML
|
|||||||
$oPage->add($sHTMLValue);
|
$oPage->add($sHTMLValue);
|
||||||
} else {
|
} else {
|
||||||
if ($oAttDef->IsIndirect()) {
|
if ($oAttDef->IsIndirect()) {
|
||||||
$oBlockLinkSetViewTable = new BlockIndirectLinkSetViewTable($oPage, $this, $sClass, $sAttCode, $oAttDef, $bReadOnly);
|
$oBlockLinkSetViewTable = new BlockIndirectLinkSetViewTable($oPage, $this, $sClass, $sAttCode, $oAttDef, $bReadOnly, $iCount);
|
||||||
} else {
|
} else {
|
||||||
$oBlockLinkSetViewTable = new BlockDirectLinkSetViewTable($oPage, $this, $sClass, $sAttCode, $oAttDef, $bReadOnly);
|
$oBlockLinkSetViewTable = new BlockDirectLinkSetViewTable($oPage, $this, $sClass, $sAttCode, $oAttDef, $bReadOnly, $iCount);
|
||||||
}
|
}
|
||||||
$oPage->AddUiBlock($oBlockLinkSetViewTable);
|
$oPage->AddUiBlock($oBlockLinkSetViewTable);
|
||||||
}
|
}
|
||||||
@@ -801,16 +805,16 @@ HTML
|
|||||||
if (!$this->IsNew()) {
|
if (!$this->IsNew()) {
|
||||||
// Look for any trigger that considers this object as "In Scope"
|
// Look for any trigger that considers this object as "In Scope"
|
||||||
// If any trigger has been found then display a tab with notifications
|
// If any trigger has been found then display a tab with notifications
|
||||||
//
|
// If all triggers on an object have been deleted, we consider that we no longer need the event notification information
|
||||||
$aTriggers = $this->GetRelatedTriggersIDs();
|
$aTriggers = $this->GetRelatedTriggersIDs();
|
||||||
if (count($aTriggers) > 0) {
|
if (count($aTriggers) > 0) {
|
||||||
$iId = $this->GetKey();
|
$iId = $this->GetKey();
|
||||||
$aParams = array('triggers' => $aTriggers, 'id' => $iId);
|
$aParams = array('class' => get_class($this), 'id' => $iId);
|
||||||
$aNotifSearches = array();
|
$aNotifSearches = array();
|
||||||
$iNotifsCount = 0;
|
$iNotifsCount = 0;
|
||||||
$aNotificationClasses = MetaModel::EnumChildClasses('EventNotification');
|
$aNotificationClasses = MetaModel::EnumChildClasses('EventNotification');
|
||||||
foreach ($aNotificationClasses as $sNotifClass) {
|
foreach ($aNotificationClasses as $sNotifClass) {
|
||||||
$aNotifSearches[$sNotifClass] = DBObjectSearch::FromOQL("SELECT $sNotifClass AS Ev JOIN Trigger AS T ON Ev.trigger_id = T.id WHERE T.id IN (:triggers) AND Ev.object_id = :id");
|
$aNotifSearches[$sNotifClass] = DBObjectSearch::FromOQL("SELECT $sNotifClass AS Ev WHERE Ev.object_id = :id AND Ev.object_class = :class");
|
||||||
$aNotifSearches[$sNotifClass]->SetInternalParams($aParams);
|
$aNotifSearches[$sNotifClass]->SetInternalParams($aParams);
|
||||||
$oNotifSet = new DBObjectSet($aNotifSearches[$sNotifClass], array());
|
$oNotifSet = new DBObjectSet($aNotifSearches[$sNotifClass], array());
|
||||||
$iNotifsCount += $oNotifSet->Count();
|
$iNotifsCount += $oNotifSet->Count();
|
||||||
@@ -863,7 +867,7 @@ HTML
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param bool $bEditMode Note that this parameter is no longer used in this method. Use {@see static::$sDisplayMode} instead
|
* @param bool $bEditMode Note that this parameter is no longer used in this method. Use {@see static::$sDisplayMode} instead
|
||||||
* @param string $sPrefix
|
* @param string $sPrefix
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
@@ -1057,17 +1061,12 @@ HTML
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fields with CKEditor need to have the highlight.js lib loaded even if they are in read-only, as it is needed to format code snippets
|
|
||||||
if ($bHasFieldsWithRichTextEditor) {
|
|
||||||
WebResourcesHelper::EnableCKEditorToWebPage($oPage);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $aFieldsMap;
|
return $aFieldsMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param bool $bEditMode Note that this parameter is no longer used in this method, {@see static::$sDisplayMode} is used instead, but we cannot remove it as it part of the base interface (iDisplay)...
|
* @param bool $bEditMode Note that this parameter is no longer used in this method, {@see static::$sDisplayMode} is used instead, but we cannot remove it as it part of the base interface (iDisplay)...
|
||||||
*
|
*
|
||||||
* @throws \ApplicationException
|
* @throws \ApplicationException
|
||||||
@@ -1155,7 +1154,7 @@ HTML
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
*
|
*
|
||||||
* @throws \ArchivedObjectException
|
* @throws \ArchivedObjectException
|
||||||
* @throws \CoreException
|
* @throws \CoreException
|
||||||
@@ -1178,7 +1177,7 @@ HTML
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param \CMDBObjectSet $oSet
|
* @param \CMDBObjectSet $oSet
|
||||||
* @param array $aExtraParams See possible values in {@see DataTableUIBlockFactory::RenderDataTable()}
|
* @param array $aExtraParams See possible values in {@see DataTableUIBlockFactory::RenderDataTable()}
|
||||||
*
|
*
|
||||||
@@ -1240,7 +1239,7 @@ HTML
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param \DBObjectSet $oSet
|
* @param \DBObjectSet $oSet
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
*
|
*
|
||||||
@@ -1338,7 +1337,7 @@ HTML
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$aHeader['friendlyname'] = ['label' => MetaModel::GetName($sClassName)];
|
||||||
foreach ($aList[$sAlias] as $sAttCodeEx => $oAttDef) {
|
foreach ($aList[$sAlias] as $sAttCodeEx => $oAttDef) {
|
||||||
$sColLabel = $bLocalize ? MetaModel::GetLabel($sClassName, $sAttCodeEx) : $sAttCodeEx;
|
$sColLabel = $bLocalize ? MetaModel::GetLabel($sClassName, $sAttCodeEx) : $sAttCodeEx;
|
||||||
|
|
||||||
@@ -1359,6 +1358,7 @@ HTML
|
|||||||
$aRow = [];
|
$aRow = [];
|
||||||
foreach ($aAuthorizedClasses as $sAlias => $sClassName) {
|
foreach ($aAuthorizedClasses as $sAlias => $sClassName) {
|
||||||
$oObj = $aObjects[$sAlias];
|
$oObj = $aObjects[$sAlias];
|
||||||
|
$aRow["friendlyname"] = $oObj->Get('friendlyname');
|
||||||
foreach ($aList[$sAlias] as $sAttCodeEx => $oAttDef) {
|
foreach ($aList[$sAlias] as $sAttCodeEx => $oAttDef) {
|
||||||
if (is_null($oObj)) {
|
if (is_null($oObj)) {
|
||||||
$aRow[$oAttDef->GetCode()] = '';
|
$aRow[$oAttDef->GetCode()] = '';
|
||||||
@@ -1412,7 +1412,7 @@ HTML
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param \CMDBObjectSet $oSet
|
* @param \CMDBObjectSet $oSet
|
||||||
* @param array $aExtraParams key used :
|
* @param array $aExtraParams key used :
|
||||||
* <ul>
|
* <ul>
|
||||||
@@ -1535,7 +1535,7 @@ HTML
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param \CMDBObjectSet $oSet
|
* @param \CMDBObjectSet $oSet
|
||||||
* @param array $aParams
|
* @param array $aParams
|
||||||
* @param string $sCharset
|
* @param string $sCharset
|
||||||
@@ -1694,7 +1694,7 @@ HTML
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param \CMDBObjectSet $oSet
|
* @param \CMDBObjectSet $oSet
|
||||||
* @param array $aParams
|
* @param array $aParams
|
||||||
*
|
*
|
||||||
@@ -1907,7 +1907,7 @@ HTML
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param \CMDBObjectSet $oSet
|
* @param \CMDBObjectSet $oSet
|
||||||
* @param array $aParams
|
* @param array $aParams
|
||||||
*
|
*
|
||||||
@@ -1985,7 +1985,7 @@ HTML
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param \CMDBObjectSet $oSet
|
* @param \CMDBObjectSet $oSet
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
*
|
*
|
||||||
@@ -2016,7 +2016,7 @@ HTML
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param string $sClass
|
* @param string $sClass
|
||||||
* @param string $sAttCode
|
* @param string $sAttCode
|
||||||
* @param \AttributeDefinition $oAttDef
|
* @param \AttributeDefinition $oAttDef
|
||||||
@@ -2310,7 +2310,7 @@ JS
|
|||||||
$sHidden = "<input type=\"hidden\" id=\"{$iId}_count\" value=\"$iEntriesCount\"/>"; // To know how many entries the case log already contains
|
$sHidden = "<input type=\"hidden\" id=\"{$iId}_count\" value=\"$iEntriesCount\"/>"; // To know how many entries the case log already contains
|
||||||
|
|
||||||
$sHTMLValue = "$sHeader<div class=\"ibo-caselog-entry-form--text-input\" $sStyle data-role=\"ibo-caselog-entry-form--text-input\">";
|
$sHTMLValue = "$sHeader<div class=\"ibo-caselog-entry-form--text-input\" $sStyle data-role=\"ibo-caselog-entry-form--text-input\">";
|
||||||
$sHTMLValue .= "<textarea class=\"htmlEditor ibo-input-richtext-placeholder\" style=\"border:0;width:100%\" title=\"$sHelpText\" name=\"attr_{$sFieldPrefix}{$sAttCode}{$sNameSuffix}\" rows=\"8\" cols=\"40\" id=\"$iId\">".utils::EscapeHtml($sEditValue)."</textarea>";
|
$sHTMLValue .= "<textarea class=\"htmlEditor ibo-input-richtext-placeholder\" style=\"border:0;width:100%\" title=\"$sHelpText\" name=\"attr_{$sFieldPrefix}{$sAttCode}{$sNameSuffix}\" rows=\"8\" cols=\"40\" id=\"$iId\">".CKEditorHelper::PrepareCKEditorValueTextEncodingForTextarea($sEditValue)."</textarea>";
|
||||||
$sHTMLValue .= "$sPreviousLog</div>{$sValidationSpan}{$sReloadSpan}$sHidden";
|
$sHTMLValue .= "$sPreviousLog</div>{$sValidationSpan}{$sReloadSpan}$sHidden";
|
||||||
|
|
||||||
// Note: This should be refactored for all types of attribute (see at the end of this function) but as we are doing this for a maintenance release, we are scheduling it for the next main release in to order to avoid regressions as much as possible.
|
// Note: This should be refactored for all types of attribute (see at the end of this function) but as we are doing this for a maintenance release, we are scheduling it for the next main release in to order to avoid regressions as much as possible.
|
||||||
@@ -2322,39 +2322,10 @@ JS
|
|||||||
|
|
||||||
$oPage->add_ready_script("$('#$iId').on('keyup change validate', function(evt, sFormId) { return ValidateCaseLogField('$iId', $bMandatory, sFormId, $sNullValue, $sOriginalValue) } );"); // Custom validation function
|
$oPage->add_ready_script("$('#$iId').on('keyup change validate', function(evt, sFormId) { return ValidateCaseLogField('$iId', $bMandatory, sFormId, $sNullValue, $sOriginalValue) } );"); // Custom validation function
|
||||||
|
|
||||||
// Replace the text area with CKEditor
|
// configure CKEditor
|
||||||
// To change the default settings of the editor,
|
CKEditorHelper::ConfigureCKEditorElementForWebPage($oPage, $iId, $sOriginalValue, true, [
|
||||||
// a) edit the file /js/ckeditor/config.js
|
'placeholder' => Dict::S('UI:CaseLogTypeYourTextHere'),
|
||||||
// b) or override some of the configuration settings, using the second parameter of ckeditor()
|
]);
|
||||||
$aConfig = utils::GetCkeditorPref();
|
|
||||||
$aConfig['placeholder'] = Dict::S('UI:CaseLogTypeYourTextHere');
|
|
||||||
|
|
||||||
// - Final config
|
|
||||||
$sConfigJS = json_encode($aConfig);
|
|
||||||
|
|
||||||
WebResourcesHelper::EnableCKEditorToWebPage($oPage);
|
|
||||||
$oPage->add_ready_script("$('#$iId').ckeditor(function() { /* callback code */ }, $sConfigJS);"); // Transform $iId into a CKEdit
|
|
||||||
|
|
||||||
$oPage->add_ready_script(
|
|
||||||
<<<EOF
|
|
||||||
$('#$iId').on('update', function(evt){
|
|
||||||
BlockField('cke_$iId', $('#$iId').attr('disabled'));
|
|
||||||
//Delayed execution - ckeditor must be properly initialized before setting readonly
|
|
||||||
var retryCount = 0;
|
|
||||||
var oMe = $('#$iId');
|
|
||||||
var delayedSetReadOnly = function () {
|
|
||||||
if (oMe.data('ckeditorInstance').editable() == undefined && retryCount++ < 10) {
|
|
||||||
setTimeout(delayedSetReadOnly, retryCount * 100); //Wait a while longer each iteration
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
oMe.data('ckeditorInstance').setReadOnly(oMe.prop('disabled'));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
setTimeout(delayedSetReadOnly, 50);
|
|
||||||
});
|
|
||||||
EOF
|
|
||||||
);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'HTML':
|
case 'HTML':
|
||||||
@@ -2432,7 +2403,7 @@ HTML;
|
|||||||
$sInputType = self::ENUM_INPUT_TYPE_IMAGE;
|
$sInputType = self::ENUM_INPUT_TYPE_IMAGE;
|
||||||
$aEventsList[] = 'validate';
|
$aEventsList[] = 'validate';
|
||||||
$aEventsList[] = 'change';
|
$aEventsList[] = 'change';
|
||||||
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/edit_image.js');
|
$oPage->LinkScriptFromAppRoot('js/edit_image.js');
|
||||||
$oDocument = $value; // Value is an ormDocument objectm
|
$oDocument = $value; // Value is an ormDocument objectm
|
||||||
$sDefaultUrl = $oAttDef->Get('default_image');
|
$sDefaultUrl = $oAttDef->Get('default_image');
|
||||||
if (is_object($oDocument) && !$oDocument->IsEmpty()) {
|
if (is_object($oDocument) && !$oDocument->IsEmpty()) {
|
||||||
@@ -2548,11 +2519,11 @@ HTML;
|
|||||||
$sHTMLValue .= '</div></div>';
|
$sHTMLValue .= '</div></div>';
|
||||||
$sHTMLValue .= '<div>'.$sReloadSpan.'</div>'; // No validation span for this one: it does handle its own validation!
|
$sHTMLValue .= '<div>'.$sReloadSpan.'</div>'; // No validation span for this one: it does handle its own validation!
|
||||||
$sHTMLValue .= "<input name=\"attr_{$sFieldPrefix}{$sAttCode}{$sNameSuffix}\" type=\"hidden\" id=\"$iId\" value=\"\"/>\n";
|
$sHTMLValue .= "<input name=\"attr_{$sFieldPrefix}{$sAttCode}{$sNameSuffix}\" type=\"hidden\" id=\"$iId\" value=\"\"/>\n";
|
||||||
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/form_handler.js');
|
$oPage->LinkScriptFromAppRoot('js/form_handler.js');
|
||||||
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/console_form_handler.js');
|
$oPage->LinkScriptFromAppRoot('js/console_form_handler.js');
|
||||||
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/field_set.js');
|
$oPage->LinkScriptFromAppRoot('js/field_set.js');
|
||||||
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/form_field.js');
|
$oPage->LinkScriptFromAppRoot('js/form_field.js');
|
||||||
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/subform_field.js');
|
$oPage->LinkScriptFromAppRoot('js/subform_field.js');
|
||||||
$oPage->add_ready_script(
|
$oPage->add_ready_script(
|
||||||
<<<JS
|
<<<JS
|
||||||
$('#{$iId}_field_set').field_set($sFieldSetOptions);
|
$('#{$iId}_field_set').field_set($sFieldSetOptions);
|
||||||
@@ -2578,9 +2549,9 @@ JS
|
|||||||
case 'Set':
|
case 'Set':
|
||||||
case 'TagSet':
|
case 'TagSet':
|
||||||
$sInputType = self::ENUM_INPUT_TYPE_TAGSET;
|
$sInputType = self::ENUM_INPUT_TYPE_TAGSET;
|
||||||
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/selectize.min.js');
|
$oPage->LinkScriptFromAppRoot('js/selectize.min.js');
|
||||||
$oPage->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'css/selectize.default.css');
|
$oPage->LinkStylesheetFromAppRoot('css/selectize.default.css');
|
||||||
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.itop-set-widget.js');
|
$oPage->LinkScriptFromAppRoot('js/jquery.itop-set-widget.js');
|
||||||
|
|
||||||
$oPage->add_dict_entry('Core:AttributeSet:placeholder');
|
$oPage->add_dict_entry('Core:AttributeSet:placeholder');
|
||||||
|
|
||||||
@@ -2611,6 +2582,13 @@ JS
|
|||||||
$iFieldSize = $oAttDef->GetMaxSize();
|
$iFieldSize = $oAttDef->GetMaxSize();
|
||||||
if ($aAllowedValues !== null)
|
if ($aAllowedValues !== null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// convert AttributeBoolean value due to issue with radio style when value is false
|
||||||
|
// @see N°2443 - Boolean don't accept yes/no value
|
||||||
|
if($oAttDef instanceof AttributeBoolean){
|
||||||
|
$value = $value === false ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
// Discrete list of values, use a SELECT or RADIO buttons depending on the config
|
// Discrete list of values, use a SELECT or RADIO buttons depending on the config
|
||||||
$sDisplayStyle = $oAttDef->GetDisplayStyle();
|
$sDisplayStyle = $oAttDef->GetDisplayStyle();
|
||||||
switch ($sDisplayStyle)
|
switch ($sDisplayStyle)
|
||||||
@@ -2755,7 +2733,7 @@ JS
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
*
|
*
|
||||||
* @throws \ArchivedObjectException
|
* @throws \ArchivedObjectException
|
||||||
@@ -2953,11 +2931,11 @@ JS
|
|||||||
$sStatesSelection .= '</select>';
|
$sStatesSelection .= '</select>';
|
||||||
$sStatesSelection .= '<input type="hidden" id="obj_state_orig" name="obj_state_orig" value="'.$this->GetState().'"/>';
|
$sStatesSelection .= '<input type="hidden" id="obj_state_orig" name="obj_state_orig" value="'.$this->GetState().'"/>';
|
||||||
$oPage->add_ready_script(<<<JS
|
$oPage->add_ready_script(<<<JS
|
||||||
$('.state_select_{$this->m_iFormId}').change( function() {
|
$('.state_select_{$this->m_iFormId}').on('change', function() {
|
||||||
if ($('#obj_state_orig').val() != $(this).val()) {
|
if ($('#obj_state_orig').val() != $(this).val()) {
|
||||||
$('.state_select_{$this->m_iFormId}').val($(this).val());
|
$('.state_select_{$this->m_iFormId}').val($(this).val());
|
||||||
$('#form_{$this->m_iFormId}').data('force_submit', true);
|
$('#form_{$this->m_iFormId}').data('force_submit', true);
|
||||||
$('#form_{$this->m_iFormId}').submit();
|
$('#form_{$this->m_iFormId}').trigger('submit');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
JS
|
JS
|
||||||
@@ -3094,7 +3072,7 @@ JS
|
|||||||
$oPage->add($oAppContext->GetForForm());
|
$oPage->add($oAppContext->GetForForm());
|
||||||
|
|
||||||
// Hook the cancel button via jQuery so that it can be unhooked easily as well if needed
|
// Hook the cancel button via jQuery so that it can be unhooked easily as well if needed
|
||||||
$sDefaultUrl = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search_form&class='.$sClass.'&'.$oAppContext->GetForLink();
|
$sDefaultUrl = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search_form&class='.$sClass.$oAppContext->GetForLink(true);
|
||||||
|
|
||||||
$sCancelButtonOnClickScript = "let fOnClick{$this->m_iFormId}CancelButton = ";
|
$sCancelButtonOnClickScript = "let fOnClick{$this->m_iFormId}CancelButton = ";
|
||||||
if(isset($aExtraParams['js_handlers']['cancel_button_on_click'])){
|
if(isset($aExtraParams['js_handlers']['cancel_button_on_click'])){
|
||||||
@@ -3102,7 +3080,7 @@ JS
|
|||||||
} else {
|
} else {
|
||||||
$sCancelButtonOnClickScript .= "function() { BackToDetails('$sClass', $iKey, '$sDefaultUrl', $sJSToken)};";
|
$sCancelButtonOnClickScript .= "function() { BackToDetails('$sClass', $iKey, '$sDefaultUrl', $sJSToken)};";
|
||||||
}
|
}
|
||||||
$sCancelButtonOnClickScript .= "$('#form_{$this->m_iFormId} button.cancel').on('click', fOnClick{$this->m_iFormId}CancelButton);";
|
$sCancelButtonOnClickScript .= "$('#form_{$this->m_iFormId} button.cancel').on('click.navigation.itop', fOnClick{$this->m_iFormId}CancelButton);";
|
||||||
$oPage->add_ready_script($sCancelButtonOnClickScript);
|
$oPage->add_ready_script($sCancelButtonOnClickScript);
|
||||||
|
|
||||||
$iFieldsCount = count($aFieldsMap);
|
$iFieldsCount = count($aFieldsMap);
|
||||||
@@ -3160,7 +3138,7 @@ EOF
|
|||||||
/**
|
/**
|
||||||
* Select the derived class to create
|
* Select the derived class to create
|
||||||
* @param string $sClass
|
* @param string $sClass
|
||||||
* @param \WebPage $oP
|
* @param WebPage $oP
|
||||||
* @param \ApplicationContext $oAppContext
|
* @param \ApplicationContext $oAppContext
|
||||||
* @param array $aPossibleClasses
|
* @param array $aPossibleClasses
|
||||||
* @param array $aHiddenFields
|
* @param array $aHiddenFields
|
||||||
@@ -3255,7 +3233,7 @@ EOF
|
|||||||
return $oBlock;
|
return $oBlock;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param string $sClass
|
* @param string $sClass
|
||||||
* @param \DBObject|null $oSourceObject Object to use for the creation form, can be either the class to instantiate, an object to clone or an object to use (eg. already prefilled / modeled object)
|
* @param \DBObject|null $oSourceObject Object to use for the creation form, can be either the class to instantiate, an object to clone or an object to use (eg. already prefilled / modeled object)
|
||||||
* @param array $aArgs
|
* @param array $aArgs
|
||||||
@@ -3340,7 +3318,7 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param string $sStimulus
|
* @param string $sStimulus
|
||||||
* @param array|null $aPrefillFormParam
|
* @param array|null $aPrefillFormParam
|
||||||
* @param bool $bDisplayBareProperties Whether to display the object details or not
|
* @param bool $bDisplayBareProperties Whether to display the object details or not
|
||||||
@@ -3455,7 +3433,7 @@ EOF
|
|||||||
// Dummy collapsible section created in order to get JS files
|
// Dummy collapsible section created in order to get JS files
|
||||||
$oCollapsibleSection = new CollapsibleSection('');
|
$oCollapsibleSection = new CollapsibleSection('');
|
||||||
foreach ($oCollapsibleSection->GetJsFilesUrlRecursively(true) as $sJSFile) {
|
foreach ($oCollapsibleSection->GetJsFilesUrlRecursively(true) as $sJSFile) {
|
||||||
$oPage->add_linked_script($sJSFile);
|
$oPage->LinkScriptFromURI($sJSFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$aAllowedValues = MetaModel::GetAllowedValues_att($sClass, $sAttCode, $aArgs);
|
$aAllowedValues = MetaModel::GetAllowedValues_att($sClass, $sAttCode, $aArgs);
|
||||||
@@ -3468,8 +3446,18 @@ EOF
|
|||||||
}
|
}
|
||||||
$sInputType = '';
|
$sInputType = '';
|
||||||
$sInputId = 'att_'.$iFieldIndex;
|
$sInputId = 'att_'.$iFieldIndex;
|
||||||
|
$value = $this->Get($sAttCode);
|
||||||
|
$sDisplayValue = $this->GetEditValue($sAttCode);
|
||||||
|
if ($oAttDef instanceof AttributeDateTime && !$oAttDef->IsNullAllowed() && $value === $oAttDef->GetNullValue()) {
|
||||||
|
$value = $oAttDef->GetDefaultValue($this);
|
||||||
|
if ($value !== $oAttDef->GetNullValue()) {
|
||||||
|
// Set default date
|
||||||
|
$this->Set($sAttCode, $value);
|
||||||
|
$sDisplayValue = $this->GetEditValue($sAttCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
$sHTMLValue = cmdbAbstractObject::GetFormElementForField($oPage, $sClass, $sAttCode, $oAttDef,
|
$sHTMLValue = cmdbAbstractObject::GetFormElementForField($oPage, $sClass, $sAttCode, $oAttDef,
|
||||||
$this->Get($sAttCode), $this->GetEditValue($sAttCode), $sInputId, '', $iExpectCode,
|
$value, $sDisplayValue, $sInputId, '', $iExpectCode,
|
||||||
$aArgs, true, $sInputType);
|
$aArgs, true, $sInputType);
|
||||||
$aAttrib = array(
|
$aAttrib = array(
|
||||||
'label' => '<span>'.$oAttDef->GetLabel().'</span>',
|
'label' => '<span>'.$oAttDef->GetLabel().'</span>',
|
||||||
@@ -3595,16 +3583,26 @@ EOF
|
|||||||
$oPage->add_ready_script(InlineImage::EnableCKEditorImageUpload($this, $sTempId));
|
$oPage->add_ready_script(InlineImage::EnableCKEditorImageUpload($this, $sTempId));
|
||||||
} else {
|
} else {
|
||||||
//we can directly apply the stimuli
|
//we can directly apply the stimuli
|
||||||
|
$sExceptionMessage = null;
|
||||||
|
try {
|
||||||
$bApplyStimulus = $this->ApplyStimulus($sStimulus); // will write the object in the DB
|
$bApplyStimulus = $this->ApplyStimulus($sStimulus); // will write the object in the DB
|
||||||
if (!$bApplyStimulus) {
|
}
|
||||||
throw new ApplicationException(Dict::S('UI:FailedToApplyStimuli'));
|
catch (Exception $oException) {
|
||||||
} else {
|
// Catch any exception happening during the stimulus
|
||||||
|
$bApplyStimulus = false;
|
||||||
|
$sExceptionMessage = ($oException instanceof CoreCannotSaveObjectException) ? $oException->getHtmlMessage() : $oException->getMessage();
|
||||||
|
}
|
||||||
|
finally {
|
||||||
if ($sOwnershipToken !== null) {
|
if ($sOwnershipToken !== null) {
|
||||||
// Release the concurrent lock, if any
|
// Release the concurrent lock, if any
|
||||||
iTopOwnershipLock::ReleaseLock($sClass, $iKey, $sOwnershipToken);
|
iTopOwnershipLock::ReleaseLock($sClass, $iKey, $sOwnershipToken);
|
||||||
}
|
}
|
||||||
|
if (!$bApplyStimulus) {
|
||||||
return true;
|
// Throw an application oriented exception if necessary
|
||||||
|
throw new ApplicationException($sExceptionMessage ?? Dict::S('UI:FailedToApplyStimuli'));
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3753,7 +3751,7 @@ HTML;
|
|||||||
/**
|
/**
|
||||||
* Displays a blob document *inline* (if possible, depending on the type of the document)
|
* Displays a blob document *inline* (if possible, depending on the type of the document)
|
||||||
*
|
*
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param $sAttCode
|
* @param $sAttCode
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
@@ -3927,7 +3925,7 @@ HTML;
|
|||||||
public static function GetShortcutActions($sFinalClass)
|
public static function GetShortcutActions($sFinalClass)
|
||||||
{
|
{
|
||||||
$sShortcutActions = MetaModel::GetConfig()->Get('shortcut_actions');
|
$sShortcutActions = MetaModel::GetConfig()->Get('shortcut_actions');
|
||||||
$aShortcutActions = explode(',', $sShortcutActions);
|
$aShortcutActions = array_map('trim', explode(',', $sShortcutActions));
|
||||||
|
|
||||||
return $aShortcutActions;
|
return $aShortcutActions;
|
||||||
}
|
}
|
||||||
@@ -4315,24 +4313,15 @@ HTML;
|
|||||||
|
|
||||||
case 'Image':
|
case 'Image':
|
||||||
$value = null;
|
$value = null;
|
||||||
|
$aDimensions = null;
|
||||||
$oImage = utils::ReadPostedDocument("attr_{$sFormPrefix}{$sAttCode}", 'fcontents');
|
$oImage = utils::ReadPostedDocument("attr_{$sFormPrefix}{$sAttCode}", 'fcontents');
|
||||||
if (!is_null($oImage->GetData()))
|
$oImage = $oImage->ResizeImageToFit(
|
||||||
{
|
$oAttDef->Get('storage_max_width'),
|
||||||
$aSize = utils::GetImageSize($oImage->GetData());
|
$oAttDef->Get('storage_max_height'),
|
||||||
if (is_array($aSize) && $aSize[0] > 0 && $aSize[1] > 0)
|
$aDimensions
|
||||||
{
|
);
|
||||||
$oImage = utils::ResizeImageToFit(
|
if (is_null($aDimensions)) {
|
||||||
$oImage,
|
IssueLog::Warning($sClass . ':' . $this->GetKey() . '/' . $sAttCode . ': Image could not be resized. Mimetype: ' . $oImage->GetMimeType() . ', filename: ' . $oImage->GetFileName());
|
||||||
$aSize[0],
|
|
||||||
$aSize[1],
|
|
||||||
$oAttDef->Get('storage_max_width'),
|
|
||||||
$oAttDef->Get('storage_max_height')
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
IssueLog::Warning($sClass . ':' . $this->GetKey() . '/' . $sAttCode . ': Image could not be resized. Mimetype: ' . $oImage->GetMimeType() . ', filename: ' . $oImage->GetFileName());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$aOtherData = utils::ReadPostedParam("attr_{$sFormPrefix}{$sAttCode}", null, 'raw_data');
|
$aOtherData = utils::ReadPostedParam("attr_{$sFormPrefix}{$sAttCode}", null, 'raw_data');
|
||||||
if (is_array($aOtherData))
|
if (is_array($aOtherData))
|
||||||
@@ -4577,28 +4566,6 @@ HTML;
|
|||||||
InlineImage::FinalizeInlineImages($this);
|
InlineImage::FinalizeInlineImages($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated 3.1.1 3.2.0 N°6966 We will have only one DBClone method in the future
|
|
||||||
*/
|
|
||||||
protected function DBCloneTracked_Internal($newKey = null)
|
|
||||||
{
|
|
||||||
/** @var cmdbAbstractObject $oNewObj */
|
|
||||||
$oNewObj = MetaModel::GetObject(get_class($this), parent::DBCloneTracked_Internal($newKey));
|
|
||||||
|
|
||||||
// Invoke extensions after insertion (the object must exist, have an id, etc.)
|
|
||||||
/** @var \iApplicationObjectExtension $oExtensionInstance */
|
|
||||||
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
|
|
||||||
{
|
|
||||||
$sExtensionClass = get_class($oExtensionInstance);
|
|
||||||
$this->LogCRUDDebug(__METHOD__, "Calling $sExtensionClass::OnDBInsert()");
|
|
||||||
$oKPI = new ExecutionKPI();
|
|
||||||
$oExtensionInstance->OnDBInsert($oNewObj, self::GetCurrentChange());
|
|
||||||
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnDBInsert');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $oNewObj;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function DBUpdate()
|
public function DBUpdate()
|
||||||
{
|
{
|
||||||
$this->LogCRUDEnter(__METHOD__);
|
$this->LogCRUDEnter(__METHOD__);
|
||||||
@@ -4692,25 +4659,6 @@ HTML;
|
|||||||
parent::PostDeleteActions();
|
parent::PostDeleteActions();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated 3.1.1 3.2.0 N°6967 We will have only one DBDelete method in the future
|
|
||||||
*/
|
|
||||||
protected function DBDeleteTracked_Internal(&$oDeletionPlan = null)
|
|
||||||
{
|
|
||||||
// Invoke extensions before the deletion (the deletion will do some cleanup and we might loose some information
|
|
||||||
/** @var \iApplicationObjectExtension $oExtensionInstance */
|
|
||||||
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
|
|
||||||
{
|
|
||||||
$sExtensionClass = get_class($oExtensionInstance);
|
|
||||||
$this->LogCRUDDebug(__METHOD__, "Calling $sExtensionClass::OnDBDelete()");
|
|
||||||
$oKPI = new ExecutionKPI();
|
|
||||||
$oExtensionInstance->OnDBDelete($this, self::GetCurrentChange());
|
|
||||||
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnDBDelete');
|
|
||||||
}
|
|
||||||
|
|
||||||
return parent::DBDeleteTracked_Internal($oDeletionPlan);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function IsModified()
|
public function IsModified()
|
||||||
{
|
{
|
||||||
if (parent::IsModified())
|
if (parent::IsModified())
|
||||||
@@ -4865,111 +4813,7 @@ HTML;
|
|||||||
/**
|
/**
|
||||||
* Special display where the case log uses the whole "screen" at the bottom of the "Properties" tab
|
* Special display where the case log uses the whole "screen" at the bottom of the "Properties" tab
|
||||||
*
|
*
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param string $sAttCode
|
|
||||||
* @param string $sComment
|
|
||||||
* @param string $sPrefix
|
|
||||||
* @param bool $bEditMode
|
|
||||||
*
|
|
||||||
* @throws \ArchivedObjectException
|
|
||||||
* @throws \CoreException
|
|
||||||
* @throws \CoreUnexpectedValue
|
|
||||||
* @throws \DictExceptionMissingString
|
|
||||||
* @throws \MySQLException
|
|
||||||
* @throws \OQLException
|
|
||||||
* @throws \Exception
|
|
||||||
* @deprecated 3.0.0, will be removed in 3.1.0
|
|
||||||
*/
|
|
||||||
public function DisplayCaseLog(WebPage $oPage, $sAttCode, $sComment = '', $sPrefix = '', $bEditMode = false)
|
|
||||||
{
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedPhpMethod();
|
|
||||||
$oPage->SetCurrentTab('UI:PropertiesTab');
|
|
||||||
$sClass = get_class($this);
|
|
||||||
|
|
||||||
if ($this->IsNew()) {
|
|
||||||
$iFlags = $this->GetInitialStateAttributeFlags($sAttCode);
|
|
||||||
} else {
|
|
||||||
$iFlags = $this->GetAttributeFlags($sAttCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($iFlags & OPT_ATT_HIDDEN) {
|
|
||||||
// The case log is hidden do nothing
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
$oAttDef = MetaModel::GetAttributeDef(get_class($this), $sAttCode);
|
|
||||||
$sAttDefClass = get_class($oAttDef);
|
|
||||||
$sAttLabel = $oAttDef->GetLabel();
|
|
||||||
$sAttMetaDataLabel = utils::HtmlEntities($sAttLabel);
|
|
||||||
$sAttMetaDataFlagHidden = (($iFlags & OPT_ATT_HIDDEN) === OPT_ATT_HIDDEN) ? 'true' : 'false';
|
|
||||||
$sAttMetaDataFlagReadOnly = (($iFlags & OPT_ATT_READONLY) === OPT_ATT_READONLY) ? 'true' : 'false';
|
|
||||||
$sAttMetaDataFlagMandatory = (($iFlags & OPT_ATT_MANDATORY) === OPT_ATT_MANDATORY) ? 'true' : 'false';
|
|
||||||
$sAttMetaDataFlagMustChange = (($iFlags & OPT_ATT_MUSTCHANGE) === OPT_ATT_MUSTCHANGE) ? 'true' : 'false';
|
|
||||||
$sAttMetaDataFlagMustPrompt = (($iFlags & OPT_ATT_MUSTPROMPT) === OPT_ATT_MUSTPROMPT) ? 'true' : 'false';
|
|
||||||
$sAttMetaDataFlagSlave = (($iFlags & OPT_ATT_SLAVE) === OPT_ATT_SLAVE) ? 'true' : 'false';
|
|
||||||
|
|
||||||
$sInputId = $this->m_iFormId.'_'.$sAttCode;
|
|
||||||
|
|
||||||
if ((!$bEditMode) || ($iFlags & (OPT_ATT_READONLY | OPT_ATT_SLAVE)))
|
|
||||||
{
|
|
||||||
// Check if the attribute is not read-only because of a synchro...
|
|
||||||
if ($iFlags & OPT_ATT_SLAVE)
|
|
||||||
{
|
|
||||||
$aReasons = array();
|
|
||||||
$sTip = '';
|
|
||||||
foreach($aReasons as $aRow) {
|
|
||||||
$sDescription = utils::EscapeHtml($aRow['description']);
|
|
||||||
$sDescription = str_replace(array("\r\n", "\n"), "<br/>", $sDescription);
|
|
||||||
$sTip .= "<div class=\"synchro-source\">";
|
|
||||||
$sTip .= "<div class=\"synchro-source-title\">Synchronized with {$aRow['name']}</div>";
|
|
||||||
$sTip .= "<div class=\"synchro-source-description\">$sDescription</div>";
|
|
||||||
}
|
|
||||||
$sTip = addslashes($sTip);
|
|
||||||
$oPage->add_ready_script("$('#synchro_$sInputId').qtip( { content: '$sTip', show: 'mouseover', hide: 'mouseout', style: { name: 'dark', tip: 'leftTop' }, position: { corner: { target: 'rightMiddle', tooltip: 'leftTop' }} } );");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Attribute is read-only
|
|
||||||
$sHTMLValue = $this->GetAsHTML($sAttCode);
|
|
||||||
$sHTMLValue .= '<input type="hidden" id="'.$sInputId.'" name="attr_'.$sPrefix.$sAttCode.'" value="'.utils::EscapeHtml($this->GetEditValue($sAttCode)).'"/>';
|
|
||||||
$aFieldsMap[$sAttCode] = $sInputId;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$sValue = $this->Get($sAttCode);
|
|
||||||
$sDisplayValue = $this->GetEditValue($sAttCode);
|
|
||||||
$aArgs = array('this' => $this, 'formPrefix' => $sPrefix);
|
|
||||||
|
|
||||||
$sCommentAsHtml = ($sComment != '') ? '<span>'.$sComment.'</span><br/>' : '';
|
|
||||||
$sFieldAsHtml = self::GetFormElementForField($oPage, $sClass, $sAttCode, $oAttDef, $sValue, $sDisplayValue, $sInputId, '', $iFlags, $aArgs);
|
|
||||||
$sHTMLValue = <<<HTML
|
|
||||||
<div class="field_data">
|
|
||||||
<div class="field_value">
|
|
||||||
$sCommentAsHtml
|
|
||||||
$sFieldAsHtml
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
HTML;
|
|
||||||
|
|
||||||
$aFieldsMap[$sAttCode] = $sInputId;
|
|
||||||
}
|
|
||||||
|
|
||||||
$oPage->add(<<<HTML
|
|
||||||
<fieldset>
|
|
||||||
<legend>{$sAttLabel}</legend>
|
|
||||||
<div class="field_container field_large" data-attribute-code="{$sAttCode}" data-attribute-type="{$sAttDefClass}" data-attribute-label="{$sAttMetaDataLabel}"
|
|
||||||
data-attribute-flag-hidden="{$sAttMetaDataFlagHidden}" data-attribute-flag-read-only="{$sAttMetaDataFlagReadOnly}" data-attribute-flag-mandatory="{$sAttMetaDataFlagMandatory}"
|
|
||||||
data-attribute-flag-must-change="{$sAttMetaDataFlagMustChange}" data-attribute-flag-must-prompt="{$sAttMetaDataFlagMustPrompt}" data-attribute-flag-slave="{$sAttMetaDataFlagSlave}">
|
|
||||||
{$sHTMLValue}
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
HTML
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Special display where the case log uses the whole "screen" at the bottom of the "Properties" tab
|
|
||||||
*
|
|
||||||
* @param \WebPage $oPage
|
|
||||||
* @param string $sAttCode
|
* @param string $sAttCode
|
||||||
* @param string $sComment
|
* @param string $sComment
|
||||||
* @param string $sPrefix
|
* @param string $sPrefix
|
||||||
@@ -5094,7 +4938,7 @@ HTML
|
|||||||
* Display a form for modifying several objects at once
|
* Display a form for modifying several objects at once
|
||||||
* The form will be submitted to the current page, with the specified additional values
|
* The form will be submitted to the current page, with the specified additional values
|
||||||
*
|
*
|
||||||
* @param \iTopWebPage $oP
|
* @param iTopWebPage $oP
|
||||||
* @param string $sClass
|
* @param string $sClass
|
||||||
* @param array $aSelectedObj
|
* @param array $aSelectedObj
|
||||||
* @param string $sCustomOperation
|
* @param string $sCustomOperation
|
||||||
@@ -5209,7 +5053,7 @@ HTML
|
|||||||
$aKeys = array_keys($aValues[$sAttCode]);
|
$aKeys = array_keys($aValues[$sAttCode]);
|
||||||
$currValue = $aKeys[0]; // The only value is the first key
|
$currValue = $aKeys[0]; // The only value is the first key
|
||||||
if ($oAttDef->GetEditClass() == 'LinkedSet') {
|
if ($oAttDef->GetEditClass() == 'LinkedSet') {
|
||||||
$oOrmLinkSet = $oDummyObj->Get($sAttCode);
|
$oOrmLinkSet = $oDummyObj->Get($sAttCode);
|
||||||
LinkSetDataTransformer::StringToOrmLinkSet($aValues[$sAttCode][$currValue]['edit_value'], $oOrmLinkSet);
|
LinkSetDataTransformer::StringToOrmLinkSet($aValues[$sAttCode][$currValue]['edit_value'], $oOrmLinkSet);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -5263,7 +5107,7 @@ HTML
|
|||||||
}
|
}
|
||||||
$oDummyObj->Set($sAttCode, $oTagSet);
|
$oDummyObj->Set($sAttCode, $oTagSet);
|
||||||
} else if ($oAttDef->GetEditClass() == 'LinkedSet') {
|
} else if ($oAttDef->GetEditClass() == 'LinkedSet') {
|
||||||
$oOrmLinkSet = $oDummyObj->Get($sAttCode);
|
$oOrmLinkSet = $oDummyObj->Get($sAttCode);
|
||||||
foreach ($aMultiValues as $key => $sValue) {
|
foreach ($aMultiValues as $key => $sValue) {
|
||||||
LinkSetDataTransformer::StringToOrmLinkSet($sValue['edit_value'], $oOrmLinkSet);
|
LinkSetDataTransformer::StringToOrmLinkSet($sValue['edit_value'], $oOrmLinkSet);
|
||||||
}
|
}
|
||||||
@@ -5338,7 +5182,7 @@ EOF
|
|||||||
/**
|
/**
|
||||||
* Process the reply made from a form built with DisplayBulkModifyForm
|
* Process the reply made from a form built with DisplayBulkModifyForm
|
||||||
*
|
*
|
||||||
* @param \WebPage $oP
|
* @param WebPage $oP
|
||||||
* @param string $sClass
|
* @param string $sClass
|
||||||
* @param array $aSelectedObj
|
* @param array $aSelectedObj
|
||||||
* @param string $sCustomOperation
|
* @param string $sCustomOperation
|
||||||
@@ -5478,7 +5322,7 @@ EOF
|
|||||||
/**
|
/**
|
||||||
* Perform all the needed checks to delete one (or more) objects
|
* Perform all the needed checks to delete one (or more) objects
|
||||||
*
|
*
|
||||||
* @param \WebPage $oP
|
* @param WebPage $oP
|
||||||
* @param $sClass
|
* @param $sClass
|
||||||
* @param \DBObject[] $aObjects
|
* @param \DBObject[] $aObjects
|
||||||
* @param $bPreview
|
* @param $bPreview
|
||||||
@@ -5942,14 +5786,14 @@ JS
|
|||||||
*
|
*
|
||||||
* @since 3.1.0
|
* @since 3.1.0
|
||||||
*/
|
*/
|
||||||
final protected function FireEventCheckToWrite(): void
|
final protected function FireEventCheckToWrite(?string $sStimulusBeingApplied): void
|
||||||
{
|
{
|
||||||
$this->FireEvent(EVENT_DB_CHECK_TO_WRITE, ['is_new' => $this->IsNew()]);
|
$this->FireEvent(EVENT_DB_CHECK_TO_WRITE, ['is_new' => $this->IsNew(), 'stimulus_applied' => $sStimulusBeingApplied]);
|
||||||
}
|
}
|
||||||
|
|
||||||
final protected function FireEventBeforeWrite()
|
final protected function FireEventBeforeWrite(?string $sStimulusBeingApplied)
|
||||||
{
|
{
|
||||||
$this->FireEvent(EVENT_DB_BEFORE_WRITE, ['is_new' => $this->IsNew()]);
|
$this->FireEvent(EVENT_DB_BEFORE_WRITE, ['is_new' => $this->IsNew(), 'stimulus_applied' => $sStimulusBeingApplied]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -5961,11 +5805,11 @@ JS
|
|||||||
* @throws \CoreException
|
* @throws \CoreException
|
||||||
* @since 3.1.0
|
* @since 3.1.0
|
||||||
*/
|
*/
|
||||||
final protected function FireEventAfterWrite(array $aChanges, bool $bIsNew): void
|
final protected function FireEventAfterWrite(array $aChanges, bool $bIsNew, ?string $sStimulusBeingApplied): void
|
||||||
{
|
{
|
||||||
$this->NotifyAttachedObjectsOnLinkClassModification();
|
$this->NotifyAttachedObjectsOnLinkClassModification();
|
||||||
$this->RemoveObjectAwaitingEventDbLinksChanged(get_class($this), $this->GetKey());
|
$this->RemoveObjectAwaitingEventDbLinksChanged(get_class($this), $this->GetKey());
|
||||||
$this->FireEvent(EVENT_DB_AFTER_WRITE, ['is_new' => $bIsNew, 'changes' => $aChanges]);
|
$this->FireEvent(EVENT_DB_AFTER_WRITE, ['is_new' => $bIsNew, 'changes' => $aChanges, 'stimulus_applied' => $sStimulusBeingApplied]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////
|
//////////////
|
||||||
@@ -6198,9 +6042,9 @@ JS
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @throws \CoreException
|
* @throws \CoreException
|
||||||
*/
|
*/
|
||||||
final protected function FireEventComputeValues(): void
|
final protected function FireEventComputeValues(?string $sStimulusBeingApplied): void
|
||||||
{
|
{
|
||||||
$this->FireEvent(EVENT_DB_COMPUTE_VALUES);
|
$this->FireEvent(EVENT_DB_COMPUTE_VALUES, ['is_new' => $this->IsNew(), 'stimulus_applied' => $sStimulusBeingApplied]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2023 Combodo SARL
|
* Copyright (C) 2013-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/CSVPage.php, now loadable using autoloader
|
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
|
||||||
*/
|
|
||||||
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/CSVPage.php, now loadable using autoloader');
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -9,6 +9,8 @@ use Combodo\iTop\Application\UI\Base\Component\DataTable\DataTableSettings;
|
|||||||
use Combodo\iTop\Application\UI\Base\Component\PopoverMenu\PopoverMenu;
|
use Combodo\iTop\Application\UI\Base\Component\PopoverMenu\PopoverMenu;
|
||||||
use Combodo\iTop\Application\UI\Base\Component\Toolbar\ToolbarUIBlockFactory;
|
use Combodo\iTop\Application\UI\Base\Component\Toolbar\ToolbarUIBlockFactory;
|
||||||
use Combodo\iTop\Application\UI\Base\Layout\Dashboard\DashboardLayout as DashboardLayoutUIBlock;
|
use Combodo\iTop\Application\UI\Base\Layout\Dashboard\DashboardLayout as DashboardLayoutUIBlock;
|
||||||
|
use Combodo\iTop\Application\WebPage\iTopWebPage;
|
||||||
|
use Combodo\iTop\Application\WebPage\WebPage;
|
||||||
|
|
||||||
require_once(APPROOT.'application/dashboardlayout.class.inc.php');
|
require_once(APPROOT.'application/dashboardlayout.class.inc.php');
|
||||||
require_once(APPROOT.'application/dashlet.class.inc.php');
|
require_once(APPROOT.'application/dashlet.class.inc.php');
|
||||||
@@ -294,21 +296,21 @@ abstract class Dashboard
|
|||||||
public function FromParams($aParams)
|
public function FromParams($aParams)
|
||||||
{
|
{
|
||||||
$this->sLayoutClass = $aParams['layout_class'];
|
$this->sLayoutClass = $aParams['layout_class'];
|
||||||
|
if (!is_subclass_of($this->sLayoutClass,DashboardLayout::class)) {
|
||||||
|
throw new InvalidParameterException('Invalid parameter layout_class "'.$aParams['layout_class'].'"');
|
||||||
|
}
|
||||||
$this->sTitle = $aParams['title'];
|
$this->sTitle = $aParams['title'];
|
||||||
$this->bAutoReload = $aParams['auto_reload'] == 'true';
|
$this->bAutoReload = $aParams['auto_reload'] == 'true';
|
||||||
$this->iAutoReloadSec = max(MetaModel::GetConfig()->Get('min_reload_interval'), (int) $aParams['auto_reload_sec']);
|
$this->iAutoReloadSec = max(MetaModel::GetConfig()->Get('min_reload_interval'), (int) $aParams['auto_reload_sec']);
|
||||||
|
|
||||||
foreach($aParams['cells'] as $aCell)
|
foreach($aParams['cells'] as $aCell) {
|
||||||
{
|
|
||||||
$aCellDashlets = array();
|
$aCellDashlets = array();
|
||||||
foreach($aCell as $aDashletParams)
|
foreach($aCell as $aDashletParams) {
|
||||||
{
|
|
||||||
$sDashletClass = $aDashletParams['dashlet_class'];
|
$sDashletClass = $aDashletParams['dashlet_class'];
|
||||||
$sId = $aDashletParams['dashlet_id'];
|
$sId = $aDashletParams['dashlet_id'];
|
||||||
/** @var \Dashlet $oNewDashlet */
|
/** @var \Dashlet $oNewDashlet */
|
||||||
$oNewDashlet = new $sDashletClass($this->oMetaModel, $sId);
|
$oNewDashlet = new $sDashletClass($this->oMetaModel, $sId);
|
||||||
if (isset($aDashletParams['dashlet_type']))
|
if (isset($aDashletParams['dashlet_type'])) {
|
||||||
{
|
|
||||||
$oNewDashlet->SetDashletType($aDashletParams['dashlet_type']);
|
$oNewDashlet->SetDashletType($aDashletParams['dashlet_type']);
|
||||||
}
|
}
|
||||||
$oForm = $oNewDashlet->GetForm();
|
$oForm = $oNewDashlet->GetForm();
|
||||||
@@ -422,7 +424,7 @@ abstract class Dashboard
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage *
|
* @param WebPage $oPage *
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
*
|
*
|
||||||
* @throws \ReflectionException
|
* @throws \ReflectionException
|
||||||
@@ -478,7 +480,7 @@ abstract class Dashboard
|
|||||||
CombodoTooltip.InitTooltipFromMarkup($("#attr_auto_reload_sec"));
|
CombodoTooltip.InitTooltipFromMarkup($("#attr_auto_reload_sec"));
|
||||||
$("#attr_auto_reload_sec").prop('disabled', !$('#attr_auto_reload').is(':checked'));
|
$("#attr_auto_reload_sec").prop('disabled', !$('#attr_auto_reload').is(':checked'));
|
||||||
|
|
||||||
$('#attr_auto_reload').change( function(ev) {
|
$('#attr_auto_reload').on('change', function(ev) {
|
||||||
$("#attr_auto_reload_sec").prop('disabled', !$(this).is(':checked'));
|
$("#attr_auto_reload_sec").prop('disabled', !$(this).is(':checked'));
|
||||||
} );
|
} );
|
||||||
|
|
||||||
@@ -513,7 +515,7 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param bool $bEditMode
|
* @param bool $bEditMode
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
* @param bool $bCanEdit
|
* @param bool $bCanEdit
|
||||||
@@ -522,9 +524,7 @@ EOF
|
|||||||
*/
|
*/
|
||||||
public function Render($oPage, $bEditMode = false, $aExtraParams = array(), $bCanEdit = true)
|
public function Render($oPage, $bEditMode = false, $aExtraParams = array(), $bCanEdit = true)
|
||||||
{
|
{
|
||||||
if (!array_key_exists('dashboard_div_id', $aExtraParams)) {
|
$aExtraParams['dashboard_div_id'] = utils::Sanitize($aExtraParams['dashboard_div_id'] ?? null, $this->GetId(), utils::ENUM_SANITIZATION_FILTER_ELEMENT_IDENTIFIER);
|
||||||
$aExtraParams['dashboard_div_id'] = utils::Sanitize($this->GetId(), '', 'element_identifier');
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @var \DashboardLayoutMultiCol $oLayout */
|
/** @var \DashboardLayoutMultiCol $oLayout */
|
||||||
$oLayout = new $this->sLayoutClass();
|
$oLayout = new $this->sLayoutClass();
|
||||||
@@ -561,15 +561,15 @@ JS
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$bEditMode) {
|
if (!$bEditMode) {
|
||||||
$oPage->add_linked_script('../js/dashlet.js');
|
$oPage->LinkScriptFromAppRoot('js/dashlet.js');
|
||||||
$oPage->add_linked_script('../js/dashboard.js');
|
$oPage->LinkScriptFromAppRoot('js/dashboard.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $oDashboard;
|
return $oDashboard;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
*
|
*
|
||||||
* @throws \ReflectionException
|
* @throws \ReflectionException
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
@@ -592,7 +592,7 @@ JS
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
*/
|
*/
|
||||||
public function RenderDashletsProperties(WebPage $oPage, $aExtraParams = array())
|
public function RenderDashletsProperties(WebPage $oPage, $aExtraParams = array())
|
||||||
@@ -1050,7 +1050,7 @@ EOF
|
|||||||
$sSelectorHtml .= '</div>';
|
$sSelectorHtml .= '</div>';
|
||||||
|
|
||||||
$sFile = addslashes($this->GetDefinitionFile());
|
$sFile = addslashes($this->GetDefinitionFile());
|
||||||
$sReloadURL = $this->GetReloadURL();
|
$sReloadURL = json_encode($this->GetReloadURL());
|
||||||
|
|
||||||
$bFromDashboardPage = isset($aAjaxParams['from_dashboard_page']) ? isset($aAjaxParams['from_dashboard_page']) : false;
|
$bFromDashboardPage = isset($aAjaxParams['from_dashboard_page']) ? isset($aAjaxParams['from_dashboard_page']) : false;
|
||||||
if ($bFromDashboardPage) {
|
if ($bFromDashboardPage) {
|
||||||
@@ -1109,15 +1109,15 @@ JS
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
*
|
*
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
protected function RenderEditionTools(WebPage $oPage, DashboardLayoutUIBlock $oDashboard, $aExtraParams)
|
protected function RenderEditionTools(WebPage $oPage, DashboardLayoutUIBlock $oDashboard, $aExtraParams)
|
||||||
{
|
{
|
||||||
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.iframe-transport.js');
|
$oPage->LinkScriptFromAppRoot('node_modules/blueimp-file-upload/js/jquery.iframe-transport.js');
|
||||||
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.fileupload.js');
|
$oPage->LinkScriptFromAppRoot('node_modules/blueimp-file-upload/js/jquery.fileupload.js');
|
||||||
$sId = utils::Sanitize($this->GetId(), '', 'element_identifier');
|
$sId = utils::Sanitize($this->GetId(), '', 'element_identifier');
|
||||||
|
|
||||||
$sMenuTogglerId = "ibo-dashboard-menu-toggler-{$sId}";
|
$sMenuTogglerId = "ibo-dashboard-menu-toggler-{$sId}";
|
||||||
@@ -1139,7 +1139,6 @@ JS
|
|||||||
->AddCSSClass('ibo-action-button');
|
->AddCSSClass('ibo-action-button');
|
||||||
|
|
||||||
$oToolbar->AddSubBlock($oActionButton);
|
$oToolbar->AddSubBlock($oActionButton);
|
||||||
|
|
||||||
$aActions = array();
|
$aActions = array();
|
||||||
$sFile = addslashes(utils::LocalPath($this->sDefinitionFile));
|
$sFile = addslashes(utils::LocalPath($this->sDefinitionFile));
|
||||||
$sJSExtraParams = json_encode($aExtraParams);
|
$sJSExtraParams = json_encode($aExtraParams);
|
||||||
@@ -1164,7 +1163,7 @@ JS
|
|||||||
$oToolbar->AddSubBlock($oActionButton)
|
$oToolbar->AddSubBlock($oActionButton)
|
||||||
->AddSubBlock($oActionsMenu);
|
->AddSubBlock($oActionsMenu);
|
||||||
|
|
||||||
$sReloadURL = $this->GetReloadURL();
|
$sReloadURL = json_encode($this->GetReloadURL());
|
||||||
$oPage->add_script(
|
$oPage->add_script(
|
||||||
<<<EOF
|
<<<EOF
|
||||||
function EditDashboard(sId, sDashboardFile, aExtraParams)
|
function EditDashboard(sId, sDashboardFile, aExtraParams)
|
||||||
@@ -1228,7 +1227,7 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
*
|
*
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
*
|
*
|
||||||
@@ -1271,7 +1270,7 @@ EOF
|
|||||||
$sTitle = json_encode($this->sTitle);
|
$sTitle = json_encode($this->sTitle);
|
||||||
$sFile = json_encode($this->GetDefinitionFile());
|
$sFile = json_encode($this->GetDefinitionFile());
|
||||||
$sUrl = utils::GetAbsoluteUrlAppRoot().'pages/ajax.render.php';
|
$sUrl = utils::GetAbsoluteUrlAppRoot().'pages/ajax.render.php';
|
||||||
$sReloadURL = $this->GetReloadURL();
|
$sReloadURL = json_encode($this->GetReloadURL());
|
||||||
|
|
||||||
$sExitConfirmationMessage = addslashes(Dict::S('UI:NavigateAwayConfirmationMessage'));
|
$sExitConfirmationMessage = addslashes(Dict::S('UI:NavigateAwayConfirmationMessage'));
|
||||||
$sCancelConfirmationMessage = addslashes(Dict::S('UI:CancelConfirmationMessage'));
|
$sCancelConfirmationMessage = addslashes(Dict::S('UI:CancelConfirmationMessage'));
|
||||||
@@ -1488,7 +1487,7 @@ JS
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param $sOQL
|
* @param $sOQL
|
||||||
*
|
*
|
||||||
* @throws \DictExceptionMissingString
|
* @throws \DictExceptionMissingString
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -19,11 +19,12 @@ use Combodo\iTop\Application\UI\Base\Component\Html\Html;
|
|||||||
use Combodo\iTop\Application\UI\Base\Layout\Dashboard\DashboardColumn;
|
use Combodo\iTop\Application\UI\Base\Layout\Dashboard\DashboardColumn;
|
||||||
use Combodo\iTop\Application\UI\Base\Layout\Dashboard\DashboardLayout as DashboardLayoutUIBlock;
|
use Combodo\iTop\Application\UI\Base\Layout\Dashboard\DashboardLayout as DashboardLayoutUIBlock;
|
||||||
use Combodo\iTop\Application\UI\Base\Layout\Dashboard\DashboardRow;
|
use Combodo\iTop\Application\UI\Base\Layout\Dashboard\DashboardRow;
|
||||||
|
use Combodo\iTop\Application\WebPage\WebPage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dashboard presentation
|
* Dashboard presentation
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
abstract class DashboardLayout
|
abstract class DashboardLayout
|
||||||
@@ -106,7 +107,7 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param $aCells
|
* @param $aCells
|
||||||
* @param bool $bEditMode
|
* @param bool $bEditMode
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2012-2023 Combodo SARL
|
// Copyright (C) 2012-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -23,13 +23,14 @@ use Combodo\iTop\Application\UI\Base\Component\Html\Html;
|
|||||||
use Combodo\iTop\Application\UI\Base\Component\Panel\PanelUIBlockFactory;
|
use Combodo\iTop\Application\UI\Base\Component\Panel\PanelUIBlockFactory;
|
||||||
use Combodo\iTop\Application\UI\Base\iUIBlock;
|
use Combodo\iTop\Application\UI\Base\iUIBlock;
|
||||||
use Combodo\iTop\Application\UI\Base\UIBlock;
|
use Combodo\iTop\Application\UI\Base\UIBlock;
|
||||||
|
use Combodo\iTop\Application\WebPage\WebPage;
|
||||||
|
|
||||||
require_once(APPROOT.'application/forms.class.inc.php');
|
require_once(APPROOT.'application/forms.class.inc.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for all 'dashlets' (i.e. widgets to be inserted into a dashboard)
|
* Base class for all 'dashlets' (i.e. widgets to be inserted into a dashboard)
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
abstract class Dashlet
|
abstract class Dashlet
|
||||||
@@ -222,7 +223,7 @@ abstract class Dashlet
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param bool $bEditMode
|
* @param bool $bEditMode
|
||||||
* @param bool $bEnclosingDiv
|
* @param bool $bEnclosingDiv
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
@@ -298,7 +299,7 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param bool $bEditMode
|
* @param bool $bEditMode
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
*
|
*
|
||||||
@@ -309,7 +310,7 @@ EOF
|
|||||||
/**
|
/**
|
||||||
* Rendering without the real data
|
* Rendering without the real data
|
||||||
*
|
*
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param bool $bEditMode
|
* @param bool $bEditMode
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
*
|
*
|
||||||
@@ -1966,7 +1967,10 @@ class DashletHeaderStatic extends Dashlet
|
|||||||
$sIcon = $this->aProperties['icon'];
|
$sIcon = $this->aProperties['icon'];
|
||||||
|
|
||||||
$oIconSelect = $this->oModelReflection->GetIconSelectionField('icon');
|
$oIconSelect = $this->oModelReflection->GetIconSelectionField('icon');
|
||||||
$sIconPath = utils::HtmlEntities($oIconSelect->MakeFileUrl($sIcon));
|
$sIconPath = '';
|
||||||
|
if (Utils::IsNotNullOrEmptyString($sIcon)) {
|
||||||
|
$sIconPath = utils::HtmlEntities($oIconSelect->MakeFileUrl($sIcon));
|
||||||
|
}
|
||||||
|
|
||||||
return DashletFactory::MakeForDashletHeaderStatic($this->oModelReflection->DictString($sTitle), $sIconPath);
|
return DashletFactory::MakeForDashletHeaderStatic($this->oModelReflection->DictString($sTitle), $sIconPath);
|
||||||
}
|
}
|
||||||
@@ -1980,6 +1984,7 @@ class DashletHeaderStatic extends Dashlet
|
|||||||
$oForm->AddField($oField);
|
$oForm->AddField($oField);
|
||||||
|
|
||||||
$oField = $this->oModelReflection->GetIconSelectionField('icon', Dict::S('UI:DashletHeaderStatic:Prop-Icon'), $this->aProperties['icon']);
|
$oField = $this->oModelReflection->GetIconSelectionField('icon', Dict::S('UI:DashletHeaderStatic:Prop-Icon'), $this->aProperties['icon']);
|
||||||
|
$oField->AddAllowedValue(['value' => '', 'label' => Dict::S('UI:DashletIcon:None'), 'icon' => '']);
|
||||||
$oForm->AddField($oField);
|
$oForm->AddField($oField);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2092,7 +2097,10 @@ class DashletHeaderDynamic extends Dashlet
|
|||||||
$sGroupBy = $this->aProperties['group_by'];
|
$sGroupBy = $this->aProperties['group_by'];
|
||||||
|
|
||||||
$oIconSelect = $this->oModelReflection->GetIconSelectionField('icon');
|
$oIconSelect = $this->oModelReflection->GetIconSelectionField('icon');
|
||||||
$sIconPath = $oIconSelect->MakeFileUrl($sIcon);
|
$sIconPath = '';
|
||||||
|
if (Utils::IsNotNullOrEmptyString($sIcon)) {
|
||||||
|
$sIconPath = $oIconSelect->MakeFileUrl($sIcon);
|
||||||
|
}
|
||||||
|
|
||||||
$aValues = $this->GetValues();
|
$aValues = $this->GetValues();
|
||||||
if (count($aValues) > 0) {
|
if (count($aValues) > 0) {
|
||||||
@@ -2137,7 +2145,7 @@ class DashletHeaderDynamic extends Dashlet
|
|||||||
$oSet = new DBObjectSet($oFilter);
|
$oSet = new DBObjectSet($oFilter);
|
||||||
$iCount = $oSet->Count();
|
$iCount = $oSet->Count();
|
||||||
$oAppContext = new ApplicationContext();
|
$oAppContext = new ApplicationContext();
|
||||||
$sHyperlink = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search&'.$oAppContext->GetForLink().'&filter='.rawurlencode($oFilter->serialize());
|
$sHyperlink = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search'.$oAppContext->GetForLink(true).'&filter='.rawurlencode($oFilter->serialize());
|
||||||
$oSubTitle->AddHtml('<a class="summary" href="'.$sHyperlink.'">'.Dict::Format(str_replace('_', ':', $sSubtitle), $iCount).'</a>');
|
$oSubTitle->AddHtml('<a class="summary" href="'.$sHyperlink.'">'.Dict::Format(str_replace('_', ':', $sSubtitle), $iCount).'</a>');
|
||||||
|
|
||||||
return $oPanel;
|
return $oPanel;
|
||||||
@@ -2222,6 +2230,7 @@ class DashletHeaderDynamic extends Dashlet
|
|||||||
$oForm->AddField($oField);
|
$oForm->AddField($oField);
|
||||||
|
|
||||||
$oField = $this->oModelReflection->GetIconSelectionField('icon', Dict::S('UI:DashletHeaderDynamic:Prop-Icon'), $this->aProperties['icon']);
|
$oField = $this->oModelReflection->GetIconSelectionField('icon', Dict::S('UI:DashletHeaderDynamic:Prop-Icon'), $this->aProperties['icon']);
|
||||||
|
$oField->AddAllowedValue(['value' => '', 'label' => Dict::S('UI:DashletIcon:None'), 'icon' => '']);
|
||||||
$oForm->AddField($oField);
|
$oForm->AddField($oField);
|
||||||
|
|
||||||
$oField = new DesignerTextField('subtitle', Dict::S('UI:DashletHeaderDynamic:Prop-Subtitle'), $this->aProperties['subtitle']);
|
$oField = new DesignerTextField('subtitle', Dict::S('UI:DashletHeaderDynamic:Prop-Subtitle'), $this->aProperties['subtitle']);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.1">
|
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3">
|
||||||
<classes>
|
<classes>
|
||||||
<class id="AbstractResource" _delta="define">
|
<class id="AbstractResource" _delta="define">
|
||||||
<parent>cmdbAbstractObject</parent>
|
<parent>cmdbAbstractObject</parent>
|
||||||
@@ -40,6 +40,36 @@
|
|||||||
<presentation/>
|
<presentation/>
|
||||||
<methods/>
|
<methods/>
|
||||||
</class>
|
</class>
|
||||||
|
<class id="WelcomePopupAcknowledge" _delta="define">
|
||||||
|
<parent>DBObject</parent>
|
||||||
|
<properties>
|
||||||
|
<comment>/** Acknowledge welcome popup messages */</comment>
|
||||||
|
<abstract>false</abstract>
|
||||||
|
<category/>
|
||||||
|
<key_type>autoincrement</key_type>
|
||||||
|
<db_table>priv_welcome_popup_acknowledge</db_table>
|
||||||
|
</properties>
|
||||||
|
<fields>
|
||||||
|
<field id="message_uuid" xsi:type="AttributeString">
|
||||||
|
<sql>message_uuid</sql>
|
||||||
|
<default_value/>
|
||||||
|
<is_null_allowed>false</is_null_allowed>
|
||||||
|
</field>
|
||||||
|
<field id="user_id" xsi:type="AttributeExternalKey">
|
||||||
|
<sql>user_id</sql>
|
||||||
|
<target_class>User</target_class>
|
||||||
|
<is_null_allowed>false</is_null_allowed>
|
||||||
|
<on_target_delete>DEL_SILENT</on_target_delete>
|
||||||
|
</field>
|
||||||
|
<field id="acknowledge_date" xsi:type="AttributeDateTime">
|
||||||
|
<sql>acknowledge_date</sql>
|
||||||
|
<default_value/>
|
||||||
|
<is_null_allowed>false</is_null_allowed>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<presentation/>
|
||||||
|
<methods/>
|
||||||
|
</class>
|
||||||
</classes>
|
</classes>
|
||||||
<portals>
|
<portals>
|
||||||
<portal id="backoffice" _delta="define">
|
<portal id="backoffice" _delta="define">
|
||||||
@@ -81,7 +111,6 @@
|
|||||||
<menu id="UserManagement" xsi:type="TemplateMenuNode" _delta="define">
|
<menu id="UserManagement" xsi:type="TemplateMenuNode" _delta="define">
|
||||||
<rank>10</rank>
|
<rank>10</rank>
|
||||||
<parent>AdminTools</parent>
|
<parent>AdminTools</parent>
|
||||||
<template_file/>
|
|
||||||
</menu>
|
</menu>
|
||||||
<menu id="UserAccountsMenu" xsi:type="OQLMenuNode" _delta="define">
|
<menu id="UserAccountsMenu" xsi:type="OQLMenuNode" _delta="define">
|
||||||
<rank>11</rank>
|
<rank>11</rank>
|
||||||
@@ -111,7 +140,6 @@
|
|||||||
<menu id="Queries" xsi:type="TemplateMenuNode" _delta="define">
|
<menu id="Queries" xsi:type="TemplateMenuNode" _delta="define">
|
||||||
<rank>30</rank>
|
<rank>30</rank>
|
||||||
<parent>AdminTools</parent>
|
<parent>AdminTools</parent>
|
||||||
<template_file/>
|
|
||||||
</menu>
|
</menu>
|
||||||
<menu id="RunQueriesMenu" xsi:type="WebPageMenuNode" _delta="define">
|
<menu id="RunQueriesMenu" xsi:type="WebPageMenuNode" _delta="define">
|
||||||
<rank>31</rank>
|
<rank>31</rank>
|
||||||
@@ -155,6 +183,10 @@
|
|||||||
<decoration_classes>fas fa-cog</decoration_classes>
|
<decoration_classes>fas fa-cog</decoration_classes>
|
||||||
</style>
|
</style>
|
||||||
</menu>
|
</menu>
|
||||||
|
<menu id="Integrations" xsi:type="TemplateMenuNode" _delta="define">
|
||||||
|
<rank>50</rank>
|
||||||
|
<parent>ConfigurationTools</parent>
|
||||||
|
</menu>
|
||||||
<menu id="DataSources" xsi:type="OQLMenuNode" _delta="define">
|
<menu id="DataSources" xsi:type="OQLMenuNode" _delta="define">
|
||||||
<rank>20</rank>
|
<rank>20</rank>
|
||||||
<parent>ConfigurationTools</parent>
|
<parent>ConfigurationTools</parent>
|
||||||
@@ -203,6 +235,10 @@ The object can be modified.]]></description>
|
|||||||
<description>Creation flag</description>
|
<description>Creation flag</description>
|
||||||
<type>boolean</type>
|
<type>boolean</type>
|
||||||
</event_datum>
|
</event_datum>
|
||||||
|
<event_datum id="stimulus_applied">
|
||||||
|
<description>Life cycle stimulus applied (null if not within a transition)</description>
|
||||||
|
<type>string</type>
|
||||||
|
</event_datum>
|
||||||
<event_datum id="debug_info">
|
<event_datum id="debug_info">
|
||||||
<description>Debug string</description>
|
<description>Debug string</description>
|
||||||
<type>string</type>
|
<type>string</type>
|
||||||
@@ -212,7 +248,9 @@ The object can be modified.]]></description>
|
|||||||
<event id="EVENT_DB_CHECK_TO_WRITE" _delta="define">
|
<event id="EVENT_DB_CHECK_TO_WRITE" _delta="define">
|
||||||
<name>Check to write</name>
|
<name>Check to write</name>
|
||||||
<description><![CDATA[Check an object before it is written into the database (no change possible).
|
<description><![CDATA[Check an object before it is written into the database (no change possible).
|
||||||
Call $this->AddCheckIssue() to signal an issue.]]></description>
|
Call $this->AddCheckIssue($sErrorMessage) to report a blocking issue.
|
||||||
|
Call $this->AddCheckWarning($sWarningMessage) to display a warning.
|
||||||
|
]]></description>
|
||||||
<sources>
|
<sources>
|
||||||
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
||||||
</sources>
|
</sources>
|
||||||
@@ -226,6 +264,10 @@ Call $this->AddCheckIssue() to signal an issue.]]></description>
|
|||||||
<description>Creation flag</description>
|
<description>Creation flag</description>
|
||||||
<type>boolean</type>
|
<type>boolean</type>
|
||||||
</event_datum>
|
</event_datum>
|
||||||
|
<event_datum id="stimulus_applied">
|
||||||
|
<description>Life cycle stimulus applied (null if not within a transition)</description>
|
||||||
|
<type>string</type>
|
||||||
|
</event_datum>
|
||||||
<event_datum id="debug_info">
|
<event_datum id="debug_info">
|
||||||
<description>Debug string</description>
|
<description>Debug string</description>
|
||||||
<type>string</type>
|
<type>string</type>
|
||||||
@@ -253,6 +295,10 @@ The modifications can be propagated to other objects.]]></description>
|
|||||||
<description><![CDATA[For updates, the list of changes done during this operation]]></description>
|
<description><![CDATA[For updates, the list of changes done during this operation]]></description>
|
||||||
<type>array</type>
|
<type>array</type>
|
||||||
</event_datum>
|
</event_datum>
|
||||||
|
<event_datum id="stimulus_applied">
|
||||||
|
<description>Life cycle stimulus applied (null if not within a transition)</description>
|
||||||
|
<type>string</type>
|
||||||
|
</event_datum>
|
||||||
<event_datum id="debug_info">
|
<event_datum id="debug_info">
|
||||||
<description>Debug string</description>
|
<description>Debug string</description>
|
||||||
<type>string</type>
|
<type>string</type>
|
||||||
@@ -262,7 +308,7 @@ The modifications can be propagated to other objects.]]></description>
|
|||||||
<event id="EVENT_DB_CHECK_TO_DELETE" _delta="define">
|
<event id="EVENT_DB_CHECK_TO_DELETE" _delta="define">
|
||||||
<name>Check to delete</name>
|
<name>Check to delete</name>
|
||||||
<description><![CDATA[Check an object before it is deleted from the database.
|
<description><![CDATA[Check an object before it is deleted from the database.
|
||||||
Call $this->AddDeleteIssue() to signal an issue.]]></description>
|
Call $this->AddDeleteIssue($sIssueMessage) to signal an issue.]]></description>
|
||||||
<sources>
|
<sources>
|
||||||
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
||||||
</sources>
|
</sources>
|
||||||
@@ -317,7 +363,7 @@ Call $this->AddDeleteIssue() to signal an issue.]]></description>
|
|||||||
<event id="EVENT_ENUM_TRANSITIONS" _delta="define">
|
<event id="EVENT_ENUM_TRANSITIONS" _delta="define">
|
||||||
<name>Enum transitions</name>
|
<name>Enum transitions</name>
|
||||||
<description><![CDATA[Manage the allowed transitions in current object state.
|
<description><![CDATA[Manage the allowed transitions in current object state.
|
||||||
The only action allowed is to deny transitions with $this->DenyTransition()]]></description>
|
The only action allowed is to deny transitions with $this->DenyTransition($sTransitionCode)]]></description>
|
||||||
<sources>
|
<sources>
|
||||||
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
||||||
</sources>
|
</sources>
|
||||||
@@ -383,6 +429,14 @@ The only action allowed is to deny transitions with $this->DenyTransition()]]></
|
|||||||
<description>The object inserted</description>
|
<description>The object inserted</description>
|
||||||
<type>DBObject</type>
|
<type>DBObject</type>
|
||||||
</event_datum>
|
</event_datum>
|
||||||
|
<event_datum id="is_new">
|
||||||
|
<description>Creation flag</description>
|
||||||
|
<type>boolean</type>
|
||||||
|
</event_datum>
|
||||||
|
<event_datum id="stimulus_applied">
|
||||||
|
<description>Life cycle stimulus applied (null if not within a transition)</description>
|
||||||
|
<type>string</type>
|
||||||
|
</event_datum>
|
||||||
<event_datum id="debug_info">
|
<event_datum id="debug_info">
|
||||||
<description>Debug string</description>
|
<description>Debug string</description>
|
||||||
<type>string</type>
|
<type>string</type>
|
||||||
@@ -426,7 +480,7 @@ The only action allowed is to deny transitions with $this->DenyTransition()]]></
|
|||||||
<event id="EVENT_DB_SET_ATTRIBUTES_FLAGS" _delta="define">
|
<event id="EVENT_DB_SET_ATTRIBUTES_FLAGS" _delta="define">
|
||||||
<name>Set attributes flags</name>
|
<name>Set attributes flags</name>
|
||||||
<description><![CDATA[Set object attributes flags.
|
<description><![CDATA[Set object attributes flags.
|
||||||
Call $this->AddAttributeFlags() for all the attributes to be set for this target state.]]></description>
|
Call $this->AddAttributeFlags($sAttCode, $iFlags) for all the attributes to be set for this target state.]]></description>
|
||||||
<sources>
|
<sources>
|
||||||
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
||||||
</sources>
|
</sources>
|
||||||
@@ -448,7 +502,7 @@ Call $this->AddAttributeFlags() for all the attributes to be set for this target
|
|||||||
<event id="EVENT_DB_SET_INITIAL_ATTRIBUTES_FLAGS" _delta="define">
|
<event id="EVENT_DB_SET_INITIAL_ATTRIBUTES_FLAGS" _delta="define">
|
||||||
<name>Set initial attributes flags</name>
|
<name>Set initial attributes flags</name>
|
||||||
<description><![CDATA[Set object initial attributes flags.
|
<description><![CDATA[Set object initial attributes flags.
|
||||||
Call $this->AddInitialAttributeFlags() for all the initial attributes to be set initially.]]></description>
|
Call $this->AddInitialAttributeFlags($sAttCode, $iFlags) for all the initial attributes to be set initially.]]></description>
|
||||||
<sources>
|
<sources>
|
||||||
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
|
||||||
</sources>
|
</sources>
|
||||||
@@ -474,10 +528,18 @@ Call $this->AddInitialAttributeFlags() for all the initial attributes to be set
|
|||||||
<description>The object containing the document</description>
|
<description>The object containing the document</description>
|
||||||
<type>DBObject</type>
|
<type>DBObject</type>
|
||||||
</event_datum>
|
</event_datum>
|
||||||
|
<event_datum id="att_code">
|
||||||
|
<description>The optional object attribute code hosting the document</description>
|
||||||
|
<type>string</type>
|
||||||
|
</event_datum>
|
||||||
<event_datum id="document">
|
<event_datum id="document">
|
||||||
<description>The document downloaded</description>
|
<description>The document downloaded</description>
|
||||||
<type>ormDocument</type>
|
<type>ormDocument</type>
|
||||||
</event_datum>
|
</event_datum>
|
||||||
|
<event_datum id="content_disposition">
|
||||||
|
<description>The content disposition of the document ("inline" or "attachment")</description>
|
||||||
|
<type>string</type>
|
||||||
|
</event_datum>
|
||||||
<event_datum id="debug_info">
|
<event_datum id="debug_info">
|
||||||
<description>Debug string</description>
|
<description>Debug string</description>
|
||||||
<type>string</type>
|
<type>string</type>
|
||||||
|
|||||||
@@ -1,877 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Combodo\iTop\Renderer\Console\ConsoleBlockRenderer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copyright (C) 2013-2023 Combodo SARL
|
|
||||||
*
|
|
||||||
* This file is part of iTop.
|
|
||||||
*
|
|
||||||
* iTop is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* iTop is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
*
|
|
||||||
* @deprecated 3.0.0 use Combodo\iTop\Application\UI\Base\Component\DataTable\Datatable
|
|
||||||
*/
|
|
||||||
|
|
||||||
class DataTable
|
|
||||||
{
|
|
||||||
protected $iListId; // Unique ID inside the web page
|
|
||||||
/** @var string */
|
|
||||||
private $sDatatableContainerId;
|
|
||||||
protected $sTableId; // identifier for saving the settings (combined with the class aliases)
|
|
||||||
protected $oSet; // The set of objects to display
|
|
||||||
protected $aClassAliases; // The aliases (alias => class) inside the set
|
|
||||||
protected $iNbObjects; // Total number of objects in the set
|
|
||||||
protected $bUseCustomSettings; // Whether or not the current display uses custom settings
|
|
||||||
protected $oDefaultSettings; // the default settings for displaying such a list
|
|
||||||
protected $bShowObsoleteData;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $iListId Unique ID for this div/table in the page
|
|
||||||
* @param DBObjectSet $oSet The set of data to display
|
|
||||||
* @param array$aClassAliases The list of classes/aliases to be displayed in this set $sAlias => $sClassName
|
|
||||||
* @param string $sTableId A string (or null) identifying this table in order to persist its settings
|
|
||||||
*
|
|
||||||
* @throws \CoreException
|
|
||||||
* @throws \MissingQueryArgument
|
|
||||||
* @throws \MySQLException
|
|
||||||
* @throws \MySQLHasGoneAwayException
|
|
||||||
*/
|
|
||||||
public function __construct($iListId, $oSet, $aClassAliases, $sTableId = null)
|
|
||||||
{
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedPhpMethod('use Combodo\iTop\Application\UI\Base\Component\DataTable\Datatable');
|
|
||||||
$this->iListId = utils::GetSafeId($iListId); // Make a "safe" ID for jQuery
|
|
||||||
$this->sDatatableContainerId = 'datatable_'.utils::GetSafeId($iListId);
|
|
||||||
$this->oSet = $oSet;
|
|
||||||
$this->aClassAliases = $aClassAliases;
|
|
||||||
$this->sTableId = $sTableId;
|
|
||||||
$this->iNbObjects = $oSet->Count();
|
|
||||||
$this->bUseCustomSettings = false;
|
|
||||||
$this->oDefaultSettings = null;
|
|
||||||
$this->bShowObsoleteData = $oSet->GetShowObsoleteData();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \WebPage $oPage
|
|
||||||
* @param \DataTableSettings $oSettings
|
|
||||||
* @param $bActionsMenu
|
|
||||||
* @param $sSelectMode
|
|
||||||
* @param $bViewLink
|
|
||||||
* @param $aExtraParams
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
* @throws \CoreException
|
|
||||||
* @throws \MySQLException
|
|
||||||
*/
|
|
||||||
public function Display(WebPage $oPage, DataTableSettings $oSettings, $bActionsMenu, $sSelectMode, $bViewLink, $aExtraParams)
|
|
||||||
{
|
|
||||||
$this->oDefaultSettings = $oSettings;
|
|
||||||
|
|
||||||
// Identified tables can have their own specific settings
|
|
||||||
$oCustomSettings = DataTableSettings::GetTableSettings($this->aClassAliases, $this->sTableId);
|
|
||||||
|
|
||||||
if ($oCustomSettings != null)
|
|
||||||
{
|
|
||||||
// Custom settings overload the default ones
|
|
||||||
$this->bUseCustomSettings = true;
|
|
||||||
if ($this->oDefaultSettings->iDefaultPageSize == 0)
|
|
||||||
{
|
|
||||||
$oCustomSettings->iDefaultPageSize = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$oCustomSettings = $oSettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($oCustomSettings->iDefaultPageSize > 0)
|
|
||||||
{
|
|
||||||
$this->oSet->SetLimit($oCustomSettings->iDefaultPageSize);
|
|
||||||
}
|
|
||||||
$this->oSet->SetOrderBy($oCustomSettings->GetSortOrder());
|
|
||||||
|
|
||||||
// Load only the requested columns
|
|
||||||
$aColumnsToLoad = array();
|
|
||||||
foreach($oCustomSettings->aColumns as $sAlias => $aColumnsInfo)
|
|
||||||
{
|
|
||||||
foreach($aColumnsInfo as $sAttCode => $aData)
|
|
||||||
{
|
|
||||||
if ($sAttCode != '_key_')
|
|
||||||
{
|
|
||||||
if ($aData['checked'])
|
|
||||||
{
|
|
||||||
$aColumnsToLoad[$sAlias][] = $sAttCode;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// See if this column is a must to load
|
|
||||||
$sClass = $this->aClassAliases[$sAlias];
|
|
||||||
$oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
|
|
||||||
if ($oAttDef->AlwaysLoadInTables()) {
|
|
||||||
$aColumnsToLoad[$sAlias][] = $sAttCode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$this->oSet->OptimizeColumnLoad($aColumnsToLoad);
|
|
||||||
|
|
||||||
|
|
||||||
$bToolkitMenu = true;
|
|
||||||
if (isset($aExtraParams['toolkit_menu']))
|
|
||||||
{
|
|
||||||
$bToolkitMenu = (bool) $aExtraParams['toolkit_menu'];
|
|
||||||
}
|
|
||||||
if (UserRights::IsPortalUser())
|
|
||||||
{
|
|
||||||
// Portal users have a limited access to data, for now they can only see what's configured for them
|
|
||||||
$bToolkitMenu = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->GetAsHTML($oPage, $oCustomSettings->iDefaultPageSize, $oCustomSettings->iDefaultPageSize, 0, $oCustomSettings->aColumns, $bActionsMenu, $bToolkitMenu, $sSelectMode, $bViewLink, $aExtraParams);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \WebPage $oPage
|
|
||||||
* @param $iPageSize
|
|
||||||
* @param $iDefaultPageSize
|
|
||||||
* @param $iPageIndex
|
|
||||||
* @param $aColumns
|
|
||||||
* @param $bActionsMenu
|
|
||||||
* @param $bToolkitMenu
|
|
||||||
* @param $sSelectMode
|
|
||||||
* @param $bViewLink
|
|
||||||
* @param $aExtraParams
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
* @throws \ArchivedObjectException
|
|
||||||
* @throws \CoreException
|
|
||||||
*/
|
|
||||||
public function GetAsHTML(WebPage $oPage, $iPageSize, $iDefaultPageSize, $iPageIndex, $aColumns, $bActionsMenu, $bToolkitMenu, $sSelectMode, $bViewLink, $aExtraParams)
|
|
||||||
{
|
|
||||||
$sObjectsCount = $this->GetObjectCount($oPage, $sSelectMode);
|
|
||||||
$sPager = $this->GetPager($oPage, $iPageSize, $iDefaultPageSize, $iPageIndex);
|
|
||||||
$sActionsMenu = '';
|
|
||||||
$sToolkitMenu = '';
|
|
||||||
if ($bActionsMenu) {
|
|
||||||
$sActionsMenu = $this->GetActionsMenu($oPage, $aExtraParams);
|
|
||||||
}
|
|
||||||
// if ($bToolkitMenu)
|
|
||||||
// {
|
|
||||||
// $sToolkitMenu = $this->GetToolkitMenu($oPage, $aExtraParams);
|
|
||||||
// }
|
|
||||||
|
|
||||||
$sDataTable = $this->GetHTMLTable($oPage, $aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams);
|
|
||||||
$sConfigDlg = $this->GetTableConfigDlg($oPage, $aColumns, $bViewLink, $iDefaultPageSize);
|
|
||||||
|
|
||||||
$sHtml = "<table id=\"{$this->sDatatableContainerId}\" class=\"datatable\">";
|
|
||||||
$sHtml .= "<tr><td>";
|
|
||||||
$sHtml .= "<table style=\"width:100%;\">";
|
|
||||||
$sHtml .= "<tr><td class=\"pagination_container\">$sObjectsCount</td><td class=\"menucontainer\">$sToolkitMenu $sActionsMenu</td></tr>";
|
|
||||||
$sHtml .= "<tr>$sPager</tr>";
|
|
||||||
$sHtml .= "</table>";
|
|
||||||
$sHtml .= "</td></tr>";
|
|
||||||
$sHtml .= "<tr><td class=\"datacontents\">$sDataTable</td></tr>";
|
|
||||||
$sHtml .= "</table>\n";
|
|
||||||
$oPage->add_at_the_end($sConfigDlg);
|
|
||||||
|
|
||||||
$aExtraParams['show_obsolete_data'] = $this->bShowObsoleteData;
|
|
||||||
|
|
||||||
$aOptions = array(
|
|
||||||
'sPersistentId' => '',
|
|
||||||
'sFilter' => $this->oSet->GetFilter()->serialize(),
|
|
||||||
'oColumns' => $aColumns,
|
|
||||||
'sSelectMode' => $sSelectMode,
|
|
||||||
'sViewLink' => ($bViewLink ? 'true' : 'false'),
|
|
||||||
'iNbObjects' => $this->iNbObjects,
|
|
||||||
'iDefaultPageSize' => $iDefaultPageSize,
|
|
||||||
'iPageSize' => $iPageSize,
|
|
||||||
'iPageIndex' => $iPageIndex,
|
|
||||||
'oClassAliases' => $this->aClassAliases,
|
|
||||||
'sTableId' => $this->sTableId,
|
|
||||||
'oExtraParams' => $aExtraParams,
|
|
||||||
'sRenderUrl' => utils::GetAbsoluteUrlAppRoot().'pages/ajax.render.php',
|
|
||||||
'oRenderParameters' => array('str' => ''), // Forces JSON to encode this as a object...
|
|
||||||
'oDefaultSettings' => array('str' => ''), // Forces JSON to encode this as a object...
|
|
||||||
'oLabels' => array('moveup' => Dict::S('UI:Button:MoveUp'), 'movedown' => Dict::S('UI:Button:MoveDown')),
|
|
||||||
);
|
|
||||||
if($this->oDefaultSettings != null)
|
|
||||||
{
|
|
||||||
$aOptions['oDefaultSettings'] = $this->GetAsHash($this->oDefaultSettings);
|
|
||||||
}
|
|
||||||
$sJSOptions = json_encode($aOptions);
|
|
||||||
$oPage->add_ready_script("$('#{$this->sDatatableContainerId}').datatable($sJSOptions);");
|
|
||||||
|
|
||||||
return $sHtml;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* When refreshing the body of a paginated table, get the rows of the table (inside the TBODY)
|
|
||||||
* return string The HTML rows to insert inside the <tbody> node
|
|
||||||
*/
|
|
||||||
public function GetAsHTMLTableRows(WebPage $oPage, $iPageSize, $aColumns, $sSelectMode, $bViewLink, $aExtraParams)
|
|
||||||
{
|
|
||||||
if ($iPageSize < 1)
|
|
||||||
{
|
|
||||||
$iPageSize = -1; // convention: no pagination
|
|
||||||
}
|
|
||||||
$aAttribs = $this->GetHTMLTableConfig($aColumns, $sSelectMode, $bViewLink);
|
|
||||||
$aValues = $this->GetHTMLTableValues($aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams);
|
|
||||||
|
|
||||||
$sHtml = '';
|
|
||||||
foreach($aValues as $aRow)
|
|
||||||
{
|
|
||||||
$sHtml .= $oPage->GetTableRow($aRow, $aAttribs);
|
|
||||||
}
|
|
||||||
return $sHtml;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \WebPage $oPage
|
|
||||||
* @param $sSelectMode
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected function GetObjectCount(WebPage $oPage, $sSelectMode)
|
|
||||||
{
|
|
||||||
if (($sSelectMode == 'single') || ($sSelectMode == 'multiple'))
|
|
||||||
{
|
|
||||||
$sHtml = '<div class="pagination_objcount">'.Dict::Format('UI:Pagination:HeaderSelection', '<span id="total">'.$this->iNbObjects.'</span>', '<span class="selectedCount">0</span>').'</div>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$sHtml = '<div class="pagination_objcount">'.Dict::Format('UI:Pagination:HeaderNoSelection', '<span id="total">'.$this->iNbObjects.'</span>').'</div>';
|
|
||||||
}
|
|
||||||
return $sHtml;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \WebPage $oPage
|
|
||||||
* @param $iPageSize
|
|
||||||
* @param $iDefaultPageSize
|
|
||||||
* @param $iPageIndex
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected function GetPager(WebPage $oPage, $iPageSize, $iDefaultPageSize, $iPageIndex)
|
|
||||||
{
|
|
||||||
$sHtml = '';
|
|
||||||
if ($iPageSize < 1) // Display all
|
|
||||||
{
|
|
||||||
$sPagerStyle = 'style="display:none"'; // no limit: display the full table, so hide the "pager" UI
|
|
||||||
// WARNING: mPDF does not take the "display" style into account
|
|
||||||
// when applied to a <td> or a <table> tag, so make sure you apply this to a div
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$sPagerStyle = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$sCombo = '<select class="pagesize">';
|
|
||||||
if($iPageSize < 1)
|
|
||||||
{
|
|
||||||
$sCombo .= "<option selected=\"selected\" value=\"-1\">".Dict::S('UI:Pagination:All')."</option>";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for($iPage = 1; $iPage < 5; $iPage++)
|
|
||||||
{
|
|
||||||
$iNbItems = $iPage * $iDefaultPageSize;
|
|
||||||
$sSelected = ($iNbItems == $iPageSize) ? 'selected="selected"' : '';
|
|
||||||
$sCombo .= "<option $sSelected value=\"$iNbItems\">$iNbItems</option>";
|
|
||||||
}
|
|
||||||
$sCombo .= "<option value=\"-1\">".Dict::S('UI:Pagination:All')."</option>";
|
|
||||||
}
|
|
||||||
|
|
||||||
$sCombo .= '</select>';
|
|
||||||
|
|
||||||
$sPages = Dict::S('UI:Pagination:PagesLabel');
|
|
||||||
$sPageSizeCombo = Dict::Format('UI:Pagination:PageSize', $sCombo);
|
|
||||||
|
|
||||||
$iNbPages = ($iPageSize < 1) ? 1 : ceil($this->iNbObjects / $iPageSize);
|
|
||||||
if ($iNbPages == 1)
|
|
||||||
{
|
|
||||||
// No need to display the pager
|
|
||||||
$sPagerStyle = 'style="display:none"';
|
|
||||||
}
|
|
||||||
$aPagesToDisplay = array();
|
|
||||||
for($idx = 0; $idx <= min(4, $iNbPages-1); $idx++)
|
|
||||||
{
|
|
||||||
if ($idx == 0)
|
|
||||||
{
|
|
||||||
$aPagesToDisplay[$idx] = '<span page="0" class="curr_page">1</span>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$aPagesToDisplay[$idx] = "<span id=\"gotopage_$idx\" class=\"gotopage\" page=\"$idx\">".(1+$idx)."</span>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$iLastPageIdx = $iNbPages - 1;
|
|
||||||
if (!isset($aPagesToDisplay[$iLastPageIdx]))
|
|
||||||
{
|
|
||||||
unset($aPagesToDisplay[$idx - 1]); // remove the last page added to make room for the very last page
|
|
||||||
$aPagesToDisplay[$iLastPageIdx] = "<span id=\"gotopage_$iLastPageIdx\" class=\"gotopage\" page=\"$iLastPageIdx\">... $iNbPages</span>";
|
|
||||||
}
|
|
||||||
$sPagesLinks = implode('', $aPagesToDisplay);
|
|
||||||
$sPagesList = '['.implode(',', array_keys($aPagesToDisplay)).']';
|
|
||||||
|
|
||||||
$sSelectionMode = ($iNbPages == 1) ? '' : 'positive';
|
|
||||||
$sHtml =
|
|
||||||
<<<EOF
|
|
||||||
<td colspan="2">
|
|
||||||
<div $sPagerStyle>
|
|
||||||
<table id="pager{$this->iListId}" class="pager"><tr>
|
|
||||||
<td>$sPages</td>
|
|
||||||
<td><img src="../images/first.png" class="first"/></td>
|
|
||||||
<td><img src="../images/prev.png" class="prev"/></td>
|
|
||||||
<td><span id="index">$sPagesLinks</span></td>
|
|
||||||
<td><img src="../images/next.png" class="next"/></td>
|
|
||||||
<td><img src="../images/last.png" class="last"/></td>
|
|
||||||
<td>$sPageSizeCombo</td>
|
|
||||||
<td><span id="loading"> </span><input type="hidden" name="selectionMode" value="$sSelectionMode"></input>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
EOF;
|
|
||||||
return $sHtml;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \WebPage $oPage
|
|
||||||
* @param $aExtraParams
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
* @throws \ApplicationException
|
|
||||||
* @throws \ArchivedObjectException
|
|
||||||
* @throws \CoreException
|
|
||||||
* @throws \CoreUnexpectedValue
|
|
||||||
* @throws \DictExceptionMissingString
|
|
||||||
* @throws \MissingQueryArgument
|
|
||||||
* @throws \MySQLException
|
|
||||||
* @throws \MySQLHasGoneAwayException
|
|
||||||
* @throws \OQLException
|
|
||||||
* @throws \ReflectionException
|
|
||||||
* @throws \Twig\Error\LoaderError
|
|
||||||
* @throws \Twig\Error\RuntimeError
|
|
||||||
* @throws \Twig\Error\SyntaxError
|
|
||||||
*/
|
|
||||||
protected function GetActionsMenu(WebPage $oPage, $aExtraParams)
|
|
||||||
{
|
|
||||||
$oMenuBlock = new MenuBlock($this->oSet->GetFilter(), 'list');
|
|
||||||
$oBlock = $oMenuBlock->GetRenderContent($oPage, $aExtraParams, $this->iListId);
|
|
||||||
|
|
||||||
return ConsoleBlockRenderer::RenderBlockTemplateInPage($oPage, $oBlock);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \WebPage $oPage
|
|
||||||
* @param $aExtraParams
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
* @throws \Exception
|
|
||||||
*/
|
|
||||||
protected function GetToolkitMenu(WebPage $oPage, $aExtraParams)
|
|
||||||
{
|
|
||||||
if (!$oPage->IsPrintableVersion())
|
|
||||||
{
|
|
||||||
$sMenuTitle = Dict::S('UI:ConfigureThisList');
|
|
||||||
$sHtml = '<div class="itop_popup toolkit_menu" id="tk_'.$this->iListId.'"><ul><li aria-label="'.Dict::S('UI:Menu:Toolkit').'"><i class="fas fa-tools"></i><i class="fas fa-caret-down"></i><ul>';
|
|
||||||
|
|
||||||
$oMenuItem1 = new JSPopupMenuItem('iTop::ConfigureList', $sMenuTitle, "$('#datatable_dlg_".$this->iListId."').dialog('open');");
|
|
||||||
$aActions = array(
|
|
||||||
$oMenuItem1->GetUID() => $oMenuItem1->GetMenuItem(),
|
|
||||||
);
|
|
||||||
$this->oSet->Rewind();
|
|
||||||
utils::GetPopupMenuItems($oPage, iPopupMenuExtension::MENU_OBJLIST_TOOLKIT, $this->oSet, $aActions, $this->sTableId, $this->iListId);
|
|
||||||
$this->oSet->Rewind();
|
|
||||||
$sHtml .= $oPage->RenderPopupMenuItems($aActions);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$sHtml = '';
|
|
||||||
}
|
|
||||||
return $sHtml;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \WebPage $oPage
|
|
||||||
* @param $aColumns
|
|
||||||
* @param $bViewLink
|
|
||||||
* @param $iDefaultPageSize
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected function GetTableConfigDlg(WebPage $oPage, $aColumns, $bViewLink, $iDefaultPageSize)
|
|
||||||
{
|
|
||||||
$sHtml = "<div id=\"datatable_dlg_{$this->iListId}\" style=\"display: none;\">";
|
|
||||||
$sHtml .= "<form onsubmit=\"return false\">";
|
|
||||||
$sChecked = ($this->bUseCustomSettings) ? '' : 'checked';
|
|
||||||
$sHtml .= "<p><input id=\"dtbl_dlg_settings_{$this->iListId}\" type=\"radio\" name=\"settings\" $sChecked value=\"defaults\"><label for=\"dtbl_dlg_settings_{$this->iListId}\"> ".Dict::S('UI:UseDefaultSettings').'</label></p>';
|
|
||||||
$sHtml .= "<fieldset>";
|
|
||||||
$sChecked = ($this->bUseCustomSettings) ? 'checked': '';
|
|
||||||
$sHtml .= "<legend class=\"transparent\"><input id=\"dtbl_dlg_specific_{$this->iListId}\" type=\"radio\" class=\"specific_settings\" name=\"settings\" $sChecked value=\"specific\"><label for=\"dtbl_dlg_specific_{$this->iListId}\"> ".Dict::S('UI:UseSpecificSettings')."</label></legend>";
|
|
||||||
$sHtml .= Dict::S('UI:ColumnsAndSortOrder').'<br/><ul class="sortable_field_list" id="sfl_'.$this->iListId.'"></ul>';
|
|
||||||
|
|
||||||
$sHtml .= '<p>'.Dict::Format('UI:Display_X_ItemsPerPage', '<input type="text" size="4" name="page_size" value="'.$iDefaultPageSize.'">').'</p>';
|
|
||||||
$sHtml .= "</fieldset>";
|
|
||||||
$sHtml .= "<fieldset>";
|
|
||||||
$sSaveChecked = ($this->sTableId != null) ? 'checked' : '';
|
|
||||||
$sCustomDisabled = ($this->sTableId == null) ? 'disabled="disabled" stay-disabled="true" ' : '';
|
|
||||||
$sCustomChecked = ($this->sTableId != null) ? 'checked' : '';
|
|
||||||
$sGenericChecked = ($this->sTableId == null) ? 'checked' : '';
|
|
||||||
$sHtml .= "<legend class=\"transparent\"><input id=\"dtbl_dlg_save_{$this->iListId}\" type=\"checkbox\" $sSaveChecked name=\"save_settings\"><label for=\"dtbl_dlg_save_{$this->iListId}\"> ".Dict::S('UI:UseSavetheSettings')."</label></legend>";
|
|
||||||
$sHtml .= "<p><input id=\"dtbl_dlg_this_list_{$this->iListId}\" type=\"radio\" name=\"scope\" $sCustomChecked $sCustomDisabled value=\"this_list\"><label for=\"dtbl_dlg_this_list_{$this->iListId}\"> ".Dict::S('UI:OnlyForThisList').'</label> ';
|
|
||||||
$sHtml .= "<input id=\"dtbl_dlg_all_{$this->iListId}\" type=\"radio\" name=\"scope\" $sGenericChecked value=\"defaults\"><label for=\"dtbl_dlg_all_{$this->iListId}\"> ".Dict::S('UI:ForAllLists').'</label></p>';
|
|
||||||
$sHtml .= "</fieldset>";
|
|
||||||
$sHtml .= '<table style="width:100%"><tr><td style="text-align:center;">';
|
|
||||||
$sHtml .= '<button type="button" onclick="$(\'#'.$this->sDatatableContainerId.'\').datatable(\'onDlgCancel\'); $(\'#datatable_dlg_'.$this->iListId.'\').dialog(\'close\')">'.Dict::S('UI:Button:Cancel').'</button>';
|
|
||||||
$sHtml .= '</td><td style="text-align:center;">';
|
|
||||||
$sHtml .= '<button type="submit" onclick="$(\'#'.$this->sDatatableContainerId.'\').datatable(\'onDlgOk\');$(\'#datatable_dlg_'.$this->iListId.'\').dialog(\'close\');">'.Dict::S('UI:Button:Ok').'</button>';
|
|
||||||
$sHtml .= '</td></tr></table>';
|
|
||||||
$sHtml .= "</form>";
|
|
||||||
$sHtml .= "</div>";
|
|
||||||
|
|
||||||
$sDlgTitle = addslashes(Dict::S('UI:ListConfigurationTitle'));
|
|
||||||
$oPage->add_ready_script("$('#datatable_dlg_{$this->iListId}').dialog({autoOpen: false, title: '$sDlgTitle', width: 500, close: function() { $('#{$this->sDatatableContainerId}').datatable('onDlgCancel'); } });");
|
|
||||||
|
|
||||||
return $sHtml;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $oSetting
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function GetAsHash($oSetting)
|
|
||||||
{
|
|
||||||
$aSettings = array('iDefaultPageSize' => $oSetting->iDefaultPageSize, 'oColumns' => $oSetting->aColumns);
|
|
||||||
return $aSettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $aColumns
|
|
||||||
* @param string $sSelectMode
|
|
||||||
* @param bool $bViewLink
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
* @throws \CoreException
|
|
||||||
* @throws \DictExceptionMissingString
|
|
||||||
* @throws \Exception
|
|
||||||
*/
|
|
||||||
protected function GetHTMLTableConfig($aColumns, $sSelectMode, $bViewLink)
|
|
||||||
{
|
|
||||||
$aAttribs = array();
|
|
||||||
if ($sSelectMode == 'multiple')
|
|
||||||
{
|
|
||||||
$aAttribs['form::select'] = array(
|
|
||||||
'label' => "<input type=\"checkbox\" onClick=\"CheckAll('.selectList{$this->iListId}:not(:disabled)', this.checked);\" class=\"checkAll\"></input>",
|
|
||||||
'description' => Dict::S('UI:SelectAllToggle+'),
|
|
||||||
'metadata' => array(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else if ($sSelectMode == 'single')
|
|
||||||
{
|
|
||||||
$aAttribs['form::select'] = array('label' => '', 'description' => '', 'metadata' => array());
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach($this->aClassAliases as $sAlias => $sClassName)
|
|
||||||
{
|
|
||||||
foreach($aColumns[$sAlias] as $sAttCode => $aData)
|
|
||||||
{
|
|
||||||
if ($aData['checked'])
|
|
||||||
{
|
|
||||||
if ($sAttCode == '_key_')
|
|
||||||
{
|
|
||||||
$sAttLabel = MetaModel::GetName($sClassName);
|
|
||||||
|
|
||||||
$aAttribs['key_'.$sAlias] = array(
|
|
||||||
'label' => $sAttLabel,
|
|
||||||
'description' => '',
|
|
||||||
'metadata' => array(
|
|
||||||
'object_class' => $sClassName,
|
|
||||||
'attribute_label' => $sAttLabel,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$oAttDef = MetaModel::GetAttributeDef($sClassName, $sAttCode);
|
|
||||||
$sAttDefClass = get_class($oAttDef);
|
|
||||||
$sAttLabel = MetaModel::GetLabel($sClassName, $sAttCode);
|
|
||||||
|
|
||||||
$aAttribs[$sAttCode.'_'.$sAlias] = array(
|
|
||||||
'label' => $sAttLabel,
|
|
||||||
'description' => $oAttDef->GetOrderByHint(),
|
|
||||||
'metadata' => array(
|
|
||||||
'object_class' => $sClassName,
|
|
||||||
'attribute_code' => $sAttCode,
|
|
||||||
'attribute_type' => $sAttDefClass,
|
|
||||||
'attribute_label' => $sAttLabel,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $aAttribs;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $aColumns
|
|
||||||
* @param $sSelectMode
|
|
||||||
* @param $iPageSize
|
|
||||||
* @param $bViewLink
|
|
||||||
* @param $aExtraParams
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
* @throws \CoreException
|
|
||||||
* @throws \CoreUnexpectedValue
|
|
||||||
* @throws \MissingQueryArgument
|
|
||||||
* @throws \MySQLException
|
|
||||||
* @throws \MySQLHasGoneAwayException
|
|
||||||
* @throws \Exception
|
|
||||||
*/
|
|
||||||
protected function GetHTMLTableValues($aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams)
|
|
||||||
{
|
|
||||||
$bLocalize = true;
|
|
||||||
if (isset($aExtraParams['localize_values']))
|
|
||||||
{
|
|
||||||
$bLocalize = (bool) $aExtraParams['localize_values'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$aValues = array();
|
|
||||||
$aAttDefsCache = array();
|
|
||||||
$this->oSet->Seek(0);
|
|
||||||
$iMaxObjects = $iPageSize;
|
|
||||||
while (($aObjects = $this->oSet->FetchAssoc()) && ($iMaxObjects != 0))
|
|
||||||
{
|
|
||||||
$bFirstObject = true;
|
|
||||||
$aRow = array();
|
|
||||||
foreach($this->aClassAliases as $sAlias => $sClassName)
|
|
||||||
{
|
|
||||||
if (is_object($aObjects[$sAlias]))
|
|
||||||
{
|
|
||||||
$sHilightClass = $aObjects[$sAlias]->GetHilightClass();
|
|
||||||
if ($sHilightClass != '')
|
|
||||||
{
|
|
||||||
$aRow['@class'] = $sHilightClass;
|
|
||||||
}
|
|
||||||
if ((($sSelectMode == 'single') || ($sSelectMode == 'multiple')) && $bFirstObject)
|
|
||||||
{
|
|
||||||
if (array_key_exists('selection_enabled', $aExtraParams) && isset($aExtraParams['selection_enabled'][$aObjects[$sAlias]->GetKey()]))
|
|
||||||
{
|
|
||||||
$sDisabled = ($aExtraParams['selection_enabled'][$aObjects[$sAlias]->GetKey()]) ? '' : ' disabled="disabled"';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$sDisabled = '';
|
|
||||||
}
|
|
||||||
if ($sSelectMode == 'single')
|
|
||||||
{
|
|
||||||
$aRow['form::select'] = "<input type=\"radio\" $sDisabled class=\"selectList{$this->iListId}\" name=\"selectObject\" value=\"".$aObjects[$sAlias]->GetKey()."\"></input>";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$aRow['form::select'] = "<input type=\"checkbox\" $sDisabled class=\"selectList{$this->iListId}\" name=\"selectObject[]\" value=\"".$aObjects[$sAlias]->GetKey()."\"></input>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach($aColumns[$sAlias] as $sAttCode => $aData)
|
|
||||||
{
|
|
||||||
if ($aData['checked'])
|
|
||||||
{
|
|
||||||
if ($sAttCode == '_key_')
|
|
||||||
{
|
|
||||||
$aRow['key_'.$sAlias] = array(
|
|
||||||
'value_raw' => $aObjects[$sAlias]->GetKey(),
|
|
||||||
'value_html' => $aObjects[$sAlias]->GetHyperLink(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Prepare att. def. classes cache to avoid retrieving AttDef for each row
|
|
||||||
if(!isset($aAttDefsCache[$sClassName][$sAttCode]))
|
|
||||||
{
|
|
||||||
$aAttDefClassesCache[$sClassName][$sAttCode] = get_class(MetaModel::GetAttributeDef($sClassName, $sAttCode));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only retrieve raw (stored) value for simple fields
|
|
||||||
$bExcludeRawValue = false;
|
|
||||||
foreach (cmdbAbstractObject::GetAttDefClassesToExcludeFromMarkupMetadataRawValue() as $sAttDefClassToExclude)
|
|
||||||
{
|
|
||||||
if (is_a($aAttDefClassesCache[$sClassName][$sAttCode], $sAttDefClassToExclude, true))
|
|
||||||
{
|
|
||||||
$bExcludeRawValue = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if($bExcludeRawValue)
|
|
||||||
{
|
|
||||||
$aRow[$sAttCode.'_'.$sAlias] = $aObjects[$sAlias]->GetAsHTML($sAttCode, $bLocalize);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$aRow[$sAttCode.'_'.$sAlias] = array(
|
|
||||||
'value_raw' => $aObjects[$sAlias]->Get($sAttCode),
|
|
||||||
'value_html' => $aObjects[$sAlias]->GetAsHTML($sAttCode, $bLocalize),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach($aColumns[$sAlias] as $sAttCode => $aData)
|
|
||||||
{
|
|
||||||
if ($aData['checked'])
|
|
||||||
{
|
|
||||||
if ($sAttCode == '_key_')
|
|
||||||
{
|
|
||||||
$aRow['key_'.$sAlias] = '';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$aRow[$sAttCode.'_'.$sAlias] = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$bFirstObject = false;
|
|
||||||
}
|
|
||||||
$aValues[] = $aRow;
|
|
||||||
$iMaxObjects--;
|
|
||||||
}
|
|
||||||
return $aValues;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \WebPage $oPage
|
|
||||||
* @param $aColumns
|
|
||||||
* @param $sSelectMode
|
|
||||||
* @param $iPageSize
|
|
||||||
* @param $bViewLink
|
|
||||||
* @param $aExtraParams
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
* @throws \ArchivedObjectException
|
|
||||||
* @throws \CoreException
|
|
||||||
* @throws \CoreUnexpectedValue
|
|
||||||
* @throws \DictExceptionMissingString
|
|
||||||
* @throws \MissingQueryArgument
|
|
||||||
* @throws \MySQLException
|
|
||||||
* @throws \MySQLHasGoneAwayException
|
|
||||||
* @throws \Exception
|
|
||||||
*/
|
|
||||||
public function GetHTMLTable(WebPage $oPage, $aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams)
|
|
||||||
{
|
|
||||||
$iNbPages = ($iPageSize < 1) ? 1 : ceil($this->iNbObjects / $iPageSize);
|
|
||||||
if ($iPageSize < 1)
|
|
||||||
{
|
|
||||||
$iPageSize = -1; // convention: no pagination
|
|
||||||
}
|
|
||||||
$aAttribs = $this->GetHTMLTableConfig($aColumns, $sSelectMode, $bViewLink);
|
|
||||||
|
|
||||||
$aValues = $this->GetHTMLTableValues($aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams);
|
|
||||||
|
|
||||||
$sHtml = '<table class="listContainer object-list">';
|
|
||||||
|
|
||||||
foreach($this->oSet->GetFilter()->GetInternalParams() as $sName => $sValue)
|
|
||||||
{
|
|
||||||
$aExtraParams['query_params'][$sName] = $sValue;
|
|
||||||
}
|
|
||||||
$aExtraParams['show_obsolete_data'] = $this->bShowObsoleteData;
|
|
||||||
|
|
||||||
$sHtml .= "<tr><td>";
|
|
||||||
$sHtml .= $oPage->GetTable($aAttribs, $aValues);
|
|
||||||
$sHtml .= '</td></tr>';
|
|
||||||
$sHtml .= '</table>';
|
|
||||||
$iCount = $this->iNbObjects;
|
|
||||||
|
|
||||||
$aArgs = $this->oSet->GetArgs();
|
|
||||||
$sExtraParams = addslashes(str_replace('"', "'", json_encode(array_merge($aExtraParams, $aArgs)))); // JSON encode, change the style of the quotes and escape them
|
|
||||||
$sSelectModeJS = '';
|
|
||||||
$sHeaders = '';
|
|
||||||
if (($sSelectMode == 'single') || ($sSelectMode == 'multiple'))
|
|
||||||
{
|
|
||||||
$sSelectModeJS = $sSelectMode;
|
|
||||||
$sHeaders = 'headers: { 0: {sorter: false}},';
|
|
||||||
}
|
|
||||||
$sDisplayKey = ($bViewLink) ? 'true' : 'false';
|
|
||||||
// Protect against duplicate elements in the Zlist
|
|
||||||
$aUniqueOrderedList = array();
|
|
||||||
foreach($this->aClassAliases as $sAlias => $sClassName)
|
|
||||||
{
|
|
||||||
foreach($aColumns[$sAlias] as $sAttCode => $aData)
|
|
||||||
{
|
|
||||||
if ($aData['checked'])
|
|
||||||
{
|
|
||||||
$aUniqueOrderedList[$sAttCode] = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$aUniqueOrderedList = array_keys($aUniqueOrderedList);
|
|
||||||
$sJSColumns = json_encode($aColumns);
|
|
||||||
$sJSClassAliases = json_encode($this->aClassAliases);
|
|
||||||
$sCssCount = isset($aExtraParams['cssCount']) ? ", cssCount: '{$aExtraParams['cssCount']}'" : '';
|
|
||||||
$this->oSet->ApplyParameters();
|
|
||||||
// Display the actual sort order of the table
|
|
||||||
$aRealSortOrder = $this->oSet->GetRealSortOrder();
|
|
||||||
$aDefaultSort = array();
|
|
||||||
$iColOffset = 0;
|
|
||||||
if (($sSelectMode == 'single') || ($sSelectMode == 'multiple'))
|
|
||||||
{
|
|
||||||
$iColOffset += 1;
|
|
||||||
}
|
|
||||||
if ($bViewLink)
|
|
||||||
{
|
|
||||||
// $iColOffset += 1;
|
|
||||||
}
|
|
||||||
foreach($aRealSortOrder as $sColCode => $bAscending)
|
|
||||||
{
|
|
||||||
$iPos = array_search($sColCode, $aUniqueOrderedList);
|
|
||||||
if ($iPos !== false)
|
|
||||||
{
|
|
||||||
$aDefaultSort[] = "[".($iColOffset+$iPos).",".($bAscending ? '0' : '1')."]";
|
|
||||||
}
|
|
||||||
else if (($iPos = array_search(preg_replace('/_friendlyname$/', '', $sColCode), $aUniqueOrderedList)) !== false)
|
|
||||||
{
|
|
||||||
// if sorted on the friendly name of an external key, then consider it sorted on the column that shows the links
|
|
||||||
$aDefaultSort[] = "[".($iColOffset+$iPos).",".($bAscending ? '0' : '1')."]";
|
|
||||||
}
|
|
||||||
else if($sColCode == 'friendlyname' && $bViewLink)
|
|
||||||
{
|
|
||||||
$aDefaultSort[] = "[".($iColOffset).",".($bAscending ? '0' : '1')."]";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$sFakeSortList = '';
|
|
||||||
if (count($aDefaultSort) > 0)
|
|
||||||
{
|
|
||||||
$sFakeSortList = '['.implode(',', $aDefaultSort).']';
|
|
||||||
}
|
|
||||||
$sOQL = addslashes($this->oSet->GetFilter()->serialize());
|
|
||||||
$oPage->add_ready_script(
|
|
||||||
<<<JS
|
|
||||||
var oTable = $('#{$this->sDatatableContainerId} table.listResults');
|
|
||||||
oTable.tableHover();
|
|
||||||
oTable
|
|
||||||
.tablesorter({ $sHeaders widgets: ['myZebra', 'truncatedList']})
|
|
||||||
.tablesorterPager({
|
|
||||||
container: $('#pager{$this->iListId}'),
|
|
||||||
totalRows:$iCount,
|
|
||||||
size: $iPageSize,
|
|
||||||
filter: '$sOQL',
|
|
||||||
extra_params: '$sExtraParams',
|
|
||||||
select_mode: '$sSelectModeJS',
|
|
||||||
displayKey: $sDisplayKey,
|
|
||||||
table_id: '{$this->sDatatableContainerId}',
|
|
||||||
columns: $sJSColumns,
|
|
||||||
class_aliases: $sJSClassAliases $sCssCount
|
|
||||||
});
|
|
||||||
JS
|
|
||||||
);
|
|
||||||
if ($sFakeSortList != '')
|
|
||||||
{
|
|
||||||
$oPage->add_ready_script("oTable.trigger(\"fakesorton\", [$sFakeSortList]);");
|
|
||||||
}
|
|
||||||
return $sHtml;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \WebPage $oPage
|
|
||||||
* @param $iDefaultPageSize
|
|
||||||
* @param $iStart
|
|
||||||
*/
|
|
||||||
public function UpdatePager(WebPage $oPage, $iDefaultPageSize, $iStart)
|
|
||||||
{
|
|
||||||
$iPageSize = $iDefaultPageSize;
|
|
||||||
$iPageIndex = 0;
|
|
||||||
$sHtml = $this->GetPager($oPage, $iPageSize, $iDefaultPageSize, $iPageIndex);
|
|
||||||
$oPage->add_ready_script("$('#pager{$this->iListId}').html('".json_encode($sHtml)."');");
|
|
||||||
if ($iDefaultPageSize < 1)
|
|
||||||
{
|
|
||||||
$oPage->add_ready_script("$('#pager{$this->iListId}').parent().hide()");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$oPage->add_ready_script("$('#pager{$this->iListId}').parent().show()");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Simplified version of the data table with less "decoration" (and no paging)
|
|
||||||
* which is optimized for printing
|
|
||||||
*/
|
|
||||||
class PrintableDataTable extends DataTable
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param \WebPage $oPage
|
|
||||||
* @param $iPageSize
|
|
||||||
* @param $iDefaultPageSize
|
|
||||||
* @param $iPageIndex
|
|
||||||
* @param $aColumns
|
|
||||||
* @param $bActionsMenu
|
|
||||||
* @param $bToolkitMenu
|
|
||||||
* @param $sSelectMode
|
|
||||||
* @param $bViewLink
|
|
||||||
* @param $aExtraParams
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
* @throws \ArchivedObjectException
|
|
||||||
* @throws \CoreException
|
|
||||||
* @throws \CoreUnexpectedValue
|
|
||||||
* @throws \DictExceptionMissingString
|
|
||||||
* @throws \MissingQueryArgument
|
|
||||||
* @throws \MySQLException
|
|
||||||
* @throws \MySQLHasGoneAwayException
|
|
||||||
*/
|
|
||||||
public function GetAsHTML(WebPage $oPage, $iPageSize, $iDefaultPageSize, $iPageIndex, $aColumns, $bActionsMenu, $bToolkitMenu, $sSelectMode, $bViewLink, $aExtraParams)
|
|
||||||
{
|
|
||||||
return $this->GetHTMLTable($oPage, $aColumns, $sSelectMode, -1, $bViewLink, $aExtraParams);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \WebPage $oPage
|
|
||||||
* @param $aColumns
|
|
||||||
* @param $sSelectMode
|
|
||||||
* @param $iPageSize
|
|
||||||
* @param $bViewLink
|
|
||||||
* @param $aExtraParams
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
* @throws \CoreException
|
|
||||||
* @throws \CoreUnexpectedValue
|
|
||||||
* @throws \DictExceptionMissingString
|
|
||||||
* @throws \MissingQueryArgument
|
|
||||||
* @throws \MySQLException
|
|
||||||
* @throws \MySQLHasGoneAwayException
|
|
||||||
*/
|
|
||||||
public function GetHTMLTable(WebPage $oPage, $aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams)
|
|
||||||
{
|
|
||||||
$iNbPages = ($iPageSize < 1) ? 1 : ceil($this->iNbObjects / $iPageSize);
|
|
||||||
if ($iPageSize < 1)
|
|
||||||
{
|
|
||||||
$iPageSize = -1; // convention: no pagination
|
|
||||||
}
|
|
||||||
$aAttribs = $this->GetHTMLTableConfig($aColumns, $sSelectMode, $bViewLink);
|
|
||||||
|
|
||||||
$aValues = $this->GetHTMLTableValues($aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams);
|
|
||||||
|
|
||||||
$sHtml = $oPage->GetTable($aAttribs, $aValues);
|
|
||||||
|
|
||||||
return $sHtml;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -24,6 +24,8 @@ use Combodo\iTop\Application\UI\DisplayBlock\BlockChartAjaxBars\BlockChartAjaxBa
|
|||||||
use Combodo\iTop\Application\UI\DisplayBlock\BlockChartAjaxPie\BlockChartAjaxPie;
|
use Combodo\iTop\Application\UI\DisplayBlock\BlockChartAjaxPie\BlockChartAjaxPie;
|
||||||
use Combodo\iTop\Application\UI\DisplayBlock\BlockCsv\BlockCsv;
|
use Combodo\iTop\Application\UI\DisplayBlock\BlockCsv\BlockCsv;
|
||||||
use Combodo\iTop\Application\UI\DisplayBlock\BlockList\BlockList;
|
use Combodo\iTop\Application\UI\DisplayBlock\BlockList\BlockList;
|
||||||
|
use Combodo\iTop\Application\WebPage\iTopWebPage;
|
||||||
|
use Combodo\iTop\Application\WebPage\WebPage;
|
||||||
use Combodo\iTop\Service\Router\Router;
|
use Combodo\iTop\Service\Router\Router;
|
||||||
|
|
||||||
require_once(APPROOT.'/application/utils.inc.php');
|
require_once(APPROOT.'/application/utils.inc.php');
|
||||||
@@ -261,6 +263,8 @@ class DisplayBlock
|
|||||||
/** param for export.php */
|
/** param for export.php */
|
||||||
'refresh_action',
|
'refresh_action',
|
||||||
/**to add refresh button in datatable*/
|
/**to add refresh button in datatable*/
|
||||||
|
'object_count',
|
||||||
|
/** int number of objects in list */
|
||||||
], DataTableUIBlockFactory::GetAllowedParams()),
|
], DataTableUIBlockFactory::GetAllowedParams()),
|
||||||
static::ENUM_STYLE_LIST_SEARCH => array_merge([
|
static::ENUM_STYLE_LIST_SEARCH => array_merge([
|
||||||
'update_history',
|
'update_history',
|
||||||
@@ -568,7 +572,7 @@ class DisplayBlock
|
|||||||
} else {
|
} else {
|
||||||
// render it as an Ajax (asynchronous) call
|
// render it as an Ajax (asynchronous) call
|
||||||
$oHtml->AddCSSClass("loading");
|
$oHtml->AddCSSClass("loading");
|
||||||
$oHtml->AddHtml("<p><img src=\"../images/indicator_arrows.gif\"> ".Dict::S('UI:Loading').'</p>');
|
$oHtml->AddHtml("<p><img src=\"".utils::GetAbsoluteUrlAppRoot()."images/indicator_arrows.gif\"> ".Dict::S('UI:Loading').'</p>');
|
||||||
$oPage->add_script('
|
$oPage->add_script('
|
||||||
$.post("ajax.render.php?style='.$this->m_sStyle.'",
|
$.post("ajax.render.php?style='.$this->m_sStyle.'",
|
||||||
{ operation: "ajax", filter: "'.$sFilter.'", extra_params: "'.$sExtraParams.'" },
|
{ operation: "ajax", filter: "'.$sFilter.'", extra_params: "'.$sExtraParams.'" },
|
||||||
@@ -595,7 +599,7 @@ class DisplayBlock
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
*
|
*
|
||||||
* @throws \ApplicationException
|
* @throws \ApplicationException
|
||||||
@@ -1122,7 +1126,7 @@ JS
|
|||||||
$oSingleGroupByValueFilter->SetShowObsoleteData($this->m_bShowObsoleteData);
|
$oSingleGroupByValueFilter->SetShowObsoleteData($this->m_bShowObsoleteData);
|
||||||
}
|
}
|
||||||
$sHyperlink = utils::GetAbsoluteUrlAppRoot()
|
$sHyperlink = utils::GetAbsoluteUrlAppRoot()
|
||||||
.'pages/UI.php?operation=search&'.$oAppContext->GetForLink()
|
.'pages/UI.php?operation=search'.$oAppContext->GetForLink(true)
|
||||||
.'&filter='.rawurlencode($oSingleGroupByValueFilter->serialize());
|
.'&filter='.rawurlencode($oSingleGroupByValueFilter->serialize());
|
||||||
$aCounts[$sStateValue] = ['link' => $sHyperlink, 'label' => $aCounts[$sStateValue]];
|
$aCounts[$sStateValue] = ['link' => $sHyperlink, 'label' => $aCounts[$sStateValue]];
|
||||||
}
|
}
|
||||||
@@ -1230,7 +1234,7 @@ JS
|
|||||||
$iCount = $this->m_oSet->Count();
|
$iCount = $this->m_oSet->Count();
|
||||||
$sClassLabel = MetaModel::GetName($sClass);
|
$sClassLabel = MetaModel::GetName($sClass);
|
||||||
$sClassIconUrl = MetaModel::GetClassIcon($sClass, false);
|
$sClassIconUrl = MetaModel::GetClassIcon($sClass, false);
|
||||||
$sHyperlink = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search&'.$oAppContext->GetForLink().'&filter='.rawurlencode($this->m_oFilter->serialize());
|
$sHyperlink = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search'.$oAppContext->GetForLink(true).'&filter='.rawurlencode($this->m_oFilter->serialize());
|
||||||
|
|
||||||
$aExtraParams['query_params'] = $this->m_oFilter->GetInternalParams();
|
$aExtraParams['query_params'] = $this->m_oFilter->GetInternalParams();
|
||||||
$aRefreshParams = [
|
$aRefreshParams = [
|
||||||
@@ -1239,7 +1243,7 @@ JS
|
|||||||
];
|
];
|
||||||
|
|
||||||
if (UserRights::IsActionAllowed($sClass, UR_ACTION_MODIFY)) {
|
if (UserRights::IsActionAllowed($sClass, UR_ACTION_MODIFY)) {
|
||||||
$sCreateActionUrl = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=new&class='.$sClass.'&'.$oAppContext->GetForLink();
|
$sCreateActionUrl = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=new&class='.$sClass.$oAppContext->GetForLink(true);
|
||||||
$sCreateActionLabel = Dict::Format('UI:Button:Create');
|
$sCreateActionLabel = Dict::Format('UI:Button:Create');
|
||||||
$oBlock = DashletFactory::MakeForDashletBadge($sClassIconUrl, $sHyperlink, $iCount, $sClassLabel, $sCreateActionUrl,
|
$oBlock = DashletFactory::MakeForDashletBadge($sClassIconUrl, $sHyperlink, $iCount, $sClassLabel, $sCreateActionUrl,
|
||||||
$sCreateActionLabel, $aRefreshParams);
|
$sCreateActionLabel, $aRefreshParams);
|
||||||
@@ -1287,7 +1291,7 @@ JS
|
|||||||
|
|
||||||
$aData = array();
|
$aData = array();
|
||||||
$oAppContext = new ApplicationContext();
|
$oAppContext = new ApplicationContext();
|
||||||
$sParams = $oAppContext->GetForLink();
|
$sParams = $oAppContext->GetForLink(true);
|
||||||
foreach ($aGroupBy as $iRow => $iCount) {
|
foreach ($aGroupBy as $iRow => $iCount) {
|
||||||
// Build the search for this subset
|
// Build the search for this subset
|
||||||
$oSubsetSearch = $this->m_oFilter->DeepClone();
|
$oSubsetSearch = $this->m_oFilter->DeepClone();
|
||||||
@@ -1302,7 +1306,7 @@ JS
|
|||||||
|
|
||||||
$aData[] = array(
|
$aData[] = array(
|
||||||
'group' => $aLabels[$iRow],
|
'group' => $aLabels[$iRow],
|
||||||
'value' => "<a href=\"".utils::GetAbsoluteUrlAppRoot()."pages/UI.php?operation=search&dosearch=1&$sParams&filter=$sFilter\">$iCount</a>"
|
'value' => "<a href=\"".utils::GetAbsoluteUrlAppRoot()."pages/UI.php?operation=search&dosearch=1$sParams&filter=$sFilter\">$iCount</a>"
|
||||||
); // TO DO: add the context information
|
); // TO DO: add the context information
|
||||||
}
|
}
|
||||||
$aAttribs = array(
|
$aAttribs = array(
|
||||||
@@ -1354,7 +1358,7 @@ JS
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
*
|
*
|
||||||
* @return \Combodo\iTop\Application\UI\Base\iUIBlock
|
* @return \Combodo\iTop\Application\UI\Base\iUIBlock
|
||||||
@@ -1378,7 +1382,7 @@ JS
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
*
|
*
|
||||||
* @throws \ArchivedObjectException
|
* @throws \ArchivedObjectException
|
||||||
* @throws \ConfigException
|
* @throws \ConfigException
|
||||||
@@ -1456,7 +1460,7 @@ JS
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
*
|
*
|
||||||
* @return \Combodo\iTop\Application\UI\Base\Layout\UIContentBlock
|
* @return \Combodo\iTop\Application\UI\Base\Layout\UIContentBlock
|
||||||
* @throws \ApplicationException
|
* @throws \ApplicationException
|
||||||
@@ -1564,7 +1568,7 @@ JS
|
|||||||
/**
|
/**
|
||||||
* @deprecated 3.1.0 N°5957
|
* @deprecated 3.1.0 N°5957
|
||||||
*
|
*
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
*
|
*
|
||||||
* @return \Combodo\iTop\Application\UI\Base\Component\Html\Html|\Combodo\iTop\Application\UI\Base\Layout\UIContentBlock|string
|
* @return \Combodo\iTop\Application\UI\Base\Component\Html\Html|\Combodo\iTop\Application\UI\Base\Layout\UIContentBlock|string
|
||||||
@@ -1634,7 +1638,7 @@ JS
|
|||||||
$sGroupByExpr = isset($aExtraParams['group_by_expr']) ? '¶ms[group_by_expr]='.$aExtraParams['group_by_expr'] : '';
|
$sGroupByExpr = isset($aExtraParams['group_by_expr']) ? '¶ms[group_by_expr]='.$aExtraParams['group_by_expr'] : '';
|
||||||
$sFilter = $this->m_oFilter->serialize(false, $aQueryParams);
|
$sFilter = $this->m_oFilter->serialize(false, $aQueryParams);
|
||||||
$oContext = new ApplicationContext();
|
$oContext = new ApplicationContext();
|
||||||
$sContextParam = $oContext->GetForLink();
|
$sContextParam = $oContext->GetForLink(true);
|
||||||
$sAggregationFunction = isset($aExtraParams['aggregation_function']) ? $aExtraParams['aggregation_function'] : '';
|
$sAggregationFunction = isset($aExtraParams['aggregation_function']) ? $aExtraParams['aggregation_function'] : '';
|
||||||
$sAggregationAttr = isset($aExtraParams['aggregation_attribute']) ? $aExtraParams['aggregation_attribute'] : '';
|
$sAggregationAttr = isset($aExtraParams['aggregation_attribute']) ? $aExtraParams['aggregation_attribute'] : '';
|
||||||
$sLimit = isset($aExtraParams['limit']) ? $aExtraParams['limit'] : '';
|
$sLimit = isset($aExtraParams['limit']) ? $aExtraParams['limit'] : '';
|
||||||
@@ -1642,7 +1646,7 @@ JS
|
|||||||
$sOrderDirection = isset($aExtraParams['order_direction']) ? $aExtraParams['order_direction'] : '';
|
$sOrderDirection = isset($aExtraParams['order_direction']) ? $aExtraParams['order_direction'] : '';
|
||||||
|
|
||||||
if (isset($aExtraParams['group_by_label'])) {
|
if (isset($aExtraParams['group_by_label'])) {
|
||||||
$sUrl = utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=chart¶ms[group_by]=$sGroupBy{$sGroupByExpr}¶ms[group_by_label]={$aExtraParams['group_by_label']}¶ms[chart_type]=$sChartType¶ms[currentId]=$sChartId{$iChartCounter}¶ms[order_direction]=$sOrderDirection¶ms[order_by]=$sOrderBy¶ms[limit]=$sLimit¶ms[aggregation_function]=$sAggregationFunction¶ms[aggregation_attribute]=$sAggregationAttr&id=$sChartId{$iChartCounter}&filter=".rawurlencode($sFilter).'&'.$sContextParam;
|
$sUrl = utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=chart¶ms[group_by]=$sGroupBy{$sGroupByExpr}¶ms[group_by_label]={$aExtraParams['group_by_label']}¶ms[chart_type]=$sChartType¶ms[currentId]=$sChartId{$iChartCounter}¶ms[order_direction]=$sOrderDirection¶ms[order_by]=$sOrderBy¶ms[limit]=$sLimit¶ms[aggregation_function]=$sAggregationFunction¶ms[aggregation_attribute]=$sAggregationAttr&id=$sChartId{$iChartCounter}&filter=".rawurlencode($sFilter).$sContextParam;
|
||||||
} else {
|
} else {
|
||||||
$sUrl = utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=chart¶ms[group_by]=$sGroupBy{$sGroupByExpr}¶ms[chart_type]=$sChartType¶ms[currentId]=$sChartId{$iChartCounter}¶ms[order_direction]=$sOrderDirection¶ms[order_by]=$sOrderBy¶ms[limit]=$sLimit¶ms[aggregation_function]=$sAggregationFunction¶ms[aggregation_attribute]=$sAggregationAttr&id=$sChartId{$iChartCounter}&filter=".rawurlencode($sFilter).'&'.$sContextParam;
|
$sUrl = utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=chart¶ms[group_by]=$sGroupBy{$sGroupByExpr}¶ms[chart_type]=$sChartType¶ms[currentId]=$sChartId{$iChartCounter}¶ms[order_direction]=$sOrderDirection¶ms[order_by]=$sOrderBy¶ms[limit]=$sLimit¶ms[aggregation_function]=$sAggregationFunction¶ms[aggregation_attribute]=$sAggregationAttr&id=$sChartId{$iChartCounter}&filter=".rawurlencode($sFilter).'&'.$sContextParam;
|
||||||
}
|
}
|
||||||
@@ -1664,7 +1668,7 @@ JS
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
*
|
*
|
||||||
* @throws \ArchivedObjectException
|
* @throws \ArchivedObjectException
|
||||||
* @throws \CoreException
|
* @throws \CoreException
|
||||||
@@ -1679,11 +1683,14 @@ JS
|
|||||||
$oBlock = null;
|
$oBlock = null;
|
||||||
$sJSURLs = '';
|
$sJSURLs = '';
|
||||||
|
|
||||||
|
$oContext = new ApplicationContext();
|
||||||
|
$sContextParam = $oContext->GetForLink(true);
|
||||||
|
|
||||||
if (isset($aExtraParams['group_by'])) {
|
if (isset($aExtraParams['group_by'])) {
|
||||||
$this->MakeGroupByQuery($aExtraParams, $oGroupByExp, $sGroupByLabel, $aGroupBy, $sAggregationFunction, $sFctVar, $sAggregationAttr, $sSql);
|
$this->MakeGroupByQuery($aExtraParams, $oGroupByExp, $sGroupByLabel, $aGroupBy, $sAggregationFunction, $sFctVar, $sAggregationAttr, $sSql);
|
||||||
$aRes = CMDBSource::QueryToArray($sSql);
|
$aRes = CMDBSource::QueryToArray($sSql);
|
||||||
$oContext = new ApplicationContext();
|
|
||||||
$sContextParam = $oContext->GetForLink();
|
|
||||||
|
|
||||||
$iTotalCount = 0;
|
$iTotalCount = 0;
|
||||||
$aURLs = array();
|
$aURLs = array();
|
||||||
@@ -1703,14 +1710,14 @@ JS
|
|||||||
$oSubsetSearch = $this->m_oFilter->DeepClone();
|
$oSubsetSearch = $this->m_oFilter->DeepClone();
|
||||||
$oCondition = new BinaryExpression($oGroupByExp, '=', new ScalarExpression($sValue));
|
$oCondition = new BinaryExpression($oGroupByExp, '=', new ScalarExpression($sValue));
|
||||||
$oSubsetSearch->AddConditionExpression($oCondition);
|
$oSubsetSearch->AddConditionExpression($oCondition);
|
||||||
$aURLs[] = utils::GetAbsoluteUrlAppRoot()."pages/UI.php?operation=search&format=html&filter=".rawurlencode($oSubsetSearch->serialize()).'&'.$sContextParam;
|
$aURLs[] = utils::GetAbsoluteUrlAppRoot()."pages/UI.php?operation=search&format=html&filter=".rawurlencode($oSubsetSearch->serialize()).$sContextParam;
|
||||||
}
|
}
|
||||||
$sJSURLs = json_encode($aURLs);
|
$sJSURLs = json_encode($aURLs);
|
||||||
}
|
}
|
||||||
if (isset($aExtraParams['group_by_label'])) {
|
if (isset($aExtraParams['group_by_label'])) {
|
||||||
$sUrl = utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=chart¶ms[group_by]=$aExtraParams[group_by]¶ms[group_by_label]={$aExtraParams['group_by_label']}¶ms[chart_type]=$sChartType¶ms[currentId]=$aExtraParams[currentId]¶ms[order_direction]=$aExtraParams[order_direction]¶ms[order_by]=$aExtraParams[order_by]¶ms[limit]=$aExtraParams[limit]¶ms[aggregation_function]=$sAggregationFunction¶ms[aggregation_attribute]=$sAggregationAttr&id=$sId&filter=".rawurlencode($this->m_oFilter->ToOQL()).'&'.$sContextParam;
|
$sUrl = utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=chart¶ms[group_by]=$aExtraParams[group_by]¶ms[group_by_label]={$aExtraParams['group_by_label']}¶ms[chart_type]=$sChartType¶ms[currentId]=$aExtraParams[currentId]¶ms[order_direction]=$aExtraParams[order_direction]¶ms[order_by]=$aExtraParams[order_by]¶ms[limit]=$aExtraParams[limit]¶ms[aggregation_function]=$sAggregationFunction¶ms[aggregation_attribute]=$sAggregationAttr&id=$sId&filter=".rawurlencode($this->m_oFilter->ToOQL()).$sContextParam;
|
||||||
} else {
|
} else {
|
||||||
$sUrl = utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=chart¶ms[group_by]=$aExtraParams[group_by]¶ms[chart_type]=$sChartType¶ms[currentId]=$aExtraParams[currentId]¶ms[order_direction]=$aExtraParams[order_direction]¶ms[order_by]=$aExtraParams[order_by]¶ms[limit]=$aExtraParams[limit]¶ms[aggregation_function]=$sAggregationFunction¶ms[aggregation_attribute]=$sAggregationAttr&id=$sId&filter=".rawurlencode($this->m_oFilter->ToOQL()).'&'.$sContextParam;
|
$sUrl = utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=chart¶ms[group_by]=$aExtraParams[group_by]¶ms[chart_type]=$sChartType¶ms[currentId]=$aExtraParams[currentId]¶ms[order_direction]=$aExtraParams[order_direction]¶ms[order_by]=$aExtraParams[order_by]¶ms[limit]=$aExtraParams[limit]¶ms[aggregation_function]=$sAggregationFunction¶ms[aggregation_attribute]=$sAggregationAttr&id=$sId&filter=".rawurlencode($this->m_oFilter->ToOQL()).$sContextParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($sChartType) {
|
switch ($sChartType) {
|
||||||
@@ -1783,7 +1790,7 @@ JS
|
|||||||
|
|
||||||
$oBlock->sCsvFile = strtolower($this->m_oFilter->GetClass()).'.csv';
|
$oBlock->sCsvFile = strtolower($this->m_oFilter->GetClass()).'.csv';
|
||||||
$oBlock->sDownloadLink = utils::GetAbsoluteUrlAppRoot().'webservices/export.php?expression='.urlencode($this->m_oFilter->ToOQL(true)).'&format=csv&filename='.urlencode($oBlock->sCsvFile);
|
$oBlock->sDownloadLink = utils::GetAbsoluteUrlAppRoot().'webservices/export.php?expression='.urlencode($this->m_oFilter->ToOQL(true)).'&format=csv&filename='.urlencode($oBlock->sCsvFile);
|
||||||
$oBlock->sLinkToToggle = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search&'.$oAppContext->GetForLink().'&filter='.rawurlencode($this->m_oFilter->serialize()).'&format=csv';
|
$oBlock->sLinkToToggle = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search'.$oAppContext->GetForLink(true).'&filter='.rawurlencode($this->m_oFilter->serialize()).'&format=csv';
|
||||||
// Pass the parameters via POST, since expression may be very long
|
// Pass the parameters via POST, since expression may be very long
|
||||||
$aParamsToPost = array(
|
$aParamsToPost = array(
|
||||||
'expression' => $this->m_oFilter->ToOQL(true),
|
'expression' => $this->m_oFilter->ToOQL(true),
|
||||||
@@ -1830,7 +1837,7 @@ class MenuBlock extends DisplayBlock
|
|||||||
* an object in with the same tab active by default as the tab that was active when selecting
|
* an object in with the same tab active by default as the tab that was active when selecting
|
||||||
* the "Modify..." action.
|
* the "Modify..." action.
|
||||||
*
|
*
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
* @param string|null $sId
|
* @param string|null $sId
|
||||||
*
|
*
|
||||||
@@ -1858,7 +1865,11 @@ class MenuBlock extends DisplayBlock
|
|||||||
$aSelectedClasses = $this->GetFilter()->GetSelectedClasses();
|
$aSelectedClasses = $this->GetFilter()->GetSelectedClasses();
|
||||||
$bIsForLinkset = isset($aExtraParams['target_attr']);
|
$bIsForLinkset = isset($aExtraParams['target_attr']);
|
||||||
$oSet = new CMDBObjectSet($this->GetFilter());
|
$oSet = new CMDBObjectSet($this->GetFilter());
|
||||||
$iSetCount = $oSet->Count();
|
if(isset($aExtraParams['object_count'])){
|
||||||
|
$iSetCount = $aExtraParams['object_count'];
|
||||||
|
} else {
|
||||||
|
$iSetCount = $oSet->Count();
|
||||||
|
}
|
||||||
/** @var string $sRefreshAction JS snippet to run when clicking on the refresh button of the menu */
|
/** @var string $sRefreshAction JS snippet to run when clicking on the refresh button of the menu */
|
||||||
$sRefreshAction = $aExtraParams['refresh_action'] ?? '';
|
$sRefreshAction = $aExtraParams['refresh_action'] ?? '';
|
||||||
$bIsCreationInModal = isset($aExtraParams['creation_in_modal']) && $aExtraParams['creation_in_modal'] === true;
|
$bIsCreationInModal = isset($aExtraParams['creation_in_modal']) && $aExtraParams['creation_in_modal'] === true;
|
||||||
@@ -1883,10 +1894,7 @@ class MenuBlock extends DisplayBlock
|
|||||||
&& (!isset($aExtraParams['menu']) || $aExtraParams['menu'] === "1" || $aExtraParams['menu'] === true)
|
&& (!isset($aExtraParams['menu']) || $aExtraParams['menu'] === "1" || $aExtraParams['menu'] === true)
|
||||||
) {
|
) {
|
||||||
$oAppContext = new ApplicationContext();
|
$oAppContext = new ApplicationContext();
|
||||||
$sContext = $oAppContext->GetForLink();
|
$sContext = $oAppContext->GetForLink(true);
|
||||||
if (utils::IsNotNullOrEmptyString($sContext)) {
|
|
||||||
$sContext = '&'.$sContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$sFilter = $this->GetFilter()->serialize();
|
$sFilter = $this->GetFilter()->serialize();
|
||||||
@@ -2022,8 +2030,8 @@ class MenuBlock extends DisplayBlock
|
|||||||
$sSelectedClassName = MetaModel::GetName($sSelectedClass);
|
$sSelectedClassName = MetaModel::GetName($sSelectedClass);
|
||||||
|
|
||||||
// Check rights on class
|
// Check rights on class
|
||||||
$bIsBulkModifyAllowed = (!MetaModel::IsAbstract($sSelectedClass)) && UserRights::IsActionAllowed($sSelectedClass, UR_ACTION_BULK_MODIFY, $oSet) && ($oReflectionClass->IsSubclassOf('cmdbAbstractObject'));
|
$bIsBulkModifyAllowed = (!MetaModel::IsAbstract($sSelectedClass)) && UserRights::IsActionAllowed($sSelectedClass, UR_ACTION_BULK_MODIFY) && ($oReflectionClass->IsSubclassOf('cmdbAbstractObject'));
|
||||||
$bIsBulkDeleteAllowed = (bool) UserRights::IsActionAllowed($sSelectedClass, UR_ACTION_BULK_DELETE, $sSelectedClass);
|
$bIsBulkDeleteAllowed = (bool) UserRights::IsActionAllowed($sSelectedClass, UR_ACTION_BULK_DELETE);
|
||||||
|
|
||||||
// Refine filter on selected class so bullk actions occur on the right class
|
// Refine filter on selected class so bullk actions occur on the right class
|
||||||
$oSelectedClassFilter = $this->GetFilter()->DeepClone();
|
$oSelectedClassFilter = $this->GetFilter()->DeepClone();
|
||||||
@@ -2216,6 +2224,11 @@ class MenuBlock extends DisplayBlock
|
|||||||
$aFavoriteRegularActions[$key] = $aRegularActions[$key];
|
$aFavoriteRegularActions[$key] = $aRegularActions[$key];
|
||||||
unset($aRegularActions[$key]);
|
unset($aRegularActions[$key]);
|
||||||
}
|
}
|
||||||
|
// Toolkit actions
|
||||||
|
if (isset($aToolkitActions[$key])) {
|
||||||
|
$aFavoriteRegularActions[$key] = $aToolkitActions[$key];
|
||||||
|
unset($aToolkitActions[$key]);
|
||||||
|
}
|
||||||
|
|
||||||
// Transitions
|
// Transitions
|
||||||
if (isset($aTransitionActions[$key])) {
|
if (isset($aTransitionActions[$key])) {
|
||||||
@@ -2305,7 +2318,27 @@ class MenuBlock extends DisplayBlock
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'UI:Menu:EMail':
|
case 'UI:Menu:EMail':
|
||||||
$sIconClass = 'fas fa-share-alt';
|
$sIconClass = 'far fa-envelope fa-lg';
|
||||||
|
$sLabel = '';
|
||||||
|
break;
|
||||||
|
case 'UI:Menu:OpenOQL':
|
||||||
|
$sIconClass = 'fas fa-play fa-sm';
|
||||||
|
$sLabel = '';
|
||||||
|
break;
|
||||||
|
case 'UI:Menu:ExportXLSX':
|
||||||
|
$sIconClass = 'far fa-file-excel fa-lg';
|
||||||
|
$sLabel = '';
|
||||||
|
break;
|
||||||
|
case 'UI:Menu:CSVExport':
|
||||||
|
$sIconClass = 'fas fa-file-csv fa-lg';
|
||||||
|
$sLabel = '';
|
||||||
|
break;
|
||||||
|
case 'UI:Menu:PrintableVersion':
|
||||||
|
$sIconClass = 'fas fa-print';
|
||||||
|
$sLabel = '';
|
||||||
|
break;
|
||||||
|
case 'UI:Menu:ExportPDF':
|
||||||
|
$sIconClass = 'fas fa-file-pdf fa-lg';
|
||||||
$sLabel = '';
|
$sLabel = '';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -2317,7 +2350,12 @@ class MenuBlock extends DisplayBlock
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sTarget = isset($aAction['target']) ? $aAction['target'] : '';
|
$sTarget = isset($aAction['target']) ? $aAction['target'] : '';
|
||||||
$oActionButton = ButtonUIBlockFactory::MakeLinkNeutral($sUrl, $sLabel, $sIconClass, $sTarget, utils::Sanitize($sActionId, '', utils::ENUM_SANITIZATION_FILTER_ELEMENT_IDENTIFIER));
|
if (!empty($aAction['onclick'])) {
|
||||||
|
$oActionButton = ButtonUIBlockFactory::MakeIconAction($sIconClass, $aAction['label'], $aAction['label'], $sLabel,false); //utils::Sanitize($sActionId.md5($aAction['onclick']), '', utils::ENUM_SANITIZATION_FILTER_ELEMENT_IDENTIFIER))
|
||||||
|
$oActionButton->SetOnClickJsCode($aAction['onclick']);
|
||||||
|
} else {
|
||||||
|
$oActionButton = ButtonUIBlockFactory::MakeLinkNeutral($sUrl, $sLabel, $sIconClass, $sTarget, utils::Sanitize($sActionId, '', utils::ENUM_SANITIZATION_FILTER_ELEMENT_IDENTIFIER));
|
||||||
|
}
|
||||||
// ResourceId should not be sanitized
|
// ResourceId should not be sanitized
|
||||||
$oActionButton->AddDataAttribute('resource-id', $sActionId);
|
$oActionButton->AddDataAttribute('resource-id', $sActionId);
|
||||||
$oActionButton->AddCSSClasses(['ibo-action-button', 'ibo-regular-action-button']);
|
$oActionButton->AddCSSClasses(['ibo-action-button', 'ibo-regular-action-button']);
|
||||||
@@ -2576,11 +2614,8 @@ class MenuBlock extends DisplayBlock
|
|||||||
$sUrl = "{$sRootUrl}pages/{$sUIPage}?{$sUrlParams}";
|
$sUrl = "{$sRootUrl}pages/{$sUIPage}?{$sUrlParams}";
|
||||||
|
|
||||||
$oAppContext = new ApplicationContext();
|
$oAppContext = new ApplicationContext();
|
||||||
$sContext = $oAppContext->GetForLink();
|
$sContext = $oAppContext->GetForLink(true);
|
||||||
if (utils::IsNotNullOrEmptyString($sContext)) {
|
|
||||||
$sUrl .= '&'.$sContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $sUrl;
|
return $sUrl . $sContext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/ErrorPage.php, now loadable using autoloader
|
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
|
||||||
*/
|
|
||||||
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/ErrorPage.php, now loadable using autoloader');
|
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Combodo\iTop\Application\WebPage\CLIPage;
|
||||||
|
use Combodo\iTop\Application\WebPage\Page;
|
||||||
|
|
||||||
require_once('xlsxwriter.class.php');
|
require_once('xlsxwriter.class.php');
|
||||||
|
|
||||||
class ExcelExporter
|
class ExcelExporter
|
||||||
@@ -299,7 +303,7 @@ class ExcelExporter
|
|||||||
{
|
{
|
||||||
if ($this->sOutputFilePath == null)
|
if ($this->sOutputFilePath == null)
|
||||||
{
|
{
|
||||||
return APPROOT.'data/bulk_export/'.$this->sToken.'.xlsx';
|
return utils::GetDataPath().'bulk_export/'.$this->sToken.'.xlsx';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -309,14 +313,14 @@ class ExcelExporter
|
|||||||
|
|
||||||
public static function GetExcelFileFromToken($sToken)
|
public static function GetExcelFileFromToken($sToken)
|
||||||
{
|
{
|
||||||
return @file_get_contents(APPROOT.'data/bulk_export/'.$sToken.'.xlsx');
|
return @file_get_contents(utils::GetDataPath().'bulk_export/'.$sToken.'.xlsx');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function CleanupFromToken($sToken)
|
public static function CleanupFromToken($sToken)
|
||||||
{
|
{
|
||||||
@unlink(APPROOT.'data/bulk_export/'.$sToken.'.status');
|
@unlink(utils::GetDataPath().'bulk_export/'.$sToken.'.status');
|
||||||
@unlink(APPROOT.'data/bulk_export/'.$sToken.'.data');
|
@unlink(utils::GetDataPath().'bulk_export/'.$sToken.'.data');
|
||||||
@unlink(APPROOT.'data/bulk_export/'.$sToken.'.xlsx');
|
@unlink(utils::GetDataPath().'bulk_export/'.$sToken.'.xlsx');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function Cleanup()
|
public function Cleanup()
|
||||||
@@ -330,7 +334,7 @@ class ExcelExporter
|
|||||||
*/
|
*/
|
||||||
public static function CleanupOldFiles()
|
public static function CleanupOldFiles()
|
||||||
{
|
{
|
||||||
$aFiles = glob(APPROOT.'data/bulk_export/*.*');
|
$aFiles = glob(utils::GetDataPath().'bulk_export/*.*');
|
||||||
$iDelay = MetaModel::GetConfig()->Get('xlsx_exporter_cleanup_old_files_delay');
|
$iDelay = MetaModel::GetConfig()->Get('xlsx_exporter_cleanup_old_files_delay');
|
||||||
|
|
||||||
if($iDelay > 0)
|
if($iDelay > 0)
|
||||||
@@ -412,14 +416,14 @@ class ExcelExporter
|
|||||||
|
|
||||||
protected function CheckDataDir()
|
protected function CheckDataDir()
|
||||||
{
|
{
|
||||||
if(!is_dir(APPROOT."data/bulk_export"))
|
if(!is_dir(utils::GetDataPath()."bulk_export"))
|
||||||
{
|
{
|
||||||
@mkdir(APPROOT."data/bulk_export", 0777, true /* recursive */);
|
@mkdir(utils::GetDataPath()."bulk_export", 0777, true /* recursive */);
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
}
|
}
|
||||||
if (!is_writable(APPROOT."data/bulk_export"))
|
if (!is_writable(utils::GetDataPath()."bulk_export"))
|
||||||
{
|
{
|
||||||
throw new Exception('Data directory "'.APPROOT.'data/bulk_export" could not be written.');
|
throw new Exception('Data directory "'.utils::GetDataPath().'bulk_export" could not be written.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -429,12 +433,12 @@ class ExcelExporter
|
|||||||
{
|
{
|
||||||
$sToken = $this->sToken;
|
$sToken = $this->sToken;
|
||||||
}
|
}
|
||||||
return APPROOT."data/bulk_export/$sToken.status";
|
return utils::GetDataPath()."bulk_export/$sToken.status";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function GetDataFile()
|
protected function GetDataFile()
|
||||||
{
|
{
|
||||||
return APPROOT.'data/bulk_export/'.$this->sToken.'.data';
|
return utils::GetDataPath().'bulk_export/'.$this->sToken.'.data';
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function GetNewToken()
|
protected function GetNewToken()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -63,14 +63,14 @@ class CoreCannotSaveObjectException extends CoreException
|
|||||||
public function getTextMessage()
|
public function getTextMessage()
|
||||||
{
|
{
|
||||||
$sTitle = Dict::S('UI:Error:SaveFailed');
|
$sTitle = Dict::S('UI:Error:SaveFailed');
|
||||||
$sContent = utils::HtmlEntities($sTitle);
|
$sContent = $sTitle;
|
||||||
|
|
||||||
if (count($this->aIssues) == 1) {
|
if (count($this->aIssues) == 1) {
|
||||||
$sIssue = reset($this->aIssues);
|
$sIssue = reset($this->aIssues);
|
||||||
$sContent .= utils::HtmlEntities($sIssue);
|
$sContent .= $sIssue;
|
||||||
} else {
|
} else {
|
||||||
foreach ($this->aIssues as $sError) {
|
foreach ($this->aIssues as $sError) {
|
||||||
$sContent .= " ".utils::HtmlEntities($sError).", ";
|
$sContent .= " " . $sError . ", ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ class CoreException extends Exception
|
|||||||
|
|
||||||
public function getHtmlDesc($sHighlightHtmlBegin = '<b>', $sHighlightHtmlEnd = '</b>')
|
public function getHtmlDesc($sHighlightHtmlBegin = '<b>', $sHighlightHtmlEnd = '</b>')
|
||||||
{
|
{
|
||||||
return $this->getMessage();
|
return utils::EscapeHtml($this->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2023 Combodo SARL
|
* Copyright (C) 2013-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -15,12 +15,13 @@
|
|||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
use Combodo\iTop\Application\WebPage\WebPage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper class to build interactive forms to be used either in stand-alone
|
* Helper class to build interactive forms to be used either in stand-alone
|
||||||
* modal dialog or in "property-sheet" panes.
|
* modal dialog or in "property-sheet" panes.
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
class DesignerForm
|
class DesignerForm
|
||||||
@@ -208,7 +209,7 @@ class DesignerForm
|
|||||||
public function RenderAsPropertySheet($oP, $bReturnHTML = false, $sNotifyParentSelector = null)
|
public function RenderAsPropertySheet($oP, $bReturnHTML = false, $sNotifyParentSelector = null)
|
||||||
{
|
{
|
||||||
$sReturn = '';
|
$sReturn = '';
|
||||||
$sActionUrl = addslashes($this->sSubmitTo);
|
$sActionUrl = addslashes($this->sSubmitTo ?? '');
|
||||||
$sJSSubmitParams = json_encode($this->aSubmitParams);
|
$sJSSubmitParams = json_encode($this->aSubmitParams);
|
||||||
$sFormId = $this->GetFormId();
|
$sFormId = $this->GetFormId();
|
||||||
if ($this->oParentForm == null) {
|
if ($this->oParentForm == null) {
|
||||||
@@ -362,7 +363,7 @@ $('#$sDialogId').dialog({
|
|||||||
buttons: [
|
buttons: [
|
||||||
{ text: "$sOkButtonLabel", click: function() {
|
{ text: "$sOkButtonLabel", click: function() {
|
||||||
var oForm = $(this).closest('.ui-dialog').find('form');
|
var oForm = $(this).closest('.ui-dialog').find('form');
|
||||||
oForm.submit();
|
oForm.trigger('submit');
|
||||||
if (AnimateDlgButtons)
|
if (AnimateDlgButtons)
|
||||||
{
|
{
|
||||||
sFormId = oForm.attr('id');
|
sFormId = oForm.attr('id');
|
||||||
@@ -828,7 +829,7 @@ class DesignerFormField
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \WebPage $oP
|
* @param WebPage $oP
|
||||||
* @param string $sFormId
|
* @param string $sFormId
|
||||||
* @param string $sRenderMode
|
* @param string $sRenderMode
|
||||||
*
|
*
|
||||||
@@ -1329,7 +1330,8 @@ class DesignerComboField extends DesignerFormField
|
|||||||
{
|
{
|
||||||
if ($this->bMultipleSelection)
|
if ($this->bMultipleSelection)
|
||||||
{
|
{
|
||||||
$sHtml = "<span><select $sCSSClasses multiple size=\"8\"id=\"$sId\" name=\"$sName\">";
|
$iSize = max(1, min(8, count($this->aAllowedValues)));
|
||||||
|
$sHtml = "<span><select $sCSSClasses multiple size=\"$iSize\" id=\"$sId\" name=\"$sName\">";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1499,6 +1501,11 @@ class DesignerIconSelectionField extends DesignerFormField
|
|||||||
$this->aAllowedValues = $aAllowedValues;
|
$this->aAllowedValues = $aAllowedValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function AddAllowedValue($aValue)
|
||||||
|
{
|
||||||
|
// Add a null value to the list of allowed values
|
||||||
|
$this->aAllowedValues = array_merge([$aValue], $this->aAllowedValues);
|
||||||
|
}
|
||||||
public function EnableUpload($sIconUploadUrl)
|
public function EnableUpload($sIconUploadUrl)
|
||||||
{
|
{
|
||||||
$this->sUploadUrl = $sIconUploadUrl;
|
$this->sUploadUrl = $sIconUploadUrl;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* Persistent class InputOutputTask
|
* Persistent class InputOutputTask
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -36,29 +36,30 @@ class InputOutputTask extends cmdbAbstractObject
|
|||||||
{
|
{
|
||||||
$aParams = array
|
$aParams = array
|
||||||
(
|
(
|
||||||
"category" => "application",
|
"category" => "application",
|
||||||
"key_type" => "autoincrement",
|
"key_type" => "autoincrement",
|
||||||
"name_attcode" => "name",
|
"name_attcode" => "name",
|
||||||
"state_attcode" => "",
|
"state_attcode" => "",
|
||||||
"reconc_keys" => array(),
|
"reconc_keys" => array(),
|
||||||
"db_table" => "priv_iotask",
|
"db_table" => "priv_iotask",
|
||||||
"db_key_field" => "id",
|
"db_key_field" => "id",
|
||||||
"db_finalclass_field" => "",
|
"db_finalclass_field" => "",
|
||||||
);
|
);
|
||||||
MetaModel::Init_Params($aParams);
|
MetaModel::Init_Params($aParams);
|
||||||
MetaModel::Init_AddAttribute(new AttributeString("name", array("allowed_values"=>null, "sql"=>"name", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
|
MetaModel::Init_AddAttribute(new AttributeString("name", array("allowed_values" => null, "sql" => "name", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
|
||||||
MetaModel::Init_AddAttribute(new AttributeString("description", array("allowed_values"=>null, "sql"=>"description", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array())));
|
MetaModel::Init_AddAttribute(new AttributeString("description", array("allowed_values" => null, "sql" => "description", "default_value" => "", "is_null_allowed" => true, "depends_on" => array())));
|
||||||
MetaModel::Init_AddAttribute(new AttributeEnum("category", array("allowed_values"=>new ValueSetEnum('Input, Ouput'), "sql"=>"category", "default_value"=>"Input", "is_null_allowed"=>false, "depends_on"=>array())));
|
MetaModel::Init_AddAttribute(new AttributeEnum("category", array("allowed_values" => new ValueSetEnum('Input, Ouput'), "sql" => "category", "default_value" => "Input", "is_null_allowed" => false, "depends_on" => array())));
|
||||||
MetaModel::Init_AddAttribute(new AttributeEnum("source_type", array("allowed_values"=>new ValueSetEnum('File, Database, Web Service'), "sql"=>"source_type", "default_value"=>"File", "is_null_allowed"=>false, "depends_on"=>array())));
|
MetaModel::Init_AddAttribute(new AttributeEnum("source_type", array("allowed_values" => new ValueSetEnum('File, Database, Web Service'), "sql" => "source_type", "default_value" => "File", "is_null_allowed" => false, "depends_on" => array())));
|
||||||
MetaModel::Init_AddAttribute(new AttributeEnum("source_subtype", array("allowed_values"=>new ValueSetEnum('Oracle, MySQL, Postgress, MSSQL, SOAP, HTTP-Get, HTTP-Post, XML/RPC, CSV, XML, Excel'), "sql"=>"source_subtype", "default_value"=>"CSV", "is_null_allowed"=>false, "depends_on"=>array())));
|
MetaModel::Init_AddAttribute(new AttributeEnum("source_subtype",
|
||||||
MetaModel::Init_AddAttribute(new AttributeString("source_path", array("allowed_values"=>null, "sql"=>"source_path", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
|
array("allowed_values" => new ValueSetEnum('Oracle, MySQL, Postgress, MSSQL, SOAP, HTTP-Get, HTTP-Post, XML/RPC, CSV, XML, Excel'), "sql" => "source_subtype", "default_value" => "CSV", "is_null_allowed" => false, "depends_on" => array())));
|
||||||
MetaModel::Init_AddAttribute(new AttributeClass("objects_class", array("class_category"=>"", "more_values"=>"", "sql"=>"objects_class", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array())));
|
MetaModel::Init_AddAttribute(new AttributeString("source_path", array("allowed_values" => null, "sql" => "source_path", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
|
||||||
MetaModel::Init_AddAttribute(new AttributeEnum("test_mode", array("allowed_values"=>new ValueSetEnum('Yes,No'), "sql"=>"test_mode", "default_value"=>'No', "is_null_allowed"=>false, "depends_on"=>array())));
|
MetaModel::Init_AddAttribute(new AttributeClass("objects_class", array("class_category" => "", "more_values" => "", "sql" => "objects_class", "default_value" => null, "is_null_allowed" => true, "depends_on" => array(), "class_exclusion_list" => null)));
|
||||||
MetaModel::Init_AddAttribute(new AttributeEnum("verbose_mode", array("allowed_values"=>new ValueSetEnum('Yes,No'), "sql"=>"verbose_mode", "default_value" => 'No', "is_null_allowed"=>false, "depends_on"=>array())));
|
MetaModel::Init_AddAttribute(new AttributeEnum("test_mode", array("allowed_values" => new ValueSetEnum('Yes,No'), "sql" => "test_mode", "default_value" => 'No', "is_null_allowed" => false, "depends_on" => array())));
|
||||||
MetaModel::Init_AddAttribute(new AttributeEnum("options", array("allowed_values"=>new ValueSetEnum('Full, Update Only, Creation Only'), "sql"=>"options", "default_value"=> 'Full', "is_null_allowed"=>true, "depends_on"=>array())));
|
MetaModel::Init_AddAttribute(new AttributeEnum("verbose_mode", array("allowed_values" => new ValueSetEnum('Yes,No'), "sql" => "verbose_mode", "default_value" => 'No', "is_null_allowed" => false, "depends_on" => array())));
|
||||||
|
MetaModel::Init_AddAttribute(new AttributeEnum("options", array("allowed_values" => new ValueSetEnum('Full, Update Only, Creation Only'), "sql" => "options", "default_value" => 'Full', "is_null_allowed" => true, "depends_on" => array())));
|
||||||
|
|
||||||
// Display lists
|
// Display lists
|
||||||
MetaModel::Init_SetZListItems('details', array('name', 'description', 'category', 'objects_class', 'source_type', 'source_subtype', 'source_path' , 'options', 'test_mode', 'verbose_mode')); // Attributes to be displayed for the complete details
|
MetaModel::Init_SetZListItems('details', array('name', 'description', 'category', 'objects_class', 'source_type', 'source_subtype', 'source_path', 'options', 'test_mode', 'verbose_mode')); // Attributes to be displayed for the complete details
|
||||||
MetaModel::Init_SetZListItems('list', array('description', 'category', 'objects_class', 'source_type', 'source_subtype', 'options')); // Attributes to be displayed for a list
|
MetaModel::Init_SetZListItems('list', array('description', 'category', 'objects_class', 'source_type', 'source_subtype', 'options')); // Attributes to be displayed for a list
|
||||||
// Search criteria
|
// Search criteria
|
||||||
MetaModel::Init_SetZListItems('standard_search', array('name', 'category', 'objects_class', 'source_type', 'source_subtype')); // Criteria of the std search form
|
MetaModel::Init_SetZListItems('standard_search', array('name', 'category', 'objects_class', 'source_type', 'source_subtype')); // Criteria of the std search form
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/iTopWebPage.php, now loadable using autoloader
|
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
|
||||||
*/
|
|
||||||
|
|
||||||
// cannot notify depreciation for now as this is still MASSIVELY used in iTop core !
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/iTopWebPage.php, now loadable using autoloader');
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/iTopWizardWebPage.php, now loadable using autoloader
|
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
|
||||||
*/
|
|
||||||
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/iTopWizardWebPage.php, now loadable using autoloader');
|
|
||||||
@@ -5,7 +5,7 @@ use Combodo\iTop\Application\Helper\Session;
|
|||||||
/**
|
/**
|
||||||
* Class LoginBasic
|
* Class LoginBasic
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -53,6 +53,12 @@ class LoginDefaultBefore extends AbstractLoginFSMExtension
|
|||||||
{
|
{
|
||||||
// Force login mode
|
// Force login mode
|
||||||
LoginWebPage::SetLoginModeAndReload($sProposedLoginMode);
|
LoginWebPage::SetLoginModeAndReload($sProposedLoginMode);
|
||||||
|
} else {
|
||||||
|
$sRawLoginMode = utils::ReadParam('login_mode', '', false, utils::ENUM_SANITIZATION_FILTER_RAW_DATA);
|
||||||
|
if ($sProposedLoginMode !== $sRawLoginMode) {
|
||||||
|
IssueLog::Error("Authentication issue due to login_mode parameter sanitization. Please avoid special characters", null, ['sRawLoginMode' => $sRawLoginMode]);
|
||||||
|
//IssueLog::Error("Authentication issue due to login_mode parameter sanitization. Please avoid special characters", null, ['sRawLoginMode' => utils::HtmlEntities($sRawLoginMode)]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use Combodo\iTop\Application\Helper\Session;
|
|||||||
/**
|
/**
|
||||||
* Class LoginExternal
|
* Class LoginExternal
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -140,7 +140,11 @@ class LoginForm extends AbstractLoginFSMExtension implements iLoginUIExtension
|
|||||||
$oLoginContext->AddBlockExtension('login_form_footer', new LoginBlockExtension('extensionblock/loginformfooter.html.twig'));
|
$oLoginContext->AddBlockExtension('login_form_footer', new LoginBlockExtension('extensionblock/loginformfooter.html.twig'));
|
||||||
|
|
||||||
$bEnableResetPassword = MetaModel::GetConfig()->Get('forgot_password');
|
$bEnableResetPassword = MetaModel::GetConfig()->Get('forgot_password');
|
||||||
$sResetPasswordUrl = utils::GetAbsoluteUrlAppRoot() . 'pages/UI.php?loginop=forgot_pwd';
|
$sResetPasswordUrl = MetaModel::GetConfig()->Get('forgot_password.url');
|
||||||
|
if ($sResetPasswordUrl == '')
|
||||||
|
{
|
||||||
|
$sResetPasswordUrl = utils::GetAbsoluteUrlAppRoot() . 'pages/UI.php?loginop=forgot_pwd';
|
||||||
|
}
|
||||||
$aData = array(
|
$aData = array(
|
||||||
'bEnableResetPassword' => $bEnableResetPassword,
|
'bEnableResetPassword' => $bEnableResetPassword,
|
||||||
'sResetPasswordUrl' => $sResetPasswordUrl,
|
'sResetPasswordUrl' => $sResetPasswordUrl,
|
||||||
|
|||||||
@@ -2,13 +2,14 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
use Combodo\iTop\Application\Branding;
|
use Combodo\iTop\Application\Branding;
|
||||||
use Combodo\iTop\Application\TwigBase\Twig\Extension;
|
use Combodo\iTop\Application\TwigBase\Twig\Extension;
|
||||||
|
use Combodo\iTop\Application\WebPage\NiceWebPage;
|
||||||
use Twig\Environment;
|
use Twig\Environment;
|
||||||
use Twig\Loader\ChainLoader;
|
use Twig\Loader\ChainLoader;
|
||||||
use Twig\Loader\FilesystemLoader;
|
use Twig\Loader\FilesystemLoader;
|
||||||
@@ -51,12 +52,13 @@ class LoginTwigContext
|
|||||||
/**
|
/**
|
||||||
* Set the absolute path on disk of the folder containing the twig templates
|
* Set the absolute path on disk of the folder containing the twig templates
|
||||||
*
|
*
|
||||||
* @param string $sPath absolute path of twig templates directory
|
|
||||||
* @api
|
* @api
|
||||||
|
*
|
||||||
|
*@param string $sAbsPath Absolute path of twig templates directory
|
||||||
*/
|
*/
|
||||||
public function SetLoaderPath($sPath)
|
public function SetLoaderPath($sAbsPath)
|
||||||
{
|
{
|
||||||
$this->sTwigLoaderPath = $sPath;
|
$this->sTwigLoaderPath = $sAbsPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -83,24 +85,27 @@ class LoginTwigContext
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the URL of a CSS file to link to the login screen
|
* Add the absolute URL of a CSS file to link to the login screen
|
||||||
*
|
*
|
||||||
* @param string $sFile URL of the CSS file to link
|
|
||||||
* @api
|
* @api
|
||||||
|
*
|
||||||
|
* @param string $sFileAbsURL Absolute URL of the CSS file to link
|
||||||
*/
|
*/
|
||||||
public function AddCSSFile($sFile)
|
public function AddCSSFile($sFileAbsURL)
|
||||||
{
|
{
|
||||||
$this->aCSSFiles[] = $sFile;
|
$this->aCSSFiles[] = $sFileAbsURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the URL of a javascript file to link to the login screen
|
* Add the absolute URL of a javascript file to link to the login screen
|
||||||
* @param string $sFile URL of the javascript file to link
|
*
|
||||||
* @api
|
* @api
|
||||||
|
*
|
||||||
|
* @param string $sFileAbsURL Absolute URL of the javascript file to link
|
||||||
*/
|
*/
|
||||||
public function AddJsFile($sFile)
|
public function AddJsFile($sFileAbsURL)
|
||||||
{
|
{
|
||||||
$this->aJsFiles[] = $sFile;
|
$this->aJsFiles[] = $sFileAbsURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -132,7 +137,7 @@ class LoginTwigContext
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array Absolute URLs of the CSS files
|
||||||
*/
|
*/
|
||||||
public function GetCSSFiles()
|
public function GetCSSFiles()
|
||||||
{
|
{
|
||||||
@@ -140,7 +145,7 @@ class LoginTwigContext
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array Absolute URLs of the JS files
|
||||||
*/
|
*/
|
||||||
public function GetJsFiles()
|
public function GetJsFiles()
|
||||||
{
|
{
|
||||||
@@ -273,12 +278,12 @@ class LoginTwigRenderer
|
|||||||
$aCSSFiles = $oFormData->GetCSSFiles();
|
$aCSSFiles = $oFormData->GetCSSFiles();
|
||||||
foreach ($aCSSFiles as $sCSSFile)
|
foreach ($aCSSFiles as $sCSSFile)
|
||||||
{
|
{
|
||||||
$oPage->add_linked_stylesheet($sCSSFile);
|
$oPage->LinkStylesheetFromURI($sCSSFile);
|
||||||
}
|
}
|
||||||
$aJsFiles = $oFormData->GetJsFiles();
|
$aJsFiles = $oFormData->GetJsFiles();
|
||||||
foreach ($aJsFiles as $sJsFile)
|
foreach ($aJsFiles as $sJsFile)
|
||||||
{
|
{
|
||||||
$oPage->add_linked_script($sJsFile);
|
$oPage->LinkScriptFromURI($sJsFile);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use Combodo\iTop\Application\Helper\Session;
|
|||||||
/**
|
/**
|
||||||
* Class LoginURL
|
* Class LoginURL
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
@@ -20,12 +20,14 @@
|
|||||||
/**
|
/**
|
||||||
* Class LoginWebPage
|
* Class LoginWebPage
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Combodo\iTop\Application\Branding;
|
use Combodo\iTop\Application\Branding;
|
||||||
use Combodo\iTop\Application\Helper\Session;
|
use Combodo\iTop\Application\Helper\Session;
|
||||||
|
use Combodo\iTop\Application\WebPage\ErrorPage;
|
||||||
|
use Combodo\iTop\Application\WebPage\NiceWebPage;
|
||||||
use Combodo\iTop\Service\Events\EventData;
|
use Combodo\iTop\Service\Events\EventData;
|
||||||
use Combodo\iTop\Service\Events\EventService;
|
use Combodo\iTop\Service\Events\EventService;
|
||||||
|
|
||||||
@@ -80,7 +82,7 @@ class LoginWebPage extends NiceWebPage
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected static $m_sLoginFailedMessage = '';
|
protected static $m_sLoginFailedMessage = '';
|
||||||
|
|
||||||
public function __construct($sTitle = null)
|
public function __construct($sTitle = null)
|
||||||
{
|
{
|
||||||
if ($sTitle === null) {
|
if ($sTitle === null) {
|
||||||
@@ -95,8 +97,17 @@ class LoginWebPage extends NiceWebPage
|
|||||||
|
|
||||||
public function SetStyleSheet()
|
public function SetStyleSheet()
|
||||||
{
|
{
|
||||||
$this->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'css/login.css');
|
$this->LinkStylesheetFromAppRoot('css/login.css');
|
||||||
$this->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'css/font-awesome/css/all.min.css');
|
$this->LinkStylesheetFromAppRoot('css/font-awesome/css/all.min.css');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
protected function GetFaviconAbsoluteUrl()
|
||||||
|
{
|
||||||
|
return Branding::GetLoginFavIconAbsoluteUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function SetLoginFailedMessage($sMessage)
|
public static function SetLoginFailedMessage($sMessage)
|
||||||
@@ -908,13 +919,13 @@ class LoginWebPage extends NiceWebPage
|
|||||||
$aAllProfiles = array();
|
$aAllProfiles = array();
|
||||||
while ($oProfile = $oProfilesSet->Fetch())
|
while ($oProfile = $oProfilesSet->Fetch())
|
||||||
{
|
{
|
||||||
$aAllProfiles[strtolower($oProfile->GetName())] = $oProfile->GetKey();
|
$aAllProfiles[mb_strtolower($oProfile->GetName())] = $oProfile->GetKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
$aProfiles = array();
|
$aProfiles = array();
|
||||||
foreach ($aRequestedProfiles as $sRequestedProfile)
|
foreach ($aRequestedProfiles as $sRequestedProfile)
|
||||||
{
|
{
|
||||||
$sRequestedProfile = strtolower($sRequestedProfile);
|
$sRequestedProfile = mb_strtolower($sRequestedProfile);
|
||||||
if (isset($aAllProfiles[$sRequestedProfile]))
|
if (isset($aAllProfiles[$sRequestedProfile]))
|
||||||
{
|
{
|
||||||
$aProfiles[] = $aAllProfiles[$sRequestedProfile];
|
$aProfiles[] = $aAllProfiles[$sRequestedProfile];
|
||||||
@@ -960,7 +971,7 @@ class LoginWebPage extends NiceWebPage
|
|||||||
}
|
}
|
||||||
else if($ret === false)
|
else if($ret === false)
|
||||||
{
|
{
|
||||||
throw new Exception('Nowhere to go??');
|
throw new Exception('Nowhere to go: Your combination of user Profiles denies you access to any '.ITOP_APPLICATION_SHORT.' portal. Please contact your administrator');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013-2023 Combodo SARL
|
* Copyright (C) 2013-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
// Maintenance message display functions
|
// Maintenance message display functions
|
||||||
// Only included by approot.inc.php
|
// Only included by approot.inc.php
|
||||||
//
|
//
|
||||||
|
use Combodo\iTop\Application\WebPage\ErrorPage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use a setup page to display the maintenance message
|
* Use a setup page to display the maintenance message
|
||||||
@@ -90,15 +91,6 @@ function _MaintenanceJsonMessage($sTitle, $sMessage)
|
|||||||
$oP->AddData($aMessage);
|
$oP->AddData($aMessage);
|
||||||
$oP->Output();
|
$oP->Output();
|
||||||
} else {
|
} else {
|
||||||
@include_once(APPROOT."/application/ajaxwebpage.class.inc.php");
|
_MaintenanceTextMessage($sMessage);
|
||||||
if (class_exists('ajax_page')) {
|
|
||||||
$oP = new ajax_page($sTitle);
|
|
||||||
$oP->add_header('Access-Control-Allow-Origin: *');
|
|
||||||
$oP->SetContentType('application/json');
|
|
||||||
$oP->add('{"code":100, "message":"'.$sMessage.'"}');
|
|
||||||
$oP->Output();
|
|
||||||
} else {
|
|
||||||
_MaintenanceTextMessage($sMessage);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Combodo\iTop\Application\Helper\WebResourcesHelper;
|
use Combodo\iTop\Application\Helper\WebResourcesHelper;
|
||||||
|
use Combodo\iTop\Application\WebPage\ErrorPage;
|
||||||
|
use Combodo\iTop\Application\WebPage\iTopWebPage;
|
||||||
|
use Combodo\iTop\Application\WebPage\WebPage;
|
||||||
|
|
||||||
require_once(APPROOT.'/application/utils.inc.php');
|
require_once(APPROOT.'/application/utils.inc.php');
|
||||||
require_once(APPROOT.'/application/template.class.inc.php');
|
|
||||||
require_once(APPROOT."/application/user.dashboard.class.inc.php");
|
require_once(APPROOT."/application/user.dashboard.class.inc.php");
|
||||||
|
|
||||||
|
|
||||||
@@ -122,9 +124,7 @@ class ApplicationMenu
|
|||||||
*/
|
*/
|
||||||
public static function CheckMenuIdEnabled($sMenuId)
|
public static function CheckMenuIdEnabled($sMenuId)
|
||||||
{
|
{
|
||||||
self::LoadAdditionalMenus();
|
if (self::IsMenuIdEnabled($sMenuId) === false)
|
||||||
$oMenuNode = self::GetMenuNode(self::GetMenuIndexById($sMenuId));
|
|
||||||
if (is_null($oMenuNode) || !$oMenuNode->IsEnabled())
|
|
||||||
{
|
{
|
||||||
require_once(APPROOT.'/setup/setuppage.class.inc.php');
|
require_once(APPROOT.'/setup/setuppage.class.inc.php');
|
||||||
$oP = new ErrorPage(Dict::S('UI:PageTitle:FatalError'));
|
$oP = new ErrorPage(Dict::S('UI:PageTitle:FatalError'));
|
||||||
@@ -135,6 +135,19 @@ class ApplicationMenu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $sMenuId
|
||||||
|
*
|
||||||
|
* @return bool true if the menu exists and current user is allowed to see the menu
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
public static function IsMenuIdEnabled($sMenuId):bool
|
||||||
|
{
|
||||||
|
self::LoadAdditionalMenus();
|
||||||
|
$oMenuNode = self::GetMenuNode(self::GetMenuIndexById($sMenuId));
|
||||||
|
return is_null($oMenuNode) === false && $oMenuNode->IsEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main function to add a menu entry into the application, can be called during the definition
|
* Main function to add a menu entry into the application, can be called during the definition
|
||||||
* of the data model objects
|
* of the data model objects
|
||||||
@@ -266,9 +279,11 @@ class ApplicationMenu
|
|||||||
$oMenuNode = static::GetMenuNode($sMenuGroupIdx);
|
$oMenuNode = static::GetMenuNode($sMenuGroupIdx);
|
||||||
|
|
||||||
if (!($oMenuNode instanceof MenuGroup)) {
|
if (!($oMenuNode instanceof MenuGroup)) {
|
||||||
IssueLog::Error('Menu node was not displayed as a menu group as it is actually not a menu group', LogChannels::CONSOLE, [
|
IssueLog::Error('Menu node without parent (root menu) must be of type menu group. Parent menu is missing or not visible to user.', LogChannels::CONSOLE, [
|
||||||
'menu_node_class' => get_class($oMenuNode),
|
'menu_node_class' => get_class($oMenuNode),
|
||||||
|
'menu_node_id' => $oMenuNode->GetMenuID(),
|
||||||
'menu_node_label' => $oMenuNode->GetLabel(),
|
'menu_node_label' => $oMenuNode->GetLabel(),
|
||||||
|
'current_user_id' => UserRights::GetUserId(),
|
||||||
]);
|
]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -345,7 +360,7 @@ class ApplicationMenu
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Entry point to display the whole menu into the web page, used by iTopWebPage
|
* Entry point to display the whole menu into the web page, used by iTopWebPage
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
* @throws DictExceptionMissingString
|
* @throws DictExceptionMissingString
|
||||||
*
|
*
|
||||||
@@ -419,7 +434,7 @@ EOF
|
|||||||
/**
|
/**
|
||||||
* Handles the display of the sub-menus (called recursively if necessary)
|
* Handles the display of the sub-menus (called recursively if necessary)
|
||||||
*
|
*
|
||||||
* @param \WebPage $oPage
|
* @param WebPage $oPage
|
||||||
* @param array $aMenus
|
* @param array $aMenus
|
||||||
* @param array $aExtraParams
|
* @param array $aExtraParams
|
||||||
* @param int $iActiveMenu
|
* @param int $iActiveMenu
|
||||||
@@ -983,15 +998,11 @@ class MenuGroup extends MenuNode
|
|||||||
*/
|
*/
|
||||||
class TemplateMenuNode extends MenuNode
|
class TemplateMenuNode extends MenuNode
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $sTemplateFile;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a menu item based on a custom template and inserts it into the application's main menu
|
* Create a menu item based on a custom template and inserts it into the application's main menu
|
||||||
* @param string $sMenuId Unique identifier of the menu (used to identify the menu for bookmarking, and for getting the labels from the dictionary)
|
* @param string $sMenuId Unique identifier of the menu (used to identify the menu for bookmarking, and for getting the labels from the dictionary)
|
||||||
* @param string $sTemplateFile Path (or URL) to the file that will be used as a template for displaying the page's content
|
* @param string $sTemplateFile unused deprecated
|
||||||
* @param integer $iParentIndex ID of the parent menu
|
* @param integer $iParentIndex ID of the parent menu
|
||||||
* @param float $fRank Number used to order the list, any number will do, but for a given level (i.e same parent) all menus are sorted based on this value
|
* @param float $fRank Number used to order the list, any number will do, but for a given level (i.e same parent) all menus are sorted based on this value
|
||||||
* @param string $sEnableClass Name of class of object
|
* @param string $sEnableClass Name of class of object
|
||||||
@@ -1002,17 +1013,6 @@ class TemplateMenuNode extends MenuNode
|
|||||||
public function __construct($sMenuId, $sTemplateFile, $iParentIndex, $fRank = 0.0, $sEnableClass = null, $iActionCode = null, $iAllowedResults = UR_ALLOWED_YES, $sEnableStimulus = null)
|
public function __construct($sMenuId, $sTemplateFile, $iParentIndex, $fRank = 0.0, $sEnableClass = null, $iActionCode = null, $iAllowedResults = UR_ALLOWED_YES, $sEnableStimulus = null)
|
||||||
{
|
{
|
||||||
parent::__construct($sMenuId, $iParentIndex, $fRank, $sEnableClass, $iActionCode, $iAllowedResults, $sEnableStimulus);
|
parent::__construct($sMenuId, $iParentIndex, $fRank, $sEnableClass, $iActionCode, $iAllowedResults, $sEnableStimulus);
|
||||||
$this->sTemplateFile = $sTemplateFile;
|
|
||||||
$this->aReflectionProperties['template_file'] = $sTemplateFile;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
public function GetHyperlink($aExtraParams)
|
|
||||||
{
|
|
||||||
if ($this->sTemplateFile == '') return '';
|
|
||||||
return parent::GetHyperlink($aExtraParams);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1021,18 +1021,7 @@ class TemplateMenuNode extends MenuNode
|
|||||||
*/
|
*/
|
||||||
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
public function RenderContent(WebPage $oPage, $aExtraParams = array())
|
||||||
{
|
{
|
||||||
ApplicationMenu::CheckMenuIdEnabled($this->GetMenuId());
|
//DO NOTHING this type of menu is only used for title not clickable
|
||||||
$sTemplate = @file_get_contents($this->sTemplateFile);
|
|
||||||
if ($sTemplate !== false)
|
|
||||||
{
|
|
||||||
$aExtraParams['table_id'] = 'Menu_'.$this->GetMenuId();
|
|
||||||
$oTemplate = new DisplayTemplate($sTemplate);
|
|
||||||
$oTemplate->Render($oPage, $aExtraParams);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$oPage->p("Error: failed to load template file: '{$this->sTemplateFile}'"); // No need to translate ?
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1143,11 +1132,11 @@ class OQLMenuNode extends MenuNode
|
|||||||
{
|
{
|
||||||
$sUsageId = utils::GetSafeId($sUsageId);
|
$sUsageId = utils::GetSafeId($sUsageId);
|
||||||
$oSearch = DBObjectSearch::FromOQL($sOql);
|
$oSearch = DBObjectSearch::FromOQL($sOql);
|
||||||
$sClass= $oSearch->GetClass();
|
$sClass= $oSearch->GetClass();
|
||||||
$sIcon = MetaModel::GetClassIcon($sClass, false);
|
$sIcon = MetaModel::GetClassIcon($sClass, false);
|
||||||
if ($bSearchPane) {
|
if ($bSearchPane) {
|
||||||
$aParams = array_merge(['open' => $bSearchOpen, 'table_id' => $sUsageId, 'submit_on_load' => false], $aExtraParams);
|
$aParams = array_merge(['open' => $bSearchOpen, 'table_id' => $sUsageId, 'submit_on_load' => false], $aExtraParams);
|
||||||
$oBlock = new DisplayBlock($oSearch, 'search', false /* Asynchronous */, $aParams);
|
$oBlock = new DisplayBlock($oSearch, DisplayBlock::ENUM_STYLE_SEARCH, false /* Asynchronous */, $aParams);
|
||||||
$oBlock->Display($oPage, 0);
|
$oBlock->Display($oPage, 0);
|
||||||
$oPage->add("<div class='sf_results_area ibo-add-margin-top-250' data-target='search_results'>");
|
$oPage->add("<div class='sf_results_area ibo-add-margin-top-250' data-target='search_results'>");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2010-2023 Combodo SARL
|
// Copyright (C) 2010-2024 Combodo SAS
|
||||||
//
|
//
|
||||||
// This file is part of iTop.
|
// This file is part of iTop.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/NiceWebPage.php, now loadable using autoloader
|
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
|
||||||
*/
|
|
||||||
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/NiceWebPage.php, now loadable using autoloader');
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/PDFPage.php, now loadable using autoloader
|
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
|
||||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
|
||||||
*/
|
|
||||||
|
|
||||||
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/PDFPage.php, now loadable using autoloader');
|
|
||||||
@@ -9,11 +9,17 @@ class PortalDispatcher
|
|||||||
$this->sPortalid = $sPortalId;
|
$this->sPortalid = $sPortalId;
|
||||||
$this->aData = PortalDispatcherData::GetData($sPortalId);
|
$this->aData = PortalDispatcherData::GetData($sPortalId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function IsUserAllowed()
|
/**
|
||||||
|
* @param \User|null $oUser
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
* @since 3.2.0 N°2039 Add $oUser parameter
|
||||||
|
*/
|
||||||
|
public function IsUserAllowed(?User $oUser = null)
|
||||||
{
|
{
|
||||||
$bRet = true;
|
$bRet = true;
|
||||||
$aProfiles = UserRights::ListProfiles();
|
$aProfiles = UserRights::ListProfiles($oUser);
|
||||||
|
|
||||||
foreach($this->aData['deny'] as $sDeniedProfile)
|
foreach($this->aData['deny'] as $sDeniedProfile)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2010-2023 Combodo SARL
|
* Copyright (C) 2010-2024 Combodo SAS
|
||||||
*
|
*
|
||||||
* This file is part of iTop.
|
* This file is part of iTop.
|
||||||
*
|
*
|
||||||
@@ -21,6 +21,7 @@ use Combodo\iTop\Application\UI\Base\Component\Alert\AlertUIBlockFactory;
|
|||||||
use Combodo\iTop\Application\UI\Base\Component\FieldSet\FieldSetUIBlockFactory;
|
use Combodo\iTop\Application\UI\Base\Component\FieldSet\FieldSetUIBlockFactory;
|
||||||
use Combodo\iTop\Application\UI\Base\Component\Html\Html;
|
use Combodo\iTop\Application\UI\Base\Component\Html\Html;
|
||||||
use Combodo\iTop\Application\UI\Base\Component\Input\TextArea;
|
use Combodo\iTop\Application\UI\Base\Component\Input\TextArea;
|
||||||
|
use Combodo\iTop\Application\WebPage\WebPage;
|
||||||
|
|
||||||
abstract class Query extends cmdbAbstractObject
|
abstract class Query extends cmdbAbstractObject
|
||||||
{
|
{
|
||||||
@@ -220,17 +221,10 @@ class QueryOQL extends Query
|
|||||||
{
|
{
|
||||||
try{
|
try{
|
||||||
// retrieve attributes
|
// retrieve attributes
|
||||||
$sFields = trim($this->Get('fields'));
|
|
||||||
$sOql = $this->Get('oql');
|
$sOql = $this->Get('oql');
|
||||||
|
|
||||||
// construct base url depending on version
|
// construct base url depending on version
|
||||||
$bExportV1Recommended = ($sFields == '');
|
$sUrl = utils::GetAbsoluteUrlAppRoot().'webservices/export-v2.php?format=spreadsheet&login_mode=basic&date_format='.urlencode((string)AttributeDateTime::GetFormat()).'&query='.$this->GetKey();
|
||||||
if ($bExportV1Recommended) {
|
|
||||||
$sUrl = utils::GetAbsoluteUrlAppRoot().'webservices/export.php?format=spreadsheet&login_mode=basic&query='.$this->GetKey();
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$sUrl = utils::GetAbsoluteUrlAppRoot().'webservices/export-v2.php?format=spreadsheet&login_mode=basic&date_format='.urlencode((string)AttributeDateTime::GetFormat()).'&query='.$this->GetKey();
|
|
||||||
}
|
|
||||||
|
|
||||||
// search object from OQL
|
// search object from OQL
|
||||||
$oSearch = DBObjectSearch::FromOQL($sOql);
|
$oSearch = DBObjectSearch::FromOQL($sOql);
|
||||||
@@ -255,22 +249,9 @@ class QueryOQL extends Query
|
|||||||
$oPage->add_script("$('[name=\"attr_oql\"]').addClass('ibo-query-oql ibo-is-code'); $('[data-attribute-code=\"oql\"]').addClass('ibo-query-oql ibo-is-code');");
|
$oPage->add_script("$('[name=\"attr_oql\"]').addClass('ibo-query-oql ibo-is-code'); $('[data-attribute-code=\"oql\"]').addClass('ibo-query-oql ibo-is-code');");
|
||||||
|
|
||||||
if (!$bEditMode) {
|
if (!$bEditMode) {
|
||||||
$sFields = trim($this->Get('fields'));
|
$sUrl = utils::GetAbsoluteUrlAppRoot().'webservices/export-v2.php?format=spreadsheet&login_mode=basic&date_format='.urlencode((string)AttributeDateTime::GetFormat()).'&query='.$this->GetKey();
|
||||||
$bExportV1Recommended = ($sFields == '');
|
|
||||||
if ($bExportV1Recommended) {
|
|
||||||
$oFieldAttDef = MetaModel::GetAttributeDef('QueryOQL', 'fields');
|
|
||||||
$oAlert = AlertUIBlockFactory::MakeForFailure()
|
|
||||||
->SetIsClosable(false)
|
|
||||||
->SetIsCollapsible(false);
|
|
||||||
$oAlert->AddCSSClass('mb-5');
|
|
||||||
$oAlert->AddSubBlock(new Html(Dict::Format('UI:Query:UrlV1', '')));
|
|
||||||
$oPage->AddSubBlock($oAlert);
|
|
||||||
$sUrl = utils::GetAbsoluteUrlAppRoot().'webservices/export.php?format=spreadsheet&login_mode=basic&query='.$this->GetKey();
|
|
||||||
} else {
|
|
||||||
$sUrl = utils::GetAbsoluteUrlAppRoot().'webservices/export-v2.php?format=spreadsheet&login_mode=basic&date_format='.urlencode((string)AttributeDateTime::GetFormat()).'&query='.$this->GetKey();
|
|
||||||
}
|
|
||||||
$sOql = $this->Get('oql');
|
$sOql = $this->Get('oql');
|
||||||
$sMessage = null;
|
|
||||||
try {
|
try {
|
||||||
$oSearch = DBObjectSearch::FromOQL($sOql);
|
$oSearch = DBObjectSearch::FromOQL($sOql);
|
||||||
$aParameters = $oSearch->GetQueryParams();
|
$aParameters = $oSearch->GetQueryParams();
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user