Compare commits
975 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 09e00e6d58 | |||
| 09d2a63cbb | |||
| 8c062a8828 | |||
| c707daf946 | |||
| 0a91e6b2c0 | |||
| 90c8348c9c | |||
| 1426cbec81 | |||
| 7047915995 | |||
| 49b514054f | |||
| bf27374dcc | |||
| 3de1c6e499 | |||
| d77285f2c4 | |||
| 96eeb70076 | |||
| 6a39e442ac | |||
| 91e030be44 | |||
| 405e20e18e | |||
| 138f770630 | |||
| eadc4fda30 | |||
| 35c5f19eac | |||
| 6d8ae180b3 | |||
| 0fea30969f | |||
| 3ff8f5cb33 | |||
| b6162a3bef | |||
| 09ca67f408 | |||
| cadb1ad674 | |||
| dec7bc3ca3 | |||
| d87460a3cd | |||
| f076711ad3 | |||
| 6149a5ac12 | |||
| 44c61f7bd7 | |||
| 4ea47da269 | |||
| 35f2c0ec7d | |||
| 3316dd1f42 | |||
| 07527fe2b1 | |||
| 03207f62ba | |||
| bcc78d81a6 | |||
| 0d38e443d1 | |||
| 50a069a7fa | |||
| 7455490074 | |||
| 64bb53abc3 | |||
| 18a680a85b | |||
| e26f71b603 | |||
| f98fe43843 | |||
| 26dad82cd3 | |||
| 73d1860995 | |||
| aca5c254d2 | |||
| 3521815646 | |||
| aecc16af5d | |||
| 5927f397a3 | |||
| 1e85c86e74 | |||
| 6640929b01 | |||
| 7a333ace11 | |||
| 32bce25ad5 | |||
| 5dc023d801 | |||
| e3f31e6560 | |||
| e582e147cb | |||
| 6525504923 | |||
| 6d6107161e | |||
| 3196864f0d | |||
| d7596beaf3 | |||
| 23de5b5a61 | |||
| d98b09f802 | |||
| 97c012b3df | |||
| 867b8e0253 | |||
| 80400db92a | |||
| 72ff84be47 | |||
| 13e62bc738 | |||
| 0e83658aa3 | |||
| 8e4506382d | |||
| 7a0b74d79b | |||
| 1026728ab7 | |||
| 909fe5dc15 | |||
| aed9801501 | |||
| 41f92c52e9 | |||
| d0dc104ede | |||
| ce42680888 | |||
| 4ebff09f73 | |||
| 8fd7daade6 | |||
| e6aef755e3 | |||
| c4b8d3b832 | |||
| c38457b48d | |||
| 60994f9ed1 | |||
| a6f078330f | |||
| cfd5c0f82b | |||
| 14c9260ab0 | |||
| 23cac99fe9 | |||
| 2237d2bbb7 | |||
| 62ca0487dc | |||
| 0e858dc333 | |||
| fa3e908afc | |||
| c1bb4de6a3 | |||
| 9b94cf18d0 | |||
| b51071155a | |||
| 1128edc23e | |||
| df9c7010e2 | |||
| 54c7757e38 | |||
| 3da3ccedcb | |||
| 26eb739b46 | |||
| 7ce5b53753 | |||
| 298d446e5f | |||
| 450dd70ea2 | |||
| 1d1a7af48e | |||
| 003bc457bf | |||
| bfafcea0b9 | |||
| 66da8dd4dc | |||
| 307a3ee015 | |||
| 95be147eb4 | |||
| 2bf711f1f7 | |||
| c3d2c7bcde | |||
| 38e32942cb | |||
| febd24b203 | |||
| d1afa3fdca | |||
| a82d1ea832 | |||
| 7d9e8da660 | |||
| ec990bd16a | |||
| fb12c0e499 | |||
| 3d1a4f8802 | |||
| c978e3b7ea | |||
| 0b201cee71 | |||
| 8b7c5a65d6 | |||
| 8a63f0368e | |||
| ce4bf7e10c | |||
| 479946173f | |||
| 176baa075f | |||
| bfbc41d5a7 | |||
| d2b303ffd6 | |||
| 00bbb4242d | |||
| 0a4b0688a8 | |||
| 9efe399399 | |||
| b03240ccb8 | |||
| 35eb17a922 | |||
| c8b997f732 | |||
| 80e83e0c05 | |||
| 9491b5aa39 | |||
| 243a254f3e | |||
| 2d1e0ec890 | |||
| 793ee38f79 | |||
| 5240068f2f | |||
| b8be174610 | |||
| b923925a6c | |||
| 61f5669d76 | |||
| cf707ba657 | |||
| 660260336c | |||
| 0447086882 | |||
| 29a96e5df1 | |||
| c95bb248fb | |||
| d3551826c1 | |||
| d2c21627de | |||
| 81e21effa4 | |||
| 2d03941745 | |||
| 2401c9cee7 | |||
| 4f0bbcc73b | |||
| 5b9700e099 | |||
| d7dda61775 | |||
| 3220721f84 | |||
| 0ed144fe81 | |||
| 13b9bed48b | |||
| c99c24b3bd | |||
| bd1ab000f3 | |||
| a1fd5bb996 | |||
| 9ef29343b3 | |||
| 8bdcdd7810 | |||
| a1217e52c8 | |||
| a8d37b917a | |||
| 06ce351d82 | |||
| f43a601e86 | |||
| 0dfadc5922 | |||
| c8cd67258a | |||
| 7499aa9201 | |||
| 0f4ea17f29 | |||
| b7631689b0 | |||
| afe670b49c | |||
| ee43dff35f | |||
| 1faf83afe4 | |||
| ce0b66db7d | |||
| 01d33c45bd | |||
| 63766dd10f | |||
| 8771158f10 | |||
| 46a589f794 | |||
| a007a8e40c | |||
| 6e42cf4ec5 | |||
| 257dc4e271 | |||
| 4136272382 | |||
| 4f9e43859c | |||
| b57ad9b8c1 | |||
| b8c297b178 | |||
| a389b863f9 | |||
| 40c82b3e48 | |||
| 2ca94f3159 | |||
| 33a97d0e50 | |||
| cef0b6d0d8 | |||
| 7a5e990ad4 | |||
| ca31dc8d78 | |||
| 5b7667fa4d | |||
| 6cdb448f62 | |||
| 053f81a53e | |||
| c842d02d6f | |||
| 4ddcd547ba | |||
| 7bb68ea6b5 | |||
| e13f427267 | |||
| c422e2d570 | |||
| b3f91c4868 | |||
| 19dd56c160 | |||
| c577d3d91f | |||
| 4f57bed03a | |||
| 29663a1229 | |||
| d9d4798f69 | |||
| 32d3c0b920 | |||
| 2224ccab7c | |||
| 8d3d3ba875 | |||
| 4ad2b2829b | |||
| 1ca46a064c | |||
| e42579521c | |||
| 96be06188b | |||
| 10172e0211 | |||
| 70c8a5a6be | |||
| af42f150f2 | |||
| ba16fdaf60 | |||
| c5480bfcc1 | |||
| 79448e9ff9 | |||
| e49398eb47 | |||
| fa842034ed | |||
| 672b472359 | |||
| 37ed87f9c1 | |||
| 25ba312636 | |||
| 340ea3fe9b | |||
| d264f8b05c | |||
| 54672d9fce | |||
| 5ac9a7f1ef | |||
| b906b0f7f2 | |||
| 758e1965f1 | |||
| 8ff437c4d2 | |||
| 4374124985 | |||
| 8b5afaa12c | |||
| a54c6d3c32 | |||
| 93af9379bd | |||
| 39deb41e2e | |||
| d7c0a947fb | |||
| 09b438850e | |||
| cbefd4195f | |||
| 849c8bf6ac | |||
| 00268b1da9 | |||
| 5f5e6084d7 | |||
| 852c4d1300 | |||
| 81fe6f884b | |||
| 9780e4184e | |||
| 1af1660312 | |||
| 1206f5dc88 | |||
| 793c4ac017 | |||
| 620e3af525 | |||
| c7b2e15d16 | |||
| 48f0c75c57 | |||
| 93d3b24300 | |||
| 21f830eb8c | |||
| c195cb00c0 | |||
| f7a53e1b15 | |||
| 759f3f29f0 | |||
| be35926fd1 | |||
| 45fd046b9b | |||
| 2b8d0f60e7 | |||
| 0e0199fc94 | |||
| 7a730c445b | |||
| 4d29592450 | |||
| 44be454a1e | |||
| cbf1b47332 | |||
| eb64bd296a | |||
| 72083f59cd | |||
| 8a20b603f5 | |||
| d45c433bc7 | |||
| 470417fcbe | |||
| 8e28d2a5aa | |||
| 344578006c | |||
| e19fd5cf17 | |||
| 943325baa3 | |||
| 702de2557e | |||
| 159f3419a5 | |||
| b1fb3bccd8 | |||
| 8927634636 | |||
| b9e584752b | |||
| 5857c05e01 | |||
| 81eb4bdebb | |||
| da18427125 | |||
| df0b4ace5e | |||
| 5971d3bf77 | |||
| cca3138f05 | |||
| 242c091add | |||
| 6f0788c9e4 | |||
| 15132a30da | |||
| 3245370280 | |||
| 740c0fe318 | |||
| 8d20ca2053 | |||
| cdd8e34cfc | |||
| a056bcfdfe | |||
| b5065a381f | |||
| 56324e3e8e | |||
| e64182d791 | |||
| 573eaee287 | |||
| 771bfd0244 | |||
| 2db96a5242 | |||
| 8459d231c2 | |||
| efd42b7293 | |||
| fe1c483b78 | |||
| bf381aff7f | |||
| 1a43c05d48 | |||
| 804a3f8adb | |||
| 1122137d12 | |||
| b88afbac4e | |||
| 8e468788a9 | |||
| 7f9e5303be | |||
| 08c48df862 | |||
| 1bc3875519 | |||
| c69cf4731a | |||
| 4ad5bd71f1 | |||
| 1ddc1cec20 | |||
| 934c701be2 | |||
| fadd4165df | |||
| 538454b11b | |||
| e4464afd56 | |||
| eb1f3d8b55 | |||
| e7208278fc | |||
| e87370354b | |||
| fc3bd3a0fe | |||
| 2270f5789a | |||
| 7ef20c273e | |||
| 39942dc5b0 | |||
| 37a6e60e90 | |||
| 1f8c55f536 | |||
| 36c4772b17 | |||
| 47d7536e24 | |||
| 9d9a407c3d | |||
| 7d731d7600 | |||
| dd9db22e9c | |||
| 6830c4fc67 | |||
| 2f3fba346f | |||
| 5bae308cae | |||
| ed71f9ac68 | |||
| 5e7bc78d35 | |||
| 41319bc817 | |||
| ceb908bee7 | |||
| 0e195679bf | |||
| 9c78b2df9a | |||
| 4844f6d927 | |||
| 64381e2a04 | |||
| 8d0abf214c | |||
| 8426b11a90 | |||
| 661bd47202 | |||
| 8e12281b86 | |||
| 51409d3031 | |||
| e1f88b9cd8 | |||
| 28397379e8 | |||
| 7d5d857c28 | |||
| 3bde6e7475 | |||
| 6bfd047c0f | |||
| 925ca1d79d | |||
| efa1a2d5ca | |||
| 0fd4a831c8 | |||
| 31ef53c530 | |||
| b0115acf42 | |||
| e91536b9e1 | |||
| 8f87070b45 | |||
| b72a5e9c69 | |||
| fc6c8c5b7f | |||
| 26cf5b8b80 | |||
| 26d6464360 | |||
| 17e6266384 | |||
| 9d0914ecc1 | |||
| 328c61b67f | |||
| 981d76ef7f | |||
| a2450be63a | |||
| c1a53f7b29 | |||
| 51d49ef60a | |||
| 585bd04c42 | |||
| 0fa45f102b | |||
| 4997ad0468 | |||
| 348eb16cef | |||
| c376f2473e | |||
| 2484cf490b | |||
| 8874ef1184 | |||
| 964dc990a6 | |||
| 58bf5ec677 | |||
| 93d4271bce | |||
| 4653d6fdef | |||
| cbfb52b920 | |||
| 8880d46dd5 | |||
| 20a4136eb5 | |||
| bbc6714be8 | |||
| f8e2947015 | |||
| 5a3ffa20ce | |||
| d0c66ed3f7 | |||
| 253f509fc6 | |||
| 8f9bc8817d | |||
| f22a2b2053 | |||
| 74ab6d2794 | |||
| e9f54a325c | |||
| d03e401d94 | |||
| 7fe2de448e | |||
| 35828fe1c7 | |||
| 6b30b6211a | |||
| 1c714bc1f2 | |||
| 24981e1f81 | |||
| d2c702f890 | |||
| 246c45c1bc | |||
| 5eaae1c960 | |||
| 27dd54dbeb | |||
| 9c3173e8ef | |||
| 0e507bad7e | |||
| 34c997401f | |||
| f6977cd15a | |||
| 91a4334b42 | |||
| 07937424ae | |||
| c98a7b7850 | |||
| 0895f65582 | |||
| 68aab74185 | |||
| 3c93cf07fc | |||
| ec8a0e51b9 | |||
| 0bb354bc4f | |||
| 095bef8ca6 | |||
| 03529174de | |||
| 25d06690ec | |||
| e833b859eb | |||
| 4b6d4fe6be | |||
| f152331615 | |||
| c7ced6a487 | |||
| 1ad94708b4 | |||
| 61047e374c | |||
| bf2531337f | |||
| be481ef006 | |||
| 3bd5f9b027 | |||
| d05e16dc11 | |||
| 91a4883b50 | |||
| 79af6c1a68 | |||
| 9e093db7d8 | |||
| 2427f15231 | |||
| b895cc6aad | |||
| 40884705b4 | |||
| 98e43a6f5a | |||
| 28bfab6700 | |||
| 5c98b6f080 | |||
| 3d0ba557e5 | |||
| de7879afb5 | |||
| 1133a41b77 | |||
| e33ae8ae11 | |||
| aa8c23c8b3 | |||
| da49a69562 | |||
| 9dedf0ec05 | |||
| cd9d49116e | |||
| 630853abb5 | |||
| e6b85c2df7 | |||
| d0fca9eeb9 | |||
| 8cc08c734e | |||
| 4b1b38be63 | |||
| 4acbb7136a | |||
| abff970169 | |||
| 2b53ea0260 | |||
| a7be30a816 | |||
| e723c3c19b | |||
| 7b32cb16f3 | |||
| 68a3c267e5 | |||
| 070f6e5de3 | |||
| 559125cd3c | |||
| c62091b077 | |||
| f71e622fdb | |||
| eee49a8291 | |||
| 27ce8f9351 | |||
| cacf0d34f5 | |||
| 34f2386a9d | |||
| 4936475c2a | |||
| cd0b51dac2 | |||
| 1041b3b8ab | |||
| 955a43723f | |||
| 1cdd528b45 | |||
| 98719aa942 | |||
| 57772662aa | |||
| 6c4aa605df | |||
| 9ba6908764 | |||
| d3b58483bd | |||
| 63ed900087 | |||
| b5ab7851c1 | |||
| 4de2a477c6 | |||
| 094fdad9a7 | |||
| 6eefe4c7c9 | |||
| 621ffb404c | |||
| 527c2f0baf | |||
| 842d7e6b61 | |||
| fb4921e2d3 | |||
| e6c43c84e4 | |||
| 8777a60b99 | |||
| c6db1c70c0 | |||
| 7d9e697d85 | |||
| 10646e9e04 | |||
| 5ef8d8d3b0 | |||
| e9f3f13564 | |||
| 8f20a09791 | |||
| 67ee82abb9 | |||
| 4cdf37b060 | |||
| 946e5caacb | |||
| fb9d8c23e1 | |||
| 37ae142a16 | |||
| 6aad89ae6e | |||
| d79d24efad | |||
| 2cdbf4d2c5 | |||
| 1264cd1dd7 | |||
| a49cb0b080 | |||
| a4c3d39cc3 | |||
| da73067315 | |||
| e73b75e4b5 | |||
| 77c66d9a02 | |||
| 775246946a | |||
| ec23c7d2b8 | |||
| 5603b9e811 | |||
| db26a6beb9 | |||
| 47d57a3971 | |||
| a4d57e7b08 | |||
| bbc6ba1a35 | |||
| 3caf0c3902 | |||
| d12e6ee2b3 | |||
| d475df8d63 | |||
| 92a103d635 | |||
| f2e56cbdd8 | |||
| c97441f7d9 | |||
| 67e4c90d37 | |||
| 4a34c390f8 | |||
| a19e502198 | |||
| fccc2d04a9 | |||
| eb4213d61d | |||
| e0d07c3c19 | |||
| 85a73af303 | |||
| be4c3575fb | |||
| e1fd369c6d | |||
| 77e6b69a63 | |||
| c7f2a04e8c | |||
| c4a8255fdd | |||
| 8fe992318e | |||
| f2317c2a81 | |||
| 516dd89d92 | |||
| 68b4bf1667 | |||
| 30880de82f | |||
| ee836e6646 | |||
| 7d929aca54 | |||
| e65c1fb718 | |||
| 0722692210 | |||
| 28dab0bc9b | |||
| 54e33a0ece | |||
| 80bf8e3ffe | |||
| 8e10477170 | |||
| 650966a7e5 | |||
| 65769e5701 | |||
| 7099102a79 | |||
| 740e69c8dd | |||
| 72ccac2753 | |||
| ae5748ffd1 | |||
| 4a522ce99b | |||
| b3916622e8 | |||
| 56e1f53890 | |||
| 1f4c71dcd6 | |||
| 0ab4bc543f | |||
| 99bc30ad07 | |||
| ab67c04f27 | |||
| 041faa10d9 | |||
| f67fd2bc79 | |||
| 2a7b320834 | |||
| 348012823b | |||
| a4e2ed2253 | |||
| 3eedbdd163 | |||
| bdc07bbbc7 | |||
| d9a9ae2add | |||
| b533e5273d | |||
| e13d905f32 | |||
| be24ed64f8 | |||
| ecc4d58bb2 | |||
| 9a359a27f5 | |||
| 2bec56145e | |||
| e97747762e | |||
| 3d5c21d9ca | |||
| febac9e8ca | |||
| c3574614bc | |||
| fcfc8ce66d | |||
| 4c185fb3b4 | |||
| 00b5438ec5 | |||
| d361962d5c | |||
| 5489285406 | |||
| be4b93ea2a | |||
| bd2e51ba1b | |||
| 18c54aa8c6 | |||
| 3a3972822e | |||
| dd750d5d68 | |||
| 978faa1f68 | |||
| 024a9c6e2b | |||
| ac33570645 | |||
| 9399b430d6 | |||
| 1affadad8e | |||
| f2c511902c | |||
| 6940de7465 | |||
| 9b872bbbd6 | |||
| 7a71c86bd8 | |||
| 2e20d757b1 | |||
| 050a82039a | |||
| 159ff1704f | |||
| be16ad6953 | |||
| c1b393d926 | |||
| 1f4827f5c5 | |||
| b239e81065 | |||
| ee2cd0b573 | |||
| c3d4769956 | |||
| 698a5be41a | |||
| d162ffe508 | |||
| 6bf7a1a2d8 | |||
| 1d69207e6e | |||
| 754cb17254 | |||
| e1ff5f1cae | |||
| 866cf75012 | |||
| 4c24de53e4 | |||
| d75c8e2858 | |||
| 25328d884f | |||
| f34840e1a3 | |||
| 4cb017e0e1 | |||
| 519b258a25 | |||
| a2c53df042 | |||
| a28ca8fed2 | |||
| 68e56f903d | |||
| 95314d46e2 | |||
| c86059e070 | |||
| 1a5cbfb2a1 | |||
| 9cebde3005 | |||
| 7926ff2811 | |||
| 13a8926f60 | |||
| 8aec0f52ba | |||
| 0ccbc76f31 | |||
| 76fa45c88d | |||
| 1d4a680851 | |||
| e9f6a163d9 | |||
| caa160b3fd | |||
| 9b6957b52f | |||
| f48b04ca87 | |||
| 0ab72f5900 | |||
| 1bf91413c4 | |||
| c25521cded | |||
| 783c6c20c1 | |||
| 5beb7d7d92 | |||
| 2d4e7c9c0a | |||
| 39498616a6 | |||
| da4c4f5530 | |||
| b56a7f854c | |||
| d22680bc86 | |||
| aa00742093 | |||
| 63c5aa1984 | |||
| 13e4093d05 | |||
| 4c422e48b2 | |||
| 249e6ffa2c | |||
| 8eadce1201 | |||
| b8c14b1d7f | |||
| e410844350 | |||
| 0049e269d3 | |||
| 287ad9034d | |||
| f8ec24b973 | |||
| 2cfa5511d5 | |||
| 25abd8a67d | |||
| 3a5d570e3c | |||
| df54ba3a0a | |||
| 78877f3731 | |||
| d9d38ae402 | |||
| 23f0eba1bd | |||
| 56b7cc4041 | |||
| 07457703b1 | |||
| 5fc0a5f9a2 | |||
| c0b2d61583 | |||
| d74993f6ac | |||
| a651aa44f4 | |||
| cf63261760 | |||
| e16eba7c66 | |||
| 736829445c | |||
| 20856c9ee8 | |||
| f1c6130cbd | |||
| 7443847697 | |||
| 0294859839 | |||
| ccb925be5d | |||
| 7835533838 | |||
| 779997e7fc | |||
| b0e2129e2f | |||
| f9478d1e76 | |||
| ab2056138e | |||
| 5f0bcf62dd | |||
| 94e2ce2968 | |||
| aea58a2b76 | |||
| 5433552710 | |||
| d2b39351b8 | |||
| a3649ea039 | |||
| f7ca78a8a6 | |||
| 853677ab2e | |||
| 7aae3790a7 | |||
| 4cd54f1026 | |||
| 0eb32b8a58 | |||
| 37e3278f23 | |||
| 7cee40b491 | |||
| fae23bd4fc | |||
| 148a189bb2 | |||
| c3778f94c4 | |||
| b7fbffcb42 | |||
| 6259849958 | |||
| eb767bb3b1 | |||
| a6f01b2455 | |||
| 4fe055c3a8 | |||
| 79d9cce2e7 | |||
| 9fbfdd08d8 | |||
| 879569c661 | |||
| 5814793dc1 | |||
| 299e40c389 | |||
| 38860cd70c | |||
| c8fe2611ba | |||
| af9175b30c | |||
| 35453a0c2d | |||
| fd91bf0498 | |||
| 3b02ef5591 | |||
| 2966763e9e | |||
| 6d7759a1af | |||
| 70e7ca395d | |||
| 922c587ca9 | |||
| a555d70868 | |||
| 6f6907363e | |||
| 77d601f0cc | |||
| 8e99f67fb7 | |||
| 9d3fa94960 | |||
| b6739e9d77 | |||
| 33c1b4ae3b | |||
| 67c0a4f513 | |||
| ce1181531a | |||
| 54682a1370 | |||
| dc5342b9fc | |||
| 83bb7c475d | |||
| 638bdc902b | |||
| 874064de67 | |||
| 1f134ff070 | |||
| 2c334170bd | |||
| 35efdf6cbd | |||
| e02f3d7064 | |||
| a5e83a4d84 | |||
| e6ba2a6e7a | |||
| 79dd50910c | |||
| c4d267ecb1 | |||
| 2011dd9a83 | |||
| b07131cd0f | |||
| d3fe165e2c | |||
| bf19de3a90 | |||
| 58a0b3d8e7 | |||
| 65c2ee1760 | |||
| dfb0a7fee1 | |||
| 7511339656 | |||
| cb106f8a55 | |||
| 39d45b71d7 | |||
| db1fa84936 | |||
| f83295372b | |||
| e6506d9458 | |||
| af63dbb31d | |||
| b5641cc445 | |||
| 576fb392bb | |||
| ff539e2669 | |||
| 506d3adf70 | |||
| 94eb7849fe | |||
| 9036b272a8 | |||
| c81467da7c | |||
| 6db3a20021 | |||
| a428d6c553 | |||
| b7b01d5605 | |||
| 500d2361ec | |||
| 75ba20201e | |||
| b26c8d20cd | |||
| 951ed4bf33 | |||
| 2a05ec3866 | |||
| 04f2bd1ec3 | |||
| e08116c9ad | |||
| da7fbeee3d | |||
| 61aa32d8c5 | |||
| 74ff5e8de4 | |||
| aad70a49b7 | |||
| d332bb05fa | |||
| 6b6781eabb | |||
| 4a1cdd4ef1 | |||
| 764a8f6a85 | |||
| 22a0b84c2a | |||
| bba911165b | |||
| 8656bea4f2 | |||
| 9024844449 | |||
| 89c5b81eb0 | |||
| 18a7b0e615 | |||
| 1407fbeb8c | |||
| b5fc377dab | |||
| 71af16beb9 | |||
| 96d3eda02b | |||
| ba2a6bab68 | |||
| 092cc40da6 | |||
| c55152c0e1 | |||
| e83bb0c639 | |||
| 318285cb07 | |||
| 5274e1c454 | |||
| 294a535c1b | |||
| eaeb80e3c0 | |||
| 6eb8047686 | |||
| db040bf293 | |||
| acfc1ede6e | |||
| 8910c76bcf | |||
| 342093f661 | |||
| 9e26db3cd2 | |||
| a71b39ddee | |||
| 0626354844 | |||
| e9d2a53aaf | |||
| ca59bbe1aa | |||
| f505b1a553 | |||
| a237b11ff7 | |||
| 9a77f012d8 | |||
| 36c7f779f3 | |||
| b970e90178 | |||
| a7ea34914d | |||
| 19e1e5861b | |||
| e23777a642 | |||
| a2f47f3ee2 | |||
| 15e0f11bb9 | |||
| 1a32ea511e | |||
| ac602dc2a9 | |||
| cf3fc940d2 | |||
| e09cac4ea1 | |||
| 7c96115ea9 | |||
| 12de353427 | |||
| 057e4db6c1 | |||
| 883915c9d3 | |||
| 898413bfd4 | |||
| aa02d839a7 | |||
| a4ba3a4dd0 | |||
| 10283d913c | |||
| d2b12ff1ab | |||
| 1664533e14 | |||
| 19247f38c5 | |||
| d7c5e36627 | |||
| aaf31efd0f | |||
| 09f27ff686 | |||
| 8f25c91272 | |||
| 9c5a7eb6bb | |||
| 5b6e6a556a | |||
| debcf9c9e9 | |||
| 64074b60b1 | |||
| 2e38e1a79c | |||
| 90b5d240a8 | |||
| f4e4bb97b1 | |||
| 0036bf1e2f | |||
| 77c370cb77 | |||
| 7a68f4e7b9 | |||
| 828e77ad80 | |||
| bd7e931674 | |||
| 5ac8e89c8e | |||
| a846dc5bf1 | |||
| f24e8b7132 | |||
| 32302e89aa | |||
| a8d2e6634f | |||
| 066dbb79b7 | |||
| ac9f08ba2a | |||
| b6f640aca2 | |||
| f0f3525b3e | |||
| 05065fca0e | |||
| d8e9807d6d | |||
| db43ae0f3f | |||
| a0ef00788a | |||
| e4e96a6a2f | |||
| ff9381f395 | |||
| 5e34deab59 | |||
| 5636033357 | |||
| c4f4f3e914 | |||
| e6f870b220 | |||
| eeda0a2868 | |||
| da38d8a045 | |||
| 5688b51abc | |||
| 4c475818bc | |||
| 158ba4ea0b | |||
| 2065f3b911 | |||
| 6960276ed6 | |||
| d843cde7a1 | |||
| c94dac769b | |||
| 10fc8e5a28 | |||
| 5cde58e8b7 | |||
| 6bf007f878 | |||
| b95427cc09 | |||
| 04bc1e8f56 | |||
| 354eff93b7 | |||
| d26c86f60f | |||
| badcc0ac2c | |||
| de72400706 | |||
| d21b20fcab | |||
| 7063bcda3c | |||
| 909c68b924 | |||
| 48b4ebdf87 | |||
| 3b0442c972 | |||
| a2c16e9442 | |||
| f22ddf5006 | |||
| 4ad26d8874 | |||
| c9f0f300a6 | |||
| 61b7dfa58c | |||
| 42a4912cc7 | |||
| 8f4c86c1b4 | |||
| e27c3c4c87 | |||
| 187389638c | |||
| f40c4b9b2c | |||
| ca2ebac694 | |||
| 33996c8728 | |||
| 4d12a948ce | |||
| ab19e58c6d | |||
| cc811522e0 | |||
| 746d5fbf1e | |||
| 8f1c1df48f | |||
| 7b70b57b37 | |||
| 3a9dd0fc84 | |||
| 9d6749ec42 | |||
| e2de107067 | |||
| c79fc1abdd | |||
| fe6ffaae94 | |||
| 02d5de3e23 | |||
| 016172ae6f | |||
| fd2fca10e5 | |||
| 481b599628 | |||
| 78f22e1556 | |||
| a215f7b661 | |||
| 01b221d815 | |||
| ba74eb6fa2 | |||
| 7af44e1fdd | |||
| cc75b4946f | |||
| c8d11fa268 | |||
| d4fd0db296 | |||
| 3cff44815a | |||
| 1a2fffbf5c | |||
| 7a38225a37 | |||
| e9175e78bd | |||
| 00f6a34afd | |||
| 4494f3525b | |||
| 26e01d611c | |||
| 7b1a51a399 | |||
| 1fb1eab2ca | |||
| fd39b498e5 | |||
| 2995f5894d | |||
| 359396b2c7 | |||
| 4f8f944282 | |||
| f0ef663691 | |||
| 680d31688f | |||
| 3374f6a4c2 | |||
| 1f16ca7e01 | |||
| d7c3a6cec9 | |||
| c87e0b16f1 | |||
| ef71cd93a4 | |||
| c0a0c9c660 | |||
| 96be3a1b46 | |||
| a588605f13 | |||
| 691d19a484 | |||
| debfd48236 | |||
| e7b5cf7b23 | |||
| dafc8dea19 | |||
| 669b042107 | |||
| ae1936a5f6 | |||
| f981819447 | |||
| 2f2a832db1 | |||
| a0d9f7fe75 | |||
| af89e04c89 | |||
| 123a11ee9d | |||
| 3a22716df6 | |||
| 2da0ae6dc0 | |||
| bdb9ae36ce | |||
| 3357b14ef1 | |||
| 2c440d58c2 | |||
| 043fc9d1af | |||
| f36f221213 | |||
| 5e8a6fdb11 | |||
| 2845790459 | |||
| 5c911127e7 | |||
| 78910ba1cb | |||
| 9877b67cd4 | |||
| e55aa7b8fc | |||
| 473505d146 | |||
| cbf7001a38 | |||
| 38920c56d2 | |||
| 1f741702af |
+1
-5
@@ -5,13 +5,9 @@
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2020
|
||||
"ecmaVersion": 13
|
||||
},
|
||||
"rules": {
|
||||
"indent": [
|
||||
"error",
|
||||
4
|
||||
],
|
||||
"linebreak-style": [
|
||||
"error",
|
||||
"unix"
|
||||
|
||||
@@ -2591,6 +2591,7 @@
|
||||
* support: fix crash when opening tickets with 0 length files
|
||||
|
||||
[7.4.0]
|
||||
* **IMPORTANT**: This is the last release of Cloudron to support Ubuntu 18.04. Please [upgrade](https://docs.cloudron.io/guides/upgrade-ubuntu-20/) to Ubuntu 20.04 (Focal Fossa) at the earliest.
|
||||
* Update base image to jammy
|
||||
* backups: Add idrive e2
|
||||
* Support proxyAuth for proxy app
|
||||
@@ -2604,4 +2605,154 @@
|
||||
* Initial OpenID integration
|
||||
* dyndns: update dynamic dns of apps that are updating
|
||||
* logs: order existing logs by date
|
||||
* volumes: list block devices
|
||||
* aws: add Asia Pacific and Africa regions
|
||||
* exoscale: add sofia and munich regions
|
||||
* vultr: add bangalore and silicon valley
|
||||
* dyndns: update secondary/redirect/alias domains as well
|
||||
* DO spaces: add sydney and singapore
|
||||
* scaleway: add warsaw region
|
||||
* domains: add pagination and search filter
|
||||
* Add disk speeds to disk usage data
|
||||
* Add danish translation . Dansk oversættelse er tilføjet. Mange tak til @jayonrails!
|
||||
* acme: support DoT + ClientID
|
||||
|
||||
[7.4.1]
|
||||
* support: Fix issue where app support tickets could not be opened
|
||||
* reverseproxy: prevent duplication of STS header
|
||||
* services: fix issue with timeout when restoring large databases
|
||||
* notifications: email configuration error shown incorrectly
|
||||
* OpenID: add RSA-SHA256 signature algorithm
|
||||
|
||||
[7.4.2]
|
||||
* dns: Add Bunny.net
|
||||
* Fix ipv4 vs ipv6 detection
|
||||
* Fix misleading pending security updates message
|
||||
|
||||
[7.4.3]
|
||||
* **IMPORTANT**: This is the last release of Cloudron to support Ubuntu 18.04. Please [upgrade](https://docs.cloudron.io/guides/upgrade-ubuntu-20/) to Ubuntu 20.04 (Focal Fossa) at the earliest.
|
||||
* postgresql: fix for supporting Taiga with postgres 14
|
||||
|
||||
[7.5.0]
|
||||
* **IMPORTANT**: This is the last release of Cloudron to support CPUs without AVX support. AVX support is required for MongoDB 5.0. See https://forum.cloudron.io/topic/8785/avx-support-in-your-vps-server for more information.
|
||||
* acme: handle LE validation type cache logic
|
||||
* improve viewing of logs
|
||||
* redis: update to 7.0.11
|
||||
* ionos profitbricks: add new regions Berlin and Logrono
|
||||
* docker: update to 23.0.6
|
||||
* network: trusted IPs
|
||||
* mail: fix crash when editing quota of new mailboxes
|
||||
* mail: update haraka to 3.0.2
|
||||
* mail: fix issue where client IP was leaked in headers
|
||||
* mail: skip SPF check of authenticated senders
|
||||
* filemanager: new UI, support for large folders and lazy loading
|
||||
* oidc: make UI translatable
|
||||
* oidc: dashboard login uses oidc
|
||||
* web terminal: Copy selected terminal text with ctrl shift c
|
||||
* Expose alias domains as `CLOUDRON_ALIAS_DOMAINS`
|
||||
|
||||
[7.5.1]
|
||||
* **IMPORTANT**: This is the last release of Cloudron to support CPUs without AVX support. AVX support is required for MongoDB 5.0. See https://forum.cloudron.io/topic/8785/avx-support-in-your-vps-server for more information.
|
||||
* mail: Fix issue where mail usage sizes where reported incorrectly
|
||||
* filemanager: Only init vue app after we fetch language files to avoid UI shaking
|
||||
* mail: Clear the correct mail status notification
|
||||
* filemanager: allow pasting on non-folders to cwd
|
||||
* mail: give resolver more time
|
||||
* dashboard: backup logs links are grayed out because of z-index
|
||||
* branding: make oidc login does not use cloudron name
|
||||
* translation: fix crash when translated text has single quote (french)
|
||||
* dyndns: show logs
|
||||
* mail: server location get it's own section
|
||||
* optional services: redis & turn . joins sendmail, recvmail
|
||||
* backups: encrypted backups must have .enc extension
|
||||
* mail: add virtual all mail mailbox
|
||||
* redirections: use 301 (permanent) instead of 302 (temporary) for redirections. this is better for SEO links
|
||||
* graphs: show old backup size if > 1GB
|
||||
* docker: fix image pruning
|
||||
* Major overhaul of the REST API
|
||||
* Fix import via SSHFS and CIFS
|
||||
|
||||
[7.5.2]
|
||||
* mail: Fix default max mail size to 25MB (and not 25MiB)
|
||||
* dashboard: disable 2fa setup for external users
|
||||
* filemanager: Always show app or volume name
|
||||
* filemanager: fix logs button link
|
||||
* backups: add Contabo object storage
|
||||
* Fix incorrect migration of directory server setting
|
||||
* support: Add explicit billing issue ticket type
|
||||
* Fix broken directory server config migration
|
||||
* system: fix crash updating disk usage
|
||||
* Fix crash in renew certs call from cron
|
||||
|
||||
[7.6.0]
|
||||
* Update MongoDB to 5.0. Important: this release requires AVX support in CPU
|
||||
* turn: add ddos mitigation settings
|
||||
* api: return json when route not found
|
||||
* oidc: loginRedirectUri can be empty string
|
||||
* New base image 4.2.0. `cloudron/base:4.2.0@sha256:46da2fffb36353ef714f97ae8e962bd2c212ca091108d768ba473078319a47f4`
|
||||
* mail: add option to enable/disable Virtual All mailbox
|
||||
* volumes: edit options for network mounts
|
||||
* oidc: fix issue with redirects not working on iOS apps
|
||||
* app proxy: Host header is set to match the proxy domain instead of the target domain
|
||||
* notifications: Add color coded indicator to notifications
|
||||
* oidc: add oidc logo as login indicator for apps
|
||||
* dyndns: update dns every 10 mins
|
||||
|
||||
[7.6.1]
|
||||
* Cleanup backup validation mount point
|
||||
* dashboard: remove nginx config of old domain when domain changed
|
||||
* Show disk consumption of docker volumes for /run and /tmp of apps separately
|
||||
* dns: add dnsimple automation
|
||||
* roles: admin role can access branding and networking
|
||||
* dns: add ovh backend
|
||||
|
||||
[7.6.2]
|
||||
* mail: fix issue with redis emitting warnings non-stop
|
||||
* mail: fix issue where doublle header was sent
|
||||
* ovh: fix nameserver matching
|
||||
* logviewer: preserve horizontal scroll position
|
||||
* redis: use default instead of redisuser
|
||||
* dockerproxy: allow child containers to access volumes
|
||||
* dashboard: Show system information
|
||||
* Fix linode object storage
|
||||
* postgres: enable cube, vector and earthdistance extensions
|
||||
* Add ability to register a Cloudron with a setupToken only
|
||||
* support: replace ticket section with help section
|
||||
* firewall: increase blocklist size to 262144
|
||||
|
||||
[7.6.3]
|
||||
* postgres: do not clear search_path for restore
|
||||
* route53: retry on rate limit errors
|
||||
* update: continue with app update if box update does not start
|
||||
|
||||
[7.6.4]
|
||||
* mail: update limit plugin
|
||||
* ldap: fix error messages to show proper error messages in the external LDAP connector
|
||||
* dashboard: fix various UI elements hidden for admin user
|
||||
* directoryserver: fix totp validation
|
||||
* email: improve loading of the mail usage to not block other views from loading
|
||||
* eventlog: add events for directory server and exernal directory configuration
|
||||
* externalldap: available regardless of subscription
|
||||
* externalldap: show syncer log history
|
||||
* externalldap: sync is now run periodically (every 4 hours)
|
||||
* profile: changing email now requires password
|
||||
|
||||
[7.7.0]
|
||||
* OIDC avatar support via picture claim
|
||||
* backupcleaner: fix bug where preserved backups were removed incorrectly
|
||||
* directoryserver: cloudflare warning
|
||||
* oidc/ldap: fix display name parsing to send anything after first name as the last name
|
||||
* mail: Update haraka to 3.0.3
|
||||
* mongodb: Update mongodb to 6.0
|
||||
* acme: use secp256r1 curve for max compatibility
|
||||
* add port range support
|
||||
* docker: disable userland proxy
|
||||
* oidc: always re-setup oidc client record
|
||||
* mail: update solr to 8.11.3
|
||||
* mail: spam acl should allow underscore and question mark
|
||||
* Fix streaming of logs with `logPaths`
|
||||
* profile: store user language setting in the database
|
||||
|
||||
[7.7.1]
|
||||
* postgresql: fix bug in loading of contrib extensions
|
||||
|
||||
|
||||
@@ -50,17 +50,6 @@ the dashboard, database addons, graph container, base image etc. Cloudron also r
|
||||
on external services such as the App Store for apps to be installed. As such, don't
|
||||
clone this repo and npm install and expect something to work.
|
||||
|
||||
## Development
|
||||
|
||||
This is the backend code of Cloudron. The frontend code is [here](https://git.cloudron.io/cloudron/dashboard).
|
||||
|
||||
The way to develop is to first install a full instance of Cloudron in a VM. Then you can use the [hotfix](https://git.cloudron.io/cloudron/cloudron-machine)
|
||||
tool to patch the VM with the latest code.
|
||||
|
||||
```
|
||||
SSH_PASSPHRASE=sshkeypassword cloudron-machine hotfix --cloudron my.example.com --release 6.0.0 --ssh-key keyname
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Please note that the Cloudron code is under a source-available license. This is not the same as an
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs'),
|
||||
ldap = require('./src/ldap.js'),
|
||||
const constants = require('./src/constants.js'),
|
||||
fs = require('fs'),
|
||||
ldapServer = require('./src/ldapserver.js'),
|
||||
oidc = require('./src/oidc.js'),
|
||||
paths = require('./src/paths.js'),
|
||||
proxyAuth = require('./src/proxyauth.js'),
|
||||
safe = require('safetydance'),
|
||||
server = require('./src/server.js'),
|
||||
settings = require('./src/settings.js'),
|
||||
directoryServer = require('./src/directoryserver.js');
|
||||
|
||||
let logFd;
|
||||
|
||||
async function setupLogging() {
|
||||
if (process.env.BOX_ENV === 'test') return;
|
||||
if (constants.TEST) return;
|
||||
|
||||
logFd = fs.openSync(paths.BOX_LOG_FILE, 'a');
|
||||
// we used to write using a stream before but it caches internally and there is no way to flush it when things crash
|
||||
@@ -37,9 +37,9 @@ async function startServers() {
|
||||
await setupLogging();
|
||||
await server.start(); // do this first since it also inits the database
|
||||
await proxyAuth.start();
|
||||
await ldap.start();
|
||||
await ldapServer.start();
|
||||
|
||||
const conf = await settings.getDirectoryServerConfig();
|
||||
const conf = await directoryServer.getConfig();
|
||||
if (conf.enabled) await directoryServer.start();
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ async function main() {
|
||||
|
||||
process.on('SIGHUP', async function () {
|
||||
debug('Received SIGHUP. Re-reading configs.');
|
||||
const conf = await settings.getDirectoryServerConfig();
|
||||
const conf = await directoryServer.getConfig();
|
||||
if (conf.enabled) await directoryServer.checkCertificate();
|
||||
});
|
||||
|
||||
@@ -62,7 +62,7 @@ async function main() {
|
||||
await proxyAuth.stop();
|
||||
await server.stop();
|
||||
await directoryServer.stop();
|
||||
await ldap.stop();
|
||||
await ldapServer.stop();
|
||||
await oidc.stop();
|
||||
setTimeout(process.exit.bind(process), 3000);
|
||||
});
|
||||
@@ -73,14 +73,12 @@ async function main() {
|
||||
await proxyAuth.stop();
|
||||
await server.stop();
|
||||
await directoryServer.stop();
|
||||
await ldap.stop();
|
||||
await ldapServer.stop();
|
||||
await oidc.stop();
|
||||
setTimeout(process.exit.bind(process), 3000);
|
||||
});
|
||||
|
||||
process.on('uncaughtException', (error) => exitSync({ error, code: 1 }));
|
||||
|
||||
console.log(`Cloudron is up and running. Logs are at ${paths.BOX_LOG_FILE}`); // this goes to journalctl
|
||||
}
|
||||
|
||||
main();
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
const database = require('./src/database.js');
|
||||
|
||||
const crashNotifier = require('./src/crashnotifier.js');
|
||||
|
||||
// This is triggered by systemd with the crashed unit name as argument
|
||||
async function main() {
|
||||
if (process.argv.length !== 3) return console.error('Usage: crashnotifier.js <unitName>');
|
||||
|
||||
const unitName = process.argv[2];
|
||||
console.log('Started crash notifier for', unitName);
|
||||
|
||||
// eventlog api needs the db
|
||||
await database.initialize();
|
||||
|
||||
await crashNotifier.sendFailureLogs(unitName);
|
||||
}
|
||||
|
||||
main();
|
||||
+15
-69
@@ -2,15 +2,15 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
var argv = require('yargs').argv,
|
||||
const argv = require('yargs').argv,
|
||||
autoprefixer = require('gulp-autoprefixer'),
|
||||
concat = require('gulp-concat'),
|
||||
cssnano = require('gulp-cssnano'),
|
||||
ejs = require('gulp-ejs'),
|
||||
execSync = require('child_process').execSync,
|
||||
fs = require('fs'),
|
||||
gulp = require('gulp'),
|
||||
rimraf = require('rimraf'),
|
||||
sass = require('gulp-sass')(require('node-sass')),
|
||||
sass = require('gulp-sass')(require('sass')),
|
||||
serve = require('gulp-serve'),
|
||||
sourcemaps = require('gulp-sourcemaps');
|
||||
|
||||
@@ -53,28 +53,11 @@ gulp.task('bootstrap', function () {
|
||||
.pipe(gulp.dest('dist/3rdparty/js'));
|
||||
});
|
||||
|
||||
gulp.task('monaco', function () {
|
||||
return gulp.src('node_modules/monaco-editor/min/**/*')
|
||||
.pipe(gulp.dest('dist/3rdparty/'));
|
||||
gulp.task('moment', function () {
|
||||
return gulp.src('node_modules/moment/min/*')
|
||||
.pipe(gulp.dest('dist/3rdparty/js'));
|
||||
});
|
||||
|
||||
gulp.task('xterm-core', function () {
|
||||
return gulp.src('node_modules/xterm/**/*')
|
||||
.pipe(gulp.dest('dist/3rdparty/xterm'));
|
||||
});
|
||||
|
||||
gulp.task('xterm-addon-attach', function () {
|
||||
return gulp.src('node_modules/xterm-addon-attach/**/*')
|
||||
.pipe(gulp.dest('dist/3rdparty/xterm-addon-attach'));
|
||||
});
|
||||
|
||||
gulp.task('xterm-addon-fit', function () {
|
||||
return gulp.src('node_modules/xterm-addon-fit/**/*')
|
||||
.pipe(gulp.dest('dist/3rdparty/xterm-addon-fit'));
|
||||
});
|
||||
|
||||
gulp.task('xterm', gulp.series(['xterm-core', 'xterm-addon-attach', 'xterm-addon-fit']));
|
||||
|
||||
gulp.task('3rdparty-copy', function () {
|
||||
return gulp.src([
|
||||
'src/3rdparty/**/*.js',
|
||||
@@ -89,7 +72,7 @@ gulp.task('3rdparty-copy', function () {
|
||||
]).pipe(gulp.dest('dist/3rdparty/'));
|
||||
});
|
||||
|
||||
gulp.task('3rdparty', gulp.series(['3rdparty-copy', 'monaco', 'xterm', 'bootstrap', 'fontawesome']));
|
||||
gulp.task('3rdparty', gulp.series(['3rdparty-copy', 'moment', 'bootstrap', 'fontawesome']));
|
||||
|
||||
// --------------
|
||||
// JavaScript
|
||||
@@ -99,7 +82,6 @@ gulp.task('js-index', function () {
|
||||
return gulp.src([
|
||||
'src/js/index.js',
|
||||
'src/js/client.js',
|
||||
'src/js/main.js',
|
||||
'src/js/utils.js',
|
||||
'src/views/*.js'
|
||||
])
|
||||
@@ -110,38 +92,11 @@ gulp.task('js-index', function () {
|
||||
.pipe(gulp.dest('dist/js'));
|
||||
});
|
||||
|
||||
gulp.task('js-logs', function () {
|
||||
return gulp.src(['src/js/logs.js', 'src/js/client.js', 'src/js/utils.js'])
|
||||
gulp.task('js-passwordreset', function () {
|
||||
return gulp.src(['src/js/passwordreset.js', 'src/js/utils.js'])
|
||||
.pipe(ejs({ apiOrigin: apiOrigin, revision: revision, appstore: appstore }, {}, { ext: '.js' }))
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(concat('logs.js', { newLine: ';' }))
|
||||
.pipe(sourcemaps.write())
|
||||
.pipe(gulp.dest('dist/js'));
|
||||
});
|
||||
|
||||
gulp.task('js-filemanager', function () {
|
||||
return gulp.src(['src/js/filemanager.js', 'src/js/client.js', 'src/js/utils.js', 'src/components/*.js'])
|
||||
.pipe(ejs({ apiOrigin: apiOrigin, revision: revision, appstore: appstore }, {}, { ext: '.js' }))
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(concat('filemanager.js', { newLine: ';' }))
|
||||
.pipe(sourcemaps.write())
|
||||
.pipe(gulp.dest('dist/js'));
|
||||
});
|
||||
|
||||
gulp.task('js-terminal', function () {
|
||||
return gulp.src(['src/js/terminal.js', 'src/js/client.js', 'src/js/utils.js'])
|
||||
.pipe(ejs({ apiOrigin: apiOrigin, revision: revision, appstore: appstore }, {}, { ext: '.js' }))
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(concat('terminal.js', { newLine: ';' }))
|
||||
.pipe(sourcemaps.write())
|
||||
.pipe(gulp.dest('dist/js'));
|
||||
});
|
||||
|
||||
gulp.task('js-login', function () {
|
||||
return gulp.src(['src/js/login.js', 'src/js/utils.js'])
|
||||
.pipe(ejs({ apiOrigin: apiOrigin, revision: revision, appstore: appstore }, {}, { ext: '.js' }))
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(concat('login.js', { newLine: ';' }))
|
||||
.pipe(concat('passwordreset.js', { newLine: ';' }))
|
||||
.pipe(sourcemaps.write())
|
||||
.pipe(gulp.dest('dist/js'));
|
||||
});
|
||||
@@ -182,7 +137,7 @@ gulp.task('js-restore', function () {
|
||||
.pipe(gulp.dest('dist/js'));
|
||||
});
|
||||
|
||||
gulp.task('js', gulp.series([ 'js-index', 'js-logs', 'js-filemanager', 'js-terminal', 'js-login', 'js-setupaccount', 'js-setup', 'js-setupdns', 'js-restore' ]));
|
||||
gulp.task('js', gulp.series([ 'js-index', 'js-passwordreset', 'js-setupaccount', 'js-setup', 'js-setupdns', 'js-restore' ]));
|
||||
|
||||
// --------------
|
||||
// HTML
|
||||
@@ -192,10 +147,6 @@ gulp.task('html-views', function () {
|
||||
return gulp.src('src/views/**/*.html').pipe(gulp.dest('dist/views'));
|
||||
});
|
||||
|
||||
gulp.task('html-components', function () {
|
||||
return gulp.src('src/components/**/*.html').pipe(gulp.dest('dist/components'));
|
||||
});
|
||||
|
||||
gulp.task('html-templates', function () {
|
||||
return gulp.src('src/templates/**/*').pipe(gulp.dest('dist/templates'));
|
||||
});
|
||||
@@ -204,7 +155,7 @@ gulp.task('html-raw', function () {
|
||||
return gulp.src('src/*.html').pipe(ejs({ apiOrigin: apiOrigin, revision: revision }, {}, { ext: '.html' })).pipe(gulp.dest('dist'));
|
||||
});
|
||||
|
||||
gulp.task('html', gulp.series(['html-views', 'html-components', 'html-templates', 'html-raw']));
|
||||
gulp.task('html', gulp.series(['html-views', 'html-templates', 'html-raw']));
|
||||
|
||||
// --------------
|
||||
// CSS
|
||||
@@ -240,8 +191,7 @@ gulp.task('timezones', function (done) {
|
||||
// --------------
|
||||
|
||||
gulp.task('clean', function (done) {
|
||||
rimraf.sync('dist');
|
||||
done();
|
||||
fs.rm('dist', { recursive: true, force: true }, done);
|
||||
});
|
||||
|
||||
gulp.task('default', gulp.series(['clean', 'html', 'js', 'timezones', '3rdparty', 'translation', 'images', 'css']));
|
||||
@@ -252,18 +202,14 @@ gulp.task('watch', function (done) {
|
||||
gulp.watch(['src/translation/*'], gulp.series(['translation']));
|
||||
gulp.watch(['src/**/*.html'], gulp.series(['html']));
|
||||
gulp.watch(['src/views/*.html'], gulp.series(['html-views']));
|
||||
gulp.watch(['src/components/*.html'], gulp.series(['html-components']));
|
||||
gulp.watch(['src/templates/*.html'], gulp.series(['html-templates']));
|
||||
gulp.watch(['scripts/createTimezones.js', 'src/js/utils.js'], gulp.series(['timezones']));
|
||||
gulp.watch(['src/js/setup.js', 'src/js/client.js', 'src/js/utils.js'], gulp.series(['js-setup']));
|
||||
gulp.watch(['src/js/setupdns.js', 'src/js/client.js', 'src/js/utils.js'], gulp.series(['js-setupdns']));
|
||||
gulp.watch(['src/js/restore.js', 'src/js/client.js', 'src/js/utils.js'], gulp.series(['js-restore']));
|
||||
gulp.watch(['src/js/logs.js', 'src/js/client.js', 'src/js/utils.js'], gulp.series(['js-logs']));
|
||||
gulp.watch(['src/js/filemanager.js', 'src/js/client.js', 'src/js/utils.js', 'src/components/*.js'], gulp.series(['js-filemanager']));
|
||||
gulp.watch(['src/js/terminal.js', 'src/js/client.js', 'src/js/utils.js'], gulp.series(['js-terminal']));
|
||||
gulp.watch(['src/js/login.js', 'src/js/utils.js'], gulp.series(['js-login']));
|
||||
gulp.watch(['src/js/passwordreset.js', 'src/js/utils.js'], gulp.series(['js-passwordreset']));
|
||||
gulp.watch(['src/js/setupaccount.js', 'src/js/utils.js'], gulp.series(['js-setupaccount']));
|
||||
gulp.watch(['src/js/index.js', 'src/js/client.js', 'src/js/main.js', 'src/views/*.js', 'src/js/utils.js'], gulp.series(['js-index']));
|
||||
gulp.watch(['src/js/index.js', 'src/js/client.js', 'src/views/*.js', 'src/js/utils.js'], gulp.series(['js-index']));
|
||||
gulp.watch(['src/3rdparty/**/*'], gulp.series(['3rdparty']));
|
||||
done();
|
||||
});
|
||||
|
||||
Generated
+341
-3798
File diff suppressed because it is too large
Load Diff
+6
-10
@@ -13,9 +13,9 @@
|
||||
"author": "",
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^5.15.4",
|
||||
"bootstrap-sass": "^3.4.1",
|
||||
"chart.js": "^4.1.1",
|
||||
"@fortawesome/fontawesome-free": "^6.4.0",
|
||||
"bootstrap-sass": "^3.4.3",
|
||||
"chart.js": "^4.3.0",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-autoprefixer": "^8.0.0",
|
||||
"gulp-concat": "^2.6.1",
|
||||
@@ -24,13 +24,9 @@
|
||||
"gulp-sass": "^5.1.0",
|
||||
"gulp-serve": "^1.4.0",
|
||||
"gulp-sourcemaps": "^3.0.0",
|
||||
"monaco-editor": "^0.34.0",
|
||||
"node-sass": "^7.0.3",
|
||||
"rimraf": "^3.0.2",
|
||||
"xterm": "^5.1.0",
|
||||
"xterm-addon-attach": "^0.8.0",
|
||||
"xterm-addon-fit": "^0.7.0",
|
||||
"yargs": "^17.5.1"
|
||||
"moment": "^2.29.4",
|
||||
"sass": "^1.63.3",
|
||||
"yargs": "^17.7.2"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"env": {
|
||||
|
||||
@@ -24,7 +24,7 @@ function getAccessToken(callback) {
|
||||
let username = readlineSync.question('Username: ', {});
|
||||
let password = readlineSync.question('Password: ', { noEchoBack: true });
|
||||
|
||||
superagent.post(`https://${cloudronDomain}/api/v1/cloudron/login`, { username: username, password: password }).end(function (error, result) {
|
||||
superagent.post(`https://${cloudronDomain}/api/v1/auth/login`, { username: username, password: password }).end(function (error, result) {
|
||||
if (error || result.statusCode !== 200) {
|
||||
console.log('Login failed');
|
||||
return getAccessToken(callback);
|
||||
@@ -63,4 +63,4 @@ getAccessToken(function (accessToken) {
|
||||
|
||||
console.log('Done');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -20,7 +20,7 @@ function getAccessToken(callback) {
|
||||
let username = readlineSync.question('Username: ', {});
|
||||
let password = readlineSync.question('Password: ', { noEchoBack: true });
|
||||
|
||||
superagent.post(`https://${cloudronDomain}/api/v1/cloudron/login`, { username: username, password: password }).end(function (error, result) {
|
||||
superagent.post(`https://${cloudronDomain}/api/v1/auth/login`, { username: username, password: password }).end(function (error, result) {
|
||||
if (error || result.statusCode !== 200) {
|
||||
console.log('Login failed');
|
||||
return getAccessToken(callback);
|
||||
@@ -66,4 +66,4 @@ getAccessToken(function (accessToken) {
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
BIN
Binary file not shown.
Vendored
-696
File diff suppressed because one or more lines are too long
-639
@@ -1,639 +0,0 @@
|
||||
(function($, angular) {
|
||||
|
||||
// eslint-disable-next-line angular/file-name, angular/no-service-method
|
||||
angular.module('ui.bootstrap.contextMenu', [])
|
||||
.service('CustomService', function () {
|
||||
'use strict';
|
||||
|
||||
return {
|
||||
initialize: function (item) {
|
||||
console.log('got here', item);
|
||||
}
|
||||
};
|
||||
|
||||
})
|
||||
.constant('ContextMenuEvents', {
|
||||
// Triggers when all the context menus have been closed
|
||||
ContextMenuAllClosed: 'context-menu-all-closed',
|
||||
// Triggers when any single conext menu is called.
|
||||
// Closing all context menus triggers this for each level open
|
||||
ContextMenuClosed: 'context-menu-closed',
|
||||
// Triggers right before the very first context menu is opened
|
||||
ContextMenuOpening: 'context-menu-opening',
|
||||
// Triggers right after any context menu is opened
|
||||
ContextMenuOpened: 'context-menu-opened'
|
||||
})
|
||||
.directive('contextMenu', ['$rootScope', 'ContextMenuEvents', '$parse', '$q', 'CustomService', '$sce', '$document', '$window', '$compile',
|
||||
function ($rootScope, ContextMenuEvents, $parse, $q, custom, $sce, $document, $window, $compile) {
|
||||
|
||||
var _contextMenus = [];
|
||||
// Contains the element that was clicked to show the context menu
|
||||
var _clickedElement = null;
|
||||
var DEFAULT_ITEM_TEXT = '"New Item';
|
||||
var _emptyText = 'empty';
|
||||
|
||||
function createAndAddOptionText(params) {
|
||||
// Destructuring:
|
||||
var $scope = params.$scope;
|
||||
var item = params.item;
|
||||
var event = params.event;
|
||||
var modelValue = params.modelValue;
|
||||
var $promises = params.$promises;
|
||||
var nestedMenu = params.nestedMenu;
|
||||
var $li = params.$li;
|
||||
var leftOriented = String(params.orientation).toLowerCase() === 'left';
|
||||
|
||||
var optionText = null;
|
||||
|
||||
if (item.html) {
|
||||
if (angular.isFunction(item.html)) {
|
||||
// runs the function that expects a jQuery/jqLite element
|
||||
optionText = item.html($scope);
|
||||
} else {
|
||||
// Incase we want to compile html string to initialize their custom directive in html string
|
||||
if (item.compile) {
|
||||
optionText = $compile(item.html)($scope);
|
||||
} else {
|
||||
// Assumes that the developer already placed a valid jQuery/jqLite element
|
||||
optionText = item.html;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
var $a = $('<a>');
|
||||
var $anchorStyle = {};
|
||||
|
||||
if (leftOriented) {
|
||||
$anchorStyle.textAlign = 'right';
|
||||
$anchorStyle.paddingLeft = '8px';
|
||||
} else {
|
||||
$anchorStyle.textAlign = 'left';
|
||||
$anchorStyle.paddingRight = '8px';
|
||||
}
|
||||
|
||||
$a.css($anchorStyle);
|
||||
$a.addClass('dropdown-item');
|
||||
$a.attr({ tabindex: '-1', href: '#' });
|
||||
|
||||
var textParam = item.text || item[0];
|
||||
var text = DEFAULT_ITEM_TEXT;
|
||||
|
||||
if (typeof textParam === 'string') {
|
||||
text = textParam;
|
||||
} else if (typeof textParam === 'function') {
|
||||
text = textParam.call($scope, $scope, event, modelValue);
|
||||
}
|
||||
|
||||
var $promise = $q.when(text);
|
||||
$promises.push($promise);
|
||||
$promise.then(function (pText) {
|
||||
if (nestedMenu) {
|
||||
var $arrow;
|
||||
var $boldStyle = {
|
||||
fontFamily: 'monospace',
|
||||
fontWeight: 'bold'
|
||||
};
|
||||
|
||||
if (leftOriented) {
|
||||
$arrow = '<';
|
||||
$boldStyle.float = 'left';
|
||||
} else {
|
||||
$arrow = '>';
|
||||
$boldStyle.float = 'right';
|
||||
}
|
||||
|
||||
var $bold = $('<strong style="font-family:monospace;font-weight:bold;float:right;">' + $arrow + '</strong>');
|
||||
$bold.css($boldStyle);
|
||||
$a.css('cursor', 'default');
|
||||
$a.append($bold);
|
||||
}
|
||||
$a.append(pText);
|
||||
});
|
||||
|
||||
optionText = $a;
|
||||
}
|
||||
|
||||
$li.append(optionText);
|
||||
|
||||
return optionText;
|
||||
};
|
||||
|
||||
/**
|
||||
* Process each individual item
|
||||
*
|
||||
* Properties of params:
|
||||
* - $scope
|
||||
* - event
|
||||
* - modelValue
|
||||
* - level
|
||||
* - item
|
||||
* - $ul
|
||||
* - $li
|
||||
* - $promises
|
||||
*/
|
||||
function processItem(params) {
|
||||
var nestedMenu = extractNestedMenu(params);
|
||||
|
||||
// if html property is not defined, fallback to text, otherwise use default text
|
||||
// if first item in the item array is a function then invoke .call()
|
||||
// if first item is a string, then text should be the string.
|
||||
|
||||
var text = DEFAULT_ITEM_TEXT;
|
||||
var currItemParam = angular.extend({}, params);
|
||||
var item = params.item;
|
||||
var enabled = item.enabled === undefined ? item[2] : item.enabled;
|
||||
|
||||
currItemParam.nestedMenu = nestedMenu;
|
||||
currItemParam.enabled = resolveBoolOrFunc(enabled, params);
|
||||
currItemParam.text = createAndAddOptionText(currItemParam);
|
||||
|
||||
registerCurrentItemEvents(currItemParam);
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
* Registers the appropriate mouse events for options if the item is enabled.
|
||||
* Otherwise, it ensures that clicks to the item do not propagate.
|
||||
*/
|
||||
function registerCurrentItemEvents (params) {
|
||||
// Destructuring:
|
||||
var item = params.item;
|
||||
var $ul = params.$ul;
|
||||
var $li = params.$li;
|
||||
var $scope = params.$scope;
|
||||
var modelValue = params.modelValue;
|
||||
var level = params.level;
|
||||
var event = params.event;
|
||||
var text = params.text;
|
||||
var nestedMenu = params.nestedMenu;
|
||||
var enabled = params.enabled;
|
||||
var orientation = String(params.orientation).toLowerCase();
|
||||
var customClass = params.customClass;
|
||||
|
||||
if (enabled) {
|
||||
var openNestedMenu = function ($event) {
|
||||
removeContextMenus(level + 1);
|
||||
/*
|
||||
* The object here needs to be constructed and filled with data
|
||||
* on an "as needed" basis. Copying the data from event directly
|
||||
* or cloning the event results in unpredictable behavior.
|
||||
*/
|
||||
/// adding the original event in the object to use the attributes of the mouse over event in the promises
|
||||
var ev = {
|
||||
pageX: orientation === 'left' ? event.pageX - $ul[0].offsetWidth + 1 : event.pageX + $ul[0].offsetWidth - 1,
|
||||
pageY: $ul[0].offsetTop + $li[0].offsetTop - 3,
|
||||
// eslint-disable-next-line angular/window-service
|
||||
view: event.view || window,
|
||||
target: event.target,
|
||||
event: $event
|
||||
};
|
||||
|
||||
/*
|
||||
* At this point, nestedMenu can only either be an Array or a promise.
|
||||
* Regardless, passing them to `when` makes the implementation singular.
|
||||
*/
|
||||
$q.when(nestedMenu).then(function(promisedNestedMenu) {
|
||||
if (angular.isFunction(promisedNestedMenu)) {
|
||||
// support for dynamic subitems
|
||||
promisedNestedMenu = promisedNestedMenu.call($scope, $scope, event, modelValue, text, $li);
|
||||
}
|
||||
var nestedParam = {
|
||||
$scope : $scope,
|
||||
event : ev,
|
||||
options : promisedNestedMenu,
|
||||
modelValue : modelValue,
|
||||
level : level + 1,
|
||||
orientation: orientation,
|
||||
customClass: customClass
|
||||
};
|
||||
renderContextMenu(nestedParam);
|
||||
});
|
||||
};
|
||||
|
||||
$li.on('click', function ($event) {
|
||||
if($event.which == 1) {
|
||||
$event.preventDefault();
|
||||
$scope.$apply(function () {
|
||||
|
||||
var cleanupFunction = function () {
|
||||
$(event.currentTarget).removeClass('context');
|
||||
removeAllContextMenus();
|
||||
};
|
||||
var clickFunction = angular.isFunction(item.click)
|
||||
? item.click
|
||||
: (angular.isFunction(item[1])
|
||||
? item[1]
|
||||
: null);
|
||||
|
||||
if (clickFunction) {
|
||||
var res = clickFunction.call($scope, $scope, event, modelValue, text, $li);
|
||||
if(res === undefined || res) {
|
||||
cleanupFunction();
|
||||
}
|
||||
} else {
|
||||
cleanupFunction();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$li.on('mouseover', function ($event) {
|
||||
$scope.$apply(function () {
|
||||
if (nestedMenu) {
|
||||
openNestedMenu($event);
|
||||
} else {
|
||||
removeContextMenus(level + 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
setElementDisabled($li);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param params - an object containing the `item` parameter
|
||||
* @returns an Array or a Promise containing the children,
|
||||
* or null if the option has no submenu
|
||||
*/
|
||||
function extractNestedMenu(params) {
|
||||
// Destructuring:
|
||||
var item = params.item;
|
||||
|
||||
// New implementation:
|
||||
if (item.children) {
|
||||
if (angular.isFunction(item.children)) {
|
||||
// Expects a function that returns a Promise or an Array
|
||||
return item.children();
|
||||
} else if (angular.isFunction(item.children.then) || angular.isArray(item.children)) {
|
||||
// Returns the promise
|
||||
// OR, returns the actual array
|
||||
return item.children;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
} else {
|
||||
// nestedMenu is either an Array or a Promise that will return that array.
|
||||
// NOTE: This might be changed soon as it's a hangover from an old implementation
|
||||
|
||||
return angular.isArray(item[1]) ||
|
||||
(item[1] && angular.isFunction(item[1].then)) ? item[1] : angular.isArray(item[2]) ||
|
||||
(item[2] && angular.isFunction(item[2].then)) ? item[2] : angular.isArray(item[3]) ||
|
||||
(item[3] && angular.isFunction(item[3].then)) ? item[3] : null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Responsible for the actual rendering of the context menu.
|
||||
*
|
||||
* The parameters in params are:
|
||||
* - $scope = the scope of this context menu
|
||||
* - event = the event that triggered this context menu
|
||||
* - options = the options for this context menu
|
||||
* - modelValue = the value of the model attached to this context menu
|
||||
* - level = the current context menu level (defauts to 0)
|
||||
* - customClass = the custom class to be used for the context menu
|
||||
*/
|
||||
function renderContextMenu (params) {
|
||||
/// <summary>Render context menu recursively.</summary>
|
||||
|
||||
// Destructuring:
|
||||
var $scope = params.$scope;
|
||||
var event = params.event;
|
||||
var options = params.options;
|
||||
var modelValue = params.modelValue;
|
||||
var level = params.level;
|
||||
var customClass = params.customClass;
|
||||
|
||||
// Initialize the container. This will be passed around
|
||||
var $ul = initContextMenuContainer(params);
|
||||
params.$ul = $ul;
|
||||
|
||||
// Register this level of the context menu
|
||||
_contextMenus.push($ul);
|
||||
|
||||
/*
|
||||
* This object will contain any promises that we have
|
||||
* to wait for before trying to adjust the context menu.
|
||||
*/
|
||||
var $promises = [];
|
||||
params.$promises = $promises;
|
||||
|
||||
angular.forEach(options, function (item) {
|
||||
|
||||
if (item === null) {
|
||||
appendDivider($ul);
|
||||
} else {
|
||||
// If displayed is anything other than a function or a boolean
|
||||
var displayed = resolveBoolOrFunc(item.displayed, params);
|
||||
|
||||
// Only add the <li> if the item is displayed
|
||||
if (displayed) {
|
||||
var $li = $('<li>');
|
||||
var itemParams = angular.extend({}, params);
|
||||
itemParams.item = item;
|
||||
itemParams.$li = $li;
|
||||
|
||||
if (typeof item[0] === 'object') {
|
||||
custom.initialize($li, item);
|
||||
} else {
|
||||
processItem(itemParams);
|
||||
}
|
||||
if (resolveBoolOrFunc(item.hasTopDivider, itemParams, false)) {
|
||||
appendDivider($ul);
|
||||
}
|
||||
$ul.append($li);
|
||||
if (resolveBoolOrFunc(item.hasBottomDivider, itemParams, false)) {
|
||||
appendDivider($ul);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if ($ul.children().length === 0) {
|
||||
var $emptyLi = angular.element('<li>');
|
||||
setElementDisabled($emptyLi);
|
||||
$emptyLi.html('<a>' + _emptyText + '</a>');
|
||||
$ul.append($emptyLi);
|
||||
}
|
||||
|
||||
$document.find('body').append($ul);
|
||||
|
||||
doAfterAllPromises(params);
|
||||
|
||||
$rootScope.$broadcast(ContextMenuEvents.ContextMenuOpened, {
|
||||
context: _clickedElement,
|
||||
contextMenu: $ul,
|
||||
params: params
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* calculate if drop down menu would go out of screen at left or bottom
|
||||
* calculation need to be done after element has been added (and all texts are set; thus the promises)
|
||||
* to the DOM the get the actual height
|
||||
*/
|
||||
function doAfterAllPromises (params) {
|
||||
|
||||
// Desctructuring:
|
||||
var $ul = params.$ul;
|
||||
var $promises = params.$promises;
|
||||
var level = params.level;
|
||||
var event = params.event;
|
||||
var leftOriented = String(params.orientation).toLowerCase() === 'left';
|
||||
|
||||
$q.all($promises).then(function () {
|
||||
var topCoordinate = event.pageY;
|
||||
var menuHeight = angular.element($ul[0]).prop('offsetHeight');
|
||||
var winHeight = $window.pageYOffset + event.view.innerHeight;
|
||||
|
||||
/// the 20 pixels in second condition are considering the browser status bar that sometimes overrides the element
|
||||
if (topCoordinate > menuHeight && winHeight - topCoordinate < menuHeight + 20) {
|
||||
topCoordinate = event.pageY - menuHeight;
|
||||
/// If the element is a nested menu, adds the height of the parent li to the topCoordinate to align with the parent
|
||||
if(level && level > 0) {
|
||||
topCoordinate += event.event.currentTarget.offsetHeight;
|
||||
}
|
||||
} else if(winHeight <= menuHeight) {
|
||||
// If it really can't fit, reset the height of the menu to one that will fit
|
||||
angular.element($ul[0]).css({ 'height': winHeight - 5, 'overflow-y': 'scroll' });
|
||||
// ...then set the topCoordinate height to 0 so the menu starts from the top
|
||||
topCoordinate = 0;
|
||||
} else if(winHeight - topCoordinate < menuHeight) {
|
||||
var reduceThresholdY = 5;
|
||||
if(topCoordinate < reduceThresholdY) {
|
||||
reduceThresholdY = topCoordinate;
|
||||
}
|
||||
topCoordinate = winHeight - menuHeight - reduceThresholdY;
|
||||
}
|
||||
|
||||
var leftCoordinate = event.pageX;
|
||||
var menuWidth = angular.element($ul[0]).prop('offsetWidth');
|
||||
var winWidth = event.view.innerWidth + window.pageXOffset;
|
||||
var padding = 5;
|
||||
|
||||
if (leftOriented) {
|
||||
if (winWidth - leftCoordinate > menuWidth && leftCoordinate < menuWidth + padding) {
|
||||
leftCoordinate = padding;
|
||||
} else if (leftCoordinate < menuWidth) {
|
||||
var reduceThresholdX = 5;
|
||||
if (winWidth - leftCoordinate < reduceThresholdX + padding) {
|
||||
reduceThresholdX = winWidth - leftCoordinate + padding;
|
||||
}
|
||||
leftCoordinate = menuWidth + reduceThresholdX + padding;
|
||||
} else {
|
||||
leftCoordinate = leftCoordinate - menuWidth;
|
||||
}
|
||||
} else {
|
||||
if (leftCoordinate > menuWidth && winWidth - leftCoordinate - padding < menuWidth) {
|
||||
leftCoordinate = winWidth - menuWidth - padding;
|
||||
} else if(winWidth - leftCoordinate < menuWidth) {
|
||||
var reduceThresholdX = 5;
|
||||
if(leftCoordinate < reduceThresholdX + padding) {
|
||||
reduceThresholdX = leftCoordinate + padding;
|
||||
}
|
||||
leftCoordinate = winWidth - menuWidth - reduceThresholdX - padding;
|
||||
}
|
||||
}
|
||||
|
||||
$ul.css({
|
||||
display: 'block',
|
||||
position: 'absolute',
|
||||
left: leftCoordinate + 'px',
|
||||
top: topCoordinate + 'px'
|
||||
});
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates the container of the context menu (a <ul> element),
|
||||
* applies the appropriate styles and then returns that container
|
||||
*
|
||||
* @return a <ul> jqLite/jQuery element
|
||||
*/
|
||||
function initContextMenuContainer(params) {
|
||||
// Destructuring
|
||||
var customClass = params.customClass;
|
||||
|
||||
var $ul = $('<ul>');
|
||||
$ul.addClass('dropdown-menu');
|
||||
$ul.attr({ 'role': 'menu' });
|
||||
$ul.css({
|
||||
display: 'block',
|
||||
position: 'absolute',
|
||||
left: params.event.pageX + 'px',
|
||||
top: params.event.pageY + 'px',
|
||||
'z-index': 10000
|
||||
});
|
||||
|
||||
if(customClass) { $ul.addClass(customClass); }
|
||||
|
||||
return $ul;
|
||||
}
|
||||
|
||||
function isTouchDevice() {
|
||||
return 'ontouchstart' in window || navigator.maxTouchPoints; // works on most browsers | works on IE10/11 and Surface
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the context menus with level greater than or equal
|
||||
* to the value passed. If undefined, null or 0, all context menus
|
||||
* are removed.
|
||||
*/
|
||||
function removeContextMenus (level) {
|
||||
while (_contextMenus.length && (!level || _contextMenus.length > level)) {
|
||||
var cm = _contextMenus.pop();
|
||||
$rootScope.$broadcast(ContextMenuEvents.ContextMenuClosed, { context: _clickedElement, contextMenu: cm });
|
||||
cm.remove();
|
||||
}
|
||||
if(!level) {
|
||||
$rootScope.$broadcast(ContextMenuEvents.ContextMenuAllClosed, { context: _clickedElement });
|
||||
}
|
||||
}
|
||||
|
||||
function removeOnScrollEvent(e) {
|
||||
removeAllContextMenus(e);
|
||||
}
|
||||
|
||||
function removeOnOutsideClickEvent(e) {
|
||||
|
||||
var $curr = $(e.target);
|
||||
var shouldRemove = true;
|
||||
|
||||
while($curr.length) {
|
||||
if ($curr.hasClass('dropdown-menu')) {
|
||||
shouldRemove = false;
|
||||
break;
|
||||
} else {
|
||||
$curr = $curr.parent();
|
||||
}
|
||||
}
|
||||
if (shouldRemove) {
|
||||
removeAllContextMenus(e);
|
||||
}
|
||||
}
|
||||
|
||||
function removeAllContextMenus(e) {
|
||||
$document.find('body').off('mousedown touchstart', removeOnOutsideClickEvent);
|
||||
$document.off('scroll', removeOnScrollEvent);
|
||||
$(_clickedElement).removeClass('context');
|
||||
removeContextMenus();
|
||||
$rootScope.$broadcast('');
|
||||
}
|
||||
|
||||
function isBoolean(a) {
|
||||
return a === false || a === true;
|
||||
}
|
||||
|
||||
/** Resolves a boolean or a function that returns a boolean
|
||||
* Returns true by default if the param is null or undefined
|
||||
* @param a - the parameter to be checked
|
||||
* @param params - the object for the item's parameters
|
||||
* @param defaultValue - the default boolean value to use if the parameter is
|
||||
* neither a boolean nor function. True by default.
|
||||
*/
|
||||
function resolveBoolOrFunc(a, params, defaultValue) {
|
||||
var item = params.item;
|
||||
var $scope = params.$scope;
|
||||
var event = params.event;
|
||||
var modelValue = params.modelValue;
|
||||
|
||||
defaultValue = isBoolean(defaultValue) ? defaultValue : true;
|
||||
|
||||
if (isBoolean(a)) {
|
||||
return a;
|
||||
} else if (angular.isFunction(a)) {
|
||||
return a.call($scope, $scope, event, modelValue);
|
||||
} else {
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
function appendDivider($ul) {
|
||||
var $li = angular.element('<li>');
|
||||
$li.addClass('divider');
|
||||
$ul.append($li);
|
||||
}
|
||||
|
||||
function setElementDisabled($li) {
|
||||
$li.on('click', function ($event) {
|
||||
$event.preventDefault();
|
||||
});
|
||||
$li.addClass('disabled');
|
||||
}
|
||||
|
||||
return function ($scope, element, attrs) {
|
||||
var openMenuEvents = ['contextmenu'];
|
||||
_emptyText = $scope.$eval(attrs.contextMenuEmptyText) || 'empty';
|
||||
|
||||
if(attrs.contextMenuOn && typeof(attrs.contextMenuOn) === 'string'){
|
||||
openMenuEvents = attrs.contextMenuOn.split(',');
|
||||
}
|
||||
|
||||
angular.forEach(openMenuEvents, function (openMenuEvent) {
|
||||
element.on(openMenuEvent.trim(), function (event) {
|
||||
// Cleanup any leftover contextmenus(there are cases with longpress on touch where we
|
||||
// still see multiple contextmenus)
|
||||
removeAllContextMenus();
|
||||
|
||||
if(!attrs.allowEventPropagation) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
// Don't show context menu if on touch device and element is draggable
|
||||
if(isTouchDevice() && element.attr('draggable') === 'true') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Remove if the user clicks outside
|
||||
$document.find('body').on('mousedown touchstart', removeOnOutsideClickEvent);
|
||||
// Remove the menu when the scroll moves
|
||||
$document.on('scroll', removeOnScrollEvent);
|
||||
|
||||
_clickedElement = event.currentTarget;
|
||||
$(_clickedElement).addClass('context');
|
||||
|
||||
$scope.$apply(function () {
|
||||
var options = $scope.$eval(attrs.contextMenu);
|
||||
var customClass = attrs.contextMenuClass;
|
||||
var modelValue = $scope.$eval(attrs.model);
|
||||
var orientation = attrs.contextMenuOrientation;
|
||||
|
||||
$q.when(options).then(function(promisedMenu) {
|
||||
if (angular.isFunction(promisedMenu)) {
|
||||
// support for dynamic items
|
||||
promisedMenu = promisedMenu.call($scope, $scope, event, modelValue);
|
||||
}
|
||||
var params = {
|
||||
'$scope' : $scope,
|
||||
'event' : event,
|
||||
'options' : promisedMenu,
|
||||
'modelValue' : modelValue,
|
||||
'level' : 0,
|
||||
'customClass' : customClass,
|
||||
'orientation': orientation
|
||||
};
|
||||
$rootScope.$broadcast(ContextMenuEvents.ContextMenuOpening, { context: _clickedElement });
|
||||
renderContextMenu(params);
|
||||
});
|
||||
});
|
||||
|
||||
// Remove all context menus if the scope is destroyed
|
||||
$scope.$on('$destroy', function () {
|
||||
removeAllContextMenus();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
if (attrs.closeMenuOn) {
|
||||
$scope.$on(attrs.closeMenuOn, function () {
|
||||
removeAllContextMenus();
|
||||
});
|
||||
}
|
||||
};
|
||||
}]);
|
||||
// eslint-disable-next-line angular/window-service
|
||||
})(window.angular.element, window.angular);
|
||||
-551
@@ -1,551 +0,0 @@
|
||||
//! moment.js
|
||||
//! version : 2.17.1
|
||||
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
||||
//! license : MIT
|
||||
//! momentjs.com
|
||||
!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){"use strict";function a(){return od.apply(null,arguments)}
|
||||
// This is done to register the method called with moment()
|
||||
// without creating circular dependencies.
|
||||
function b(a){od=a}function c(a){return a instanceof Array||"[object Array]"===Object.prototype.toString.call(a)}function d(a){
|
||||
// IE8 will treat undefined and null as object if it wasn't for
|
||||
// input != null
|
||||
return null!=a&&"[object Object]"===Object.prototype.toString.call(a)}function e(a){var b;for(b in a)
|
||||
// even if its not own property I'd still call it non-empty
|
||||
return!1;return!0}function f(a){return"number"==typeof a||"[object Number]"===Object.prototype.toString.call(a)}function g(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function h(a,b){var c,d=[];for(c=0;c<a.length;++c)d.push(b(a[c],c));return d}function i(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function j(a,b){for(var c in b)i(b,c)&&(a[c]=b[c]);return i(b,"toString")&&(a.toString=b.toString),i(b,"valueOf")&&(a.valueOf=b.valueOf),a}function k(a,b,c,d){return rb(a,b,c,d,!0).utc()}function l(){
|
||||
// We need to deep clone this object.
|
||||
return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}}function m(a){return null==a._pf&&(a._pf=l()),a._pf}function n(a){if(null==a._isValid){var b=m(a),c=qd.call(b.parsedDateParts,function(a){return null!=a}),d=!isNaN(a._d.getTime())&&b.overflow<0&&!b.empty&&!b.invalidMonth&&!b.invalidWeekday&&!b.nullInput&&!b.invalidFormat&&!b.userInvalidated&&(!b.meridiem||b.meridiem&&c);if(a._strict&&(d=d&&0===b.charsLeftOver&&0===b.unusedTokens.length&&void 0===b.bigHour),null!=Object.isFrozen&&Object.isFrozen(a))return d;a._isValid=d}return a._isValid}function o(a){var b=k(NaN);return null!=a?j(m(b),a):m(b).userInvalidated=!0,b}function p(a){return void 0===a}function q(a,b){var c,d,e;if(p(b._isAMomentObject)||(a._isAMomentObject=b._isAMomentObject),p(b._i)||(a._i=b._i),p(b._f)||(a._f=b._f),p(b._l)||(a._l=b._l),p(b._strict)||(a._strict=b._strict),p(b._tzm)||(a._tzm=b._tzm),p(b._isUTC)||(a._isUTC=b._isUTC),p(b._offset)||(a._offset=b._offset),p(b._pf)||(a._pf=m(b)),p(b._locale)||(a._locale=b._locale),rd.length>0)for(c in rd)d=rd[c],e=b[d],p(e)||(a[d]=e);return a}
|
||||
// Moment prototype object
|
||||
function r(b){q(this,b),this._d=new Date(null!=b._d?b._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),
|
||||
// Prevent infinite loop in case updateOffset creates new moment
|
||||
// objects.
|
||||
sd===!1&&(sd=!0,a.updateOffset(this),sd=!1)}function s(a){return a instanceof r||null!=a&&null!=a._isAMomentObject}function t(a){return a<0?Math.ceil(a)||0:Math.floor(a)}function u(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=t(b)),c}
|
||||
// compare two arrays, return the number of differences
|
||||
function v(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;d<e;d++)(c&&a[d]!==b[d]||!c&&u(a[d])!==u(b[d]))&&g++;return g+f}function w(b){a.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function x(b,c){var d=!0;return j(function(){if(null!=a.deprecationHandler&&a.deprecationHandler(null,b),d){for(var e,f=[],g=0;g<arguments.length;g++){if(e="","object"==typeof arguments[g]){e+="\n["+g+"] ";for(var h in arguments[0])e+=h+": "+arguments[0][h]+", ";e=e.slice(0,-2)}else e=arguments[g];f.push(e)}w(b+"\nArguments: "+Array.prototype.slice.call(f).join("")+"\n"+(new Error).stack),d=!1}return c.apply(this,arguments)},c)}function y(b,c){null!=a.deprecationHandler&&a.deprecationHandler(b,c),td[b]||(w(c),td[b]=!0)}function z(a){return a instanceof Function||"[object Function]"===Object.prototype.toString.call(a)}function A(a){var b,c;for(c in a)b=a[c],z(b)?this[c]=b:this["_"+c]=b;this._config=a,
|
||||
// Lenient ordinal parsing accepts just a number in addition to
|
||||
// number + (possibly) stuff coming from _ordinalParseLenient.
|
||||
this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function B(a,b){var c,e=j({},a);for(c in b)i(b,c)&&(d(a[c])&&d(b[c])?(e[c]={},j(e[c],a[c]),j(e[c],b[c])):null!=b[c]?e[c]=b[c]:delete e[c]);for(c in a)i(a,c)&&!i(b,c)&&d(a[c])&&(
|
||||
// make sure changes to properties don't modify parent config
|
||||
e[c]=j({},e[c]));return e}function C(a){null!=a&&this.set(a)}function D(a,b,c){var d=this._calendar[a]||this._calendar.sameElse;return z(d)?d.call(b,c):d}function E(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];return b||!c?b:(this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a])}function F(){return this._invalidDate}function G(a){return this._ordinal.replace("%d",a)}function H(a,b,c,d){var e=this._relativeTime[c];return z(e)?e(a,b,c,d):e.replace(/%d/i,a)}function I(a,b){var c=this._relativeTime[a>0?"future":"past"];return z(c)?c(b):c.replace(/%s/i,b)}function J(a,b){var c=a.toLowerCase();Dd[c]=Dd[c+"s"]=Dd[b]=a}function K(a){return"string"==typeof a?Dd[a]||Dd[a.toLowerCase()]:void 0}function L(a){var b,c,d={};for(c in a)i(a,c)&&(b=K(c),b&&(d[b]=a[c]));return d}function M(a,b){Ed[a]=b}function N(a){var b=[];for(var c in a)b.push({unit:c,priority:Ed[c]});return b.sort(function(a,b){return a.priority-b.priority}),b}function O(b,c){return function(d){return null!=d?(Q(this,b,d),a.updateOffset(this,c),this):P(this,b)}}function P(a,b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function Q(a,b,c){a.isValid()&&a._d["set"+(a._isUTC?"UTC":"")+b](c)}
|
||||
// MOMENTS
|
||||
function R(a){return a=K(a),z(this[a])?this[a]():this}function S(a,b){if("object"==typeof a){a=L(a);for(var c=N(a),d=0;d<c.length;d++)this[c[d].unit](a[c[d].unit])}else if(a=K(a),z(this[a]))return this[a](b);return this}function T(a,b,c){var d=""+Math.abs(a),e=b-d.length,f=a>=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}
|
||||
// token: 'M'
|
||||
// padded: ['MM', 2]
|
||||
// ordinal: 'Mo'
|
||||
// callback: function () { this.month() + 1 }
|
||||
function U(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(Id[a]=e),b&&(Id[b[0]]=function(){return T(e.apply(this,arguments),b[1],b[2])}),c&&(Id[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function V(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function W(a){var b,c,d=a.match(Fd);for(b=0,c=d.length;b<c;b++)Id[d[b]]?d[b]=Id[d[b]]:d[b]=V(d[b]);return function(b){var e,f="";for(e=0;e<c;e++)f+=d[e]instanceof Function?d[e].call(b,a):d[e];return f}}
|
||||
// format date using native date object
|
||||
function X(a,b){return a.isValid()?(b=Y(b,a.localeData()),Hd[b]=Hd[b]||W(b),Hd[b](a)):a.localeData().invalidDate()}function Y(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Gd.lastIndex=0;d>=0&&Gd.test(a);)a=a.replace(Gd,c),Gd.lastIndex=0,d-=1;return a}function Z(a,b,c){$d[a]=z(b)?b:function(a,d){return a&&c?c:b}}function $(a,b){return i($d,a)?$d[a](b._strict,b._locale):new RegExp(_(a))}
|
||||
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
|
||||
function _(a){return aa(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}))}function aa(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ba(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),f(b)&&(d=function(a,c){c[b]=u(a)}),c=0;c<a.length;c++)_d[a[c]]=d}function ca(a,b){ba(a,function(a,c,d,e){d._w=d._w||{},b(a,d._w,d,e)})}function da(a,b,c){null!=b&&i(_d,a)&&_d[a](b,c._a,c,a)}function ea(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function fa(a,b){return a?c(this._months)?this._months[a.month()]:this._months[(this._months.isFormat||ke).test(b)?"format":"standalone"][a.month()]:this._months}function ga(a,b){return a?c(this._monthsShort)?this._monthsShort[a.month()]:this._monthsShort[ke.test(b)?"format":"standalone"][a.month()]:this._monthsShort}function ha(a,b,c){var d,e,f,g=a.toLocaleLowerCase();if(!this._monthsParse)for(
|
||||
// this is not used
|
||||
this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],d=0;d<12;++d)f=k([2e3,d]),this._shortMonthsParse[d]=this.monthsShort(f,"").toLocaleLowerCase(),this._longMonthsParse[d]=this.months(f,"").toLocaleLowerCase();return c?"MMM"===b?(e=je.call(this._shortMonthsParse,g),e!==-1?e:null):(e=je.call(this._longMonthsParse,g),e!==-1?e:null):"MMM"===b?(e=je.call(this._shortMonthsParse,g),e!==-1?e:(e=je.call(this._longMonthsParse,g),e!==-1?e:null)):(e=je.call(this._longMonthsParse,g),e!==-1?e:(e=je.call(this._shortMonthsParse,g),e!==-1?e:null))}function ia(a,b,c){var d,e,f;if(this._monthsParseExact)return ha.call(this,a,b,c);
|
||||
// TODO: add sorting
|
||||
// Sorting makes sure if one month (or abbr) is a prefix of another
|
||||
// see sorting in computeMonthsParse
|
||||
for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;d<12;d++){
|
||||
// test the regex
|
||||
if(
|
||||
// make the regex if we don't have it already
|
||||
e=k([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}
|
||||
// MOMENTS
|
||||
function ja(a,b){var c;if(!a.isValid())
|
||||
// No op
|
||||
return a;if("string"==typeof b)if(/^\d+$/.test(b))b=u(b);else
|
||||
// TODO: Another silent failure?
|
||||
if(b=a.localeData().monthsParse(b),!f(b))return a;return c=Math.min(a.date(),ea(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a}function ka(b){return null!=b?(ja(this,b),a.updateOffset(this,!0),this):P(this,"Month")}function la(){return ea(this.year(),this.month())}function ma(a){return this._monthsParseExact?(i(this,"_monthsRegex")||oa.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex):(i(this,"_monthsShortRegex")||(this._monthsShortRegex=ne),this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex)}function na(a){return this._monthsParseExact?(i(this,"_monthsRegex")||oa.call(this),a?this._monthsStrictRegex:this._monthsRegex):(i(this,"_monthsRegex")||(this._monthsRegex=oe),this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex)}function oa(){function a(a,b){return b.length-a.length}var b,c,d=[],e=[],f=[];for(b=0;b<12;b++)
|
||||
// make the regex if we don't have it already
|
||||
c=k([2e3,b]),d.push(this.monthsShort(c,"")),e.push(this.months(c,"")),f.push(this.months(c,"")),f.push(this.monthsShort(c,""));for(
|
||||
// Sorting makes sure if one month (or abbr) is a prefix of another it
|
||||
// will match the longer piece.
|
||||
d.sort(a),e.sort(a),f.sort(a),b=0;b<12;b++)d[b]=aa(d[b]),e[b]=aa(e[b]);for(b=0;b<24;b++)f[b]=aa(f[b]);this._monthsRegex=new RegExp("^("+f.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+e.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}
|
||||
// HELPERS
|
||||
function pa(a){return qa(a)?366:365}function qa(a){return a%4===0&&a%100!==0||a%400===0}function ra(){return qa(this.year())}function sa(a,b,c,d,e,f,g){
|
||||
//can't just apply() to create a date:
|
||||
//http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
|
||||
var h=new Date(a,b,c,d,e,f,g);
|
||||
//the date constructor remaps years 0-99 to 1900-1999
|
||||
return a<100&&a>=0&&isFinite(h.getFullYear())&&h.setFullYear(a),h}function ta(a){var b=new Date(Date.UTC.apply(null,arguments));
|
||||
//the Date.UTC function remaps years 0-99 to 1900-1999
|
||||
return a<100&&a>=0&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a),b}
|
||||
// start-of-first-week - start-of-year
|
||||
function ua(a,b,c){var// first-week day -- which january is always in the first week (4 for iso, 1 for other)
|
||||
d=7+b-c,
|
||||
// first-week day local weekday -- which local weekday is fwd
|
||||
e=(7+ta(a,0,d).getUTCDay()-b)%7;return-e+d-1}
|
||||
//http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
|
||||
function va(a,b,c,d,e){var f,g,h=(7+c-d)%7,i=ua(a,d,e),j=1+7*(b-1)+h+i;return j<=0?(f=a-1,g=pa(f)+j):j>pa(a)?(f=a+1,g=j-pa(a)):(f=a,g=j),{year:f,dayOfYear:g}}function wa(a,b,c){var d,e,f=ua(a.year(),b,c),g=Math.floor((a.dayOfYear()-f-1)/7)+1;return g<1?(e=a.year()-1,d=g+xa(e,b,c)):g>xa(a.year(),b,c)?(d=g-xa(a.year(),b,c),e=a.year()+1):(e=a.year(),d=g),{week:d,year:e}}function xa(a,b,c){var d=ua(a,b,c),e=ua(a+1,b,c);return(pa(a)-d+e)/7}
|
||||
// HELPERS
|
||||
// LOCALES
|
||||
function ya(a){return wa(a,this._week.dow,this._week.doy).week}function za(){return this._week.dow}function Aa(){return this._week.doy}
|
||||
// MOMENTS
|
||||
function Ba(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function Ca(a){var b=wa(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}
|
||||
// HELPERS
|
||||
function Da(a,b){return"string"!=typeof a?a:isNaN(a)?(a=b.weekdaysParse(a),"number"==typeof a?a:null):parseInt(a,10)}function Ea(a,b){return"string"==typeof a?b.weekdaysParse(a)%7||7:isNaN(a)?null:a}function Fa(a,b){return a?c(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]:this._weekdays}function Ga(a){return a?this._weekdaysShort[a.day()]:this._weekdaysShort}function Ha(a){return a?this._weekdaysMin[a.day()]:this._weekdaysMin}function Ia(a,b,c){var d,e,f,g=a.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],d=0;d<7;++d)f=k([2e3,1]).day(d),this._minWeekdaysParse[d]=this.weekdaysMin(f,"").toLocaleLowerCase(),this._shortWeekdaysParse[d]=this.weekdaysShort(f,"").toLocaleLowerCase(),this._weekdaysParse[d]=this.weekdays(f,"").toLocaleLowerCase();return c?"dddd"===b?(e=je.call(this._weekdaysParse,g),e!==-1?e:null):"ddd"===b?(e=je.call(this._shortWeekdaysParse,g),e!==-1?e:null):(e=je.call(this._minWeekdaysParse,g),e!==-1?e:null):"dddd"===b?(e=je.call(this._weekdaysParse,g),e!==-1?e:(e=je.call(this._shortWeekdaysParse,g),e!==-1?e:(e=je.call(this._minWeekdaysParse,g),e!==-1?e:null))):"ddd"===b?(e=je.call(this._shortWeekdaysParse,g),e!==-1?e:(e=je.call(this._weekdaysParse,g),e!==-1?e:(e=je.call(this._minWeekdaysParse,g),e!==-1?e:null))):(e=je.call(this._minWeekdaysParse,g),e!==-1?e:(e=je.call(this._weekdaysParse,g),e!==-1?e:(e=je.call(this._shortWeekdaysParse,g),e!==-1?e:null)))}function Ja(a,b,c){var d,e,f;if(this._weekdaysParseExact)return Ia.call(this,a,b,c);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),d=0;d<7;d++){
|
||||
// test the regex
|
||||
if(
|
||||
// make the regex if we don't have it already
|
||||
e=k([2e3,1]).day(d),c&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(e,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(e,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(e,"").replace(".",".?")+"$","i")),this._weekdaysParse[d]||(f="^"+this.weekdays(e,"")+"|^"+this.weekdaysShort(e,"")+"|^"+this.weekdaysMin(e,""),this._weekdaysParse[d]=new RegExp(f.replace(".",""),"i")),c&&"dddd"===b&&this._fullWeekdaysParse[d].test(a))return d;if(c&&"ddd"===b&&this._shortWeekdaysParse[d].test(a))return d;if(c&&"dd"===b&&this._minWeekdaysParse[d].test(a))return d;if(!c&&this._weekdaysParse[d].test(a))return d}}
|
||||
// MOMENTS
|
||||
function Ka(a){if(!this.isValid())return null!=a?this:NaN;var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=Da(a,this.localeData()),this.add(a-b,"d")):b}function La(a){if(!this.isValid())return null!=a?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function Ma(a){if(!this.isValid())return null!=a?this:NaN;
|
||||
// behaves the same as moment#day except
|
||||
// as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
|
||||
// as a setter, sunday should belong to the previous week.
|
||||
if(null!=a){var b=Ea(a,this.localeData());return this.day(this.day()%7?b:b-7)}return this.day()||7}function Na(a){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||Qa.call(this),a?this._weekdaysStrictRegex:this._weekdaysRegex):(i(this,"_weekdaysRegex")||(this._weekdaysRegex=ue),this._weekdaysStrictRegex&&a?this._weekdaysStrictRegex:this._weekdaysRegex)}function Oa(a){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||Qa.call(this),a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(i(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ve),this._weekdaysShortStrictRegex&&a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Pa(a){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||Qa.call(this),a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(i(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=we),this._weekdaysMinStrictRegex&&a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Qa(){function a(a,b){return b.length-a.length}var b,c,d,e,f,g=[],h=[],i=[],j=[];for(b=0;b<7;b++)
|
||||
// make the regex if we don't have it already
|
||||
c=k([2e3,1]).day(b),d=this.weekdaysMin(c,""),e=this.weekdaysShort(c,""),f=this.weekdays(c,""),g.push(d),h.push(e),i.push(f),j.push(d),j.push(e),j.push(f);for(
|
||||
// Sorting makes sure if one weekday (or abbr) is a prefix of another it
|
||||
// will match the longer piece.
|
||||
g.sort(a),h.sort(a),i.sort(a),j.sort(a),b=0;b<7;b++)h[b]=aa(h[b]),i[b]=aa(i[b]),j[b]=aa(j[b]);this._weekdaysRegex=new RegExp("^("+j.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+g.join("|")+")","i")}
|
||||
// FORMATTING
|
||||
function Ra(){return this.hours()%12||12}function Sa(){return this.hours()||24}function Ta(a,b){U(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}
|
||||
// PARSING
|
||||
function Ua(a,b){return b._meridiemParse}
|
||||
// LOCALES
|
||||
function Va(a){
|
||||
// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
|
||||
// Using charAt should be more compatible.
|
||||
return"p"===(a+"").toLowerCase().charAt(0)}function Wa(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function Xa(a){return a?a.toLowerCase().replace("_","-"):a}
|
||||
// pick the locale from the array
|
||||
// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
|
||||
// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
|
||||
function Ya(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Xa(a[f]).split("-"),b=e.length,c=Xa(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=Za(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1)
|
||||
//the next array item is better than a shallower substring of this one
|
||||
break;b--}f++}return null}function Za(a){var b=null;
|
||||
// TODO: Find a better way to register and load all the locales in Node
|
||||
if(!Be[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=xe._abbr,require("./locale/"+a),
|
||||
// because defineLocale currently also sets the global locale, we
|
||||
// want to undo that for lazy loaded locales
|
||||
$a(b)}catch(a){}return Be[a]}
|
||||
// This function will load locale and then set the global locale. If
|
||||
// no arguments are passed in, it will simply return the current global
|
||||
// locale key.
|
||||
function $a(a,b){var c;
|
||||
// moment.duration._locale = moment._locale = data;
|
||||
return a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}function _a(a,b){if(null!==b){var c=Ae;if(b.abbr=a,null!=Be[a])y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),c=Be[a]._config;else if(null!=b.parentLocale){if(null==Be[b.parentLocale])return Ce[b.parentLocale]||(Ce[b.parentLocale]=[]),Ce[b.parentLocale].push({name:a,config:b}),null;c=Be[b.parentLocale]._config}
|
||||
// backwards compat for now: also set the locale
|
||||
// make sure we set the locale AFTER all child locales have been
|
||||
// created, so we won't end up with the child locale set.
|
||||
return Be[a]=new C(B(c,b)),Ce[a]&&Ce[a].forEach(function(a){_a(a.name,a.config)}),$a(a),Be[a]}
|
||||
// useful for testing
|
||||
return delete Be[a],null}function ab(a,b){if(null!=b){var c,d=Ae;
|
||||
// MERGE
|
||||
null!=Be[a]&&(d=Be[a]._config),b=B(d,b),c=new C(b),c.parentLocale=Be[a],Be[a]=c,
|
||||
// backwards compat for now: also set the locale
|
||||
$a(a)}else
|
||||
// pass null for config to unupdate, useful for tests
|
||||
null!=Be[a]&&(null!=Be[a].parentLocale?Be[a]=Be[a].parentLocale:null!=Be[a]&&delete Be[a]);return Be[a]}
|
||||
// returns locale data
|
||||
function bb(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return xe;if(!c(a)){if(
|
||||
//short-circuit everything else
|
||||
b=Za(a))return b;a=[a]}return Ya(a)}function cb(){return wd(Be)}function db(a){var b,c=a._a;return c&&m(a).overflow===-2&&(b=c[be]<0||c[be]>11?be:c[ce]<1||c[ce]>ea(c[ae],c[be])?ce:c[de]<0||c[de]>24||24===c[de]&&(0!==c[ee]||0!==c[fe]||0!==c[ge])?de:c[ee]<0||c[ee]>59?ee:c[fe]<0||c[fe]>59?fe:c[ge]<0||c[ge]>999?ge:-1,m(a)._overflowDayOfYear&&(b<ae||b>ce)&&(b=ce),m(a)._overflowWeeks&&b===-1&&(b=he),m(a)._overflowWeekday&&b===-1&&(b=ie),m(a).overflow=b),a}
|
||||
// date from iso format
|
||||
function eb(a){var b,c,d,e,f,g,h=a._i,i=De.exec(h)||Ee.exec(h);if(i){for(m(a).iso=!0,b=0,c=Ge.length;b<c;b++)if(Ge[b][1].exec(i[1])){e=Ge[b][0],d=Ge[b][2]!==!1;break}if(null==e)return void(a._isValid=!1);if(i[3]){for(b=0,c=He.length;b<c;b++)if(He[b][1].exec(i[3])){
|
||||
// match[2] should be 'T' or space
|
||||
f=(i[2]||" ")+He[b][0];break}if(null==f)return void(a._isValid=!1)}if(!d&&null!=f)return void(a._isValid=!1);if(i[4]){if(!Fe.exec(i[4]))return void(a._isValid=!1);g="Z"}a._f=e+(f||"")+(g||""),kb(a)}else a._isValid=!1}
|
||||
// date from iso format or fallback
|
||||
function fb(b){var c=Ie.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(eb(b),void(b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b))))}
|
||||
// Pick the first defined of two or three arguments.
|
||||
function gb(a,b,c){return null!=a?a:null!=b?b:c}function hb(b){
|
||||
// hooks is actually the exported moment object
|
||||
var c=new Date(a.now());return b._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()]}
|
||||
// convert an array to a date.
|
||||
// the array should mirror the parameters below
|
||||
// note: all values past the year are optional and will default to the lowest possible value.
|
||||
// [year, month, day , hour, minute, second, millisecond]
|
||||
function ib(a){var b,c,d,e,f=[];if(!a._d){
|
||||
// Default to current date.
|
||||
// * if no year, month, day of month are given, default to today
|
||||
// * if day of month is given, default month and year
|
||||
// * if month is given, default only year
|
||||
// * if year is given, don't default anything
|
||||
for(d=hb(a),
|
||||
//compute day of the year from weeks and weekdays
|
||||
a._w&&null==a._a[ce]&&null==a._a[be]&&jb(a),
|
||||
//if the day of the year is set, figure out what it is
|
||||
a._dayOfYear&&(e=gb(a._a[ae],d[ae]),a._dayOfYear>pa(e)&&(m(a)._overflowDayOfYear=!0),c=ta(e,0,a._dayOfYear),a._a[be]=c.getUTCMonth(),a._a[ce]=c.getUTCDate()),b=0;b<3&&null==a._a[b];++b)a._a[b]=f[b]=d[b];
|
||||
// Zero out whatever was not defaulted, including time
|
||||
for(;b<7;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];
|
||||
// Check for 24:00:00.000
|
||||
24===a._a[de]&&0===a._a[ee]&&0===a._a[fe]&&0===a._a[ge]&&(a._nextDay=!0,a._a[de]=0),a._d=(a._useUTC?ta:sa).apply(null,f),
|
||||
// Apply timezone offset from input. The actual utcOffset can be changed
|
||||
// with parseZone.
|
||||
null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[de]=24)}}function jb(a){var b,c,d,e,f,g,h,i;if(b=a._w,null!=b.GG||null!=b.W||null!=b.E)f=1,g=4,
|
||||
// TODO: We need to take the current isoWeekYear, but that depends on
|
||||
// how we interpret now (local, utc, fixed offset). So create
|
||||
// a now version of current config (take local/utc/offset flags, and
|
||||
// create now).
|
||||
c=gb(b.GG,a._a[ae],wa(sb(),1,4).year),d=gb(b.W,1),e=gb(b.E,1),(e<1||e>7)&&(i=!0);else{f=a._locale._week.dow,g=a._locale._week.doy;var j=wa(sb(),f,g);c=gb(b.gg,a._a[ae],j.year),
|
||||
// Default to current week.
|
||||
d=gb(b.w,j.week),null!=b.d?(
|
||||
// weekday -- low day numbers are considered next week
|
||||
e=b.d,(e<0||e>6)&&(i=!0)):null!=b.e?(
|
||||
// local weekday -- counting starts from begining of week
|
||||
e=b.e+f,(b.e<0||b.e>6)&&(i=!0)):
|
||||
// default to begining of week
|
||||
e=f}d<1||d>xa(c,f,g)?m(a)._overflowWeeks=!0:null!=i?m(a)._overflowWeekday=!0:(h=va(c,d,e,f,g),a._a[ae]=h.year,a._dayOfYear=h.dayOfYear)}
|
||||
// date from string and format string
|
||||
function kb(b){
|
||||
// TODO: Move this to another part of the creation flow to prevent circular deps
|
||||
if(b._f===a.ISO_8601)return void eb(b);b._a=[],m(b).empty=!0;
|
||||
// This array is used to make a Date, either with `new Date` or `Date.UTC`
|
||||
var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=Y(b._f,b._locale).match(Fd)||[],c=0;c<e.length;c++)f=e[c],d=(h.match($(f,b))||[])[0],
|
||||
// console.log('token', token, 'parsedInput', parsedInput,
|
||||
// 'regex', getParseRegexForToken(token, config));
|
||||
d&&(g=h.substr(0,h.indexOf(d)),g.length>0&&m(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),
|
||||
// don't parse if it's not a known token
|
||||
Id[f]?(d?m(b).empty=!1:m(b).unusedTokens.push(f),da(f,d,b)):b._strict&&!d&&m(b).unusedTokens.push(f);
|
||||
// add remaining unparsed input length to the string
|
||||
m(b).charsLeftOver=i-j,h.length>0&&m(b).unusedInput.push(h),
|
||||
// clear _12h flag if hour is <= 12
|
||||
b._a[de]<=12&&m(b).bigHour===!0&&b._a[de]>0&&(m(b).bigHour=void 0),m(b).parsedDateParts=b._a.slice(0),m(b).meridiem=b._meridiem,
|
||||
// handle meridiem
|
||||
b._a[de]=lb(b._locale,b._a[de],b._meridiem),ib(b),db(b)}function lb(a,b,c){var d;
|
||||
// Fallback
|
||||
return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&b<12&&(b+=12),d||12!==b||(b=0),b):b}
|
||||
// date from string and array of format strings
|
||||
function mb(a){var b,c,d,e,f;if(0===a._f.length)return m(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;e<a._f.length;e++)f=0,b=q({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._f=a._f[e],kb(b),n(b)&&(
|
||||
// if there is any input that was not parsed add a penalty for that format
|
||||
f+=m(b).charsLeftOver,
|
||||
//or tokens
|
||||
f+=10*m(b).unusedTokens.length,m(b).score=f,(null==d||f<d)&&(d=f,c=b));j(a,c||b)}function nb(a){if(!a._d){var b=L(a._i);a._a=h([b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],function(a){return a&&parseInt(a,10)}),ib(a)}}function ob(a){var b=new r(db(pb(a)));
|
||||
// Adding is smart enough around DST
|
||||
return b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b}function pb(a){var b=a._i,d=a._f;return a._locale=a._locale||bb(a._l),null===b||void 0===d&&""===b?o({nullInput:!0}):("string"==typeof b&&(a._i=b=a._locale.preparse(b)),s(b)?new r(db(b)):(g(b)?a._d=b:c(d)?mb(a):d?kb(a):qb(a),n(a)||(a._d=null),a))}function qb(b){var d=b._i;void 0===d?b._d=new Date(a.now()):g(d)?b._d=new Date(d.valueOf()):"string"==typeof d?fb(b):c(d)?(b._a=h(d.slice(0),function(a){return parseInt(a,10)}),ib(b)):"object"==typeof d?nb(b):f(d)?
|
||||
// from milliseconds
|
||||
b._d=new Date(d):a.createFromInputFallback(b)}function rb(a,b,f,g,h){var i={};
|
||||
// object construction must be done this way.
|
||||
// https://github.com/moment/moment/issues/1423
|
||||
return f!==!0&&f!==!1||(g=f,f=void 0),(d(a)&&e(a)||c(a)&&0===a.length)&&(a=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=h,i._l=f,i._i=a,i._f=b,i._strict=g,ob(i)}function sb(a,b,c,d){return rb(a,b,c,d,!1)}
|
||||
// Pick a moment m from moments so that m[fn](other) is true for all
|
||||
// other. This relies on the function fn to be transitive.
|
||||
//
|
||||
// moments should either be an array of moment objects or an array, whose
|
||||
// first element is an array of moment objects.
|
||||
function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}
|
||||
// TODO: Use [].sort instead?
|
||||
function ub(){var a=[].slice.call(arguments,0);return tb("isBefore",a)}function vb(){var a=[].slice.call(arguments,0);return tb("isAfter",a)}function wb(a){var b=L(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;
|
||||
// representation for dateAddRemove
|
||||
this._milliseconds=+k+1e3*j+// 1000
|
||||
6e4*i+// 1000 * 60
|
||||
1e3*h*60*60,//using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
|
||||
// Because of dateAddRemove treats 24 hours as different from a
|
||||
// day when working around DST, we need to store them separately
|
||||
this._days=+g+7*f,
|
||||
// It is impossible translate months into days without knowing
|
||||
// which months you are are talking about, so we have to store
|
||||
// it separately.
|
||||
this._months=+e+3*d+12*c,this._data={},this._locale=bb(),this._bubble()}function xb(a){return a instanceof wb}function yb(a){return a<0?Math.round(-1*a)*-1:Math.round(a)}
|
||||
// FORMATTING
|
||||
function zb(a,b){U(a,0,0,function(){var a=this.utcOffset(),c="+";return a<0&&(a=-a,c="-"),c+T(~~(a/60),2)+b+T(~~a%60,2)})}function Ab(a,b){var c=(b||"").match(a);if(null===c)return null;var d=c[c.length-1]||[],e=(d+"").match(Me)||["-",0,0],f=+(60*e[1])+u(e[2]);return 0===f?0:"+"===e[0]?f:-f}
|
||||
// Return a moment from input, that is local/utc/zone equivalent to model.
|
||||
function Bb(b,c){var d,e;
|
||||
// Use low-level api, because this fn is low-level api.
|
||||
return c._isUTC?(d=c.clone(),e=(s(b)||g(b)?b.valueOf():sb(b).valueOf())-d.valueOf(),d._d.setTime(d._d.valueOf()+e),a.updateOffset(d,!1),d):sb(b).local()}function Cb(a){
|
||||
// On Firefox.24 Date#getTimezoneOffset returns a floating point.
|
||||
// https://github.com/moment/moment/pull/1871
|
||||
return 15*-Math.round(a._d.getTimezoneOffset()/15)}
|
||||
// MOMENTS
|
||||
// keepLocalTime = true means only change the timezone, without
|
||||
// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
|
||||
// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
|
||||
// +0200, so we adjust the time as needed, to be valid.
|
||||
//
|
||||
// Keeping the time actually adds/subtracts (one hour)
|
||||
// from the actual represented time. That is why we call updateOffset
|
||||
// a second time. In case it wants us to change the offset again
|
||||
// _changeInProgress == true case, then we have to adjust, because
|
||||
// there is no such time in the given timezone.
|
||||
function Db(b,c){var d,e=this._offset||0;if(!this.isValid())return null!=b?this:NaN;if(null!=b){if("string"==typeof b){if(b=Ab(Xd,b),null===b)return this}else Math.abs(b)<16&&(b=60*b);return!this._isUTC&&c&&(d=Cb(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==b&&(!c||this._changeInProgress?Tb(this,Ob(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?e:Cb(this)}function Eb(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Fb(a){return this.utcOffset(0,a)}function Gb(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Cb(this),"m")),this}function Hb(){if(null!=this._tzm)this.utcOffset(this._tzm);else if("string"==typeof this._i){var a=Ab(Wd,this._i);null!=a?this.utcOffset(a):this.utcOffset(0,!0)}return this}function Ib(a){return!!this.isValid()&&(a=a?sb(a).utcOffset():0,(this.utcOffset()-a)%60===0)}function Jb(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Kb(){if(!p(this._isDSTShifted))return this._isDSTShifted;var a={};if(q(a,this),a=pb(a),a._a){var b=a._isUTC?k(a._a):sb(a._a);this._isDSTShifted=this.isValid()&&v(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Lb(){return!!this.isValid()&&!this._isUTC}function Mb(){return!!this.isValid()&&this._isUTC}function Nb(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Ob(a,b){var c,d,e,g=a,
|
||||
// matching against regexp is expensive, do it on demand
|
||||
h=null;// checks for null or undefined
|
||||
return xb(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:f(a)?(g={},b?g[b]=a:g.milliseconds=a):(h=Ne.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:u(h[ce])*c,h:u(h[de])*c,m:u(h[ee])*c,s:u(h[fe])*c,ms:u(yb(1e3*h[ge]))*c}):(h=Oe.exec(a))?(c="-"===h[1]?-1:1,g={y:Pb(h[2],c),M:Pb(h[3],c),w:Pb(h[4],c),d:Pb(h[5],c),h:Pb(h[6],c),m:Pb(h[7],c),s:Pb(h[8],c)}):null==g?g={}:"object"==typeof g&&("from"in g||"to"in g)&&(e=Rb(sb(g.from),sb(g.to)),g={},g.ms=e.milliseconds,g.M=e.months),d=new wb(g),xb(a)&&i(a,"_locale")&&(d._locale=a._locale),d}function Pb(a,b){
|
||||
// We'd normally use ~~inp for this, but unfortunately it also
|
||||
// converts floats to ints.
|
||||
// inp may be undefined, so careful calling replace on it.
|
||||
var c=a&&parseFloat(a.replace(",","."));
|
||||
// apply sign while we're at it
|
||||
return(isNaN(c)?0:c)*b}function Qb(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function Rb(a,b){var c;return a.isValid()&&b.isValid()?(b=Bb(b,a),a.isBefore(b)?c=Qb(a,b):(c=Qb(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}}
|
||||
// TODO: remove 'name' arg after deprecation is removed
|
||||
function Sb(a,b){return function(c,d){var e,f;
|
||||
//invert the arguments, but complain about it
|
||||
return null===d||isNaN(+d)||(y(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}function Tb(b,c,d,e){var f=c._milliseconds,g=yb(c._days),h=yb(c._months);b.isValid()&&(e=null==e||e,f&&b._d.setTime(b._d.valueOf()+f*d),g&&Q(b,"Date",P(b,"Date")+g*d),h&&ja(b,P(b,"Month")+h*d),e&&a.updateOffset(b,g||h))}function Ub(a,b){var c=a.diff(b,"days",!0);return c<-6?"sameElse":c<-1?"lastWeek":c<0?"lastDay":c<1?"sameDay":c<2?"nextDay":c<7?"nextWeek":"sameElse"}function Vb(b,c){
|
||||
// We want to compare the start of today, vs this.
|
||||
// Getting start-of-today depends on whether we're local/utc/offset or not.
|
||||
var d=b||sb(),e=Bb(d,this).startOf("day"),f=a.calendarFormat(this,e)||"sameElse",g=c&&(z(c[f])?c[f].call(this,d):c[f]);return this.format(g||this.localeData().calendar(f,this,sb(d)))}function Wb(){return new r(this)}function Xb(a,b){var c=s(a)?a:sb(a);return!(!this.isValid()||!c.isValid())&&(b=K(p(b)?"millisecond":b),"millisecond"===b?this.valueOf()>c.valueOf():c.valueOf()<this.clone().startOf(b).valueOf())}function Yb(a,b){var c=s(a)?a:sb(a);return!(!this.isValid()||!c.isValid())&&(b=K(p(b)?"millisecond":b),"millisecond"===b?this.valueOf()<c.valueOf():this.clone().endOf(b).valueOf()<c.valueOf())}function Zb(a,b,c,d){return d=d||"()",("("===d[0]?this.isAfter(a,c):!this.isBefore(a,c))&&(")"===d[1]?this.isBefore(b,c):!this.isAfter(b,c))}function $b(a,b){var c,d=s(a)?a:sb(a);return!(!this.isValid()||!d.isValid())&&(b=K(b||"millisecond"),"millisecond"===b?this.valueOf()===d.valueOf():(c=d.valueOf(),this.clone().startOf(b).valueOf()<=c&&c<=this.clone().endOf(b).valueOf()))}function _b(a,b){return this.isSame(a,b)||this.isAfter(a,b)}function ac(a,b){return this.isSame(a,b)||this.isBefore(a,b)}function bc(a,b,c){var d,e,f,g;// 1000
|
||||
// 1000 * 60
|
||||
// 1000 * 60 * 60
|
||||
// 1000 * 60 * 60 * 24, negate dst
|
||||
// 1000 * 60 * 60 * 24 * 7, negate dst
|
||||
return this.isValid()?(d=Bb(a,this),d.isValid()?(e=6e4*(d.utcOffset()-this.utcOffset()),b=K(b),"year"===b||"month"===b||"quarter"===b?(g=cc(this,d),"quarter"===b?g/=3:"year"===b&&(g/=12)):(f=this-d,g="second"===b?f/1e3:"minute"===b?f/6e4:"hour"===b?f/36e5:"day"===b?(f-e)/864e5:"week"===b?(f-e)/6048e5:f),c?g:t(g)):NaN):NaN}function cc(a,b){
|
||||
// difference in months
|
||||
var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),
|
||||
// b is in (anchor - 1 month, anchor + 1 month)
|
||||
f=a.clone().add(e,"months");
|
||||
//check for negative zero, return zero if negative zero
|
||||
// linear across the month
|
||||
// linear across the month
|
||||
return b-f<0?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)||0}function dc(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ec(){var a=this.clone().utc();return 0<a.year()&&a.year()<=9999?z(Date.prototype.toISOString)?this.toDate().toISOString():X(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):X(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}/**
|
||||
* Return a human readable representation of a moment that can
|
||||
* also be evaluated to get a new moment which is the same
|
||||
*
|
||||
* @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
|
||||
*/
|
||||
function fc(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var a="moment",b="";this.isLocal()||(a=0===this.utcOffset()?"moment.utc":"moment.parseZone",b="Z");var c="["+a+'("]',d=0<this.year()&&this.year()<=9999?"YYYY":"YYYYYY",e="-MM-DD[T]HH:mm:ss.SSS",f=b+'[")]';return this.format(c+d+e+f)}function gc(b){b||(b=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var c=X(this,b);return this.localeData().postformat(c)}function hc(a,b){return this.isValid()&&(s(a)&&a.isValid()||sb(a).isValid())?Ob({to:this,from:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function ic(a){return this.from(sb(),a)}function jc(a,b){return this.isValid()&&(s(a)&&a.isValid()||sb(a).isValid())?Ob({from:this,to:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function kc(a){return this.to(sb(),a)}
|
||||
// If passed a locale key, it will set the locale for this
|
||||
// instance. Otherwise, it will return the locale configuration
|
||||
// variables for this instance.
|
||||
function lc(a){var b;return void 0===a?this._locale._abbr:(b=bb(a),null!=b&&(this._locale=b),this)}function mc(){return this._locale}function nc(a){
|
||||
// the following switch intentionally omits break keywords
|
||||
// to utilize falling through the cases.
|
||||
switch(a=K(a)){case"year":this.month(0);/* falls through */
|
||||
case"quarter":case"month":this.date(1);/* falls through */
|
||||
case"week":case"isoWeek":case"day":case"date":this.hours(0);/* falls through */
|
||||
case"hour":this.minutes(0);/* falls through */
|
||||
case"minute":this.seconds(0);/* falls through */
|
||||
case"second":this.milliseconds(0)}
|
||||
// weeks are a special case
|
||||
// quarters are also special
|
||||
return"week"===a&&this.weekday(0),"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this}function oc(a){
|
||||
// 'date' is an alias for 'day', so it should be considered as such.
|
||||
return a=K(a),void 0===a||"millisecond"===a?this:("date"===a&&(a="day"),this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms"))}function pc(){return this._d.valueOf()-6e4*(this._offset||0)}function qc(){return Math.floor(this.valueOf()/1e3)}function rc(){return new Date(this.valueOf())}function sc(){var a=this;return[a.year(),a.month(),a.date(),a.hour(),a.minute(),a.second(),a.millisecond()]}function tc(){var a=this;return{years:a.year(),months:a.month(),date:a.date(),hours:a.hours(),minutes:a.minutes(),seconds:a.seconds(),milliseconds:a.milliseconds()}}function uc(){
|
||||
// new Date(NaN).toJSON() === null
|
||||
return this.isValid()?this.toISOString():null}function vc(){return n(this)}function wc(){return j({},m(this))}function xc(){return m(this).overflow}function yc(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function zc(a,b){U(0,[a,a.length],0,b)}
|
||||
// MOMENTS
|
||||
function Ac(a){return Ec.call(this,a,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Bc(a){return Ec.call(this,a,this.isoWeek(),this.isoWeekday(),1,4)}function Cc(){return xa(this.year(),1,4)}function Dc(){var a=this.localeData()._week;return xa(this.year(),a.dow,a.doy)}function Ec(a,b,c,d,e){var f;return null==a?wa(this,d,e).year:(f=xa(a,d,e),b>f&&(b=f),Fc.call(this,a,b,c,d,e))}function Fc(a,b,c,d,e){var f=va(a,b,c,d,e),g=ta(f.year,0,f.dayOfYear);return this.year(g.getUTCFullYear()),this.month(g.getUTCMonth()),this.date(g.getUTCDate()),this}
|
||||
// MOMENTS
|
||||
function Gc(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)}
|
||||
// HELPERS
|
||||
// MOMENTS
|
||||
function Hc(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function Ic(a,b){b[ge]=u(1e3*("0."+a))}
|
||||
// MOMENTS
|
||||
function Jc(){return this._isUTC?"UTC":""}function Kc(){return this._isUTC?"Coordinated Universal Time":""}function Lc(a){return sb(1e3*a)}function Mc(){return sb.apply(null,arguments).parseZone()}function Nc(a){return a}function Oc(a,b,c,d){var e=bb(),f=k().set(d,b);return e[c](f,a)}function Pc(a,b,c){if(f(a)&&(b=a,a=void 0),a=a||"",null!=b)return Oc(a,b,c,"month");var d,e=[];for(d=0;d<12;d++)e[d]=Oc(a,d,c,"month");return e}
|
||||
// ()
|
||||
// (5)
|
||||
// (fmt, 5)
|
||||
// (fmt)
|
||||
// (true)
|
||||
// (true, 5)
|
||||
// (true, fmt, 5)
|
||||
// (true, fmt)
|
||||
function Qc(a,b,c,d){"boolean"==typeof a?(f(b)&&(c=b,b=void 0),b=b||""):(b=a,c=b,a=!1,f(b)&&(c=b,b=void 0),b=b||"");var e=bb(),g=a?e._week.dow:0;if(null!=c)return Oc(b,(c+g)%7,d,"day");var h,i=[];for(h=0;h<7;h++)i[h]=Oc(b,(h+g)%7,d,"day");return i}function Rc(a,b){return Pc(a,b,"months")}function Sc(a,b){return Pc(a,b,"monthsShort")}function Tc(a,b,c){return Qc(a,b,c,"weekdays")}function Uc(a,b,c){return Qc(a,b,c,"weekdaysShort")}function Vc(a,b,c){return Qc(a,b,c,"weekdaysMin")}function Wc(){var a=this._data;return this._milliseconds=Ze(this._milliseconds),this._days=Ze(this._days),this._months=Ze(this._months),a.milliseconds=Ze(a.milliseconds),a.seconds=Ze(a.seconds),a.minutes=Ze(a.minutes),a.hours=Ze(a.hours),a.months=Ze(a.months),a.years=Ze(a.years),this}function Xc(a,b,c,d){var e=Ob(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}
|
||||
// supports only 2.0-style add(1, 's') or add(duration)
|
||||
function Yc(a,b){return Xc(this,a,b,1)}
|
||||
// supports only 2.0-style subtract(1, 's') or subtract(duration)
|
||||
function Zc(a,b){return Xc(this,a,b,-1)}function $c(a){return a<0?Math.floor(a):Math.ceil(a)}function _c(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;
|
||||
// if we have a mix of positive and negative values, bubble down first
|
||||
// check: https://github.com/moment/moment/issues/2166
|
||||
// The following code bubbles up values, see the tests for
|
||||
// examples of what that means.
|
||||
// convert days to months
|
||||
// 12 months -> 1 year
|
||||
return f>=0&&g>=0&&h>=0||f<=0&&g<=0&&h<=0||(f+=864e5*$c(bd(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=t(f/1e3),i.seconds=a%60,b=t(a/60),i.minutes=b%60,c=t(b/60),i.hours=c%24,g+=t(c/24),e=t(ad(g)),h+=e,g-=$c(bd(e)),d=t(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function ad(a){
|
||||
// 400 years have 146097 days (taking into account leap year rules)
|
||||
// 400 years have 12 months === 4800
|
||||
return 4800*a/146097}function bd(a){
|
||||
// the reverse of daysToMonths
|
||||
return 146097*a/4800}function cd(a){var b,c,d=this._milliseconds;if(a=K(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+ad(b),"month"===a?c:c/12;switch(
|
||||
// handle milliseconds separately because of floating point math errors (issue #1867)
|
||||
b=this._days+Math.round(bd(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;
|
||||
// Math.floor prevents floating point math errors here
|
||||
case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}
|
||||
// TODO: Use this.as('ms')?
|
||||
function dd(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*u(this._months/12)}function ed(a){return function(){return this.as(a)}}function fd(a){return a=K(a),this[a+"s"]()}function gd(a){return function(){return this._data[a]}}function hd(){return t(this.days()/7)}
|
||||
// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
|
||||
function id(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function jd(a,b,c){var d=Ob(a).abs(),e=of(d.as("s")),f=of(d.as("m")),g=of(d.as("h")),h=of(d.as("d")),i=of(d.as("M")),j=of(d.as("y")),k=e<pf.s&&["s",e]||f<=1&&["m"]||f<pf.m&&["mm",f]||g<=1&&["h"]||g<pf.h&&["hh",g]||h<=1&&["d"]||h<pf.d&&["dd",h]||i<=1&&["M"]||i<pf.M&&["MM",i]||j<=1&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,id.apply(null,k)}
|
||||
// This function allows you to set the rounding function for relative time strings
|
||||
function kd(a){return void 0===a?of:"function"==typeof a&&(of=a,!0)}
|
||||
// This function allows you to set a threshold for relative time strings
|
||||
function ld(a,b){return void 0!==pf[a]&&(void 0===b?pf[a]:(pf[a]=b,!0))}function md(a){var b=this.localeData(),c=jd(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function nd(){
|
||||
// for ISO strings we do not use the normal bubbling rules:
|
||||
// * milliseconds bubble up until they become hours
|
||||
// * days do not bubble at all
|
||||
// * months bubble up until they become years
|
||||
// This is because there is no context-free conversion between hours and days
|
||||
// (think of clock changes)
|
||||
// and also not between days and months (28-31 days per month)
|
||||
var a,b,c,d=qf(this._milliseconds)/1e3,e=qf(this._days),f=qf(this._months);
|
||||
// 3600 seconds -> 60 minutes -> 1 hour
|
||||
a=t(d/60),b=t(a/60),d%=60,a%=60,
|
||||
// 12 months -> 1 year
|
||||
c=t(f/12),f%=12;
|
||||
// inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
|
||||
var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(m<0?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var od,pd;pd=Array.prototype.some?Array.prototype.some:function(a){for(var b=Object(this),c=b.length>>>0,d=0;d<c;d++)if(d in b&&a.call(this,b[d],d,b))return!0;return!1};var qd=pd,rd=a.momentProperties=[],sd=!1,td={};a.suppressDeprecationWarnings=!1,a.deprecationHandler=null;var ud;ud=Object.keys?Object.keys:function(a){var b,c=[];for(b in a)i(a,b)&&c.push(b);return c};var vd,wd=ud,xd={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},yd={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},zd="Invalid date",Ad="%d",Bd=/\d{1,2}/,Cd={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Dd={},Ed={},Fd=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Gd=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Hd={},Id={},Jd=/\d/,Kd=/\d\d/,Ld=/\d{3}/,Md=/\d{4}/,Nd=/[+-]?\d{6}/,Od=/\d\d?/,Pd=/\d\d\d\d?/,Qd=/\d\d\d\d\d\d?/,Rd=/\d{1,3}/,Sd=/\d{1,4}/,Td=/[+-]?\d{1,6}/,Ud=/\d+/,Vd=/[+-]?\d+/,Wd=/Z|[+-]\d\d:?\d\d/gi,Xd=/Z|[+-]\d\d(?::?\d\d)?/gi,Yd=/[+-]?\d+(\.\d{1,3})?/,Zd=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,$d={},_d={},ae=0,be=1,ce=2,de=3,ee=4,fe=5,ge=6,he=7,ie=8;vd=Array.prototype.indexOf?Array.prototype.indexOf:function(a){
|
||||
// I know
|
||||
var b;for(b=0;b<this.length;++b)if(this[b]===a)return b;return-1};var je=vd;
|
||||
// FORMATTING
|
||||
U("M",["MM",2],"Mo",function(){return this.month()+1}),U("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)}),U("MMMM",0,0,function(a){return this.localeData().months(this,a)}),
|
||||
// ALIASES
|
||||
J("month","M"),
|
||||
// PRIORITY
|
||||
M("month",8),
|
||||
// PARSING
|
||||
Z("M",Od),Z("MM",Od,Kd),Z("MMM",function(a,b){return b.monthsShortRegex(a)}),Z("MMMM",function(a,b){return b.monthsRegex(a)}),ba(["M","MM"],function(a,b){b[be]=u(a)-1}),ba(["MMM","MMMM"],function(a,b,c,d){var e=c._locale.monthsParse(a,d,c._strict);
|
||||
// if we didn't find a month name, mark the date as invalid.
|
||||
null!=e?b[be]=e:m(c).invalidMonth=a});
|
||||
// LOCALES
|
||||
var ke=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,le="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),me="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ne=Zd,oe=Zd;
|
||||
// FORMATTING
|
||||
U("Y",0,0,function(){var a=this.year();return a<=9999?""+a:"+"+a}),U(0,["YY",2],0,function(){return this.year()%100}),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),
|
||||
// ALIASES
|
||||
J("year","y"),
|
||||
// PRIORITIES
|
||||
M("year",1),
|
||||
// PARSING
|
||||
Z("Y",Vd),Z("YY",Od,Kd),Z("YYYY",Sd,Md),Z("YYYYY",Td,Nd),Z("YYYYYY",Td,Nd),ba(["YYYYY","YYYYYY"],ae),ba("YYYY",function(b,c){c[ae]=2===b.length?a.parseTwoDigitYear(b):u(b)}),ba("YY",function(b,c){c[ae]=a.parseTwoDigitYear(b)}),ba("Y",function(a,b){b[ae]=parseInt(a,10)}),
|
||||
// HOOKS
|
||||
a.parseTwoDigitYear=function(a){return u(a)+(u(a)>68?1900:2e3)};
|
||||
// MOMENTS
|
||||
var pe=O("FullYear",!0);
|
||||
// FORMATTING
|
||||
U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),
|
||||
// ALIASES
|
||||
J("week","w"),J("isoWeek","W"),
|
||||
// PRIORITIES
|
||||
M("week",5),M("isoWeek",5),
|
||||
// PARSING
|
||||
Z("w",Od),Z("ww",Od,Kd),Z("W",Od),Z("WW",Od,Kd),ca(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=u(a)});var qe={dow:0,// Sunday is the first day of the week.
|
||||
doy:6};
|
||||
// FORMATTING
|
||||
U("d",0,"do","day"),U("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),U("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),U("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),
|
||||
// ALIASES
|
||||
J("day","d"),J("weekday","e"),J("isoWeekday","E"),
|
||||
// PRIORITY
|
||||
M("day",11),M("weekday",11),M("isoWeekday",11),
|
||||
// PARSING
|
||||
Z("d",Od),Z("e",Od),Z("E",Od),Z("dd",function(a,b){return b.weekdaysMinRegex(a)}),Z("ddd",function(a,b){return b.weekdaysShortRegex(a)}),Z("dddd",function(a,b){return b.weekdaysRegex(a)}),ca(["dd","ddd","dddd"],function(a,b,c,d){var e=c._locale.weekdaysParse(a,d,c._strict);
|
||||
// if we didn't get a weekday name, mark the date as invalid
|
||||
null!=e?b.d=e:m(c).invalidWeekday=a}),ca(["d","e","E"],function(a,b,c,d){b[d]=u(a)});
|
||||
// LOCALES
|
||||
var re="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),se="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),te="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ue=Zd,ve=Zd,we=Zd;U("H",["HH",2],0,"hour"),U("h",["hh",2],0,Ra),U("k",["kk",2],0,Sa),U("hmm",0,0,function(){return""+Ra.apply(this)+T(this.minutes(),2)}),U("hmmss",0,0,function(){return""+Ra.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)}),U("Hmm",0,0,function(){return""+this.hours()+T(this.minutes(),2)}),U("Hmmss",0,0,function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)}),Ta("a",!0),Ta("A",!1),
|
||||
// ALIASES
|
||||
J("hour","h"),
|
||||
// PRIORITY
|
||||
M("hour",13),Z("a",Ua),Z("A",Ua),Z("H",Od),Z("h",Od),Z("HH",Od,Kd),Z("hh",Od,Kd),Z("hmm",Pd),Z("hmmss",Qd),Z("Hmm",Pd),Z("Hmmss",Qd),ba(["H","HH"],de),ba(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),ba(["h","hh"],function(a,b,c){b[de]=u(a),m(c).bigHour=!0}),ba("hmm",function(a,b,c){var d=a.length-2;b[de]=u(a.substr(0,d)),b[ee]=u(a.substr(d)),m(c).bigHour=!0}),ba("hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[de]=u(a.substr(0,d)),b[ee]=u(a.substr(d,2)),b[fe]=u(a.substr(e)),m(c).bigHour=!0}),ba("Hmm",function(a,b,c){var d=a.length-2;b[de]=u(a.substr(0,d)),b[ee]=u(a.substr(d))}),ba("Hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[de]=u(a.substr(0,d)),b[ee]=u(a.substr(d,2)),b[fe]=u(a.substr(e))});var xe,ye=/[ap]\.?m?\.?/i,ze=O("Hours",!0),Ae={calendar:xd,longDateFormat:yd,invalidDate:zd,ordinal:Ad,ordinalParse:Bd,relativeTime:Cd,months:le,monthsShort:me,week:qe,weekdays:re,weekdaysMin:te,weekdaysShort:se,meridiemParse:ye},Be={},Ce={},De=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ee=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Fe=/Z|[+-]\d\d(?::?\d\d)?/,Ge=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],
|
||||
// YYYYMM is NOT allowed by the standard
|
||||
["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],He=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ie=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=x("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),
|
||||
// constant that refers to the ISO standard
|
||||
a.ISO_8601=function(){};var Je=x("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=sb.apply(null,arguments);return this.isValid()&&a.isValid()?a<this?this:a:o()}),Ke=x("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=sb.apply(null,arguments);return this.isValid()&&a.isValid()?a>this?this:a:o()}),Le=function(){return Date.now?Date.now():+new Date};zb("Z",":"),zb("ZZ",""),
|
||||
// PARSING
|
||||
Z("Z",Xd),Z("ZZ",Xd),ba(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=Ab(Xd,a)});
|
||||
// HELPERS
|
||||
// timezone chunker
|
||||
// '+10:00' > ['10', '00']
|
||||
// '-1530' > ['-15', '30']
|
||||
var Me=/([\+\-]|\d\d)/gi;
|
||||
// HOOKS
|
||||
// This function will be called whenever a moment is mutated.
|
||||
// It is intended to keep the offset in sync with the timezone.
|
||||
a.updateOffset=function(){};
|
||||
// ASP.NET json date format regex
|
||||
var Ne=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Oe=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Ob.fn=wb.prototype;var Pe=Sb(1,"add"),Qe=Sb(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Re=x("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});
|
||||
// FORMATTING
|
||||
U(0,["gg",2],0,function(){return this.weekYear()%100}),U(0,["GG",2],0,function(){return this.isoWeekYear()%100}),zc("gggg","weekYear"),zc("ggggg","weekYear"),zc("GGGG","isoWeekYear"),zc("GGGGG","isoWeekYear"),
|
||||
// ALIASES
|
||||
J("weekYear","gg"),J("isoWeekYear","GG"),
|
||||
// PRIORITY
|
||||
M("weekYear",1),M("isoWeekYear",1),
|
||||
// PARSING
|
||||
Z("G",Vd),Z("g",Vd),Z("GG",Od,Kd),Z("gg",Od,Kd),Z("GGGG",Sd,Md),Z("gggg",Sd,Md),Z("GGGGG",Td,Nd),Z("ggggg",Td,Nd),ca(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=u(a)}),ca(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),
|
||||
// FORMATTING
|
||||
U("Q",0,"Qo","quarter"),
|
||||
// ALIASES
|
||||
J("quarter","Q"),
|
||||
// PRIORITY
|
||||
M("quarter",7),
|
||||
// PARSING
|
||||
Z("Q",Jd),ba("Q",function(a,b){b[be]=3*(u(a)-1)}),
|
||||
// FORMATTING
|
||||
U("D",["DD",2],"Do","date"),
|
||||
// ALIASES
|
||||
J("date","D"),
|
||||
// PRIOROITY
|
||||
M("date",9),
|
||||
// PARSING
|
||||
Z("D",Od),Z("DD",Od,Kd),Z("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),ba(["D","DD"],ce),ba("Do",function(a,b){b[ce]=u(a.match(Od)[0],10)});
|
||||
// MOMENTS
|
||||
var Se=O("Date",!0);
|
||||
// FORMATTING
|
||||
U("DDD",["DDDD",3],"DDDo","dayOfYear"),
|
||||
// ALIASES
|
||||
J("dayOfYear","DDD"),
|
||||
// PRIORITY
|
||||
M("dayOfYear",4),
|
||||
// PARSING
|
||||
Z("DDD",Rd),Z("DDDD",Ld),ba(["DDD","DDDD"],function(a,b,c){c._dayOfYear=u(a)}),
|
||||
// FORMATTING
|
||||
U("m",["mm",2],0,"minute"),
|
||||
// ALIASES
|
||||
J("minute","m"),
|
||||
// PRIORITY
|
||||
M("minute",14),
|
||||
// PARSING
|
||||
Z("m",Od),Z("mm",Od,Kd),ba(["m","mm"],ee);
|
||||
// MOMENTS
|
||||
var Te=O("Minutes",!1);
|
||||
// FORMATTING
|
||||
U("s",["ss",2],0,"second"),
|
||||
// ALIASES
|
||||
J("second","s"),
|
||||
// PRIORITY
|
||||
M("second",15),
|
||||
// PARSING
|
||||
Z("s",Od),Z("ss",Od,Kd),ba(["s","ss"],fe);
|
||||
// MOMENTS
|
||||
var Ue=O("Seconds",!1);
|
||||
// FORMATTING
|
||||
U("S",0,0,function(){return~~(this.millisecond()/100)}),U(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,function(){return 10*this.millisecond()}),U(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),U(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),U(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),U(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),U(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),
|
||||
// ALIASES
|
||||
J("millisecond","ms"),
|
||||
// PRIORITY
|
||||
M("millisecond",16),
|
||||
// PARSING
|
||||
Z("S",Rd,Jd),Z("SS",Rd,Kd),Z("SSS",Rd,Ld);var Ve;for(Ve="SSSS";Ve.length<=9;Ve+="S")Z(Ve,Ud);for(Ve="S";Ve.length<=9;Ve+="S")ba(Ve,Ic);
|
||||
// MOMENTS
|
||||
var We=O("Milliseconds",!1);
|
||||
// FORMATTING
|
||||
U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var Xe=r.prototype;Xe.add=Pe,Xe.calendar=Vb,Xe.clone=Wb,Xe.diff=bc,Xe.endOf=oc,Xe.format=gc,Xe.from=hc,Xe.fromNow=ic,Xe.to=jc,Xe.toNow=kc,Xe.get=R,Xe.invalidAt=xc,Xe.isAfter=Xb,Xe.isBefore=Yb,Xe.isBetween=Zb,Xe.isSame=$b,Xe.isSameOrAfter=_b,Xe.isSameOrBefore=ac,Xe.isValid=vc,Xe.lang=Re,Xe.locale=lc,Xe.localeData=mc,Xe.max=Ke,Xe.min=Je,Xe.parsingFlags=wc,Xe.set=S,Xe.startOf=nc,Xe.subtract=Qe,Xe.toArray=sc,Xe.toObject=tc,Xe.toDate=rc,Xe.toISOString=ec,Xe.inspect=fc,Xe.toJSON=uc,Xe.toString=dc,Xe.unix=qc,Xe.valueOf=pc,Xe.creationData=yc,
|
||||
// Year
|
||||
Xe.year=pe,Xe.isLeapYear=ra,
|
||||
// Week Year
|
||||
Xe.weekYear=Ac,Xe.isoWeekYear=Bc,
|
||||
// Quarter
|
||||
Xe.quarter=Xe.quarters=Gc,
|
||||
// Month
|
||||
Xe.month=ka,Xe.daysInMonth=la,
|
||||
// Week
|
||||
Xe.week=Xe.weeks=Ba,Xe.isoWeek=Xe.isoWeeks=Ca,Xe.weeksInYear=Dc,Xe.isoWeeksInYear=Cc,
|
||||
// Day
|
||||
Xe.date=Se,Xe.day=Xe.days=Ka,Xe.weekday=La,Xe.isoWeekday=Ma,Xe.dayOfYear=Hc,
|
||||
// Hour
|
||||
Xe.hour=Xe.hours=ze,
|
||||
// Minute
|
||||
Xe.minute=Xe.minutes=Te,
|
||||
// Second
|
||||
Xe.second=Xe.seconds=Ue,
|
||||
// Millisecond
|
||||
Xe.millisecond=Xe.milliseconds=We,
|
||||
// Offset
|
||||
Xe.utcOffset=Db,Xe.utc=Fb,Xe.local=Gb,Xe.parseZone=Hb,Xe.hasAlignedHourOffset=Ib,Xe.isDST=Jb,Xe.isLocal=Lb,Xe.isUtcOffset=Mb,Xe.isUtc=Nb,Xe.isUTC=Nb,
|
||||
// Timezone
|
||||
Xe.zoneAbbr=Jc,Xe.zoneName=Kc,
|
||||
// Deprecations
|
||||
Xe.dates=x("dates accessor is deprecated. Use date instead.",Se),Xe.months=x("months accessor is deprecated. Use month instead",ka),Xe.years=x("years accessor is deprecated. Use year instead",pe),Xe.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Eb),Xe.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Kb);var Ye=C.prototype;Ye.calendar=D,Ye.longDateFormat=E,Ye.invalidDate=F,Ye.ordinal=G,Ye.preparse=Nc,Ye.postformat=Nc,Ye.relativeTime=H,Ye.pastFuture=I,Ye.set=A,
|
||||
// Month
|
||||
Ye.months=fa,Ye.monthsShort=ga,Ye.monthsParse=ia,Ye.monthsRegex=na,Ye.monthsShortRegex=ma,
|
||||
// Week
|
||||
Ye.week=ya,Ye.firstDayOfYear=Aa,Ye.firstDayOfWeek=za,
|
||||
// Day of Week
|
||||
Ye.weekdays=Fa,Ye.weekdaysMin=Ha,Ye.weekdaysShort=Ga,Ye.weekdaysParse=Ja,Ye.weekdaysRegex=Na,Ye.weekdaysShortRegex=Oa,Ye.weekdaysMinRegex=Pa,
|
||||
// Hours
|
||||
Ye.isPM=Va,Ye.meridiem=Wa,$a("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===u(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),
|
||||
// Side effect imports
|
||||
a.lang=x("moment.lang is deprecated. Use moment.locale instead.",$a),a.langData=x("moment.langData is deprecated. Use moment.localeData instead.",bb);var Ze=Math.abs,$e=ed("ms"),_e=ed("s"),af=ed("m"),bf=ed("h"),cf=ed("d"),df=ed("w"),ef=ed("M"),ff=ed("y"),gf=gd("milliseconds"),hf=gd("seconds"),jf=gd("minutes"),kf=gd("hours"),lf=gd("days"),mf=gd("months"),nf=gd("years"),of=Math.round,pf={s:45,// seconds to minute
|
||||
m:45,// minutes to hour
|
||||
h:22,// hours to day
|
||||
d:26,// days to month
|
||||
M:11},qf=Math.abs,rf=wb.prototype;
|
||||
// Deprecations
|
||||
// Side effect imports
|
||||
// FORMATTING
|
||||
// PARSING
|
||||
// Side effect imports
|
||||
return rf.abs=Wc,rf.add=Yc,rf.subtract=Zc,rf.as=cd,rf.asMilliseconds=$e,rf.asSeconds=_e,rf.asMinutes=af,rf.asHours=bf,rf.asDays=cf,rf.asWeeks=df,rf.asMonths=ef,rf.asYears=ff,rf.valueOf=dd,rf._bubble=_c,rf.get=fd,rf.milliseconds=gf,rf.seconds=hf,rf.minutes=jf,rf.hours=kf,rf.days=lf,rf.weeks=hd,rf.months=mf,rf.years=nf,rf.humanize=md,rf.toISOString=nd,rf.toString=nd,rf.toJSON=nd,rf.locale=lc,rf.localeData=mc,rf.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",nd),rf.lang=Re,U("X",0,0,"unix"),U("x",0,0,"valueOf"),Z("x",Vd),Z("X",Yd),ba("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),ba("x",function(a,b,c){c._d=new Date(u(a))}),a.version="2.17.1",b(sb),a.fn=Xe,a.min=ub,a.max=vb,a.now=Le,a.utc=k,a.unix=Lc,a.months=Rc,a.isDate=g,a.locale=$a,a.invalid=o,a.duration=Ob,a.isMoment=s,a.weekdays=Tc,a.parseZone=Mc,a.localeData=bb,a.isDuration=xb,a.monthsShort=Sc,a.weekdaysMin=Vc,a.defineLocale=_a,a.updateLocale=ab,a.locales=cb,a.weekdaysShort=Uc,a.normalizeUnits=K,a.relativeTimeRounding=kd,a.relativeTimeThreshold=ld,a.calendarFormat=Ub,a.prototype=Xe,a});
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
// Custom library to add password show/hide icons to input element with `password-reveal` attribute
|
||||
// util.js has the angular version, this is for plain js
|
||||
|
||||
window.addEventListener('load', function () {
|
||||
var svgEye = '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="eye" class="svg-inline--fa fa-eye fa-w-18" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"></path></svg>';
|
||||
var svgEyeSlash = '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="eye-slash" class="svg-inline--fa fa-eye-slash fa-w-20" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"></path></svg>';
|
||||
|
||||
document.querySelectorAll('[password-reveal]').forEach(function (element) {
|
||||
var eye = document.createElement('i');
|
||||
eye.innerHTML = svgEyeSlash;
|
||||
eye.style.width = '18px';
|
||||
eye.style.height = '18px';
|
||||
eye.style.position = 'relative';
|
||||
eye.style.float = 'right';
|
||||
eye.style.marginTop = '-24px';
|
||||
eye.style.marginRight = '10px';
|
||||
eye.style.cursor = 'pointer';
|
||||
|
||||
eye.addEventListener('click', function () {
|
||||
if (element.type === 'password') {
|
||||
element.type = 'text';
|
||||
eye.innerHTML = svgEye;
|
||||
} else {
|
||||
element.type = 'password';
|
||||
eye.innerHTML = svgEyeSlash;
|
||||
}
|
||||
});
|
||||
|
||||
element.parentNode.style.position = 'relative';
|
||||
element.parentNode.insertBefore(eye, element.nextSibling);
|
||||
});
|
||||
});
|
||||
@@ -4,7 +4,8 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
|
||||
|
||||
<title> Cloudron App Error </title>
|
||||
<title>Cloudron App Error</title>
|
||||
<meta name="description" content="Cloudron App Error">
|
||||
|
||||
<!-- Use static style as we can't include local stylesheets -->
|
||||
<style>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<script>
|
||||
|
||||
var tmp = window.location.hash.slice(1).split('&');
|
||||
|
||||
tmp.forEach(function (pair) {
|
||||
if (pair.indexOf('access_token=') === 0) localStorage.token = pair.split('=')[1];
|
||||
});
|
||||
|
||||
window.location.href = '/';
|
||||
|
||||
</script>
|
||||
@@ -1,80 +0,0 @@
|
||||
|
||||
<!-- Modal image/video viewer -->
|
||||
<div class="modal fade" id="{{ 'mediaViewerModal-' + $id }}" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" style="max-width: 1280px; max-height: calc(100% - 60px);">
|
||||
<div class="modal-content" style="height: 100%; height: 100%; display: flex; background-color: #000; background-clip: border-box;">
|
||||
<img ng-show="mediaViewer.type === 'image'" ng-src="{{ mediaViewer.src }}" style="display: block; margin: auto; max-width: 100%; max-height: 100%;" />
|
||||
<video ng-show="mediaViewer.type === 'video'" controls preload="auto" autoplay ng-src="{{ mediaViewer.src | trustUrl}}" style="display: block; margin: auto; max-width: 100%; max-height: 100%;"></video>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- main content -->
|
||||
|
||||
<div class="toolbar">
|
||||
<div class="btn-group" role="group" style="display: block;">
|
||||
<!-- TODO figure out why a line break in code between the two buttons results in a gap visually without any margin/padding set -->
|
||||
<button class="btn btn-primary" ng-click="goDirectoryUp()" ng-disabled="cwd === ''"><i class="fas fa-arrow-left"></i></button><button class="btn btn-primary" ng-disabled="busyRefresh" ng-click="refresh()"><i class="fas fa-redo" ng-class="{ 'fa-spin': busyRefresh }"></i></button>
|
||||
</div>
|
||||
<div class="btn-group path-parts" role="group">
|
||||
<button class="btn btn-default" ng-disabled="cwd === ''" ng-click="changeDirectory('/')" ng-drop="drop($event, '/')" ng-dragleave="dragExit($event, '/')" ng-dragover="dragEnter($event, '/')"><i class="fas fa-home"></i> {{ rootDirLabel }} </button><button class="btn btn-default" ng-disabled="part.path === cwd" ng-click="changeDirectory(part.path)" ng-drop="drop($event, part.path)" ng-dragleave="dragExit($event, part.path)" ng-dragover="dragEnter($event, part.path)" ng-repeat="part in cwdParts">{{ part.name }}</button>
|
||||
</div>
|
||||
<div style="display: block;">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fas fa-plus"></i> {{ 'filemanager.toolbar.new' | tr }}</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="hand" ng-click="onNewFile()">{{ 'filemanager.toolbar.newFile' | tr }}</a></li>
|
||||
<li><a class="hand" ng-click="onNewFolder()">{{ 'filemanager.toolbar.newFolder' | tr }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fas fa-upload"></i> {{ 'filemanager.toolbar.upload' | tr }}</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a class="hand" ng-click="onUploadFile()">{{ 'filemanager.toolbar.uploadFile' | tr }}</a></li>
|
||||
<li><a class="hand" ng-click="onUploadFolder()">{{ 'filemanager.toolbar.uploadFolder' | tr }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="file-list-header">
|
||||
<table class="table" style="margin: 0;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 42px"> </th>
|
||||
<th style="">{{ 'filemanager.list.name' | tr }}</th>
|
||||
<th style="width:100px">{{ 'filemanager.list.owner' | tr }}</th>
|
||||
<th style="width: 80px">{{ 'filemanager.list.size' | tr }}</th>
|
||||
<th style="width:100px">{{ 'filemanager.list.mtime' | tr }}</th>
|
||||
<th style="width: 45px;"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="file-list" ng-class="{ 'entry-hovered': dropToBody, 'busy': busy }" context-menu="menuOptionsBlank" ng-mousedown="onClearSelection($event)" ng-drop="drop($event, null)" ng-dragleave="dragExit($event, null)" ng-dragover="dragEnter($event, null)">
|
||||
<table class="table table-hover" style="margin: 0;">
|
||||
<tbody>
|
||||
<tr ng-show="busy && !busyRefresh">
|
||||
<td colspan="6"><center><h2><i class="fa fa-circle-notch fa-spin"></i></h2></center></td>
|
||||
</tr>
|
||||
<tr ng-show="!(busy && !busyRefresh) && entries.length === 0">
|
||||
<td colspan="" class="text-center">{{ 'filemanager.list.empty' | tr }}</td>
|
||||
</tr>
|
||||
<tr style="cursor: default" ng-hide="busy && !busyRefresh" entry-hashkey="{{ entry['$$hashKey'] }}" ng-repeat="entry in entries" ng-mouseup="onMouseup($event, entry)" draggable="true" ng-dragstart="dragStart($event, entry)" ng-drop="drop($event, entry)" context-menu="menuOptions" ng-mousedown="onMousedown($event, entry)" model="entry" ng-dragleave="dragExit($event, entry)" ng-dragover="dragEnter($event, entry)" ng-class="{ 'entry-hovered': entry.hovered, 'entry-selected': isSelected(entry) }">
|
||||
<td style="width: 42px; height: 42px" ng-dblclick="open(entry)" class="text-center">
|
||||
<i ng-show="!entry.previewUrl" class="fas fa-lg {{ entry.icon }}" ng-class="{ 'text-primary': entry.isDirectory && !isSelected(entry) }"></i>
|
||||
<img ng-show="entry.previewUrl" ng-src="{{ entry.previewUrl }}" height="42" width="42" style="object-fit: cover;"/>
|
||||
</td>
|
||||
<td class="elide-table-cell" ng-dblclick="open(entry)" style="padding-left: 5px;">{{ entry.fileName }}<span ng-show="entry.isSymbolicLink" class="text-muted" style="margin-left: 20px;">{{ 'filemanager.list.symlink' | tr:{ target: entry.target } }}</span></td>
|
||||
<td style="width:100px" class="elide-table-cell" ng-dblclick="open(entry)">{{ entry.uid | prettyOwner }}</td>
|
||||
<td style="width: 80px" class="elide-table-cell" ng-dblclick="open(entry)">{{ entry.size | prettyDecimalSize }}</td>
|
||||
<td style="width:100px" class="elide-table-cell" ng-dblclick="open(entry)" uib-tooltip="{{ entry.mtime | prettyLongDate }}" tooltip-append-to-body="true">{{ entry.mtime | prettyDate }}</td>
|
||||
<td style="width: 45px">
|
||||
<button type="button" class="btn btn-xs btn-default context-menu-action" context-menu="menuOptions" model="entry" context-menu-on="click" ng-click="onEntryContextMenu($event, entry)"><i class="fas fa-ellipsis-h"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -1,513 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/* global angular */
|
||||
/* global sanitize, isModalVisible */
|
||||
|
||||
angular.module('Application').component('filetree', {
|
||||
bindings: {
|
||||
backendId: '<',
|
||||
backendType: '<',
|
||||
view: '<',
|
||||
clipboard: '<',
|
||||
onUploadFile: '&',
|
||||
onUploadFolder: '&',
|
||||
onNewFile: '&',
|
||||
onNewFolder: '&',
|
||||
onRenameEntry: '&',
|
||||
onExtractEntry: '&',
|
||||
onChownEntries: '&',
|
||||
onDeleteEntries: '&',
|
||||
onCopyEntries: '&',
|
||||
onCutEntries: '&',
|
||||
onPasteEntries: '&'
|
||||
},
|
||||
templateUrl: 'components/filetree.html?<%= revision %>',
|
||||
controller: [ '$scope', '$translate', '$timeout', 'Client', FileTreeController ]
|
||||
});
|
||||
|
||||
function FileTreeController($scope, $translate, $timeout, Client) {
|
||||
var ctrl = this;
|
||||
|
||||
$scope.backendId = this.backendId;
|
||||
$scope.backendType = this.backendType;
|
||||
$scope.view = this.view;
|
||||
|
||||
$scope.busy = true;
|
||||
$scope.busyRefresh = false;
|
||||
$scope.client = Client;
|
||||
$scope.cwd = null;
|
||||
$scope.cwdParts = [];
|
||||
$scope.rootDirLabel = '';
|
||||
$scope.entries = [];
|
||||
$scope.selected = []; // holds selected entries
|
||||
$scope.dropToBody = false;
|
||||
$scope.applicationLink = '';
|
||||
|
||||
// register so parent can call child
|
||||
$scope.$parent.registerChild($scope);
|
||||
|
||||
function isArchive(f) {
|
||||
return f.match(/\.tgz$/) ||
|
||||
f.match(/\.tar$/) ||
|
||||
f.match(/\.7z$/) ||
|
||||
f.match(/\.zip$/) ||
|
||||
f.match(/\.tar\.gz$/) ||
|
||||
f.match(/\.tar\.xz$/) ||
|
||||
f.match(/\.tar\.bz2$/);
|
||||
}
|
||||
|
||||
$scope.menuOptions = []; // shown for entries
|
||||
$scope.menuOptionsBlank = []; // shown for empty space in folder
|
||||
|
||||
function sort() {
|
||||
return $scope.entries.sort(function (a, b) {
|
||||
if (a.fileName.toLowerCase() < b.fileName.toLowerCase()) return -1;
|
||||
return 1;
|
||||
}).sort(function (a, b) {
|
||||
if ((a.isDirectory && b.isDirectory) || (!a.isDirectory && !b.isDirectory)) return 0;
|
||||
if (a.isDirectory && !b.isDirectory) return -1;
|
||||
return 1;
|
||||
});
|
||||
}
|
||||
|
||||
$scope.isSelected = function (entry) {
|
||||
return $scope.selected.indexOf(entry) !== -1;
|
||||
};
|
||||
|
||||
function download(entry) {
|
||||
var filePath = sanitize($scope.cwd + '/' + entry.fileName);
|
||||
|
||||
Client.filesGet($scope.backendId, $scope.backendType, filePath, 'download', function (error) {
|
||||
if (error) return Client.error(error);
|
||||
});
|
||||
}
|
||||
|
||||
$scope.dragStart = function ($event, entry) {
|
||||
var filePaths = $scope.selected.map(function (entry) { return sanitize($scope.cwd + '/' + entry.fileName); });
|
||||
$event.originalEvent.dataTransfer.setData('application/cloudron-filemanager', JSON.stringify(filePaths));
|
||||
};
|
||||
|
||||
$scope.dragEnter = function ($event, entry) {
|
||||
$event.originalEvent.stopPropagation();
|
||||
$event.originalEvent.preventDefault();
|
||||
|
||||
// if entry is string, we come from breadcrumb
|
||||
if (entry && typeof entry === 'string') $event.currentTarget.classList.add('entry-hovered');
|
||||
else if (entry && entry.isDirectory) entry.hovered = true;
|
||||
else $scope.dropToBody = true;
|
||||
|
||||
$event.originalEvent.dataTransfer.dropEffect = 'move';
|
||||
};
|
||||
|
||||
$scope.dragExit = function ($event, entry) {
|
||||
$event.originalEvent.stopPropagation();
|
||||
$event.originalEvent.preventDefault();
|
||||
|
||||
// if entry is string, we come from breadcrumb
|
||||
if (entry && typeof entry === 'string') $event.currentTarget.classList.remove('entry-hovered');
|
||||
else if (entry && entry.isDirectory) entry.hovered = false;
|
||||
$scope.dropToBody = false;
|
||||
|
||||
$event.originalEvent.dataTransfer.dropEffect = 'move';
|
||||
};
|
||||
|
||||
$scope.drop = function (event, entry) {
|
||||
event.originalEvent.stopPropagation();
|
||||
event.originalEvent.preventDefault();
|
||||
|
||||
$scope.dropToBody = false;
|
||||
|
||||
if (!event.originalEvent.dataTransfer.items[0]) return;
|
||||
|
||||
var targetFolder;
|
||||
if (entry === null) targetFolder = $scope.cwd + '/';
|
||||
else if (typeof entry === 'string') targetFolder = sanitize(entry);
|
||||
else targetFolder = sanitize($scope.cwd + '/' + (entry && entry.isDirectory ? entry.fileName : ''));
|
||||
|
||||
var dataTransfer = event.originalEvent.dataTransfer;
|
||||
var dragContent = dataTransfer.getData('application/cloudron-filemanager');
|
||||
|
||||
// check if we have internal drag'n'drop
|
||||
if (dragContent) {
|
||||
var moved = 0;
|
||||
|
||||
// we expect a JSON.stringified Array here
|
||||
try {
|
||||
dragContent = JSON.parse(dragContent);
|
||||
} catch (e) {
|
||||
console.error('Wrong drag content.', e);
|
||||
return;
|
||||
}
|
||||
|
||||
// move files
|
||||
async.eachLimit(dragContent, 5, function (oldFilePath, callback) {
|
||||
var fileName = oldFilePath.split('/').slice(-1);
|
||||
var newFilePath = sanitize(targetFolder + '/' + fileName);
|
||||
|
||||
// if we drop the item on itself
|
||||
if (oldFilePath === targetFolder) return callback();
|
||||
|
||||
// if nothing changes
|
||||
if (newFilePath === oldFilePath) return callback();
|
||||
|
||||
moved++;
|
||||
|
||||
// TODO this will overwrite files in destination!
|
||||
Client.filesRename($scope.backendId, $scope.backendType, oldFilePath, newFilePath, callback);
|
||||
}, function (error) {
|
||||
if (error) return Client.error(error);
|
||||
|
||||
// only refresh if anything has changed
|
||||
if (moved) $scope.refresh();
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// figure if a folder was dropped on a modern browser, in this case the first would have to be a directory
|
||||
var folderItem;
|
||||
try {
|
||||
folderItem = dataTransfer.items[0].webkitGetAsEntry();
|
||||
if (folderItem.isFile) return $scope.$parent.uploadFiles(event.originalEvent.dataTransfer.files, targetFolder, false);
|
||||
} catch (e) {
|
||||
return $scope.$parent.uploadFiles(event.originalEvent.dataTransfer.files, targetFolder, false);
|
||||
}
|
||||
|
||||
// if we got here we have a folder drop and a modern browser
|
||||
// now traverse the folder tree and create a file list
|
||||
var fileList = [];
|
||||
function traverseFileTree(item, path, callback) {
|
||||
if (item.isFile) {
|
||||
// Get file
|
||||
item.file(function (file) {
|
||||
fileList.push(file);
|
||||
callback();
|
||||
});
|
||||
} else if (item.isDirectory) {
|
||||
// Get folder contents
|
||||
var dirReader = item.createReader();
|
||||
dirReader.readEntries(function (entries) {
|
||||
async.each(entries, function (entry, callback) {
|
||||
traverseFileTree(entry, path + item.name + '/', callback);
|
||||
}, callback);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
traverseFileTree(folderItem, '', function (error) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.$parent.uploadFiles(fileList, targetFolder, false);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.refresh = function () {
|
||||
$scope.$parent.refresh();
|
||||
};
|
||||
|
||||
function amendIcons() {
|
||||
$scope.entries.forEach(function (e) {
|
||||
e.icon = 'fa-file';
|
||||
e.previewUrl = null;
|
||||
|
||||
if (e.isDirectory) e.icon = 'fa-folder';
|
||||
if (e.isSymbolicLink) e.icon = 'fa-link';
|
||||
if (e.isFile) {
|
||||
var mimeType = Mimer().get(e.fileName.toLowerCase());
|
||||
var mimeGroup = mimeType.split('/')[0];
|
||||
if (mimeGroup === 'text') e.icon = 'fa-file-alt';
|
||||
// if (mimeGroup === 'image') e.icon = 'fa-file-image';
|
||||
if (mimeGroup === 'image') {
|
||||
e.icon = 'fa-file-image';
|
||||
e.previewUrl = Client.filesGetLink($scope.backendId, $scope.backendType, sanitize($scope.cwd + '/' + e.fileName));
|
||||
}
|
||||
if (mimeGroup === 'video') e.icon = 'fa-file-video';
|
||||
if (mimeGroup === 'audio') e.icon = 'fa-file-audio';
|
||||
if (mimeType === 'text/csv') e.icon = 'fa-file-csv';
|
||||
if (mimeType === 'application/pdf') e.icon = 'fa-file-pdf';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// called from the parent
|
||||
$scope.onRefresh = function () {
|
||||
$scope.selected = [];
|
||||
$scope.busy = true;
|
||||
$scope.busyRefresh = true;
|
||||
|
||||
Client.filesGet($scope.backendId, $scope.backendType, $scope.cwd, 'data', function (error, result) {
|
||||
if (error && error.statusCode !== 404) return Client.error(error);
|
||||
|
||||
$scope.entries = result ? result.entries : [];
|
||||
amendIcons();
|
||||
sort();
|
||||
|
||||
$scope.busyRefresh = false;
|
||||
$scope.busy = false;
|
||||
});
|
||||
};
|
||||
|
||||
function openDirectory(path) {
|
||||
$scope.cwd = path;
|
||||
$scope.selected = [];
|
||||
|
||||
$scope.cwdParts = path.split('/').filter(function (p) { return !!p; }).map(function (p, i) { return { name: decodeURIComponent(p), path: path.split('/').slice(0, i+1).join('/') }; });
|
||||
|
||||
// refresh will set busy to false once done
|
||||
$scope.refresh();
|
||||
}
|
||||
|
||||
function openFile(entry) {
|
||||
var mimeType = Mimer().get(entry.fileName);
|
||||
var mimeGroup = mimeType.split('/')[0];
|
||||
var path = sanitize($scope.cwd + '/' + entry.fileName);
|
||||
|
||||
if (mimeGroup === 'video' || mimeGroup === 'image') {
|
||||
$scope.mediaViewer.show(entry);
|
||||
} else if (mimeType === 'application/pdf') {
|
||||
Client.filesGet($scope.backendId, $scope.backendType, path, 'open', function (error) { if (error) return Client.error(error); });
|
||||
} else if (mimeGroup === 'text' || mimeGroup === 'application') {
|
||||
$scope.$parent.textEditor.show($scope.cwd, entry);
|
||||
} else {
|
||||
Client.filesGet($scope.backendId, $scope.backendType, path, 'open', function (error) { if (error) return Client.error(error); });
|
||||
}
|
||||
|
||||
$scope.busy = false;
|
||||
}
|
||||
|
||||
$scope.open = function (entry) {
|
||||
if (entry.isDirectory) openDirectory(sanitize($scope.cwd + '/' + entry.fileName));
|
||||
else if (entry.isFile) openFile(entry);
|
||||
};
|
||||
|
||||
$scope.goDirectoryUp = function () {
|
||||
openDirectory(sanitize($scope.cwd + '/..'));
|
||||
};
|
||||
|
||||
$scope.changeDirectory = function (path) {
|
||||
openDirectory(sanitize(path));
|
||||
};
|
||||
|
||||
$scope.onClearSelection = function ($event) {
|
||||
// we don't stop propagation if targets don't match we got the whole list click event
|
||||
if ($event.currentTarget !== $event.target) return;
|
||||
|
||||
$scope.selected = [];
|
||||
};
|
||||
|
||||
$scope.onMousedown = function ($event, entry) {
|
||||
if ($event.button === 2) {
|
||||
$scope.onMouseup($event, entry);
|
||||
}
|
||||
};
|
||||
|
||||
$scope.onMouseup = function ($event, entry) {
|
||||
var i = $scope.selected.indexOf(entry);
|
||||
var multi = ($event.ctrlKey || $event.metaKey);
|
||||
var shift = $event.shiftKey;
|
||||
|
||||
if (shift) {
|
||||
if ($scope.selected.length === 0) {
|
||||
$scope.selected = [ entry ];
|
||||
} else {
|
||||
var pos = $scope.entries.indexOf(entry);
|
||||
var selectedPositions = $scope.selected.map(function (s) { return $scope.entries.indexOf(s); }).sort();
|
||||
|
||||
if (pos < selectedPositions[0]) {
|
||||
$scope.selected = $scope.entries.slice(pos, selectedPositions[0]+1);
|
||||
} else if (selectedPositions[1] && pos > selectedPositions[1]) {
|
||||
$scope.selected = $scope.entries.slice(selectedPositions[1], pos+1);
|
||||
} else {
|
||||
$scope.selected = $scope.entries.slice(selectedPositions[0], pos+1);
|
||||
}
|
||||
}
|
||||
} else if (multi) {
|
||||
if (i === -1) {
|
||||
$scope.selected.push(entry);
|
||||
} else if ($event.button === 0) { // only do this on left click
|
||||
$scope.selected.splice(i, 1);
|
||||
}
|
||||
} else {
|
||||
$scope.selected = [ entry ];
|
||||
}
|
||||
};
|
||||
|
||||
$scope.onEntryContextMenu = function ($event, entry) {
|
||||
if ($scope.selected.indexOf(entry) !== -1) return;
|
||||
$scope.selected.push(entry);
|
||||
};
|
||||
|
||||
$scope.actionSelectAll = function () {
|
||||
$scope.selected = $scope.entries.slice();
|
||||
};
|
||||
|
||||
// just events to the parent controller
|
||||
$scope.onUploadFile = function () { ctrl.onUploadFile({ cwd: $scope.cwd }); };
|
||||
$scope.onUploadFolder = function () { ctrl.onUploadFolder({ cwd: $scope.cwd }); };
|
||||
$scope.onNewFile = function () { ctrl.onNewFile({ cwd: $scope.cwd }); };
|
||||
$scope.onNewFolder = function () { ctrl.onNewFolder({ cwd: $scope.cwd }); };
|
||||
|
||||
$scope.mediaViewer = {
|
||||
type: '',
|
||||
src: '',
|
||||
entry: null,
|
||||
|
||||
show: function (entry) {
|
||||
var filePath = sanitize($scope.cwd + '/' + entry.fileName);
|
||||
|
||||
$scope.mediaViewer.entry = entry;
|
||||
$scope.mediaViewer.type = Mimer().get(entry.fileName).split('/')[0];
|
||||
$scope.mediaViewer.src = Client.filesGetLink($scope.backendId, $scope.backendType, filePath);
|
||||
|
||||
$('#mediaViewerModal-' + $scope.$id).modal('show');
|
||||
},
|
||||
|
||||
close: function () {
|
||||
// set an empty pixel image to bust the cached img to avoid flickering on slow load
|
||||
$scope.mediaViewer.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==';
|
||||
|
||||
$('#mediaViewerModal-' + $scope.$id).modal('hide');
|
||||
}
|
||||
};
|
||||
|
||||
$translate(['filemanager.list.menu.edit', 'filemanager.list.menu.cut', 'filemanager.list.menu.copy', 'filemanager.list.menu.paste', 'filemanager.list.menu.rename', 'filemanager.list.menu.chown', 'filemanager.list.menu.extract', 'filemanager.list.menu.download', 'filemanager.list.menu.delete' ]).then(function (tr) {
|
||||
$scope.menuOptions = [
|
||||
{
|
||||
text: tr['filemanager.list.menu.edit'],
|
||||
displayed: function ($itemScope, $event, entry) { return !entry.isDirectory && !entry.isSymbolicLink; },
|
||||
enabled: function () { return $scope.selected.length === 1; },
|
||||
hasBottomDivider: true,
|
||||
click: function ($itemScope, $event, entry) { $scope.open(entry); }
|
||||
}, {
|
||||
text: tr['filemanager.list.menu.cut'],
|
||||
click: function ($itemScope, $event, entry) { ctrl.onCutEntries({ cwd: $scope.cwd, entries: $scope.selected.slice() }); }
|
||||
}, {
|
||||
text: tr['filemanager.list.menu.copy'],
|
||||
click: function ($itemScope, $event, entry) { ctrl.onCopyEntries({ cwd: $scope.cwd, entries: $scope.selected.slice() }); }
|
||||
}, {
|
||||
text: tr['filemanager.list.menu.paste'],
|
||||
hasBottomDivider: true,
|
||||
enabled: function () { return ctrl.clipboard.length; },
|
||||
click: function ($itemScope, $event, entry) { ctrl.onPasteEntries({ cwd: $scope.cwd, entry: entry }); }
|
||||
}, {
|
||||
text: tr['filemanager.list.menu.rename'],
|
||||
enabled: function () { return $scope.selected.length === 1; },
|
||||
click: function ($itemScope, $event, entry) { ctrl.onRenameEntry({ cwd: $scope.cwd, entry: entry }); }
|
||||
}, {
|
||||
text: tr['filemanager.list.menu.chown'],
|
||||
click: function ($itemScope, $event, entry) { ctrl.onChownEntries({ cwd: $scope.cwd, entries: $scope.selected }); }
|
||||
}, {
|
||||
text: tr['filemanager.list.menu.extract'],
|
||||
displayed: function ($itemScope, $event, entry) { return !entry.isDirectory && isArchive(entry.fileName); },
|
||||
click: function ($itemScope, $event, entry) { ctrl.onExtractEntry({ cwd: $scope.cwd, entry: entry }); }
|
||||
}, {
|
||||
text: tr['filemanager.list.menu.download'],
|
||||
enabled: function () { return $scope.selected.length === 1; },
|
||||
click: function ($itemScope, $event, entry) { download(entry); }
|
||||
}, {
|
||||
text: tr['filemanager.list.menu.delete'],
|
||||
hasTopDivider: true,
|
||||
click: function ($itemScope, $event, entry) { ctrl.onDeleteEntries({ cwd: $scope.cwd, entries: $scope.selected }); }
|
||||
}
|
||||
];
|
||||
});
|
||||
|
||||
$translate(['filemanager.toolbar.newFile', 'filemanager.toolbar.newFolder', 'filemanager.list.menu.paste', 'filemanager.list.menu.selectAll' ]).then(function (tr) {
|
||||
$scope.menuOptionsBlank = [
|
||||
{
|
||||
text: tr['filemanager.toolbar.newFile'],
|
||||
click: function ($itemScope, $event) { ctrl.onNewFile({ cwd: $scope.cwd }); }
|
||||
}, {
|
||||
text: tr['filemanager.toolbar.newFolder'],
|
||||
click: function ($itemScope, $event) { ctrl.onNewFolder({ cwd: $scope.cwd }); }
|
||||
}, {
|
||||
text: tr['filemanager.list.menu.paste'],
|
||||
hasTopDivider: true,
|
||||
hasBottomDivider: true,
|
||||
enabled: function () { return ctrl.clipboard.length; },
|
||||
click: function ($itemScope, $event) { ctrl.onPasteEntries({ cwd: $scope.cwd, entry: null }); }
|
||||
}, {
|
||||
text: tr['filemanager.list.menu.selectAll'],
|
||||
click: function ($itemScope, $event) { $scope.actionSelectAll(); }
|
||||
}
|
||||
];
|
||||
});
|
||||
|
||||
function scrollInView(element) {
|
||||
if (!element) return;
|
||||
|
||||
// This assumes the DOM tree being that rigid
|
||||
function isVisible(ele) {
|
||||
var container = ele.parentElement.parentElement.parentElement;
|
||||
var eleTop = ele.offsetTop;
|
||||
var eleBottom = eleTop + ele.clientHeight;
|
||||
|
||||
var containerTop = container.scrollTop;
|
||||
var containerBottom = containerTop + container.clientHeight;
|
||||
|
||||
// The element is fully visible in the container
|
||||
return (
|
||||
(eleTop >= containerTop && eleBottom <= containerBottom) ||
|
||||
// Some part of the element is visible in the container
|
||||
(eleTop < containerTop && containerTop < eleBottom) ||
|
||||
(eleTop < containerBottom && containerBottom < eleBottom)
|
||||
);
|
||||
}
|
||||
|
||||
if (!isVisible(element)) element.scrollIntoView();
|
||||
}
|
||||
|
||||
function openSelected() {
|
||||
if (!$scope.selected.length) return;
|
||||
|
||||
$scope.open($scope.selected[0]);
|
||||
}
|
||||
|
||||
function selectNext() {
|
||||
var entries = sort();
|
||||
|
||||
if (!$scope.selected.length) return $scope.selected = [ entries[0] ];
|
||||
|
||||
var curIndex = $scope.entries.indexOf($scope.selected[0]);
|
||||
if (curIndex !== -1 && curIndex < $scope.entries.length-1) {
|
||||
var entry = entries[++curIndex];
|
||||
$scope.selected = [ entry ];
|
||||
scrollInView(document.querySelector('[entry-hashkey="' + entry['$$hashKey'] + '"]'));
|
||||
}
|
||||
}
|
||||
|
||||
function selectPrev() {
|
||||
var entries = sort();
|
||||
|
||||
if (!$scope.selected.length) return $scope.selected = [ entries.slice(-1) ];
|
||||
|
||||
var curIndex = $scope.entries.indexOf($scope.selected[0]);
|
||||
if (curIndex !== -1 && curIndex !== 0) {
|
||||
var entry = entries[--curIndex];
|
||||
$scope.selected = [ entry ];
|
||||
scrollInView(document.querySelector('[entry-hashkey="' + entry['$$hashKey'] + '"]'));
|
||||
}
|
||||
}
|
||||
|
||||
openDirectory('.');
|
||||
|
||||
$('.file-list').on('scroll', function (event) {
|
||||
if (event.target.scrollTop > 10) event.target.classList.add('top-scroll-indicator');
|
||||
else event.target.classList.remove('top-scroll-indicator');
|
||||
});
|
||||
|
||||
// handle shortcuts
|
||||
window.addEventListener('keydown', function (event) {
|
||||
if ($scope.$parent.activeView !== $scope.view || $scope.$parent.viewerOpen || isModalVisible()) return;
|
||||
|
||||
if (event.key === 'ArrowDown') {
|
||||
$scope.$apply(selectNext);
|
||||
} else if (event.key === 'ArrowUp') {
|
||||
$scope.$apply(selectPrev);
|
||||
} else if (event.key === 'Enter') {
|
||||
$scope.$apply(openSelected);
|
||||
} else if (event.key === 'Backspace') {
|
||||
if ($scope.view === 'fileTree') $scope.goDirectoryUp();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1,353 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html ng-app="Application">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
|
||||
|
||||
<title> FileManager </title>
|
||||
|
||||
<link id="favicon" href="/api/v1/cloudron/avatar" rel="icon" type="image/png">
|
||||
<link rel="apple-touch-icon" href="/api/v1/cloudron/avatar">
|
||||
<link rel="icon" href="/api/v1/cloudron/avatar">
|
||||
|
||||
<!-- CSS -->
|
||||
<link type="text/css" rel="stylesheet" href="/3rdparty/angular-ui-notification.css?<%= revision %>"/>
|
||||
<link type="text/css" rel="stylesheet" href="/theme.css?<%= revision %>">
|
||||
|
||||
<!-- Fontawesome -->
|
||||
<link type="text/css" rel="stylesheet" href="/3rdparty/fontawesome/css/all.css?<%= revision %>"/>
|
||||
|
||||
<!-- jQuery-->
|
||||
<script type="text/javascript" src="/3rdparty/js/jquery.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- async -->
|
||||
<script type="text/javascript" src="/3rdparty/js/async-3.2.0.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Showdown (markdown converter) -->
|
||||
<script type="text/javascript" src="/3rdparty/js/showdown-1.9.1.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Bootstrap Core JavaScript -->
|
||||
<script type="text/javascript" src="/3rdparty/js/bootstrap.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Angularjs scripts -->
|
||||
<script type="text/javascript" src="/3rdparty/js/angular.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-loader.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-cookies.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-animate.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-base64.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-md5.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-sanitize.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-ui-notification.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Angular directives for bootstrap https://angular-ui.github.io/bootstrap/ -->
|
||||
<script type="text/javascript" src="/3rdparty/js/ui-bootstrap-tpls-1.3.3.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Angular translate https://angular-translate.github.io/ -->
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-translate.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-translate-loader-static-files.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-translate-storage-cookie.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-translate-storage-local.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- colors -->
|
||||
<script type="text/javascript" src="/3rdparty/js/colors.js?<%= revision %>"></script>
|
||||
|
||||
<!-- moment -->
|
||||
<script type="text/javascript" src="/3rdparty/js/moment.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- https://github.com/data-uri/mimer -->
|
||||
<script type="text/javascript" src="/3rdparty/js/mimer.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- https://github.com/Templarian/ui.bootstrap.contextMenu -->
|
||||
<script type="text/javascript" src="/3rdparty/js/contextMenu.js?<%= revision %>"></script>
|
||||
|
||||
<!-- WARNING this adds an AMD loader! Make sure script tag includes like mimer are above -->
|
||||
<!-- monaco-editor -->
|
||||
<script type="text/javascript" src="/3rdparty/vs/loader.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Main Application -->
|
||||
<script type="text/javascript" src="/js/filemanager.js?<%= revision %>"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="filemanager" ng-drop="drop($event)" ng-dragover="dragEnter($event)" ng-dragleave="dragExit($event)" ng-controller="FileManagerController">
|
||||
|
||||
<a class="offline-banner animateMe" ng-show="client.offline" ng-cloak href="https://docs.cloudron.io/troubleshooting/" target="_blank"><i class="fa fa-circle-notch fa-spin"></i> {{ 'main.offline' | tr }}</a>
|
||||
|
||||
<div class="restart-banner animateMe" ng-show="restartBusy" ng-cloak><i class="fa fa-circle-notch fa-spin"></i> {{ 'filemanager.status.restartingApp' | tr}}</div>
|
||||
|
||||
<!-- Modal delete entries -->
|
||||
<div class="modal fade" id="entriesDeleteModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<p class="text-bold text-danger" ng-show="deleteEntries.error">{{ deleteEntries.error }}</p>
|
||||
<h4 ng-hide="deleteEntries.error">{{ 'filemanager.removeDialog.reallyDelete' | tr }}</h4>
|
||||
<ul>
|
||||
<li ng-repeat="entry in deleteEntries.entries">{{ entry.fileName }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.no' | tr }}</button>
|
||||
<button type="button" class="btn btn-danger" ng-click="deleteEntries.submit()" ng-hide="deleteEntries.error" ng-disabled="deleteEntries.busy"><i class="fa fa-circle-notch fa-spin" ng-show="deleteEntries.busy"></i> {{ 'main.dialog.yes' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal rename entry -->
|
||||
<div class="modal fade" id="renameEntryModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'filemanager.renameDialog.title' | tr:{ fileName: renameEntry.entry.fileName } }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form role="form" name="renameEntryForm" ng-submit="renameEntry.submit()" autocomplete="off">
|
||||
<div class="form-group" ng-class="{ 'has-error': (renameEntryForm.newName.$dirty && renameEntryForm.newName.$invalid) }">
|
||||
<label class="control-label">{{ 'filemanager.renameDialog.newName' | tr }}</label>
|
||||
<div class="control-label" ng-show="renameEntry.error">{{ renameEntry.error }}</div>
|
||||
<input type="text" class="form-control" id="inputNewName" name="newName" ng-model="renameEntry.newName" required autofocus>
|
||||
</div>
|
||||
<input class="ng-hide" type="submit" ng-disabled="renameEntryForm.$invalid || renameEntry.busy"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.close' | tr }}</button>
|
||||
<button type="button" class="btn btn-primary" ng-click="renameEntry.submit()" ng-hide="renameEntry.error" ng-disabled="renameEntry.busy"><i class="fa fa-circle-notch fa-spin" ng-show="renameEntry.busy"></i> {{ 'filemanager.renameDialog.rename' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal extract -->
|
||||
<div class="modal fade" id="extractModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'filemanager.extractDialog.title' | tr:{ fileName: extractStatus.fileName } }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div ng-show="extractStatus.error">
|
||||
<p class="text-danger">{{ extractStatus.error }}</p>
|
||||
</div>
|
||||
<div class="progress progress-striped active" ng-hide="extractStatus.error">
|
||||
<div class="progress-bar" role="progressbar" style="width: 100%">
|
||||
</div>
|
||||
</div>
|
||||
<p class="no-wrap" ng-hide="extractStatus.error">{{ extractStatus.fileName }}</p>
|
||||
</div>
|
||||
<div class="modal-footer" style="text-align: left;">
|
||||
<small ng-hide="extractStatus.error">{{ 'filemanager.extractDialog.closeWarning' | tr }}</small>
|
||||
<button class="btn btn-primary pull-right" ng-show="extractStatus.error" data-dismiss="modal">{{ 'main.dialog.close' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal chown entry -->
|
||||
<div class="modal fade" id="chownEntriesModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'filemanager.chownDialog.title' | tr }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form role="form" name="chownEntryForm" ng-submit="chownEntries.submit()" autocomplete="off">
|
||||
<div class="form-group" ng-class="{ 'has-error': (chownEntryForm.newOwner.$dirty && chownEntries.error) }">
|
||||
<label class="control-label">{{ 'filemanager.chownDialog.newOwner' | tr }}</label>
|
||||
<div class="control-label" for="inputNewOwner" ng-show="chownEntries.error">{{ chownEntries.error }}</div>
|
||||
<select class="form-control" id="inputNewOwner" name="newOwner" ng-model="chownEntries.newOwner" ng-options="a.value as a.name for a in OWNERS" ng-disabled="chownEntries.busy"></select>
|
||||
</div>
|
||||
<div class="form-group" ng-show="chownEntries.showRecursiveOption">
|
||||
<input type="checkbox" id="inputNewOwnerRecursive" ng-model="chownEntries.recursive">
|
||||
<label class="control-label" for="inputNewOwnerRecursive">{{ 'filemanager.chownDialog.recursiveCheckbox' | tr }}</label>
|
||||
</div>
|
||||
<input class="ng-hide" type="submit" ng-disabled="chownEntryForm.$invalid || chownEntries.busy"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.close' | tr }}</button>
|
||||
<button type="button" class="btn btn-primary" ng-click="chownEntries.submit()" ng-hide="chownEntries.error" ng-disabled="chownEntries.busy"><i class="fa fa-circle-notch fa-spin" ng-show="chownEntries.busy"></i> {{ 'filemanager.chownDialog.change' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal new file -->
|
||||
<div class="modal fade" id="newFileModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'filemanager.newFileDialog.title' | tr }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form role="form" name="newFileForm" ng-submit="newFile.submit()" autocomplete="off">
|
||||
<div class="form-group" ng-class="{ 'has-error': newFile.error || (newFileForm.fileName.$dirty && newFileForm.fileName.$invalid) }">
|
||||
<input type="text" class="form-control" id="inputFileName" name="fileName" ng-model="newFile.name" required autofocus>
|
||||
<div class="control-label" ng-show="newFile.error === 'exists'">{{ 'filemanager.newFile.errorAlreadyExists' | tr }}</div>
|
||||
</div>
|
||||
<input class="ng-hide" type="submit" ng-disabled="newFileForm.$invalid || newFile.busy"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.close' | tr }}</button>
|
||||
<button type="button" class="btn btn-primary" ng-click="newFile.submit()" ng-disabled="newFile.busy"><i class="fa fa-circle-notch fa-spin" ng-show="newFile.busy"></i> {{ 'filemanager.newFileDialog.create' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal new directory -->
|
||||
<div class="modal fade" id="newFolderModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'filemanager.newDirectoryDialog.title' | tr }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form role="form" name="newFolderForm" ng-submit="newFolder.submit()" autocomplete="off">
|
||||
<div class="form-group" ng-class="{ 'has-error': newFolder.error || (newFolderForm.directoryName.$dirty && newFolderForm.directoryName.$invalid) }">
|
||||
<input type="text" class="form-control" id="inputDirectoryName" name="directoryName" ng-model="newFolder.name" required autofocus>
|
||||
<div class="control-label" ng-show="newFolder.error === 'exists'">{{ 'filemanager.newDirectory.errorAlreadyExists' | tr }}</div>
|
||||
</div>
|
||||
<input class="ng-hide" type="submit" ng-disabled="newDirectoryForm.$invalid || newFolder.busy"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.close' | tr }}</button>
|
||||
<button type="button" class="btn btn-primary" ng-click="newFolder.submit()" ng-disabled="newFolder.busy"><i class="fa fa-circle-notch fa-spin" ng-show="newFolder.busy"></i> {{ 'filemanager.newDirectoryDialog.create' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal editor close -->
|
||||
<div class="modal fade" id="textEditorCloseModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'filemanager.textEditorCloseDialog.title' | tr }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p class="text-bold text-danger">{{ 'filemanager.textEditorCloseDialog.details' | tr }}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" ng-click="textEditor.onClose()">{{ 'filemanager.textEditorCloseDialog.dontSave' | tr }}</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="textEditor.saveAndClose()"><i class="fa fa-circle-notch fa-spin" ng-show="textEditor.busy"></i> {{ 'main.dialog.save' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal upload -->
|
||||
<div class="modal fade" id="uploadModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'filemanager.uploadingDialog.title' | tr:{ countDone: uploadStatus.countDone, count: uploadStatus.count } }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div ng-show="uploadStatus.error">
|
||||
<p class="text-danger" ng-show="uploadStatus.error === 'exists'">{{ 'filemanager.uploadingDialog.errorAlreadyExists' | tr }}</p>
|
||||
<p class="text-danger" ng-show="uploadStatus.error === 'generic'">{{ 'filemanager.uploadingDialog.errorFailed' | tr }}</p>
|
||||
</div>
|
||||
<span><b>{{ uploadStatus.sizeDone | prettyDecimalSize }}</b> (total {{ uploadStatus.size | prettyDecimalSize }})</span>
|
||||
<div class="progress progress-striped active" ng-hide="uploadStatus.error">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" style="width: {{ uploadStatus.percentDone || 0 }}%"></div>
|
||||
</div>
|
||||
<p class="no-wrap" ng-hide="uploadStatus.error">{{ uploadStatus.fileName }}</p>
|
||||
</div>
|
||||
<div class="modal-footer" style="text-align: left;">
|
||||
<small ng-hide="uploadStatus.error">{{ 'filemanager.uploadingDialog.closeWarning' | tr }}</small>
|
||||
<button class="btn btn-default pull-right" ng-show="uploadStatus.error" data-dismiss="modal">{{ 'main.dialog.close' | tr }}</button>
|
||||
<button class="btn btn-primary pull-right" ng-show="uploadStatus.error === 'generic'" ng-click="retryUpload(false)">{{ 'filemanager.uploadingDialog.retry' | tr }}</button>
|
||||
<button class="btn btn-danger pull-right" ng-show="uploadStatus.error === 'exists'" ng-click="retryUpload(true)">{{ 'filemanager.uploadingDialog.overwrite' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="animateMe ng-hide layout-root" ng-show="initialized">
|
||||
<div class="row" ng-hide="title">
|
||||
<div class="col-md-12 text-center">
|
||||
<h3>{{ 'filemanager.notFound' | tr }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="file" id="uploadFileInput" style="display: none" multiple/>
|
||||
<input type="file" id="uploadFolderInput" style="display: none" multiple webkitdirectory directory/>
|
||||
|
||||
<div class="container card" ng-show="title" style="max-width: unset;">
|
||||
<h4 class="text-left">
|
||||
{{ title }}
|
||||
|
||||
<div class="pull-right">
|
||||
<div class="btn-group" ng-show="volumes.length">
|
||||
<button type="button" class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fas fa-folder"></i> <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li ng-repeat="volume in volumes"><a class="hand" ng-href="{{ '/filemanager.html?type=volume&id=' + volume.id }}" target="_blank"><i class="fas fa-folder fa-fw"></i> {{ volume.name }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<button type="button" class="btn btn-sm btn-default" ng-class="{ 'active': splitView }" ng-click="toggleSplitView()"><i class="fas fa-columns"></i></button>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-sm btn-default" ng-show="backendType === 'app'" ng-click="onRestartApp()" uib-tooltip="{{ 'filemanager.toolbar.restartApp' | tr }}" tooltip-placement="bottom" tooltip-append-to-body="true"><i class="fas fa-sync-alt"></i></button>
|
||||
<button type="button" class="btn btn-sm btn-default" ng-show="backendType === 'mail'" ng-click="onRestartMail()" uib-tooltip="{{ 'filemanager.toolbar.restartApp' | tr }}" tooltip-placement="bottom" tooltip-append-to-body="true"><i class="fas fa-sync-alt"></i></button>
|
||||
<a type="button" class="btn btn-sm btn-default" ng-show="backendType === 'app'" ng-href="/logs.html?{{ backendType === 'app' ? 'appId=' + backendId : 'id=mail' }}" target="_blank" uib-tooltip="{{ 'filemanager.toolbar.openLogs' | tr }}" tooltip-placement="bottom" tooltip-append-to-body="true"><i class="fas fa-align-left"></i></a>
|
||||
<a type="button" class="btn btn-sm btn-default" ng-show="backendType === 'app'" ng-href="{{ '/terminal.html?id=' + backendId }}" target="_blank" uib-tooltip="{{ 'filemanager.toolbar.openTerminal' | tr }}" tooltip-placement="bottom" tooltip-append-to-body="true"><i class="fa fa-terminal"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</h4>
|
||||
|
||||
<div class="file-trees">
|
||||
<filetree ng-class="{ 'two-pane': splitView }"
|
||||
on-upload-folder="onUploadFolder(cwd)"
|
||||
on-upload-file="onUploadFile(cwd)"
|
||||
on-new-file="newFile.show(cwd)"
|
||||
on-new-folder="newFolder.show(cwd)"
|
||||
on-copy-entries="actionCopy(cwd, entries)"
|
||||
on-cut-entries="actionCut(cwd, entries)"
|
||||
on-paste-entries="actionPaste(cwd, entries)"
|
||||
on-delete-entries="deleteEntries.show(cwd, entries)"
|
||||
on-rename-entry="renameEntry.show(cwd, entry)"
|
||||
on-extract-entry="extractEntry(cwd, entry)"
|
||||
on-chown-entries="chownEntries.show(cwd, entries)"
|
||||
backend-type="backendType" backend-id="backendId" view="VIEW.LEFT" clipboard="clipboard"
|
||||
ng-click="setActiveView(VIEW.LEFT)"></filetree>
|
||||
<filetree ng-show="splitView" class="two-pane"
|
||||
on-upload-folder="onUploadFolder(cwd)"
|
||||
on-upload-file="onUploadFile(cwd)"
|
||||
on-new-file="newFile.show(cwd)"
|
||||
on-new-folder="newFolder.show(cwd)"
|
||||
on-copy-entries="actionCopy(cwd, entries)"
|
||||
on-cut-entries="actionCut(cwd, entries)"
|
||||
on-paste-entries="actionPaste(cwd, entries)"
|
||||
on-delete-entries="deleteEntries.show(cwd, entries)"
|
||||
on-rename-entry="renameEntry.show(cwd, entry)"
|
||||
on-extract-entry="extractEntry(cwd, entry)"
|
||||
on-chown-entries="chownEntries.show(cwd, entries)"
|
||||
backend-type="backendType" backend-id="backendId" view="VIEW.RIGHT" clipboard="clipboard"
|
||||
ng-click="setActiveView(VIEW.RIGHT)"></filetree>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="textEditor.visible" class="text-editor">
|
||||
<div>
|
||||
<div class="toolbar">
|
||||
<div><span>{{ textEditor.entry.fileName }}</span></div>
|
||||
<button type="button" class="btn btn-primary" ng-click="textEditor.maybeClose()">{{ 'main.dialog.close' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="textEditor.save()" ng-disabled="textEditor.busy"><i class="fa fa-circle-notch fa-spin" ng-show="textEditor.busy"></i> {{ 'main.dialog.save' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="textEditorContainer" style="flex-grow: 2; border: 0px solid black"></div>
|
||||
</div>
|
||||
|
||||
<footer class="text-center ng-cloak">
|
||||
<span class="text-muted" ng-bind-html="status.footer | markdown2html"></span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,7 +5,8 @@
|
||||
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
|
||||
|
||||
<!-- this gets changed once we get the config (because angular has not loaded yet, we see template string for a flash) -->
|
||||
<title>‎</title>
|
||||
<title>Cloudron Dashboard</title>
|
||||
<meta name="description" content="Cloudron Dashboard">
|
||||
|
||||
<link id="favicon" type="image/png" rel="icon" href="/api/v1/cloudron/avatar">
|
||||
<link rel="apple-touch-icon" href="/api/v1/cloudron/avatar">
|
||||
@@ -79,11 +80,8 @@
|
||||
<!-- Anugular Multiselect https://github.com/sebastianha/angular-bootstrap-multiselect -->
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-bootstrap-multiselect.js?<%= revision %>"></script>
|
||||
|
||||
<!-- colors -->
|
||||
<script type="text/javascript" src="/3rdparty/js/colors.js?<%= revision %>"></script>
|
||||
|
||||
<!-- moment -->
|
||||
<script type="text/javascript" src="/3rdparty/js/moment.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/moment-with-locales.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- timezone list -->
|
||||
<script type="text/javascript" src="/js/timezones.js?<%= revision %>"></script>
|
||||
@@ -158,7 +156,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a ng-class="{ active: isActive('/apps')}" href="#/apps"><i class="fa fa-th fa-fw"></i> {{ 'apps.title' | tr }}</a>
|
||||
<a ng-class="{ active: isActive('/apps')}" href="#/apps"><i class="fa fa-grip fa-fw"></i> {{ 'apps.title' | tr }}</a>
|
||||
</li>
|
||||
<li ng-show="user.isAtLeastAdmin">
|
||||
<a ng-class="{ active: isActive('/appstore')}" href="#/appstore"><i class="fa fa-cloud-download-alt fa-fw"></i> {{ 'appstore.title' | tr }}</a>
|
||||
@@ -179,13 +177,14 @@
|
||||
<li><a href="#/profile"><i class="fa fa-user fa-fw"></i> {{ 'profile.title' | tr }}</a></li>
|
||||
<li ng-show="user.isAtLeastMailManager" class="divider"></li>
|
||||
<li ng-show="user.isAtLeastAdmin"><a href="#/backups"><i class="fa fa-archive fa-fw"></i> {{ 'backups.title' | tr }}</a></li>
|
||||
<li ng-show="user.isAtLeastOwner"><a href="#/branding"><i class="fa fa-passport fa-fw"></i> {{ 'branding.title' | tr }}</a></li>
|
||||
<li ng-show="user.isAtLeastAdmin"><a href="#/branding"><i class="fa fa-passport fa-fw"></i> {{ 'branding.title' | tr }}</a></li>
|
||||
<li ng-show="user.isAtLeastAdmin"><a href="#/domains"><i class="fa fa-globe fa-fw"></i> {{ 'domains.title' | tr }}</a></li>
|
||||
<li ng-show="user.isAtLeastMailManager"><a href="#/email"><i class="fa fa-envelope fa-fw"></i> {{ 'emails.title' | tr }}</a></li>
|
||||
<li ng-show="user.isAtLeastAdmin"><a href="#/eventlog"><i class="fa fa-list-alt fa-fw"></i> {{ 'eventlog.title' | tr }}</a></li>
|
||||
<li ng-show="user.isAtLeastAdmin"><a href="#/network"><i class="fas fa-network-wired fa-fw"></i> {{ 'network.title' | tr }}</a></li>
|
||||
<li ng-show="user.isAtLeastAdmin"><a href="#/services"><i class="fa fa-cogs fa-fw"></i> {{ 'services.title' | tr }}</a></li>
|
||||
<li ng-show="user.isAtLeastAdmin"><a href="#/settings"><i class="fa fa-wrench fa-fw"></i> {{ 'settings.title' | tr }}</a></li>
|
||||
<li ng-show="user.isAtLeastAdmin"><a href="#/usersettings"><i class="fa fa-users-gear fa-fw"></i> {{ 'users.title' | tr }}</a></li>
|
||||
<li ng-show="user.isAtLeastAdmin"><a href="#/volumes"><i class="fa fa-hdd fa-fw"></i> {{ 'volumes.title' | tr }}</a></li>
|
||||
<li ng-show="user.isAtLeastAdmin" class="divider"></li>
|
||||
<li ng-show="user.isAtLeastOwner"><a href="#/support"><i class="fa fa-comment fa-fw"></i> {{ 'support.title' | tr }}</a></li>
|
||||
|
||||
+378
-453
File diff suppressed because it is too large
Load Diff
@@ -1,890 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
require.config({ paths: { 'vs': '3rdparty/vs' }});
|
||||
|
||||
// create main application module
|
||||
var app = angular.module('Application', ['pascalprecht.translate', 'ngCookies', 'angular-md5', 'ui-notification', 'ngDrag', 'ui.bootstrap', 'ui.bootstrap.contextMenu']);
|
||||
|
||||
angular.module('Application').filter('prettyOwner', function () {
|
||||
return function (uid) {
|
||||
if (uid === 0) return 'root';
|
||||
if (uid === 33) return 'www-data';
|
||||
if (uid === 1000) return 'cloudron';
|
||||
if (uid === 1001) return 'git';
|
||||
|
||||
return uid;
|
||||
};
|
||||
});
|
||||
|
||||
// disable sce for footer https://code.angularjs.org/1.5.8/docs/api/ng/service/$sce
|
||||
app.config(function ($sceProvider) {
|
||||
$sceProvider.enabled(false);
|
||||
});
|
||||
|
||||
app.filter('trustUrl', ['$sce', function ($sce) {
|
||||
return function (recordingUrl) {
|
||||
return $sce.trustAsResourceUrl(recordingUrl);
|
||||
};
|
||||
}]);
|
||||
|
||||
// https://stackoverflow.com/questions/25621321/angularjs-ng-drag
|
||||
var ngDragEventDirectives = {};
|
||||
angular.forEach(
|
||||
'drag dragend dragenter dragexit dragleave dragover dragstart drop'.split(' '),
|
||||
function(eventName) {
|
||||
var directiveName = 'ng' + eventName.charAt(0).toUpperCase() + eventName.slice(1);
|
||||
|
||||
ngDragEventDirectives[directiveName] = ['$parse', '$rootScope', function($parse/*, $rootScope */) {
|
||||
return {
|
||||
restrict: 'A',
|
||||
compile: function($element, attr) {
|
||||
var fn = $parse(attr[directiveName], null, true);
|
||||
|
||||
return function ngDragEventHandler(scope, element) {
|
||||
element.on(eventName, function(event) {
|
||||
var callback = function() {
|
||||
fn(scope, {$event: event});
|
||||
};
|
||||
|
||||
scope.$apply(callback);
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
}];
|
||||
}
|
||||
);
|
||||
angular.module('ngDrag', []).directive(ngDragEventDirectives);
|
||||
|
||||
function sanitize(filePath) {
|
||||
filePath = filePath.split('/').filter(function (a) { return !!a; }).reduce(function (a, v) {
|
||||
if (v === '.'); // do nothing
|
||||
else if (v === '..') a.pop();
|
||||
else a.push(v);
|
||||
return a;
|
||||
}, []).map(function (p) {
|
||||
// small detour to safely handle special characters and whitespace
|
||||
return encodeURIComponent(decodeURIComponent(p));
|
||||
}).join('/');
|
||||
|
||||
return filePath;
|
||||
}
|
||||
|
||||
function isModalVisible() {
|
||||
return !!document.getElementsByClassName('modal in').length;
|
||||
}
|
||||
|
||||
var VIEW = {
|
||||
LEFT: 'left',
|
||||
RIGHT: 'right'
|
||||
};
|
||||
|
||||
var OWNERS = [
|
||||
{ name: 'cloudron', value: 1000 },
|
||||
{ name: 'www-data', value: 33 },
|
||||
{ name: 'git', value: 1001 },
|
||||
{ name: 'root', value: 0 }
|
||||
];
|
||||
|
||||
app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Client', function ($scope, $translate, $timeout, Client) {
|
||||
var search = decodeURIComponent(window.location.search).slice(1).split('&').map(function (item) { return item.split('='); }).reduce(function (o, k) { o[k[0]] = k[1]; return o; }, {});
|
||||
|
||||
// expose enums
|
||||
$scope.VIEW = VIEW;
|
||||
$scope.OWNERS = OWNERS;
|
||||
|
||||
$scope.initialized = false;
|
||||
$scope.status = null;
|
||||
$scope.client = Client;
|
||||
$scope.title = '';
|
||||
$scope.backendId = search.id;
|
||||
$scope.backendType = search.type;
|
||||
$scope.volumes = [];
|
||||
$scope.splitView = !!window.localStorage.splitView;
|
||||
$scope.activeView = VIEW.LEFT;
|
||||
$scope.viewerOpen = false;
|
||||
|
||||
$scope.clipboard = []; // holds cut or copied entries
|
||||
$scope.clipboardCut = false; // if action is cut or copy
|
||||
|
||||
|
||||
// add a hook for children to refresh both tree views
|
||||
|
||||
$scope.children = [];
|
||||
$scope.registerChild = function (child) { $scope.children.push(child); };
|
||||
$scope.refresh = function () {
|
||||
$scope.children.forEach(function (child) {
|
||||
child.onRefresh();
|
||||
});
|
||||
};
|
||||
|
||||
function collectFiles(entry, callback) {
|
||||
var pathFrom = entry.pathFrom;
|
||||
|
||||
if (entry.isDirectory) {
|
||||
Client.filesGet($scope.backendId, $scope.backendType, entry.fullFilePath, 'data', function (error, result) {
|
||||
if (error) return callback(error);
|
||||
if (!result.entries) return callback(new Error('not a folder'));
|
||||
|
||||
// amend fullFilePath
|
||||
result.entries.forEach(function (e) {
|
||||
e.fullFilePath = sanitize(entry.fullFilePath + '/' + e.fileName);
|
||||
e.pathFrom = pathFrom; // we stash the original path for pasting
|
||||
});
|
||||
|
||||
var collectedFiles = [];
|
||||
async.eachLimit(result.entries, 5, function (entry, callback) {
|
||||
collectFiles(entry, function (error, result) {
|
||||
if (error) return callback(error);
|
||||
|
||||
collectedFiles = collectedFiles.concat(result);
|
||||
|
||||
callback();
|
||||
});
|
||||
}, function (error) {
|
||||
if (error) return callback(error);
|
||||
|
||||
callback(null, collectedFiles);
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
callback(null, [ entry ]);
|
||||
}
|
||||
|
||||
// entries need to be an actual copy
|
||||
$scope.actionCut = function (cwd, entries) {
|
||||
$scope.clipboard = entries; //$scope.selected.slice();
|
||||
$scope.clipboard.forEach(function (entry) {
|
||||
entry.fullFilePath = sanitize(cwd + '/' + entry.fileName);
|
||||
});
|
||||
$scope.clipboardCut = true;
|
||||
};
|
||||
|
||||
// entries need to be an actual copy
|
||||
$scope.actionCopy = function (cwd, entries) {
|
||||
$scope.clipboard = entries; //$scope.selected.slice();
|
||||
$scope.clipboard.forEach(function (entry) {
|
||||
entry.fullFilePath = sanitize(cwd + '/' + entry.fileName);
|
||||
entry.pathFrom = cwd; // we stash the original path for pasting
|
||||
});
|
||||
$scope.clipboardCut = false;
|
||||
};
|
||||
|
||||
$scope.actionPaste = function (cwd, destinationEntry) {
|
||||
if ($scope.clipboardCut) {
|
||||
// move files
|
||||
async.eachLimit($scope.clipboard, 5, function (entry, callback) {
|
||||
var newFilePath = sanitize(cwd + '/' + ((destinationEntry && destinationEntry.isDirectory) ? destinationEntry.fileName : '') + '/' + entry.fileName);
|
||||
|
||||
// TODO this will overwrite files in destination!
|
||||
Client.filesRename($scope.backendId, $scope.backendType, entry.fullFilePath, newFilePath, callback);
|
||||
}, function (error) {
|
||||
if (error) return Client.error(error);
|
||||
|
||||
// clear clipboard
|
||||
$scope.clipboard = [];
|
||||
|
||||
$scope.refresh();
|
||||
});
|
||||
} else {
|
||||
// copy files
|
||||
|
||||
// first collect all files recursively
|
||||
var collectedFiles = [];
|
||||
|
||||
async.eachLimit($scope.clipboard, 5, function (entry, callback) {
|
||||
collectFiles(entry, function (error, result) {
|
||||
if (error) return callback(error);
|
||||
|
||||
collectedFiles = collectedFiles.concat(result);
|
||||
|
||||
callback();
|
||||
});
|
||||
}, function (error) {
|
||||
if (error) return Client.error(error);
|
||||
|
||||
async.eachLimit(collectedFiles, 5, function (entry, callback) {
|
||||
var newFilePath = sanitize(cwd + '/' + ((destinationEntry && destinationEntry.isDirectory) ? destinationEntry.fileName : '') + '/' + entry.fullFilePath.slice(entry.pathFrom.length));
|
||||
|
||||
// This will NOT overwrite but finds a unique new name to copy to
|
||||
// we prefix with a / to ensure we don't do relative target paths
|
||||
Client.filesCopy($scope.backendId, $scope.backendType, entry.fullFilePath, '/' + newFilePath, callback);
|
||||
}, function (error) {
|
||||
if (error) return Client.error(error);
|
||||
|
||||
// clear clipboard
|
||||
$scope.clipboard = [];
|
||||
|
||||
$scope.refresh();
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// handle uploads
|
||||
|
||||
$scope.uploadStatus = {
|
||||
error: null,
|
||||
busy: false,
|
||||
fileName: '',
|
||||
count: 0,
|
||||
countDone: 0,
|
||||
size: 0,
|
||||
done: 0,
|
||||
percentDone: 0,
|
||||
files: [],
|
||||
targetFolder: ''
|
||||
};
|
||||
|
||||
$scope.uploadFiles = function (files, targetFolder, overwrite) {
|
||||
if (!files || !files.length) return;
|
||||
|
||||
overwrite = !!overwrite;
|
||||
|
||||
// prevent it from getting closed
|
||||
$('#uploadModal').modal({
|
||||
backdrop: 'static',
|
||||
keyboard: false
|
||||
});
|
||||
|
||||
$scope.uploadStatus.files = files;
|
||||
$scope.uploadStatus.targetFolder = targetFolder;
|
||||
$scope.uploadStatus.error = null;
|
||||
$scope.uploadStatus.busy = true;
|
||||
$scope.uploadStatus.count = files.length;
|
||||
$scope.uploadStatus.countDone = 0;
|
||||
$scope.uploadStatus.size = 0;
|
||||
$scope.uploadStatus.sizeDone = 0;
|
||||
$scope.uploadStatus.done = 0;
|
||||
$scope.uploadStatus.percentDone = 0;
|
||||
|
||||
for (var i = 0; i < files.length; ++i) {
|
||||
$scope.uploadStatus.size += files[i].size;
|
||||
}
|
||||
|
||||
async.eachSeries(files, function (file, callback) {
|
||||
var filePath = sanitize(targetFolder + '/' + (file.webkitRelativePath || file.name));
|
||||
|
||||
$scope.uploadStatus.fileName = file.name;
|
||||
|
||||
Client.filesUpload($scope.backendId, $scope.backendType, filePath, file, overwrite, function (loaded) {
|
||||
$scope.uploadStatus.percentDone = ($scope.uploadStatus.done+loaded) * 100 / $scope.uploadStatus.size;
|
||||
$scope.uploadStatus.sizeDone = loaded;
|
||||
}, function (error) {
|
||||
if (error) return callback(error);
|
||||
|
||||
$scope.uploadStatus.done += file.size;
|
||||
$scope.uploadStatus.percentDone = $scope.uploadStatus.done * 100 / $scope.uploadStatus.size;
|
||||
$scope.uploadStatus.countDone++;
|
||||
|
||||
callback();
|
||||
});
|
||||
}, function (error) {
|
||||
$scope.uploadStatus.busy = false;
|
||||
|
||||
if (error && error.statusCode === 409) {
|
||||
$scope.uploadStatus.error = 'exists';
|
||||
return;
|
||||
} else if (error) {
|
||||
console.error(error);
|
||||
$scope.uploadStatus.error = 'generic';
|
||||
return;
|
||||
}
|
||||
|
||||
$('#uploadModal').modal('hide');
|
||||
|
||||
$scope.uploadStatus.fileName = '';
|
||||
$scope.uploadStatus.count = 0;
|
||||
$scope.uploadStatus.size = 0;
|
||||
$scope.uploadStatus.sizeDone = 0;
|
||||
$scope.uploadStatus.done = 0;
|
||||
$scope.uploadStatus.percentDone = 100;
|
||||
$scope.uploadStatus.files = [];
|
||||
$scope.uploadStatus.targetFolder = '';
|
||||
|
||||
$scope.refresh();
|
||||
});
|
||||
};
|
||||
|
||||
$scope.retryUpload = function (overwrite) {
|
||||
$scope.uploadFiles($scope.uploadStatus.files, $scope.uploadStatus.targetFolder, !!overwrite);
|
||||
};
|
||||
|
||||
|
||||
// file and folder upload hooks, stashing $scope.uploadCwd for now
|
||||
|
||||
$scope.uploadCwd = '';
|
||||
$('#uploadFileInput').on('change', function (e ) {
|
||||
$scope.uploadFiles(e.target.files || [], $scope.uploadCwd, false);
|
||||
});
|
||||
$scope.onUploadFile = function (cwd) {
|
||||
$scope.uploadCwd = cwd;
|
||||
$('#uploadFileInput').click();
|
||||
};
|
||||
|
||||
$('#uploadFolderInput').on('change', function (e ) {
|
||||
$scope.uploadFiles(e.target.files || [], $scope.uploadCwd, false);
|
||||
});
|
||||
$scope.onUploadFolder = function (cwd) {
|
||||
$scope.uploadCwd = cwd;
|
||||
$('#uploadFolderInput').click();
|
||||
};
|
||||
|
||||
|
||||
// handle delete
|
||||
|
||||
$scope.deleteEntries = {
|
||||
busy: false,
|
||||
error: null,
|
||||
cwd: '',
|
||||
entries: [],
|
||||
|
||||
show: function (cwd, entries) {
|
||||
$scope.deleteEntries.error = null;
|
||||
$scope.deleteEntries.cwd = cwd;
|
||||
$scope.deleteEntries.entries = entries;
|
||||
|
||||
$('#entriesDeleteModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.deleteEntries.busy = true;
|
||||
|
||||
async.eachLimit($scope.deleteEntries.entries, 5, function (entry, callback) {
|
||||
var filePath = sanitize($scope.deleteEntries.cwd + '/' + entry.fileName);
|
||||
|
||||
Client.filesRemove($scope.backendId, $scope.backendType, filePath, callback);
|
||||
}, function (error) {
|
||||
$scope.deleteEntries.busy = false;
|
||||
if (error) return Client.error(error);
|
||||
|
||||
$scope.refresh();
|
||||
|
||||
$('#entriesDeleteModal').modal('hide');
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
// rename entry
|
||||
|
||||
$scope.renameEntry = {
|
||||
busy: false,
|
||||
error: null,
|
||||
entry: null,
|
||||
cwd: '',
|
||||
newName: '',
|
||||
|
||||
show: function (cwd, entry) {
|
||||
$scope.renameEntry.error = null;
|
||||
$scope.renameEntry.cwd = cwd;
|
||||
$scope.renameEntry.entry = entry;
|
||||
$scope.renameEntry.newName = entry.fileName;
|
||||
$scope.renameEntry.busy = false;
|
||||
|
||||
$('#renameEntryModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.renameEntry.busy = true;
|
||||
|
||||
var oldFilePath = sanitize($scope.renameEntry.cwd + '/' + $scope.renameEntry.entry.fileName);
|
||||
var newFilePath = sanitize(($scope.renameEntry.newName[0] === '/' ? '' : ($scope.renameEntry.cwd + '/')) + $scope.renameEntry.newName);
|
||||
|
||||
Client.filesRename($scope.backendId, $scope.backendType, oldFilePath, newFilePath, function (error) {
|
||||
$scope.renameEntry.busy = false;
|
||||
if (error) return Client.error(error);
|
||||
|
||||
$scope.refresh();
|
||||
|
||||
$('#renameEntryModal').modal('hide');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// chown entries
|
||||
|
||||
$scope.chownEntries = {
|
||||
busy: false,
|
||||
error: null,
|
||||
entries: [],
|
||||
newOwner: 0,
|
||||
recursive: false,
|
||||
showRecursiveOption: false,
|
||||
|
||||
show: function (cwd, entries) {
|
||||
$scope.chownEntries.error = null;
|
||||
$scope.chownEntries.cwd = cwd;
|
||||
$scope.chownEntries.entries = entries;
|
||||
// set default uid from first file
|
||||
$scope.chownEntries.newOwner = entries[0].uid;
|
||||
$scope.chownEntries.busy = false;
|
||||
|
||||
// default for directories is recursive
|
||||
$scope.chownEntries.recursive = !!entries.find(function (entry) { return entry.isDirectory; });
|
||||
$scope.chownEntries.showRecursiveOption = false;
|
||||
|
||||
$('#chownEntriesModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.chownEntries.busy = true;
|
||||
|
||||
async.eachLimit($scope.chownEntries.entries, 5, function (entry, callback) {
|
||||
var filePath = sanitize($scope.chownEntries.cwd + '/' + entry.fileName);
|
||||
|
||||
Client.filesChown($scope.backendId, $scope.backendType, filePath, $scope.chownEntries.newOwner, $scope.chownEntries.recursive, callback);
|
||||
}, function (error) {
|
||||
$scope.chownEntries.busy = false;
|
||||
if (error) return Client.error(error);
|
||||
|
||||
$scope.refresh();
|
||||
|
||||
$('#chownEntriesModal').modal('hide');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// new file
|
||||
|
||||
$scope.newFile = {
|
||||
busy: false,
|
||||
error: null,
|
||||
cwd: '',
|
||||
name: '',
|
||||
|
||||
show: function (cwd) {
|
||||
$scope.newFile.error = null;
|
||||
$scope.newFile.name = '';
|
||||
$scope.newFile.busy = false;
|
||||
$scope.newFile.cwd = cwd;
|
||||
|
||||
$scope.newFileForm.$setUntouched();
|
||||
$scope.newFileForm.$setPristine();
|
||||
|
||||
$('#newFileModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.newFile.busy = true;
|
||||
$scope.newFile.error = null;
|
||||
|
||||
var filePath = sanitize($scope.newFile.cwd + '/' + $scope.newFile.name);
|
||||
|
||||
Client.filesUpload($scope.backendId, $scope.backendType, filePath, new File([], $scope.newFile.name), false, function () {}, function (error) {
|
||||
$scope.newFile.busy = false;
|
||||
if (error && error.statusCode === 409) return $scope.newFile.error = 'exists';
|
||||
if (error) return Client.error(error);
|
||||
|
||||
$scope.refresh();
|
||||
|
||||
$('#newFileModal').modal('hide');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// new folder
|
||||
|
||||
$scope.newFolder = {
|
||||
busy: false,
|
||||
error: null,
|
||||
cwd: '',
|
||||
name: '',
|
||||
|
||||
show: function (cwd) {
|
||||
$scope.newFolder.error = null;
|
||||
$scope.newFolder.name = '';
|
||||
$scope.newFolder.busy = false;
|
||||
$scope.newFolder.cwd = cwd;
|
||||
|
||||
$scope.newFolderForm.$setUntouched();
|
||||
$scope.newFolderForm.$setPristine();
|
||||
|
||||
$('#newFolderModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.newFolder.busy = true;
|
||||
$scope.newFolder.error = null;
|
||||
|
||||
var filePath = sanitize($scope.newFolder.cwd + '/' + $scope.newFolder.name);
|
||||
|
||||
Client.filesCreateDirectory($scope.backendId, $scope.backendType, filePath, function (error) {
|
||||
$scope.newFolder.busy = false;
|
||||
if (error && error.statusCode === 409) return $scope.newFolder.error = 'exists';
|
||||
if (error) return Client.error(error);
|
||||
|
||||
$scope.refresh();
|
||||
|
||||
$('#newFolderModal').modal('hide');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// extract archives
|
||||
|
||||
$scope.extractStatus = {
|
||||
error: null,
|
||||
busy: false,
|
||||
fileName: ''
|
||||
};
|
||||
|
||||
$scope.extractEntry = function (cwd, entry) {
|
||||
var filePath = sanitize(cwd + '/' + entry.fileName);
|
||||
|
||||
if (entry.isDirectory) return;
|
||||
|
||||
// prevent it from getting closed
|
||||
$('#extractModal').modal({
|
||||
backdrop: 'static',
|
||||
keyboard: false
|
||||
});
|
||||
|
||||
$scope.extractStatus.fileName = entry.fileName;
|
||||
$scope.extractStatus.error = null;
|
||||
$scope.extractStatus.busy = true;
|
||||
|
||||
Client.filesExtract($scope.backendId, $scope.backendType, filePath, function (error) {
|
||||
$scope.extractStatus.busy = false;
|
||||
|
||||
if (error) {
|
||||
console.error(error);
|
||||
$scope.extractStatus.error = $translate.instant('filemanager.extract.error', error.message);
|
||||
return;
|
||||
}
|
||||
|
||||
$('#extractModal').modal('hide');
|
||||
|
||||
$scope.refresh();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// split view handling
|
||||
|
||||
$scope.toggleSplitView = function () {
|
||||
$scope.splitView = !$scope.splitView;
|
||||
if (!$scope.splitView) {
|
||||
$scope.activeView = VIEW.LEFT;
|
||||
delete window.localStorage.splitView;
|
||||
} else {
|
||||
window.localStorage.splitView = true;
|
||||
}
|
||||
};
|
||||
|
||||
$scope.setActiveView = function (view) {
|
||||
$scope.activeView = view;
|
||||
};
|
||||
|
||||
|
||||
// monaco text editor
|
||||
|
||||
var LANGUAGES = [];
|
||||
require(['vs/editor/editor.main'], function() { LANGUAGES = monaco.languages.getLanguages(); });
|
||||
|
||||
function getLanguage(filename) {
|
||||
var ext = '.' + filename.split('.').pop();
|
||||
var language = LANGUAGES.find(function (l) {
|
||||
if (!l.extensions) return false;
|
||||
return !!l.extensions.find(function (e) { return e === ext; });
|
||||
}) || '';
|
||||
return language ? language.id : '';
|
||||
}
|
||||
|
||||
$scope.textEditor = {
|
||||
busy: false,
|
||||
cwd: null,
|
||||
entry: null,
|
||||
editor: null,
|
||||
unsaved: false,
|
||||
visible: false,
|
||||
|
||||
show: function (cwd, entry) {
|
||||
$scope.textEditor.cwd = cwd;
|
||||
$scope.textEditor.entry = entry;
|
||||
$scope.textEditor.busy = false;
|
||||
$scope.textEditor.unsaved = false;
|
||||
$scope.textEditor.visible = true;
|
||||
|
||||
// clear model if any
|
||||
if ($scope.textEditor.editor && $scope.textEditor.editor.getModel()) $scope.textEditor.editor.setModel(null);
|
||||
|
||||
$scope.viewerOpen = true;
|
||||
// document.getElementById('textEditorModal').style['display'] = 'flex';
|
||||
|
||||
var filePath = sanitize($scope.textEditor.cwd + '/' + entry.fileName);
|
||||
var language = getLanguage(entry.fileName);
|
||||
|
||||
Client.filesGet($scope.backendId, $scope.backendType, filePath, 'data', function (error, result) {
|
||||
if (error) return Client.error(error);
|
||||
|
||||
if (!$scope.textEditor.editor) {
|
||||
$timeout(function () {
|
||||
$scope.textEditor.editor = monaco.editor.create(document.getElementById('textEditorContainer'), {
|
||||
value: result,
|
||||
language: language,
|
||||
theme: 'vs-dark'
|
||||
});
|
||||
$scope.textEditor.editor.getModel().onDidChangeContent(function () { $scope.textEditor.unsaved = true; });
|
||||
}, 200);
|
||||
} else {
|
||||
$scope.textEditor.editor.setModel(monaco.editor.createModel(result, language));
|
||||
$scope.textEditor.editor.getModel().onDidChangeContent(function () { $scope.textEditor.unsaved = true; }); // have to re-attach whenever model changes
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
save: function (callback) {
|
||||
$scope.textEditor.busy = true;
|
||||
|
||||
var newContent = $scope.textEditor.editor.getValue();
|
||||
var filePath = sanitize($scope.textEditor.cwd + '/' + $scope.textEditor.entry.fileName);
|
||||
var file = new File([newContent], 'file');
|
||||
|
||||
Client.filesUpload($scope.backendId, $scope.backendType, filePath, file, true, function () {}, function (error) {
|
||||
if (error) return Client.error(error);
|
||||
|
||||
$scope.refresh();
|
||||
|
||||
$timeout(function () {
|
||||
$scope.textEditor.unsaved = false;
|
||||
$scope.textEditor.busy = false;
|
||||
if (typeof callback === 'function') return callback();
|
||||
}, 1000);
|
||||
});
|
||||
},
|
||||
|
||||
close: function () {
|
||||
$scope.textEditor.visible = false;
|
||||
$scope.viewerOpen = false;
|
||||
$('#textEditorCloseModal').modal('hide');
|
||||
},
|
||||
|
||||
onClose: function () {
|
||||
$scope.textEditor.visible = false;
|
||||
$scope.viewerOpen = false;
|
||||
$('#textEditorCloseModal').modal('hide');
|
||||
},
|
||||
|
||||
saveAndClose: function () {
|
||||
$scope.textEditor.save(function () {
|
||||
$scope.textEditor.onClose();
|
||||
});
|
||||
},
|
||||
|
||||
maybeClose: function () {
|
||||
if (!$scope.textEditor.unsaved) return $scope.textEditor.onClose();
|
||||
$('#textEditorCloseModal').modal('show');
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
// restart app or mail logic
|
||||
|
||||
$scope.restartBusy = false;
|
||||
|
||||
$scope.onRestartApp = function () {
|
||||
$scope.restartBusy = true;
|
||||
|
||||
function waitUntilRestarted(callback) {
|
||||
Client.getApp($scope.backendId, function (error, result) {
|
||||
if (error) return callback(error);
|
||||
|
||||
if (result.installationState === ISTATES.INSTALLED) return callback();
|
||||
setTimeout(waitUntilRestarted.bind(null, callback), 2000);
|
||||
});
|
||||
}
|
||||
|
||||
Client.restartApp($scope.backendId, function (error) {
|
||||
if (error) console.error('Failed to restart app.', error);
|
||||
|
||||
waitUntilRestarted(function (error) {
|
||||
if (error) console.error('Failed wait for restart.', error);
|
||||
|
||||
$scope.restartBusy = false;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$scope.onRestartMail = function () {
|
||||
$scope.restartBusy = true;
|
||||
|
||||
function waitUntilRestarted(callback) {
|
||||
Client.getService('mail', function (error, result) {
|
||||
if (error) return callback(error);
|
||||
|
||||
if (result.status === 'active') return callback();
|
||||
setTimeout(waitUntilRestarted.bind(null, callback), 2000);
|
||||
});
|
||||
}
|
||||
|
||||
Client.restartService('mail', function (error) {
|
||||
if (error) console.error('Failed to restart mail.', error);
|
||||
|
||||
waitUntilRestarted(function (error) {
|
||||
if (error) console.error('Failed wait for restart.', error);
|
||||
|
||||
$scope.restartBusy = false;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// init code
|
||||
|
||||
function fetchVolumesInfo(mounts) {
|
||||
$scope.volumes = [];
|
||||
|
||||
async.each(mounts, function (mount, callback) {
|
||||
Client.getVolume(mount.volumeId, function (error, result) {
|
||||
if (error) return callback(error);
|
||||
|
||||
$scope.volumes.push(result);
|
||||
|
||||
callback();
|
||||
});
|
||||
}, function (error) {
|
||||
if (error) console.error('Failed to fetch volumes info.', error);
|
||||
});
|
||||
}
|
||||
|
||||
function init() {
|
||||
|
||||
Client.getStatus(function (error, status) {
|
||||
if (error) return Client.initError(error, init);
|
||||
|
||||
if (!status.activated) {
|
||||
console.log('Not activated yet, redirecting', status);
|
||||
window.location.href = '/';
|
||||
return;
|
||||
}
|
||||
|
||||
// check version and force reload if needed
|
||||
if (!localStorage.version) {
|
||||
localStorage.version = status.version;
|
||||
} else if (localStorage.version !== status.version) {
|
||||
localStorage.version = status.version;
|
||||
window.location.reload(true);
|
||||
}
|
||||
|
||||
$scope.status = status;
|
||||
|
||||
console.log('Running filemanager version ', localStorage.version);
|
||||
|
||||
// get user profile as the first thing. this populates the "scope" and affects subsequent API calls
|
||||
Client.refreshUserInfo(function (error) {
|
||||
if (error) return Client.initError(error, init);
|
||||
|
||||
var getter;
|
||||
if ($scope.backendType === 'app') {
|
||||
getter = Client.getApp.bind(Client, $scope.backendId);
|
||||
} else if ($scope.backendType === 'volume') {
|
||||
getter = Client.getVolume.bind(Client, $scope.backendId);
|
||||
} else if ($scope.backendType === 'mail') {
|
||||
getter = function (next) { next(null, null); };
|
||||
}
|
||||
|
||||
getter(function (error, result) {
|
||||
if (error) {
|
||||
$scope.initialized = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// fine to do async
|
||||
if ($scope.backendType === 'app') fetchVolumesInfo(result.mounts || []);
|
||||
|
||||
switch ($scope.backendType) {
|
||||
case 'app':
|
||||
$scope.title = result.label || result.fqdn;
|
||||
$scope.rootDirLabel = '/app/data/';
|
||||
$scope.applicationLink = 'https://' + result.fqdn;
|
||||
break;
|
||||
case 'volume':
|
||||
$scope.title = result.name;
|
||||
$scope.rootDirLabel = result.hostPath;
|
||||
break;
|
||||
case 'mail':
|
||||
$scope.title = 'mail';
|
||||
$scope.rootDirLabel = 'mail';
|
||||
break;
|
||||
}
|
||||
|
||||
window.document.title = $scope.title + ' - ' + $translate.instant('filemanager.title');
|
||||
|
||||
// now mark the Client to be ready
|
||||
Client.setReady();
|
||||
|
||||
// openPath('');
|
||||
|
||||
$scope.initialized = true;
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
init();
|
||||
|
||||
|
||||
// toplevel key input handling
|
||||
|
||||
window.addEventListener('keydown', function (event) {
|
||||
if((navigator.platform.match('Mac') ? event.metaKey : event.ctrlKey) && event.key === 's') {
|
||||
if (!$scope.textEditor.visible) return;
|
||||
|
||||
event.preventDefault();
|
||||
$scope.$apply($scope.textEditor.save);
|
||||
} else if((navigator.platform.match('Mac') ? event.metaKey : event.ctrlKey) && event.key === 'c') {
|
||||
if ($scope.textEditor.visible) return;
|
||||
if ($scope.selected.length === 0) return;
|
||||
if (isModalVisible()) return;
|
||||
|
||||
event.preventDefault();
|
||||
$scope.$apply($scope.actionCopy);
|
||||
} else if((navigator.platform.match('Mac') ? event.metaKey : event.ctrlKey) && event.key === 'x') {
|
||||
if ($scope.textEditor.visible) return;
|
||||
if ($scope.selected.length === 0) return;
|
||||
if (isModalVisible()) return;
|
||||
|
||||
event.preventDefault();
|
||||
$scope.$apply($scope.actionCut);
|
||||
} else if((navigator.platform.match('Mac') ? event.metaKey : event.ctrlKey) && event.key === 'v') {
|
||||
if ($scope.textEditor.visible) return;
|
||||
if ($scope.clipboard.length === 0) return;
|
||||
if (isModalVisible()) return;
|
||||
|
||||
event.preventDefault();
|
||||
$scope.$apply($scope.actionPaste);
|
||||
} else if((navigator.platform.match('Mac') ? event.metaKey : event.ctrlKey) && event.key === 'a') {
|
||||
if ($scope.textEditor.visible) return;
|
||||
if (isModalVisible()) return;
|
||||
|
||||
event.preventDefault();
|
||||
$scope.$apply($scope.actionSelectAll);
|
||||
} else if(event.key === 'Escape') {
|
||||
if ($scope.textEditor.visible) return $scope.$apply($scope.textEditor.maybeClose);
|
||||
else $scope.$apply(function () { $scope.selected = []; });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// setup all the dialog focus handling
|
||||
['newFileModal', 'newFolderModal', 'renameEntryModal'].forEach(function (id) {
|
||||
$('#' + id).on('shown.bs.modal', function () {
|
||||
$(this).find('[autofocus]:first').focus();
|
||||
});
|
||||
});
|
||||
|
||||
// selects filename (without extension)
|
||||
['renameEntryModal'].forEach(function (id) {
|
||||
$('#' + id).on('shown.bs.modal', function () {
|
||||
var elem = $(this).find('[autofocus]:first');
|
||||
var text = elem.val();
|
||||
elem[0].setSelectionRange(0, text.indexOf('.'));
|
||||
});
|
||||
});
|
||||
}]);
|
||||
+236
-3
@@ -2,7 +2,8 @@
|
||||
|
||||
/* global angular:false */
|
||||
/* global $:false */
|
||||
/* global ERROR,ISTATES,HSTATES,RSTATES,APP_TYPES */
|
||||
/* global async */
|
||||
/* global ERROR,ISTATES,HSTATES,RSTATES,APP_TYPES,NOTIFICATION_TYPES */
|
||||
|
||||
// deal with accessToken in the query, this is passed for example on password reset and account setup upon invite
|
||||
var search = decodeURIComponent(window.location.search).slice(1).split('&').map(function (item) { return item.split('='); }).reduce(function (o, k) { o[k[0]] = k[1]; return o; }, {});
|
||||
@@ -50,6 +51,9 @@ app.config(['$routeProvider', function ($routeProvider) {
|
||||
}).when('/users', {
|
||||
controller: 'UsersController',
|
||||
templateUrl: 'views/users.html?<%= revision %>'
|
||||
}).when('/usersettings', {
|
||||
controller: 'UserSettingsController',
|
||||
templateUrl: 'views/user-settings.html?<%= revision %>'
|
||||
}).when('/app/:appId/:view?', {
|
||||
controller: 'AppController',
|
||||
templateUrl: 'views/app.html?<%= revision %>'
|
||||
@@ -93,8 +97,7 @@ app.config(['$routeProvider', function ($routeProvider) {
|
||||
controller: 'NotificationsController',
|
||||
templateUrl: 'views/notifications.html?<%= revision %>'
|
||||
}).when('/oidc', {
|
||||
controller: 'OidcController',
|
||||
templateUrl: 'views/oidc.html?<%= revision %>'
|
||||
redirectTo: '/usersettings'
|
||||
}).when('/settings', {
|
||||
controller: 'SettingsController',
|
||||
templateUrl: 'views/settings.html?<%= revision %>'
|
||||
@@ -116,6 +119,26 @@ app.config(['$routeProvider', function ($routeProvider) {
|
||||
}).otherwise({ redirectTo: '/'});
|
||||
}]);
|
||||
|
||||
app.filter('notificationTypeToColor', function () {
|
||||
return function (n) {
|
||||
switch (n.type) {
|
||||
case NOTIFICATION_TYPES.ALERT_REBOOT:
|
||||
case NOTIFICATION_TYPES.ALERT_APP_OOM:
|
||||
case NOTIFICATION_TYPES.ALERT_MAIL_STATUS:
|
||||
case NOTIFICATION_TYPES.ALERT_CERTIFICATE_RENEWAL_FAILED:
|
||||
case NOTIFICATION_TYPES.ALERT_DISK_SPACE:
|
||||
case NOTIFICATION_TYPES.ALERT_BACKUP_CONFIG:
|
||||
case NOTIFICATION_TYPES.ALERT_BACKUP_FAILED:
|
||||
return '#ff4c4c';
|
||||
case NOTIFICATION_TYPES.ALERT_BOX_UPDATE:
|
||||
case NOTIFICATION_TYPES.ALERT_MANUAL_APP_UPDATE:
|
||||
return '#f0ad4e';
|
||||
default:
|
||||
return '#2196f3';
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
app.filter('capitalize', function () {
|
||||
return function (s) {
|
||||
return s.charAt(0).toUpperCase() + s.slice(1);
|
||||
@@ -297,6 +320,7 @@ app.filter('installationStateLabel', function () {
|
||||
case ISTATES.PENDING_LOCATION_CHANGE:
|
||||
case ISTATES.PENDING_CONFIGURE:
|
||||
case ISTATES.PENDING_RECREATE_CONTAINER:
|
||||
case ISTATES.PENDING_SERVICES_CHANGE:
|
||||
case ISTATES.PENDING_DEBUG:
|
||||
return 'Configuring' + waiting;
|
||||
case ISTATES.PENDING_RESIZE:
|
||||
@@ -607,3 +631,212 @@ app.config(['fitTextConfigProvider', function (fitTextConfigProvider) {
|
||||
max: 24
|
||||
};
|
||||
}]);
|
||||
|
||||
app.controller('MainController', ['$scope', '$route', '$timeout', '$location', '$interval', 'Notification', 'Client', function ($scope, $route, $timeout, $location, $interval, Notification, Client) {
|
||||
$scope.initialized = false; // used to animate the UI
|
||||
$scope.user = Client.getUserInfo();
|
||||
$scope.installedApps = Client.getInstalledApps();
|
||||
$scope.config = {};
|
||||
$scope.client = Client;
|
||||
$scope.subscription = {};
|
||||
$scope.notificationCount = 0;
|
||||
$scope.hideNavBarActions = $location.path() === '/logs';
|
||||
$scope.backgroundImageUrl = '';
|
||||
|
||||
$scope.reboot = {
|
||||
busy: false,
|
||||
|
||||
show: function () {
|
||||
$scope.reboot.busy = false;
|
||||
$('#rebootModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.reboot.busy = true;
|
||||
|
||||
Client.reboot(function (error) {
|
||||
if (error) return Client.error(error);
|
||||
|
||||
$('#rebootModal').modal('hide');
|
||||
|
||||
// trigger refetch to show offline banner
|
||||
$timeout(function () { Client.getStatus(function () {}); }, 5000);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.isActive = function (url) {
|
||||
if (!$route.current) return false;
|
||||
return $route.current.$$route.originalPath.indexOf(url) === 0;
|
||||
};
|
||||
|
||||
$scope.logout = function (event) {
|
||||
event.stopPropagation();
|
||||
$scope.initialized = false;
|
||||
Client.logout();
|
||||
};
|
||||
|
||||
$scope.openSubscriptionSetup = function () {
|
||||
Client.openSubscriptionSetup($scope.subscription);
|
||||
};
|
||||
|
||||
// NOTE: this function is exported and called from the appstore.js
|
||||
$scope.updateSubscriptionStatus = function () {
|
||||
Client.getSubscription(function (error, subscription) {
|
||||
if (error && error.statusCode === 412) return; // not yet registered
|
||||
if (error && error.statusCode === 402) return; // invalid appstore token
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.subscription = subscription;
|
||||
});
|
||||
};
|
||||
|
||||
function refreshNotifications() {
|
||||
if (!Client.getUserInfo().isAtLeastAdmin) return;
|
||||
|
||||
Client.getNotifications({ acknowledged: false }, 1, 100, function (error, results) { // counter maxes out at 100
|
||||
if (error) console.error(error);
|
||||
else $scope.notificationCount = results.length;
|
||||
});
|
||||
}
|
||||
|
||||
// update state of acknowledged notification
|
||||
$scope.notificationAcknowledged = function () {
|
||||
refreshNotifications();
|
||||
};
|
||||
|
||||
function redirectOnMandatory2FA() {
|
||||
if (Client.getConfig().mandatory2FA && !Client.getUserInfo().twoFactorAuthenticationEnabled) {
|
||||
$location.path('/profile').search({ setup2fa: true });
|
||||
}
|
||||
}
|
||||
|
||||
// Make it redirect if the browser URL is changed directly - https://forum.cloudron.io/topic/7510/bug-in-2fa-force
|
||||
$scope.$on('$routeChangeStart', function (/* event */) {
|
||||
if ($scope.initialized) redirectOnMandatory2FA();
|
||||
});
|
||||
|
||||
var gPlatformStatusNotification = null;
|
||||
function trackPlatformStatus() {
|
||||
Client.getPlatformStatus(function (error, result) {
|
||||
if (error) return console.error('Failed to get platform status.', error);
|
||||
|
||||
// see box/src/platform.js
|
||||
if (result.message === 'Ready') {
|
||||
if (gPlatformStatusNotification) {
|
||||
gPlatformStatusNotification.kill();
|
||||
gPlatformStatusNotification = null;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!gPlatformStatusNotification) {
|
||||
var options = { title: 'Platform status', message: result.message, delay: 'notimeout', replaceMessage: true, closeOnClick: false };
|
||||
|
||||
Notification.primary(options).then(function (result) {
|
||||
gPlatformStatusNotification = result;
|
||||
$timeout(trackPlatformStatus, 5000);
|
||||
});
|
||||
} else {
|
||||
gPlatformStatusNotification.message = result.message;
|
||||
$timeout(trackPlatformStatus, 5000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function redirectIfNeeded(status) {
|
||||
if (!status.activated) {
|
||||
console.log('Not activated yet, redirecting', status);
|
||||
if (status.restore.active || status.restore.errorMessage) { // show the error message in restore page
|
||||
window.location.href = '/restore.html' + window.location.search;
|
||||
} else if (status.adminFqdn) {
|
||||
window.location.href = 'https://' + status.adminFqdn + '/setup.html' + (window.location.search);
|
||||
} else {
|
||||
window.location.href = '/setupdns.html' + window.location.search;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// support local development with localhost check
|
||||
if (window.location.hostname !== status.adminFqdn && window.location.hostname !== 'localhost' && !window.location.hostname.startsWith('192.')) {
|
||||
// user is accessing by IP or by the old admin location (pre-migration)
|
||||
window.location.href = '/setupdns.html' + window.location.search;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// this loads the very first thing when accessing via IP or domain
|
||||
function init() {
|
||||
Client.getProvisionStatus(function (error, status) {
|
||||
if (error) return Client.initError(error, init);
|
||||
|
||||
if (redirectIfNeeded(status)) return;
|
||||
|
||||
// check version and force reload if needed
|
||||
if (!localStorage.version) {
|
||||
localStorage.version = status.version;
|
||||
} else if (localStorage.version !== status.version) {
|
||||
localStorage.version = status.version;
|
||||
window.location.reload(true);
|
||||
}
|
||||
|
||||
console.log('Running dashboard version ', localStorage.version);
|
||||
|
||||
// get user profile as the first thing. this populates the "scope" and affects subsequent API calls
|
||||
async.series([
|
||||
Client.refreshProfile.bind(Client),
|
||||
Client.refreshConfig.bind(Client),
|
||||
Client.refreshAvailableLanguages.bind(Client),
|
||||
Client.refreshInstalledApps.bind(Client)
|
||||
], function (error) {
|
||||
if (error) return Client.initError(error, init);
|
||||
|
||||
// now mark the Client to be ready
|
||||
Client.setReady();
|
||||
|
||||
$scope.config = Client.getConfig();
|
||||
|
||||
if (Client.getUserInfo().hasBackgroundImage) {
|
||||
document.getElementById('mainContentContainer').style.backgroundImage = 'url("' + Client.getBackgroundImageUrl() + '")';
|
||||
document.getElementById('mainContentContainer').classList.add('has-background');
|
||||
}
|
||||
|
||||
$scope.initialized = true;
|
||||
|
||||
redirectOnMandatory2FA();
|
||||
|
||||
$interval(refreshNotifications, 60 * 1000);
|
||||
refreshNotifications();
|
||||
|
||||
Client.getSubscription(function (error, subscription) {
|
||||
if (error && error.statusCode === 412) return; // not yet registered
|
||||
if (error && error.statusCode === 402) return; // invalid appstore token
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.subscription = subscription;
|
||||
|
||||
// only track platform status if we are registered
|
||||
trackPlatformStatus();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Client.onConfig(function (config) {
|
||||
if (config.cloudronName) {
|
||||
document.title = config.cloudronName;
|
||||
}
|
||||
});
|
||||
|
||||
init();
|
||||
|
||||
// setup all the dialog focus handling
|
||||
['updateModal'].forEach(function (id) {
|
||||
$('#' + id).on('shown.bs.modal', function () {
|
||||
$(this).find('[autofocus]:first').focus();
|
||||
});
|
||||
});
|
||||
}]);
|
||||
|
||||
@@ -1,202 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/* global angular */
|
||||
/* global moment */
|
||||
/* global $ */
|
||||
|
||||
// create main application module
|
||||
var app = angular.module('Application', ['pascalprecht.translate', 'ngCookies', 'angular-md5', 'ui-notification']);
|
||||
|
||||
app.controller('LogsController', ['$scope', '$translate', 'Client', function ($scope, $translate, Client) {
|
||||
var search = decodeURIComponent(window.location.search).slice(1).split('&').map(function (item) { return item.split('='); }).reduce(function (o, k) { o[k[0]] = k[1]; return o; }, {});
|
||||
|
||||
$scope.initialized = false;
|
||||
$scope.client = Client;
|
||||
$scope.selected = '';
|
||||
$scope.activeEventSource = null;
|
||||
$scope.lines = 100;
|
||||
$scope.selectedAppInfo = null;
|
||||
$scope.selectedTaskInfo = null;
|
||||
|
||||
function ab2str(buf) {
|
||||
return String.fromCharCode.apply(null, new Uint16Array(buf));
|
||||
}
|
||||
|
||||
$scope.clear = function () {
|
||||
var logViewer = $('.logs-container');
|
||||
logViewer.empty();
|
||||
};
|
||||
|
||||
// https://github.com/janl/mustache.js/blob/master/mustache.js#L60
|
||||
var entityMap = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
"'": ''',
|
||||
'/': '/',
|
||||
'`': '`',
|
||||
'=': '='
|
||||
};
|
||||
|
||||
function escapeHtml(string) {
|
||||
return String(string).replace(/[&<>"'`=\/]/g, function fromEntityMap (s) {
|
||||
return entityMap[s];
|
||||
});
|
||||
}
|
||||
|
||||
function showLogs() {
|
||||
if (!$scope.selected) return;
|
||||
|
||||
var func;
|
||||
if ($scope.selected.type === 'platform') func = Client.getPlatformLogs;
|
||||
else if ($scope.selected.type === 'service') func = Client.getServiceLogs;
|
||||
else if ($scope.selected.type === 'task') func = Client.getTaskLogs;
|
||||
else if ($scope.selected.type === 'app') func = Client.getAppLogs;
|
||||
|
||||
func($scope.selected.value, true /* follow */, $scope.lines, function handleLogs(error, result) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.activeEventSource = result;
|
||||
result.onmessage = function handleMessage(message) {
|
||||
var data;
|
||||
|
||||
try {
|
||||
data = JSON.parse(message.data);
|
||||
} catch (e) {
|
||||
return console.error(e);
|
||||
}
|
||||
|
||||
// check if we want to auto scroll (this is before the appending, as that skews the check)
|
||||
var tmp = $('.logs-container');
|
||||
var autoScroll = tmp[0].scrollTop > (tmp[0].scrollHeight - tmp.innerHeight() - 24);
|
||||
|
||||
var logLine = $('<div class="log-line">');
|
||||
// realtimeTimestamp is 0 if line is blank or some parse error
|
||||
var timeString = data.realtimeTimestamp ? moment(data.realtimeTimestamp/1000).format('MMM DD HH:mm:ss') : '';
|
||||
logLine.html('<span class="time">' + timeString + ' </span>' + window.ansiToHTML(escapeHtml(typeof data.message === 'string' ? data.message : ab2str(data.message))));
|
||||
tmp.append(logLine);
|
||||
|
||||
if (autoScroll) tmp[0].lastChild.scrollIntoView({ behavior: 'instant', block: 'end' });
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
function select(ids, callback) {
|
||||
if (ids.id && ids.id.indexOf('redis:') === 0) {
|
||||
$scope.selected = {
|
||||
name: 'Redis',
|
||||
type: 'service',
|
||||
value: ids.id,
|
||||
url: Client.makeURL('/api/v1/services/' + ids.id + '/logs')
|
||||
};
|
||||
callback();
|
||||
} else if (ids.id) {
|
||||
var BUILT_IN_LOGS = [
|
||||
{ name: 'Box', type: 'platform', value: 'box', url: Client.makeURL('/api/v1/cloudron/logs/box') },
|
||||
{ name: 'Graphite', type: 'service', value: 'graphite', url: Client.makeURL('/api/v1/services/graphite/logs') },
|
||||
{ name: 'MongoDB', type: 'service', value: 'mongodb', url: Client.makeURL('/api/v1/services/mongodb/logs') },
|
||||
{ name: 'MySQL', type: 'service', value: 'mysql', url: Client.makeURL('/api/v1/services/mysql/logs') },
|
||||
{ name: 'PostgreSQL', type: 'service', value: 'postgresql', url: Client.makeURL('/api/v1/services/postgresql/logs') },
|
||||
{ name: 'Mail', type: 'service', value: 'mail', url: Client.makeURL('/api/v1/services/mail/logs') },
|
||||
{ name: 'Docker', type: 'service', value: 'docker', url: Client.makeURL('/api/v1/services/docker/logs') },
|
||||
{ name: 'Nginx', type: 'service', value: 'nginx', url: Client.makeURL('/api/v1/services/nginx/logs') },
|
||||
{ name: 'Unbound', type: 'service', value: 'unbound', url: Client.makeURL('/api/v1/services/unbound/logs') },
|
||||
{ name: 'SFTP', type: 'service', value: 'sftp', url: Client.makeURL('/api/v1/services/sftp/logs') },
|
||||
{ name: 'TURN/STUN', type: 'service', value: 'turn', url: Client.makeURL('/api/v1/services/turn/logs') },
|
||||
];
|
||||
|
||||
$scope.selected = BUILT_IN_LOGS.find(function (e) { return e.value === ids.id; });
|
||||
callback();
|
||||
} else if (ids.crashId) {
|
||||
$scope.selected = {
|
||||
type: 'platform',
|
||||
value: 'crash-' + ids.crashId,
|
||||
name: 'Crash',
|
||||
url: Client.makeURL('/api/v1/cloudron/logs/crash-' + ids.crashId)
|
||||
};
|
||||
|
||||
callback();
|
||||
} else if (ids.appId) {
|
||||
Client.getApp(ids.appId, function (error, app) {
|
||||
if (error) return callback(error);
|
||||
|
||||
$scope.selectedAppInfo = app;
|
||||
|
||||
$scope.selected = {
|
||||
type: 'app',
|
||||
value: app.id,
|
||||
name: app.fqdn + ' (' + app.manifest.title + ')',
|
||||
url: Client.makeURL('/api/v1/apps/' + app.id + '/logs'),
|
||||
addons: app.manifest.addons
|
||||
};
|
||||
|
||||
callback();
|
||||
});
|
||||
} else if (ids.taskId) {
|
||||
Client.getTask(ids.taskId, function (error, task) {
|
||||
if (error) return callback(error);
|
||||
|
||||
$scope.selectedTaskInfo = task;
|
||||
|
||||
$scope.selected = {
|
||||
type: 'task',
|
||||
value: task.id,
|
||||
name: task.type,
|
||||
url: Client.makeURL('/api/v1/tasks/' + task.id + '/logs')
|
||||
};
|
||||
|
||||
callback();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function init() {
|
||||
|
||||
Client.getStatus(function (error, status) {
|
||||
if (error) return Client.initError(error, init);
|
||||
|
||||
if (!status.activated) {
|
||||
console.log('Not activated yet, redirecting', status);
|
||||
window.location.href = '/';
|
||||
return;
|
||||
}
|
||||
|
||||
// check version and force reload if needed
|
||||
if (!localStorage.version) {
|
||||
localStorage.version = status.version;
|
||||
} else if (localStorage.version !== status.version) {
|
||||
localStorage.version = status.version;
|
||||
window.location.reload(true);
|
||||
}
|
||||
|
||||
console.log('Running log version ', localStorage.version);
|
||||
|
||||
// get user profile as the first thing. this populates the "scope" and affects subsequent API calls
|
||||
Client.refreshUserInfo(function (error) {
|
||||
if (error) return Client.initError(error, init);
|
||||
|
||||
Client.refreshConfig(function (error) {
|
||||
if (error) return Client.initError(error, init);
|
||||
|
||||
select({ id: search.id, taskId: search.taskId, appId: search.appId, crashId: search.crashId }, function (error) {
|
||||
if (error) return Client.initError(error, init);
|
||||
|
||||
// now mark the Client to be ready
|
||||
Client.setReady();
|
||||
|
||||
$scope.initialized = true;
|
||||
|
||||
showLogs();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
init();
|
||||
|
||||
$translate([ 'logs.title' ]).then(function (tr) {
|
||||
if (tr['logs.title'] !== 'logs.title') window.document.title = tr['logs.title'];
|
||||
});
|
||||
}]);
|
||||
@@ -1,217 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/* global angular */
|
||||
/* global $ */
|
||||
|
||||
angular.module('Application').controller('MainController', ['$scope', '$route', '$timeout', '$location', '$interval', 'Notification', 'Client', function ($scope, $route, $timeout, $location, $interval, Notification, Client) {
|
||||
$scope.initialized = false; // used to animate the UI
|
||||
$scope.user = Client.getUserInfo();
|
||||
$scope.installedApps = Client.getInstalledApps();
|
||||
$scope.config = {};
|
||||
$scope.client = Client;
|
||||
$scope.subscription = {};
|
||||
$scope.notificationCount = 0;
|
||||
$scope.hideNavBarActions = $location.path() === '/logs';
|
||||
$scope.backgroundImageUrl = '';
|
||||
|
||||
$scope.reboot = {
|
||||
busy: false,
|
||||
|
||||
show: function () {
|
||||
$scope.reboot.busy = false;
|
||||
$('#rebootModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.reboot.busy = true;
|
||||
|
||||
Client.reboot(function (error) {
|
||||
if (error) return Client.error(error);
|
||||
|
||||
$('#rebootModal').modal('hide');
|
||||
|
||||
// trigger refetch to show offline banner
|
||||
$timeout(function () { Client.getStatus(function () {}); }, 5000);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.isActive = function (url) {
|
||||
if (!$route.current) return false;
|
||||
return $route.current.$$route.originalPath.indexOf(url) === 0;
|
||||
};
|
||||
|
||||
$scope.logout = function (event) {
|
||||
event.stopPropagation();
|
||||
$scope.initialized = false;
|
||||
Client.logout();
|
||||
};
|
||||
|
||||
$scope.openSubscriptionSetup = function () {
|
||||
Client.openSubscriptionSetup($scope.subscription);
|
||||
};
|
||||
|
||||
// NOTE: this function is exported and called from the appstore.js
|
||||
$scope.updateSubscriptionStatus = function () {
|
||||
Client.getSubscription(function (error, subscription) {
|
||||
if (error && error.statusCode === 412) return; // not yet registered
|
||||
if (error && error.statusCode === 402) return; // invalid appstore token
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.subscription = subscription;
|
||||
});
|
||||
};
|
||||
|
||||
function refreshNotifications() {
|
||||
if (!Client.getUserInfo().isAtLeastAdmin) return;
|
||||
|
||||
Client.getNotifications({ acknowledged: false }, 1, 100, function (error, results) { // counter maxes out at 100
|
||||
if (error) console.error(error);
|
||||
else $scope.notificationCount = results.length;
|
||||
});
|
||||
}
|
||||
|
||||
// update state of acknowledged notification
|
||||
$scope.notificationAcknowledged = function () {
|
||||
refreshNotifications();
|
||||
};
|
||||
|
||||
function redirectOnMandatory2FA() {
|
||||
if (Client.getConfig().mandatory2FA && !Client.getUserInfo().twoFactorAuthenticationEnabled) {
|
||||
$location.path('/profile').search({ setup2fa: true });
|
||||
}
|
||||
}
|
||||
|
||||
// Make it redirect if the browser URL is changed directly - https://forum.cloudron.io/topic/7510/bug-in-2fa-force
|
||||
$scope.$on('$routeChangeStart', function (/* event */) {
|
||||
if ($scope.initialized) redirectOnMandatory2FA();
|
||||
});
|
||||
|
||||
var gPlatformStatusNotification = null;
|
||||
function trackPlatformStatus() {
|
||||
Client.getPlatformStatus(function (error, result) {
|
||||
if (error) return console.error('Failed to get platform status.', error);
|
||||
|
||||
// see box/src/platform.js
|
||||
if (result.message === 'Ready') {
|
||||
if (gPlatformStatusNotification) {
|
||||
gPlatformStatusNotification.kill();
|
||||
gPlatformStatusNotification = null;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!gPlatformStatusNotification) {
|
||||
var options = { title: 'Platform status', message: result.message, delay: 'notimeout', replaceMessage: true, closeOnClick: false };
|
||||
|
||||
Notification.primary(options).then(function (result) {
|
||||
gPlatformStatusNotification = result;
|
||||
$timeout(trackPlatformStatus, 5000);
|
||||
});
|
||||
} else {
|
||||
gPlatformStatusNotification.message = result.message;
|
||||
$timeout(trackPlatformStatus, 5000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function init() {
|
||||
Client.getStatus(function (error, status) {
|
||||
if (error) return Client.initError(error, init);
|
||||
|
||||
// WARNING if anything about the routing is changed here test these use-cases:
|
||||
//
|
||||
// 1. Caas
|
||||
// 3. selfhosted restore
|
||||
// 4. local development with gulp develop
|
||||
|
||||
if (!status.activated) {
|
||||
console.log('Not activated yet, redirecting', status);
|
||||
if (status.restore.active || status.restore.errorMessage) { // show the error message in restore page
|
||||
window.location.href = '/restore.html' + window.location.search;
|
||||
} else {
|
||||
window.location.href = (status.adminFqdn ? '/setup.html' : '/setupdns.html') + window.location.search;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// support local development with localhost check
|
||||
if (window.location.hostname !== status.adminFqdn && window.location.hostname !== 'localhost' && !window.location.hostname.startsWith('192.')) {
|
||||
// user is accessing by IP or by the old admin location (pre-migration)
|
||||
window.location.href = '/setupdns.html' + window.location.search;
|
||||
return;
|
||||
}
|
||||
|
||||
// check version and force reload if needed
|
||||
if (!localStorage.version) {
|
||||
localStorage.version = status.version;
|
||||
} else if (localStorage.version !== status.version) {
|
||||
localStorage.version = status.version;
|
||||
window.location.reload(true);
|
||||
}
|
||||
|
||||
console.log('Running dashboard version ', localStorage.version);
|
||||
|
||||
// get user profile as the first thing. this populates the "scope" and affects subsequent API calls
|
||||
Client.refreshUserInfo(function (error) {
|
||||
if (error) return Client.initError(error, init);
|
||||
|
||||
Client.refreshConfig(function (error) {
|
||||
if (error) return Client.initError(error, init);
|
||||
|
||||
Client.refreshAvailableLanguages(function (error) {
|
||||
if (error) return Client.initError(error, init);
|
||||
|
||||
Client.refreshInstalledApps(function (error) {
|
||||
if (error) return Client.initError(error, init);
|
||||
|
||||
// now mark the Client to be ready
|
||||
Client.setReady();
|
||||
|
||||
$scope.config = Client.getConfig();
|
||||
|
||||
if (Client.getUserInfo().hasBackgroundImage) {
|
||||
document.getElementById('mainContentContainer').style.backgroundImage = 'url("' + Client.getBackgroundImageUrl() + '")';
|
||||
document.getElementById('mainContentContainer').classList.add('has-background');
|
||||
}
|
||||
|
||||
$scope.initialized = true;
|
||||
|
||||
redirectOnMandatory2FA();
|
||||
|
||||
$interval(refreshNotifications, 60 * 1000);
|
||||
refreshNotifications();
|
||||
|
||||
Client.getSubscription(function (error, subscription) {
|
||||
if (error && error.statusCode === 412) return; // not yet registered
|
||||
if (error && error.statusCode === 402) return; // invalid appstore token
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.subscription = subscription;
|
||||
|
||||
// only track platform status if we are registered
|
||||
trackPlatformStatus();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Client.onConfig(function (config) {
|
||||
if (config.cloudronName) {
|
||||
document.title = config.cloudronName;
|
||||
}
|
||||
});
|
||||
|
||||
init();
|
||||
|
||||
// setup all the dialog focus handling
|
||||
['updateModal'].forEach(function (id) {
|
||||
$('#' + id).on('shown.bs.modal', function () {
|
||||
$(this).find('[autofocus]:first').focus();
|
||||
});
|
||||
});
|
||||
}]);
|
||||
@@ -57,7 +57,7 @@ translateFilterFactory.displayName = 'translateFilterFactory';
|
||||
app.filter('tr', translateFilterFactory);
|
||||
|
||||
|
||||
app.controller('LoginController', ['$scope', '$translate', '$http', function ($scope, $translate, $http) {
|
||||
app.controller('PasswordResetController', ['$scope', '$translate', '$http', function ($scope, $translate, $http) {
|
||||
// Stupid angular location provider either wants html5 location mode or not, do the query parsing on my own
|
||||
var search = decodeURIComponent(window.location.search).slice(1).split('&').map(function (item) { return item.indexOf('=') === -1 ? [item, true] : [item.slice(0, item.indexOf('=')), item.slice(item.indexOf('=')+1)]; }).reduce(function (o, k) { o[k[0]] = k[1]; return o; }, {});
|
||||
|
||||
@@ -65,7 +65,7 @@ app.controller('LoginController', ['$scope', '$translate', '$http', function ($s
|
||||
$scope.mode = '';
|
||||
$scope.busy = false;
|
||||
$scope.error = false;
|
||||
$scope.status = null;
|
||||
$scope.branding = null;
|
||||
$scope.username = '';
|
||||
$scope.password = '';
|
||||
$scope.totpToken = '';
|
||||
@@ -74,38 +74,6 @@ app.controller('LoginController', ['$scope', '$translate', '$http', function ($s
|
||||
$scope.newPasswordRepeat = '';
|
||||
var API_ORIGIN = '<%= apiOrigin %>' || window.location.origin;
|
||||
|
||||
$scope.onLogin = function () {
|
||||
$scope.busy = true;
|
||||
$scope.error = false;
|
||||
|
||||
var data = {
|
||||
username: $scope.username,
|
||||
password: $scope.password,
|
||||
totpToken: $scope.totpToken
|
||||
};
|
||||
|
||||
function error() {
|
||||
$scope.busy = false;
|
||||
$scope.error = true;
|
||||
|
||||
$scope.password = '';
|
||||
$scope.loginForm.$setPristine();
|
||||
setTimeout(function () { $('#inputPassword').focus(); }, 200);
|
||||
}
|
||||
|
||||
$http.post(API_ORIGIN + '/api/v1/cloudron/login', data).success(function (data, status) {
|
||||
if (status !== 200) return error();
|
||||
|
||||
localStorage.token = data.accessToken;
|
||||
|
||||
// prevent redirecting to random domains
|
||||
var returnTo = search.returnTo || '/';
|
||||
if (returnTo.indexOf('/') !== 0) returnTo = '/';
|
||||
|
||||
window.location.href = returnTo;
|
||||
}).error(error);
|
||||
};
|
||||
|
||||
$scope.onPasswordReset = function () {
|
||||
$scope.busy = true;
|
||||
|
||||
@@ -113,12 +81,13 @@ app.controller('LoginController', ['$scope', '$translate', '$http', function ($s
|
||||
identifier: $scope.passwordResetIdentifier
|
||||
};
|
||||
|
||||
function done() {
|
||||
function done(error) {
|
||||
if (error) $scope.error = error.message;
|
||||
$scope.busy = false;
|
||||
$scope.mode = 'passwordResetDone';
|
||||
}
|
||||
|
||||
$http.post(API_ORIGIN + '/api/v1/cloudron/password_reset_request', data).success(done).error(done);
|
||||
$http.post(API_ORIGIN + '/api/v1/auth/password_reset_request', data).success(done).error(done);
|
||||
};
|
||||
|
||||
$scope.onNewPassword = function () {
|
||||
@@ -139,7 +108,7 @@ app.controller('LoginController', ['$scope', '$translate', '$http', function ($s
|
||||
else $scope.error = 'Unknown error';
|
||||
}
|
||||
|
||||
$http.post(API_ORIGIN + '/api/v1/cloudron/password_reset', data).success(function (data, status) {
|
||||
$http.post(API_ORIGIN + '/api/v1/auth/password_reset', data).success(function (data, status) {
|
||||
if (status !== 202) return error(data, status);
|
||||
|
||||
// set token to autologin
|
||||
@@ -158,28 +127,20 @@ app.controller('LoginController', ['$scope', '$translate', '$http', function ($s
|
||||
setTimeout(function () { $('#inputPasswordResetIdentifier').focus(); }, 200);
|
||||
};
|
||||
|
||||
$scope.showLogin = function () {
|
||||
if ($scope.status) window.document.title = $scope.status.cloudronName + ' Login';
|
||||
$scope.mode = 'login';
|
||||
$scope.error = false;
|
||||
setTimeout(function () { $('#inputUsername').focus(); }, 200);
|
||||
};
|
||||
|
||||
$scope.showNewPassword = function () {
|
||||
window.document.title = 'Set New Password';
|
||||
$scope.mode = 'newPassword';
|
||||
setTimeout(function () { $('#inputNewPassword').focus(); }, 200);
|
||||
};
|
||||
|
||||
$http.get(API_ORIGIN + '/api/v1/cloudron/status').success(function (data, status) {
|
||||
$http.get(API_ORIGIN + '/api/v1/auth/branding').success(function (data, status) {
|
||||
$scope.initialized = true;
|
||||
|
||||
if (status !== 200) return;
|
||||
|
||||
if (data.language) $translate.use(data.language);
|
||||
|
||||
if ($scope.mode === 'login') window.document.title = data.cloudronName + ' Login';
|
||||
$scope.status = data;
|
||||
$scope.branding = data;
|
||||
}).error(function () {
|
||||
$scope.initialized = false;
|
||||
});
|
||||
@@ -193,6 +154,6 @@ app.controller('LoginController', ['$scope', '$translate', '$http', function ($s
|
||||
localStorage.token = search.accessToken || search.access_token;
|
||||
window.location.href = '/';
|
||||
} else {
|
||||
$scope.showLogin();
|
||||
$scope.showPasswordReset();
|
||||
}
|
||||
}]);
|
||||
+39
-11
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
/* global $, angular, tld, SECRET_PLACEHOLDER, STORAGE_PROVIDERS, BACKUP_FORMATS */
|
||||
/* global REGIONS_S3, REGIONS_WASABI, REGIONS_DIGITALOCEAN, REGIONS_EXOSCALE, REGIONS_SCALEWAY, REGIONS_LINODE, REGIONS_OVH, REGIONS_IONOS, REGIONS_UPCLOUD, REGIONS_VULTR */
|
||||
/* global REGIONS_S3, REGIONS_WASABI, REGIONS_DIGITALOCEAN, REGIONS_EXOSCALE, REGIONS_SCALEWAY, REGIONS_LINODE, REGIONS_OVH, REGIONS_IONOS, REGIONS_UPCLOUD, REGIONS_VULTR, REGIONS_CONTABO */
|
||||
|
||||
// create main application module
|
||||
var app = angular.module('Application', ['pascalprecht.translate', 'ngCookies', 'angular-md5', 'ui-notification', 'ui.bootstrap']);
|
||||
@@ -41,6 +41,8 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
|
||||
$scope.encrypted = false; // only used if a backup config contains that flag
|
||||
$scope.setupToken = '';
|
||||
$scope.skipDnsSetup = false;
|
||||
$scope.disk = null;
|
||||
$scope.blockDevices = [];
|
||||
|
||||
$scope.mountOptions = {
|
||||
host: '',
|
||||
@@ -54,6 +56,11 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
|
||||
privateKey: ''
|
||||
};
|
||||
|
||||
$scope.$watch('disk', function (newValue) {
|
||||
if (!newValue) return;
|
||||
$scope.mountOptions.diskPath = '/dev/disk/by-uuid/' + newValue.uuid;
|
||||
});
|
||||
|
||||
$scope.sysinfo = {
|
||||
provider: 'generic',
|
||||
ipv4: '',
|
||||
@@ -85,6 +92,7 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
|
||||
$scope.ionosRegions = REGIONS_IONOS;
|
||||
$scope.upcloudRegions = REGIONS_UPCLOUD;
|
||||
$scope.vultrRegions = REGIONS_VULTR;
|
||||
$scope.contaboRegions = REGIONS_CONTABO;
|
||||
|
||||
$scope.storageProviders = STORAGE_PROVIDERS;
|
||||
|
||||
@@ -94,11 +102,12 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
|
||||
return provider === 's3' || provider === 'minio' || provider === 's3-v4-compat' || provider === 'exoscale-sos'
|
||||
|| provider === 'digitalocean-spaces' || provider === 'wasabi' || provider === 'scaleway-objectstorage'
|
||||
|| provider === 'linode-objectstorage' || provider === 'ovh-objectstorage' || provider === 'backblaze-b2' || provider === 'cloudflare-r2'
|
||||
|| provider === 'ionos-objectstorage' || provider === 'vultr-objectstorage' || provider === 'upcloud-objectstorage' || provider === 'idrive-e2';
|
||||
|| provider === 'ionos-objectstorage' || provider === 'vultr-objectstorage' || provider === 'upcloud-objectstorage' || provider === 'idrive-e2'
|
||||
|| provider === 'contabo-objectstorage';
|
||||
};
|
||||
|
||||
$scope.mountlike = function (provider) {
|
||||
return provider === 'sshfs' || provider === 'cifs' || provider === 'nfs' || provider === 'mountpoint' || provider === 'ext4' || provider === 'xfs';
|
||||
return provider === 'disk' || provider === 'sshfs' || provider === 'cifs' || provider === 'nfs' || provider === 'mountpoint' || provider === 'ext4' || provider === 'xfs';
|
||||
};
|
||||
|
||||
$scope.restore = function () {
|
||||
@@ -151,6 +160,10 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
|
||||
} else if (backupConfig.provider === 'vultr-objectstorage') {
|
||||
backupConfig.region = $scope.vultrRegions.find(function (x) { return x.value === $scope.endpoint; }).region;
|
||||
backupConfig.signatureVersion = 'v4';
|
||||
} else if (backupConfig.provider === 'contabo-objectstorage') {
|
||||
backupConfig.region = $scope.contaboRegions.find(function (x) { return x.value === $scope.endpoint; }).region;
|
||||
backupConfig.signatureVersion = 'v4';
|
||||
backupConfig.s3ForcePathStyle = true; // https://docs.contabo.com/docs/products/Object-Storage/technical-description (no virtual buckets)
|
||||
} else if (backupConfig.provider === 'upcloud-objectstorage') {
|
||||
var m = /^.*\.(.*)\.upcloudobjects.com$/.exec(backupConfig.endpoint);
|
||||
backupConfig.region = m ? m[1] : 'us-east-1'; // let it fail in validation phase if m is not valid
|
||||
@@ -195,7 +208,7 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
|
||||
backupConfig.mountOptions.port = $scope.mountOptions.port;
|
||||
backupConfig.mountOptions.privateKey = $scope.mountOptions.privateKey;
|
||||
}
|
||||
} else if (backupConfig.provider === 'ext4' || backupConfig.provider === 'xfs') {
|
||||
} else if (backupConfig.provider === 'disk' || backupConfig.provider === 'ext4' || backupConfig.provider === 'xfs') {
|
||||
backupConfig.mountOptions.diskPath = $scope.mountOptions.diskPath;
|
||||
} else if (backupConfig.provider === 'mountpoint') {
|
||||
backupConfig.mountPoint = $scope.mountPoint;
|
||||
@@ -230,7 +243,7 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
|
||||
provider: $scope.sysinfo.provider
|
||||
};
|
||||
if ($scope.sysinfo.provider === 'fixed') {
|
||||
sysinfoConfig.ipv4 = $scope.sysinfo.ipv4;
|
||||
sysinfoConfig.ip = $scope.sysinfo.ipv4;
|
||||
} else if ($scope.sysinfo.provider === 'network-interface') {
|
||||
sysinfoConfig.ifname = $scope.sysinfo.ifname;
|
||||
}
|
||||
@@ -284,7 +297,7 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
|
||||
function waitForRestore() {
|
||||
$scope.busy = true;
|
||||
|
||||
Client.getStatus(function (error, status) {
|
||||
Client.getProvisionStatus(function (error, status) {
|
||||
if (!error && !status.restore.active) { // restore finished
|
||||
if (status.restore.errorMessage) {
|
||||
$scope.busy = false;
|
||||
@@ -346,7 +359,7 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
|
||||
};
|
||||
|
||||
function init() {
|
||||
Client.getStatus(function (error, status) {
|
||||
Client.getProvisionStatus(function (error, status) {
|
||||
if (error) return Client.initError(error, init);
|
||||
|
||||
if (status.restore.active) return waitForRestore();
|
||||
@@ -358,10 +371,25 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.status = status;
|
||||
$scope.instanceId = search.instanceId;
|
||||
$scope.setupToken = search.setupToken;
|
||||
$scope.initialized = true;
|
||||
Client.getProvisionBlockDevices(function (error, result) {
|
||||
if (error) {
|
||||
console.error('Failed to list blockdevices:', error);
|
||||
} else {
|
||||
// only offer non /, /boot or /home disks
|
||||
result = result.filter(function (d) { return d.mountpoint !== '/' && d.mountpoint !== '/home' && d.mountpoint !== '/boot'; });
|
||||
// only offer xfs and ext4 disks
|
||||
result = result.filter(function (d) { return d.type === 'xfs' || d.type === 'ext4'; });
|
||||
|
||||
// amend label for UI
|
||||
result.forEach(function (d) { d.label = d.path; });
|
||||
}
|
||||
|
||||
$scope.blockDevices = result;
|
||||
|
||||
$scope.instanceId = search.instanceId;
|
||||
$scope.setupToken = search.setupToken;
|
||||
$scope.initialized = true;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -71,22 +71,24 @@ app.controller('SetupController', ['$scope', 'Client', function ($scope, Client)
|
||||
return;
|
||||
}
|
||||
|
||||
// if we are here from the ip first go to the real domain if already setup
|
||||
// if we are here from https://ip/setup.html ,go to https://admin/setup.html
|
||||
if (status.adminFqdn && status.adminFqdn !== window.location.hostname) {
|
||||
window.location.href = 'https://' + status.adminFqdn + '/setup.html';
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// if we don't have a domain yet, first go to domain setup
|
||||
if (!status.adminFqdn) {
|
||||
window.location.href = '/setupdns.html';
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (status.activated) {
|
||||
window.location.href = '/';
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function setView(view) {
|
||||
@@ -98,10 +100,10 @@ app.controller('SetupController', ['$scope', 'Client', function ($scope, Client)
|
||||
}
|
||||
|
||||
function init() {
|
||||
Client.getStatus(function (error, status) {
|
||||
Client.getProvisionStatus(function (error, status) {
|
||||
if (error) return Client.initError(error, init);
|
||||
|
||||
redirectIfNeeded(status);
|
||||
if (redirectIfNeeded(status)) return;
|
||||
setView(search.view);
|
||||
|
||||
$scope.setupToken = search.setupToken;
|
||||
|
||||
@@ -70,7 +70,7 @@ app.controller('SetupAccountController', ['$scope', '$translate', '$http', funct
|
||||
$scope.busy = false;
|
||||
$scope.error = null;
|
||||
$scope.view = 'setup';
|
||||
$scope.status = null;
|
||||
$scope.branding = null;
|
||||
|
||||
$scope.profileLocked = !!search.profileLocked;
|
||||
$scope.existingUsername = !!search.username;
|
||||
@@ -119,7 +119,7 @@ app.controller('SetupAccountController', ['$scope', '$translate', '$http', funct
|
||||
}
|
||||
}
|
||||
|
||||
$http.post(API_ORIGIN + '/api/v1/cloudron/setup_account', data).success(function (data, status) {
|
||||
$http.post(API_ORIGIN + '/api/v1/auth/setup_account', data).success(function (data, status) {
|
||||
if (status !== 201) return error(data, status);
|
||||
|
||||
// set token to autologin
|
||||
@@ -133,14 +133,14 @@ app.controller('SetupAccountController', ['$scope', '$translate', '$http', funct
|
||||
$scope.view = 'noUsername';
|
||||
$scope.initialized = true;
|
||||
} else {
|
||||
$http.get(API_ORIGIN + '/api/v1/cloudron/status').success(function (data, status) {
|
||||
$http.get(API_ORIGIN + '/api/v1/auth/branding').success(function (data, status) {
|
||||
$scope.initialized = true;
|
||||
|
||||
if (status !== 200) return;
|
||||
|
||||
if (data.language) $translate.use(data.language);
|
||||
|
||||
$scope.status = data;
|
||||
$scope.branding = data;
|
||||
}).error(function () {
|
||||
$scope.initialized = false;
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
/* global $, tld, angular, Clipboard */
|
||||
/* global $, tld, angular, Clipboard, ENDPOINTS_OVH */
|
||||
|
||||
// create main application module
|
||||
var app = angular.module('Application', ['pascalprecht.translate', 'ngCookies', 'angular-md5', 'ui-notification', 'ui.bootstrap']);
|
||||
@@ -55,6 +55,8 @@ app.controller('SetupDNSController', ['$scope', '$http', '$timeout', 'Client', f
|
||||
}
|
||||
};
|
||||
|
||||
$scope.ovhEndpoints = ENDPOINTS_OVH;
|
||||
|
||||
$scope.needsPort80 = function (dnsProvider, tlsProvider) {
|
||||
return ((dnsProvider === 'manual' || dnsProvider === 'noop' || dnsProvider === 'wildcard') &&
|
||||
(tlsProvider === 'letsencrypt-prod' || tlsProvider === 'letsencrypt-staging'));
|
||||
@@ -79,8 +81,10 @@ app.controller('SetupDNSController', ['$scope', '$http', '$timeout', 'Client', f
|
||||
// keep in sync with domains.js
|
||||
$scope.dnsProvider = [
|
||||
{ name: 'AWS Route53', value: 'route53' },
|
||||
{ name: 'Bunny', value: 'bunny' },
|
||||
{ name: 'Cloudflare', value: 'cloudflare' },
|
||||
{ name: 'DigitalOcean', value: 'digitalocean' },
|
||||
{ name: 'DNSimple', value: 'dnsimple' },
|
||||
{ name: 'Gandi LiveDNS', value: 'gandi' },
|
||||
{ name: 'GoDaddy', value: 'godaddy' },
|
||||
{ name: 'Google Cloud DNS', value: 'gcdns' },
|
||||
@@ -89,6 +93,7 @@ app.controller('SetupDNSController', ['$scope', '$http', '$timeout', 'Client', f
|
||||
{ name: 'Name.com', value: 'namecom' },
|
||||
{ name: 'Namecheap', value: 'namecheap' },
|
||||
{ name: 'Netcup', value: 'netcup' },
|
||||
{ name: 'OVH', value: 'ovh' },
|
||||
{ name: 'Porkbun', value: 'porkbun' },
|
||||
{ name: 'Vultr', value: 'vultr' },
|
||||
{ name: 'Wildcard', value: 'wildcard' },
|
||||
@@ -110,6 +115,8 @@ app.controller('SetupDNSController', ['$scope', '$http', '$timeout', 'Client', f
|
||||
godaddyApiKey: '',
|
||||
godaddyApiSecret: '',
|
||||
linodeToken: '',
|
||||
bunnyAccessKey: '',
|
||||
dnsimpleAccessToken: '',
|
||||
hetznerToken: '',
|
||||
vultrToken: '',
|
||||
nameComUsername: '',
|
||||
@@ -119,6 +126,10 @@ app.controller('SetupDNSController', ['$scope', '$http', '$timeout', 'Client', f
|
||||
netcupCustomerNumber: '',
|
||||
netcupApiKey: '',
|
||||
netcupApiPassword: '',
|
||||
ovhEndpoint: 'ovh-eu',
|
||||
ovhConsumerKey: '',
|
||||
ovhAppKey: '',
|
||||
ovhAppSecret: '',
|
||||
porkbunSecretapikey: '',
|
||||
porkbunApikey: '',
|
||||
|
||||
@@ -200,6 +211,10 @@ app.controller('SetupDNSController', ['$scope', '$http', '$timeout', 'Client', f
|
||||
config.defaultProxyStatus = $scope.dnsCredentials.cloudflareDefaultProxyStatus;
|
||||
} else if (provider === 'linode') {
|
||||
config.token = $scope.dnsCredentials.linodeToken;
|
||||
} else if (provider === 'bunny') {
|
||||
config.accessKey = $scope.dnsCredentials.bunnyAccessKey;
|
||||
} else if (provider === 'dnsimple') {
|
||||
config.accessToken = $scope.dnsCredentials.dnsimpleAccessToken;
|
||||
} else if (provider === 'hetzner') {
|
||||
config.token = $scope.dnsCredentials.hetznerToken;
|
||||
} else if (provider === 'vultr') {
|
||||
@@ -214,6 +229,11 @@ app.controller('SetupDNSController', ['$scope', '$http', '$timeout', 'Client', f
|
||||
config.customerNumber = $scope.dnsCredentials.netcupCustomerNumber;
|
||||
config.apiKey = $scope.dnsCredentials.netcupApiKey;
|
||||
config.apiPassword = $scope.dnsCredentials.netcupApiPassword;
|
||||
} else if (provider === 'ovh') {
|
||||
config.endpoint = $scope.dnsCredentials.ovhEndpoint;
|
||||
config.consumerKey = $scope.dnsCredentials.ovhConsumerKey;
|
||||
config.appKey = $scope.dnsCredentials.ovhAppKey;
|
||||
config.appSecret = $scope.dnsCredentials.ovhAppSecret;
|
||||
} else if (provider === 'porkbun') {
|
||||
config.apikey = $scope.dnsCredentials.porkbunApikey;
|
||||
config.secretapikey = $scope.dnsCredentials.porkbunSecretapikey;
|
||||
@@ -232,7 +252,7 @@ app.controller('SetupDNSController', ['$scope', '$http', '$timeout', 'Client', f
|
||||
provider: $scope.sysinfo.provider
|
||||
};
|
||||
if ($scope.sysinfo.provider === 'fixed') {
|
||||
sysinfoConfig.ipv4 = $scope.sysinfo.ipv4;
|
||||
sysinfoConfig.ip = $scope.sysinfo.ipv4;
|
||||
} else if ($scope.sysinfo.provider === 'network-interface') {
|
||||
sysinfoConfig.ifname = $scope.sysinfo.ifname;
|
||||
}
|
||||
@@ -245,7 +265,7 @@ app.controller('SetupDNSController', ['$scope', '$http', '$timeout', 'Client', f
|
||||
config: config,
|
||||
tlsConfig: tlsConfig
|
||||
},
|
||||
sysinfoConfig: sysinfoConfig,
|
||||
ipv4Config: sysinfoConfig,
|
||||
providerToken: $scope.instanceId,
|
||||
setupToken: $scope.setupToken
|
||||
};
|
||||
@@ -272,7 +292,7 @@ app.controller('SetupDNSController', ['$scope', '$http', '$timeout', 'Client', f
|
||||
function waitForDnsSetup() {
|
||||
$scope.state = 'waitingForDnsSetup';
|
||||
|
||||
Client.getStatus(function (error, status) {
|
||||
Client.getProvisionStatus(function (error, status) {
|
||||
if (!error && !status.setup.active) {
|
||||
if (!status.adminFqdn || status.setup.errorMessage) { // setup reset or errored. start over
|
||||
$scope.error.setup = status.setup.errorMessage;
|
||||
@@ -291,7 +311,7 @@ app.controller('SetupDNSController', ['$scope', '$http', '$timeout', 'Client', f
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
Client.getStatus(function (error, status) {
|
||||
Client.getProvisionStatus(function (error, status) {
|
||||
if (error) {
|
||||
// During domain migration, the box code restarts and can result in getStatus() failing temporarily
|
||||
console.error(error);
|
||||
|
||||
@@ -1,376 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/* global angular, $, Terminal, AttachAddon, FitAddon, ISTATES */
|
||||
|
||||
// create main application module
|
||||
angular.module('Application', ['pascalprecht.translate', 'ngCookies', 'angular-md5', 'ui-notification']);
|
||||
|
||||
angular.module('Application').controller('TerminalController', ['$scope', '$translate', '$timeout', '$location', 'Client', function ($scope, $translate, $timeout, $location, Client) {
|
||||
var search = decodeURIComponent(window.location.search).slice(1).split('&').map(function (item) { return item.split('='); }).reduce(function (o, k) { o[k[0]] = k[1]; return o; }, {});
|
||||
|
||||
$scope.config = Client.getConfig();
|
||||
$scope.user = Client.getUserInfo();
|
||||
|
||||
$scope.apps = [];
|
||||
$scope.selected = '';
|
||||
$scope.terminal = null;
|
||||
$scope.terminalSocket = null;
|
||||
$scope.fitAddon = null;
|
||||
$scope.restartAppBusy = false;
|
||||
$scope.appBusy = false;
|
||||
$scope.selectedAppInfo = null;
|
||||
$scope.schedulerTasks = [];
|
||||
|
||||
$scope.downloadFile = {
|
||||
error: '',
|
||||
filePath: '',
|
||||
busy: false,
|
||||
|
||||
downloadUrl: function () {
|
||||
if (!$scope.downloadFile.filePath) return '';
|
||||
|
||||
var filePath = encodeURIComponent($scope.downloadFile.filePath);
|
||||
|
||||
return Client.apiOrigin + '/api/v1/apps/' + $scope.selected.value + '/download?file=' + filePath + '&access_token=' + Client.getToken();
|
||||
},
|
||||
|
||||
show: function () {
|
||||
$scope.downloadFile.busy = false;
|
||||
$scope.downloadFile.error = '';
|
||||
$scope.downloadFile.filePath = '';
|
||||
$('#downloadFileModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.downloadFile.busy = true;
|
||||
|
||||
Client.checkDownloadableFile($scope.selected.value, $scope.downloadFile.filePath, function (error) {
|
||||
$scope.downloadFile.busy = false;
|
||||
|
||||
if (error) {
|
||||
$scope.downloadFile.error = 'The requested file does not exist.';
|
||||
return;
|
||||
}
|
||||
|
||||
// we have to click the link to make the browser do the download
|
||||
// don't know how to prevent the browsers
|
||||
$('#fileDownloadLink')[0].click();
|
||||
|
||||
$('#downloadFileModal').modal('hide');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.uploadProgress = {
|
||||
busy: false,
|
||||
total: 0,
|
||||
current: 0,
|
||||
|
||||
show: function () {
|
||||
$scope.uploadProgress.total = 0;
|
||||
$scope.uploadProgress.current = 0;
|
||||
|
||||
$('#uploadProgressModal').modal('show');
|
||||
},
|
||||
|
||||
hide: function () {
|
||||
$('#uploadProgressModal').modal('hide');
|
||||
}
|
||||
};
|
||||
|
||||
$scope.uploadFile = function () {
|
||||
var fileUpload = document.querySelector('#fileUpload');
|
||||
|
||||
fileUpload.onchange = function (e) {
|
||||
if (e.target.files.length === 0) return;
|
||||
|
||||
$scope.uploadProgress.busy = true;
|
||||
$scope.uploadProgress.show();
|
||||
|
||||
Client.uploadFile($scope.selected.value, e.target.files[0], function progress(e) {
|
||||
$scope.uploadProgress.total = e.total;
|
||||
$scope.uploadProgress.current = e.loaded;
|
||||
}, function (error) {
|
||||
if (error) console.error(error);
|
||||
|
||||
$scope.uploadProgress.busy = false;
|
||||
$scope.uploadProgress.hide();
|
||||
});
|
||||
};
|
||||
|
||||
fileUpload.click();
|
||||
};
|
||||
|
||||
$scope.usesAddon = function (addon) {
|
||||
if (!$scope.selected || !$scope.selected.addons) return false;
|
||||
return !!Object.keys($scope.selected.addons).find(function (a) { return a === addon; });
|
||||
};
|
||||
|
||||
function reset() {
|
||||
if ($scope.terminal) {
|
||||
$scope.terminal.dispose();
|
||||
$scope.terminal = null;
|
||||
}
|
||||
|
||||
if ($scope.terminalSocket) {
|
||||
$scope.terminalSocket = null;
|
||||
}
|
||||
|
||||
$scope.selectedAppInfo = null;
|
||||
}
|
||||
|
||||
$scope.restartApp = function () {
|
||||
$scope.restartAppBusy = true;
|
||||
$scope.appBusy = true;
|
||||
|
||||
var appId = $scope.selected.value;
|
||||
|
||||
function waitUntilRestarted(callback) {
|
||||
refreshApp(appId, function (error, result) {
|
||||
if (error) return callback(error);
|
||||
|
||||
if (result.installationState === ISTATES.INSTALLED) return callback();
|
||||
setTimeout(waitUntilRestarted.bind(null, callback), 2000);
|
||||
});
|
||||
}
|
||||
|
||||
Client.restartApp(appId, function (error) {
|
||||
if (error) console.error('Failed to restart app.', error);
|
||||
|
||||
waitUntilRestarted(function (error) {
|
||||
if (error) console.error('Failed wait for restart.', error);
|
||||
|
||||
$scope.restartAppBusy = false;
|
||||
$scope.appBusy = false;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
function createTerminalSocket(callback) {
|
||||
var appId = $scope.selected.value;
|
||||
|
||||
Client.createExec(appId, { cmd: [ '/bin/bash' ], tty: true, lang: 'C.UTF-8' }, function (error, execId) {
|
||||
if (error) return callback(error);
|
||||
|
||||
try {
|
||||
// websocket cannot use relative urls
|
||||
var url = Client.apiOrigin.replace('https', 'wss') + '/api/v1/apps/' + appId + '/exec/' + execId + '/startws?tty=true&rows=' + $scope.terminal.rows + '&columns=' + $scope.terminal.cols + '&access_token=' + Client.getToken();
|
||||
$scope.terminalSocket = new WebSocket(url);
|
||||
$scope.terminal.loadAddon(new AttachAddon.AttachAddon($scope.terminalSocket));
|
||||
|
||||
$scope.terminalSocket.onclose = function () {
|
||||
// retry in one second
|
||||
$scope.terminalReconnectTimeout = setTimeout(function () {
|
||||
showTerminal(true);
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
callback();
|
||||
} catch (e) {
|
||||
callback(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function refreshApp(id, callback) {
|
||||
Client.getApp(id, function (error, result) {
|
||||
if (error) return callback(error);
|
||||
|
||||
$scope.selectedAppInfo = result;
|
||||
|
||||
callback(null, result);
|
||||
});
|
||||
}
|
||||
|
||||
function showTerminal(retry) {
|
||||
reset();
|
||||
|
||||
if (!$scope.selected) return;
|
||||
|
||||
var appId = $scope.selected.value;
|
||||
|
||||
refreshApp(appId, function (error) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
var result = $scope.selectedAppInfo;
|
||||
|
||||
$scope.schedulerTasks = result.manifest.addons.scheduler ? Object.keys(result.manifest.addons.scheduler).map(function (k) { return { name: k, command: result.manifest.addons.scheduler[k].command }; }) : [];
|
||||
|
||||
$scope.terminal = new Terminal();
|
||||
|
||||
$scope.fitAddon = new FitAddon.FitAddon();
|
||||
$scope.terminal.loadAddon($scope.fitAddon);
|
||||
|
||||
$scope.terminal.open(document.querySelector('#terminalContainer'));
|
||||
|
||||
window.terminal = $scope.terminal;
|
||||
|
||||
// Let the browser handle paste
|
||||
$scope.terminal.attachCustomKeyEventHandler(function (e) {
|
||||
if (e.key === 'v' && (e.ctrlKey || e.metaKey)) return false;
|
||||
});
|
||||
|
||||
if (retry) $scope.terminal.writeln('Reconnecting...');
|
||||
else $scope.terminal.writeln('Connecting...');
|
||||
|
||||
// we have to give it some time to setup the terminal to make it fit, there is no event unfortunately
|
||||
setTimeout(function () {
|
||||
if (!$scope.terminal) return;
|
||||
|
||||
// this is here so that the text wraps correctly after the fit!
|
||||
// var YELLOW = '\u001b[33m'; // https://gist.github.com/dainkaplan/4651352
|
||||
// var NC = '\u001b[0m';
|
||||
// $scope.terminal.writeln(YELLOW + 'If you resize the browser window, press Ctrl+D to start a new session with the current size.' + NC);
|
||||
|
||||
// we have to first write something on reconnect after app restart..not sure why
|
||||
$scope.fitAddon.fit();
|
||||
|
||||
// create exec container after we fit() since we cannot resize exec container post-creation
|
||||
createTerminalSocket(function (error) { if (error) console.error(error); });
|
||||
|
||||
$scope.terminal.focus();
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
|
||||
$scope.terminalInject = function (addon, extra) {
|
||||
if (!$scope.terminalSocket) return;
|
||||
|
||||
var cmd, manifestVersion = $scope.selected.manifest.manifestVersion;
|
||||
if (addon === 'mysql') {
|
||||
if (manifestVersion === 1) {
|
||||
cmd = 'mysql --user=${MYSQL_USERNAME} --password=${MYSQL_PASSWORD} --host=${MYSQL_HOST} ${MYSQL_DATABASE}';
|
||||
} else {
|
||||
cmd = 'mysql --user=${CLOUDRON_MYSQL_USERNAME} --password=${CLOUDRON_MYSQL_PASSWORD} --host=${CLOUDRON_MYSQL_HOST} ${CLOUDRON_MYSQL_DATABASE}';
|
||||
}
|
||||
} else if (addon === 'postgresql') {
|
||||
if (manifestVersion === 1) {
|
||||
cmd = 'PGPASSWORD=${POSTGRESQL_PASSWORD} psql -h ${POSTGRESQL_HOST} -p ${POSTGRESQL_PORT} -U ${POSTGRESQL_USERNAME} -d ${POSTGRESQL_DATABASE}';
|
||||
} else {
|
||||
cmd = 'PGPASSWORD=${CLOUDRON_POSTGRESQL_PASSWORD} psql -h ${CLOUDRON_POSTGRESQL_HOST} -p ${CLOUDRON_POSTGRESQL_PORT} -U ${CLOUDRON_POSTGRESQL_USERNAME} -d ${CLOUDRON_POSTGRESQL_DATABASE}';
|
||||
}
|
||||
} else if (addon === 'mongodb') {
|
||||
if (manifestVersion === 1) {
|
||||
cmd = 'mongo -u "${MONGODB_USERNAME}" -p "${MONGODB_PASSWORD}" ${MONGODB_HOST}:${MONGODB_PORT}/${MONGODB_DATABASE}';
|
||||
} else {
|
||||
cmd = 'mongosh -u "${CLOUDRON_MONGODB_USERNAME}" -p "${CLOUDRON_MONGODB_PASSWORD}" ${CLOUDRON_MONGODB_HOST}:${CLOUDRON_MONGODB_PORT}/${CLOUDRON_MONGODB_DATABASE}';
|
||||
}
|
||||
} else if (addon === 'redis') {
|
||||
if (manifestVersion === 1) {
|
||||
cmd = 'redis-cli -h "${REDIS_HOST}" -p "${REDIS_PORT}" -a "${REDIS_PASSWORD}"';
|
||||
} else {
|
||||
cmd = 'redis-cli -h "${CLOUDRON_REDIS_HOST}" -p "${CLOUDRON_REDIS_PORT}" -a "${CLOUDRON_REDIS_PASSWORD}"';
|
||||
}
|
||||
} else if (addon === 'scheduler' && extra) {
|
||||
cmd = extra.command;
|
||||
}
|
||||
|
||||
if (!cmd) return;
|
||||
|
||||
cmd += ' ';
|
||||
|
||||
$scope.terminalSocket.send(cmd);
|
||||
$scope.terminal.focus();
|
||||
};
|
||||
|
||||
// terminal right click handling
|
||||
$scope.terminalClear = function () {
|
||||
if (!$scope.terminal) return;
|
||||
$scope.terminal.clear();
|
||||
$scope.terminal.focus();
|
||||
};
|
||||
|
||||
$scope.terminalCopy = function () {
|
||||
if (!$scope.terminal) return;
|
||||
|
||||
// execCommand('copy') would copy any selection from the page, so do this only if terminal has a selection
|
||||
if (!$scope.terminal.getSelection()) return;
|
||||
|
||||
document.execCommand('copy');
|
||||
$scope.terminal.focus();
|
||||
};
|
||||
|
||||
$('.contextMenuBackdrop').on('click', function () {
|
||||
$('#terminalContextMenu').hide();
|
||||
$('.contextMenuBackdrop').hide();
|
||||
|
||||
$scope.terminal.focus();
|
||||
});
|
||||
|
||||
$('#terminalContainer').on('contextmenu', function (e) {
|
||||
if (!$scope.terminal) return true;
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
$('.contextMenuBackdrop').show();
|
||||
$('#terminalContextMenu').css({
|
||||
display: 'block',
|
||||
left: e.pageX,
|
||||
top: e.pageY
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
window.addEventListener('resize', function () {
|
||||
if ($scope.fitAddon) $scope.fitAddon.fit();
|
||||
});
|
||||
|
||||
Client.getStatus(function (error, status) {
|
||||
if (error) return $scope.error(error);
|
||||
|
||||
if (!status.activated) {
|
||||
console.log('Not activated yet, closing or redirecting', status);
|
||||
window.close();
|
||||
window.location.href = '/';
|
||||
return;
|
||||
}
|
||||
|
||||
// check version and force reload if needed
|
||||
if (!localStorage.version) {
|
||||
localStorage.version = status.version;
|
||||
} else if (localStorage.version !== status.version) {
|
||||
localStorage.version = status.version;
|
||||
window.location.reload(true);
|
||||
}
|
||||
|
||||
console.log('Running terminal version ', localStorage.version);
|
||||
|
||||
// get user profile as the first thing. this populates the "scope" and affects subsequent API calls
|
||||
Client.refreshUserInfo(function (error) {
|
||||
if (error) return $scope.error(error);
|
||||
|
||||
Client.refreshConfig(function (error) {
|
||||
if (error) return $scope.error(error);
|
||||
|
||||
refreshApp(search.id, function (error, app) {
|
||||
$scope.selected = {
|
||||
type: 'app',
|
||||
value: app.id,
|
||||
name: app.fqdn + ' (' + app.manifest.title + ')',
|
||||
addons: app.manifest.addons,
|
||||
manifest: app.manifest
|
||||
};
|
||||
|
||||
// now mark the Client to be ready
|
||||
Client.setReady();
|
||||
|
||||
$scope.initialized = true;
|
||||
|
||||
showTerminal();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$translate([ 'terminal.title' ]).then(function (tr) {
|
||||
if (tr['terminal.title'] !== 'terminal.title') window.document.title = tr['terminal.title'];
|
||||
});
|
||||
|
||||
// setup all the dialog focus handling
|
||||
['downloadFileModal'].forEach(function (id) {
|
||||
$('#' + id).on('shown.bs.modal', function () {
|
||||
$(this).find('[autofocus]:first').focus();
|
||||
});
|
||||
});
|
||||
}]);
|
||||
@@ -1,83 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html ng-app="Application" ng-controller="LogsController">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
|
||||
|
||||
<title> Logs </title>
|
||||
|
||||
<link id="favicon" href="/api/v1/cloudron/avatar" rel="icon" type="image/png">
|
||||
<link rel="apple-touch-icon" href="/api/v1/cloudron/avatar">
|
||||
<link rel="icon" href="/api/v1/cloudron/avatar">
|
||||
|
||||
<!-- CSS -->
|
||||
<link type="text/css" rel="stylesheet" href="/3rdparty/angular-ui-notification.css?<%= revision %>"/>
|
||||
<link type="text/css" rel="stylesheet" href="/theme.css?<%= revision %>">
|
||||
|
||||
<!-- Fontawesome -->
|
||||
<link type="text/css" rel="stylesheet" href="/3rdparty/fontawesome/css/all.css?<%= revision %>"/>
|
||||
|
||||
<!-- jQuery-->
|
||||
<script type="text/javascript" src="/3rdparty/js/jquery.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- async -->
|
||||
<script type="text/javascript" src="/3rdparty/js/async-3.2.0.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Bootstrap Core JavaScript -->
|
||||
<script type="text/javascript" src="/3rdparty/js/bootstrap.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Angularjs scripts -->
|
||||
<script type="text/javascript" src="/3rdparty/js/angular.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-loader.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-cookies.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-animate.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-base64.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-md5.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-sanitize.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-ui-notification.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Angular directives for bootstrap https://angular-ui.github.io/bootstrap/ -->
|
||||
<script type="text/javascript" src="/3rdparty/js/ui-bootstrap-tpls-1.3.3.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Angular translate https://angular-translate.github.io/ -->
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-translate.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-translate-loader-static-files.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-translate-storage-cookie.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-translate-storage-local.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Showdown (markdown converter) -->
|
||||
<script type="text/javascript" src="/3rdparty/js/showdown-1.9.1.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- colors -->
|
||||
<script type="text/javascript" src="/3rdparty/js/colors.js?<%= revision %>"></script>
|
||||
|
||||
<!-- moment -->
|
||||
<script type="text/javascript" src="/3rdparty/js/moment.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Main Application -->
|
||||
<script type="text/javascript" src="/js/logs.js?<%= revision %>"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="logs">
|
||||
|
||||
<a class="offline-banner animateMe" ng-show="client.offline" ng-cloak href="https://docs.cloudron.io/troubleshooting/" target="_blank"><i class="fa fa-circle-notch fa-spin"></i> {{ 'main.offline' | tr }}</a>
|
||||
|
||||
<div class="animateMe ng-hide layout-root" ng-show="initialized">
|
||||
<div class="logs-controls">
|
||||
<h3 style="display: inline-block;">{{ selected.name }}</h3>
|
||||
|
||||
<!-- logs actions -->
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" ng-href="{{ '/terminal.html?id=' + selected.value }}" target="_blank" ng-show="selected.type === 'app'"><i class="fa fa-terminal"></i> {{ 'terminal.title' | tr }}</a>
|
||||
<a class="btn btn-primary" ng-href="{{ '/filemanager.html?type=app&id=' + selected.value }}" target="_blank" ng-show="selected.type === 'app'"><i class="fas fa-folder"></i> {{ 'filemanager.title' | tr }}</a>
|
||||
<a class="btn btn-primary" ng-click="clear()"><i class="fa fa-trash"></i> {{ 'logs.clear' | tr }}</a>
|
||||
<a class="btn btn-primary" ng-href="{{ selected.url }}&format=short&lines=-1"><i class="fa fa-download"></i> {{ 'logs.download' | tr }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="logs-container"></div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,6 +5,7 @@
|
||||
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
|
||||
|
||||
<title>Cloudron - Not Found</title>
|
||||
<meta name="description" content="Cloudron - Not Found">
|
||||
|
||||
<!-- Use static style as we can't include local stylesheets -->
|
||||
<style>
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src <%= apiOrigin %> 'unsafe-inline' 'unsafe-eval' 'self'; img-src <%= apiOrigin %> 'self'" />
|
||||
|
||||
<!-- this gets changed once we get the status (because angular has not loaded yet, we see template string for a flash) -->
|
||||
<title>‎</title>
|
||||
<title>Cloudron Password Reset</title>
|
||||
<meta name="description" content="Cloudron Password Reset">
|
||||
|
||||
<link id="favicon" href="<%= apiOrigin %>/api/v1/cloudron/avatar" rel="icon" type="image/png">
|
||||
|
||||
@@ -46,52 +47,14 @@
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-translate-storage-local.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Setup Application -->
|
||||
<script type="text/javascript" src="/js/login.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/js/passwordreset.js?<%= revision %>"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body ng-app="Application" ng-controller="LoginController">
|
||||
<body ng-app="Application" ng-controller="PasswordResetController">
|
||||
|
||||
<div class="layout-root ng-cloak" ng-show="initialized">
|
||||
|
||||
<div class="layout-content" ng-show="mode === 'login'">
|
||||
<div class="card" style="padding: 20px; margin-top: 100px; max-width: 620px;">
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: center;">
|
||||
<img width="128" height="128" style="margin-top: -84px" src="<%= apiOrigin %>/api/v1/cloudron/avatar"/>
|
||||
<br/>
|
||||
<h1><small>{{ 'login.loginTo' | tr }}</small> {{ status.cloudronName || 'Cloudron' }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h4 class="has-error" ng-show="error">{{ 'login.errorIncorrectCredentials' | tr }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<form name="loginForm" ng-submit="onLogin()">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="inputUsername">{{ 'login.username' | tr }}</label>
|
||||
<input type="text" class="form-control" id="inputUsername" name="username" ng-model="username" ng-disabled="busy" autofocus required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="inputPassword">{{ 'login.password' | tr }}</label>
|
||||
<input type="password" class="form-control" name="password" id="inputPassword" ng-model="password" ng-disabled="busy" required password-reveal>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="inputTotpToken">{{ 'login.2faToken' | tr }}</label>
|
||||
<input type="text" class="form-control" name="totpToken" id="inputTotpToken" ng-model="totpToken" ng-disabled="busy" value="">
|
||||
</div>
|
||||
<button class="btn btn-primary btn-outline pull-right" type="submit" ng-disabled="busy || loginForm.$invalid"><i class="fa fa-circle-notch fa-spin" ng-show="busy"></i> {{ 'login.signInAction' | tr }}</button>
|
||||
</form>
|
||||
<a ng-href="" class="hand" ng-click="showPasswordReset()">{{ 'login.resetPasswordAction' | tr }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layout-content" ng-show="mode === 'passwordReset'">
|
||||
<div class="card" style="padding: 20px; margin-top: 100px; max-width: 620px;">
|
||||
<div class="row">
|
||||
@@ -110,9 +73,11 @@
|
||||
<input type="text" class="form-control" id="inputPasswordResetIdentifier" name="passwordResetIdentifier" ng-model="passwordResetIdentifier" ng-disabled="busy" autofocus required>
|
||||
</div>
|
||||
<br/>
|
||||
<button class="btn btn-primary btn-outline pull-right" type="submit" ng-disabled="busy || passwordResetForm.$invalid"><i class="fa fa-circle-notch fa-spin" ng-show="busy"></i> {{ 'passwordReset.resetAction' | tr }}</button>
|
||||
<div class="card-form-bottom-bar">
|
||||
<a href="/" class="hand">{{ 'passwordReset.backToLoginAction' | tr }}</a>
|
||||
<button class="btn btn-primary btn-outline" type="submit" ng-disabled="busy || passwordResetForm.$invalid"><i class="fa fa-circle-notch fa-spin" ng-show="busy"></i> {{ 'passwordReset.resetAction' | tr }}</button>
|
||||
</div>
|
||||
</form>
|
||||
<a ng-href="" class="hand" ng-click="showLogin()">{{ 'passwordReset.backToLoginAction' | tr }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -124,9 +89,10 @@
|
||||
<div class="col-md-12" style="text-align: center;">
|
||||
<img width="128" height="128" style="margin-top: -84px" src="<%= apiOrigin %>/api/v1/cloudron/avatar"/>
|
||||
<br/>
|
||||
<h2>{{ 'passwordReset.emailSent.title' | tr }}</h2>
|
||||
<h2 ng-hide="error">{{ 'passwordReset.emailSent.title' | tr }}</h2>
|
||||
<h4 ng-show="error" class="has-error">{{ error }}</h4>
|
||||
<br/>
|
||||
<button class="btn btn-primary" ng-click="showLogin()">{{ 'passwordReset.backToLoginAction' | tr }}</button>
|
||||
<a href="/" class="btn btn-primary">{{ 'passwordReset.backToLoginAction' | tr }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -170,10 +136,11 @@
|
||||
<label class="control-label" for="inputPasswordResetTotpToken">{{ 'login.2faToken' | tr }}</label>
|
||||
<input type="text" class="form-control" name="passwordResetTotpToken" id="inputPasswordResetTotpToken" ng-model="totpToken" ng-disabled="busy" value="">
|
||||
</div>
|
||||
<br/>
|
||||
<button class="btn btn-primary btn-outline pull-right" type="submit" ng-disabled="busy || newPasswordForm.$invalid || newPassword !== newPasswordRepeat"><i class="fa fa-circle-notch fa-spin" ng-show="busy"></i> {{ 'passwordReset.passwordChanged.submitAction' | tr }}</button>
|
||||
<div class="card-form-bottom-bar">
|
||||
<a href="/" class="hand">{{ 'passwordReset.backToLoginAction' | tr }}</a>
|
||||
<button class="btn btn-primary btn-outline" type="submit" ng-disabled="busy || newPasswordForm.$invalid || newPassword !== newPasswordRepeat"><i class="fa fa-circle-notch fa-spin" ng-show="busy"></i> {{ 'passwordReset.passwordChanged.submitAction' | tr }}</button>
|
||||
</div>
|
||||
</form>
|
||||
<a ng-href="" class="hand" ng-click="showLogin()">{{ 'passwordReset.backToLoginAction' | tr }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -194,7 +161,7 @@
|
||||
</div>
|
||||
|
||||
<footer class="text-center">
|
||||
<span class="text-muted" ng-bind-html="status.footer | markdown2html"></span>
|
||||
<span class="text-muted" ng-bind-html="branding.footer | markdown2html"></span>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
@@ -4,7 +4,8 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
|
||||
|
||||
<title> Cloudron Restore </title>
|
||||
<title>Cloudron Restore</title>
|
||||
<meta name="description" content="Cloudron Restore">
|
||||
|
||||
<link id="favicon" href="/api/v1/cloudron/avatar" rel="icon" type="image/png">
|
||||
|
||||
@@ -136,6 +137,12 @@
|
||||
<input type="text" class="form-control" ng-model="mountOptions.diskPath" id="inputConfigureDiskPath" name="diskPath" ng-disabled="busy" placeholder="Directory for backups" ng-required="provider === 'ext4' || provider === 'xfs'">
|
||||
</div>
|
||||
|
||||
<!-- Disk -->
|
||||
<div class="form-group" ng-class="{ 'has-error': error.diskPath }" ng-show="provider === 'disk'">
|
||||
<label class="control-label">Device</label>
|
||||
<select class="form-control" ng-model="disk" ng-options="item as item.label for item in blockDevices track by item.path" ng-required="provider === 'disk'"></select>
|
||||
</div>
|
||||
|
||||
<!-- SSHFS -->
|
||||
<div class="form-group" ng-show="provider === 'sshfs'">
|
||||
<label class="control-label" for="configureBackupPort">SSH Port</label>
|
||||
@@ -234,6 +241,11 @@
|
||||
<select class="form-control" name="region" id="inputConfigureBackupVultrRegion" ng-model="endpoint" ng-options="a.value as a.name for a in vultrRegions" ng-disabled="busy" ng-required="provider === 'vultr-objectstorage'"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': error.region }" ng-show="provider === 'contabo-objectstorage'">
|
||||
<label class="control-label" for="inputConfigureBackupContaboRegion">Region</label>
|
||||
<select class="form-control" name="region" id="inputConfigureBackupContaboRegion" ng-model="endpoint" ng-options="a.value as a.name for a in contaboRegions" ng-disabled="busy" ng-required="provider === 'contabo-objectstorage'"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': error.accessKeyId }" ng-show="s3like(provider)">
|
||||
<label class="control-label" for="inputConfigureBackupAccessKeyId">Access key id</label>
|
||||
<input type="text" class="form-control" ng-model="accessKeyId" id="inputConfigureBackupAccessKeyId" name="accessKeyId" ng-disabled="busy" ng-required="s3like(provider)">
|
||||
@@ -262,9 +274,9 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': error.remotePath }">
|
||||
<label class="control-label" for="inputConfigureRemotePath">Backup Path</label>
|
||||
<label class="control-label" for="inputConfigureRemotePath">Backup Path<sup><a ng-href="https://docs.cloudron.io/backups/#restore-cloudron" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></label>
|
||||
|
||||
<input type="text" class="form-control" ng-model="remotePath" name="inputConfigureBackupId" placeholder="Backup Path" required ng-disabled="busy">
|
||||
<input type="text" class="form-control" ng-model="remotePath" name="inputConfigureBackupId" placeholder="e.g. 2024-02-20-130007-637/box_v7.4.3.tar.gz" required ng-disabled="busy">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': error.key }">
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
|
||||
|
||||
<title> Cloudron Setup </title>
|
||||
<title>Cloudron Setup</title>
|
||||
<meta name="description" content="Cloudron Setup">
|
||||
|
||||
<link id="favicon" href="/api/v1/cloudron/avatar" rel="icon" type="image/png">
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src <%= apiOrigin %> 'unsafe-inline' 'unsafe-eval' 'self'; img-src <%= apiOrigin %> 'self'" />
|
||||
|
||||
<title>Cloudron Account Setup</title>
|
||||
<meta name="description" content="Cloudron Account Setup">
|
||||
|
||||
<link id="favicon" href="<%= apiOrigin %>/api/v1/cloudron/avatar" rel="icon" type="image/png">
|
||||
|
||||
@@ -57,7 +58,7 @@
|
||||
<div class="col-md-12" style="text-align: center;">
|
||||
<img width="128" height="128" style="margin-top: -84px" src="<%= apiOrigin %>/api/v1/cloudron/avatar"/>
|
||||
<br/>
|
||||
<h1><small>{{ 'setupAccount.welcomeTo' | tr }}</small> {{ status.cloudronName || 'Cloudron' }}</h1>
|
||||
<h1><small>{{ 'setupAccount.welcomeTo' | tr }}</small> {{ branding.cloudronName || 'Cloudron' }}</h1>
|
||||
<h3>{{ 'setupAccount.description' | tr }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
@@ -153,7 +154,7 @@
|
||||
</div>
|
||||
|
||||
<footer class="text-center ng-cloak">
|
||||
<span class="text-muted" ng-bind-html="status.footer | markdown2html"></span>
|
||||
<span class="text-muted" ng-bind-html="branding.footer | markdown2html"></span>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
|
||||
|
||||
<title> Cloudron Domain Setup </title>
|
||||
<title>Cloudron Domain Setup</title>
|
||||
<meta name="description" content="Cloudron Domain Setup">
|
||||
|
||||
<link id="favicon" href="/api/v1/cloudron/avatar" rel="icon" type="image/png">
|
||||
|
||||
@@ -219,15 +220,45 @@
|
||||
<input type="text" class="form-control" ng-model="dnsCredentials.linodeToken" name="linodeToken" ng-required="dnsCredentials.provider === 'linode'" ng-disabled="dnsCredentials.busy">
|
||||
</p>
|
||||
|
||||
<!-- Bunny -->
|
||||
<p class="form-group" ng-show="dnsCredentials.provider === 'bunny'">
|
||||
<label class="control-label">Access Key</label>
|
||||
<input type="text" class="form-control" ng-model="dnsCredentials.bunnyAccessKey" name="bunnyAccessKey" ng-required="dnsCredentials.provider === 'bunny'" ng-disabled="dnsCredentials.busy">
|
||||
</p>
|
||||
|
||||
<!-- dnsimple -->
|
||||
<p class="form-group" ng-show="dnsCredentials.provider === 'dnsimple'">
|
||||
<label class="control-label">Access Token</label>
|
||||
<input type="text" class="form-control" ng-model="dnsCredentials.dnsimpleAccessToken" name="dnsimpleAccessToken" ng-required="dnsCredentials.provider === 'dnsimple'" ng-disabled="dnsCredentials.busy">
|
||||
</p>
|
||||
|
||||
<!-- OVH -->
|
||||
<p class="form-group" ng-show="dnsCredentials.provider === 'ovh'">
|
||||
<label class="control-label" for="inputConfigureOvhEndpoint">Endpoint</label>
|
||||
<select class="form-control" name="endpoint" id="inputConfigureOvhEndpoint" ng-model="dnsCredentials.ovhEndpoint" ng-options="a.value as a.name for a in ovhEndpoints" ng-disabled="dnsCredentials.busy" ng-required="dnsCredentials.provider === 'ovh'"></select>
|
||||
</p>
|
||||
<p class="form-group" ng-show="dnsCredentials.provider === 'ovh'">
|
||||
<label class="control-label">Consumer Key</label>
|
||||
<input type="text" class="form-control" ng-model="dnsCredentials.ovhConsumerKey" name="ovhConsumerKey" ng-disabled="dnsCredentials.busy" ng-required="dnsCredentials.provider === 'ovh'">
|
||||
</p>
|
||||
<p class="form-group" ng-show="dnsCredentials.provider === 'ovh'">
|
||||
<label class="control-label">Application Key</label>
|
||||
<input type="text" class="form-control" ng-model="dnsCredentials.ovhAppKey" name="ovhAppKey" ng-disabled="dnsCredentials.busy" ng-minlength="1" ng-required="dnsCredentials.provider === 'ovh'">
|
||||
</p>
|
||||
<p class="form-group" ng-show="dnsCredentials.provider === 'ovh'">
|
||||
<label class="control-label">Application Secret</label>
|
||||
<input type="text" class="form-control" ng-model="dnsCredentials.ovhAppSecret" name="ovhAppSecret" ng-disabled="dnsCredentials.busy" ng-required="dnsCredentials.provider === 'ovh'">
|
||||
</p>
|
||||
|
||||
<!-- Porkbun -->
|
||||
<div class="form-group" ng-class="{ 'has-error': dnsCredentialsForm.porkbunApikey.$dirty && dnsCredentialsForm.porkbunApikey.$invalid }" ng-show="dnsCredentials.provider === 'porkbun'">
|
||||
<p class="form-group" ng-class="{ 'has-error': dnsCredentialsForm.porkbunApikey.$dirty && dnsCredentialsForm.porkbunApikey.$invalid }" ng-show="dnsCredentials.provider === 'porkbun'">
|
||||
<label class="control-label">API Key</label>
|
||||
<input type="text" class="form-control" ng-model="dnsCredentials.porkbunApikey" name="porkbunApikey" placeholder="API Key" ng-minlength="1" ng-required="dnsCredentials.provider === 'porkbun'" ng-disabled="dnsCredentials.busy">
|
||||
</div>
|
||||
<div class="form-group" ng-class="{ 'has-error': dnsCredentialsForm.porkbunSecretapikey.$dirty && dnsCredentialsForm.porkbunSecretapikey.$invalid }" ng-show="dnsCredentials.provider === 'porkbun'">
|
||||
<label class="control-label">API Secret</label>
|
||||
<input type="text" class="form-control" ng-model="dnsCredentials.porkbunSecretapikey" name="porkbunSecretapikey" placeholder="API Secret" ng-required="dnsCredentials.provider === 'porkbun'" ng-disabled="dnsCredentials.busy">
|
||||
</div>
|
||||
</p>
|
||||
<p class="form-group" ng-class="{ 'has-error': dnsCredentialsForm.porkbunSecretapikey.$dirty && dnsCredentialsForm.porkbunSecretapikey.$invalid }" ng-show="dnsCredentials.provider === 'porkbun'">
|
||||
<label class="control-label">API Secret</label>
|
||||
<input type="text" class="form-control" ng-model="dnsCredentials.porkbunSecretapikey" name="porkbunSecretapikey" placeholder="API Secret" ng-required="dnsCredentials.provider === 'porkbun'" ng-disabled="dnsCredentials.busy">
|
||||
</p>
|
||||
|
||||
<!-- Hetzner -->
|
||||
<p class="form-group" ng-show="dnsCredentials.provider === 'hetzner'">
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<label class="control-label" for="inputTotpToken">{{ login.2faToken }}</label>
|
||||
<input type="text" class="form-control" name="totpToken" id="inputTotpToken" value="">
|
||||
</div>
|
||||
<button class="btn btn-primary btn-outline pull-right" type="submit" id="login">{{ login.signInAction }}</button>
|
||||
<button class="btn btn-primary btn-outline pull-right" type="submit" id="login"><i id="busyIndicator" class="hide fa fa-circle-notch fa-spin"></i> {{ login.signInAction }}</button>
|
||||
</form>
|
||||
<!-- <a ng-href="" class="hand" ng-click="showPasswordReset()">Reset password</a> -->
|
||||
</div>
|
||||
@@ -67,6 +67,8 @@
|
||||
var password = document.getElementById('inputPassword').value;
|
||||
var totpToken = document.getElementById('inputTotpToken').value;
|
||||
|
||||
document.getElementById('busyIndicator').classList.remove('hide');
|
||||
|
||||
fetch('/login', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
@@ -75,6 +77,7 @@
|
||||
}).then(function (response) {
|
||||
if (response.status === 401 || response.status === 403) {
|
||||
document.getElementById('message').innerText = "{{ login.errorIncorrectCredentials }}"; // FIXME this needs proper escaping for translated strings, single quotes break easily!
|
||||
document.getElementById('busyIndicator').classList.add('hide');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,171 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html ng-app="Application" ng-controller="TerminalController">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
|
||||
|
||||
<title> Terminal </title>
|
||||
|
||||
<link id="favicon" href="/api/v1/cloudron/avatar" rel="icon" type="image/png">
|
||||
<link rel="apple-touch-icon" href="/api/v1/cloudron/avatar">
|
||||
<link rel="icon" href="/api/v1/cloudron/avatar">
|
||||
|
||||
<!-- CSS -->
|
||||
<link type="text/css" rel="stylesheet" href="/3rdparty/angular-ui-notification.css?<%= revision %>"/>
|
||||
<link type="text/css" rel="stylesheet" href="/theme.css?<%= revision %>">
|
||||
|
||||
<!-- Fontawesome -->
|
||||
<link type="text/css" rel="stylesheet" href="/3rdparty/fontawesome/css/all.css?<%= revision %>"/>
|
||||
|
||||
<!-- jQuery-->
|
||||
<script type="text/javascript" src="/3rdparty/js/jquery.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- async -->
|
||||
<script type="text/javascript" src="/3rdparty/js/async-3.2.0.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Bootstrap Core JavaScript -->
|
||||
<script type="text/javascript" src="/3rdparty/js/bootstrap.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Angularjs scripts -->
|
||||
<script type="text/javascript" src="/3rdparty/js/angular.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-loader.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-cookies.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-animate.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-base64.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-md5.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-sanitize.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-ui-notification.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Angular directives for bootstrap https://angular-ui.github.io/bootstrap/ -->
|
||||
<script type="text/javascript" src="/3rdparty/js/ui-bootstrap-tpls-1.3.3.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Angular translate https://angular-translate.github.io/ -->
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-translate.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-translate-loader-static-files.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-translate-storage-cookie.min.js?<%= revision %>"></script>
|
||||
<script type="text/javascript" src="/3rdparty/js/angular-translate-storage-local.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Clipboard handling -->
|
||||
<script type="text/javascript" src="/3rdparty/js/clipboard.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- xterm -->
|
||||
<link type="text/css" rel="stylesheet" href="/3rdparty/xterm/css/xterm.css?<%= revision %>" />
|
||||
<script src="/3rdparty/xterm/lib/xterm.js?<%= revision %>"></script>
|
||||
<script src="/3rdparty/xterm-addon-attach/lib/xterm-addon-attach.js?<%= revision %>"></script>
|
||||
<script src="/3rdparty/xterm-addon-fit/lib/xterm-addon-fit.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Showdown (markdown converter) -->
|
||||
<script type="text/javascript" src="/3rdparty/js/showdown-1.9.1.min.js?<%= revision %>"></script>
|
||||
|
||||
<!-- Main Application -->
|
||||
<script type="text/javascript" src="/js/terminal.js?<%= revision %>"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body style="overflow: hidden;">
|
||||
|
||||
<!-- Modal download file -->
|
||||
<div class="modal fade" id="downloadFileModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'terminal.download.title' | tr:{ name: selected.name } }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form name="downloadFileForm" ng-submit="downloadFile.submit()">
|
||||
<div class="form-group" ng-class="{ 'has-error': downloadFileForm.filePath.$dirty && downloadFile.error }">
|
||||
<label class="control-label" for="inputDownloadFilePath">{{ 'terminal.download.filePath' | tr }}</label>
|
||||
<div class="control-label" ng-show="{ 'has-error': downloadFileForm.filePath.$dirty && downloadFile.error }">
|
||||
<small>{{ downloadFile.error }}</small>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="filePath" ng-model="downloadFile.filePath" required autofocus>
|
||||
</div>
|
||||
<input id="inputDownloadFilePath" class="ng-hide" type="submit" ng-disabled="!downloadFile.filePath"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a id="fileDownloadLink" class="" ng-href="{{ downloadFile.downloadUrl() }}" target="_blank"></a>
|
||||
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="downloadFile.submit()" ng-disabled="!downloadFile.filePath"><i class="fa fa-circle-notch fa-spin" ng-show="downloadFile.busy"></i> {{ 'terminal.download.download' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal upload progress -->
|
||||
<div class="modal fade" id="uploadProgressModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'terminal.upload.title' | tr:{ name: selected.name } }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<span><b>{{ uploadProgress.current | prettyDecimalSize }}</b> (total {{ uploadProgress.total | prettyDecimalSize }})</span>
|
||||
<div class="progress progress-striped active">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" style="width: {{ 100*(uploadProgress.current/uploadProgress.total) }}%"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="animateMe ng-hide layout-root terminal-view" ng-show="initialized">
|
||||
|
||||
<div class="terminal-controls">
|
||||
<h3 style="display: inline-block;">{{ selected.name }}</h3>
|
||||
|
||||
<input type="file" id="fileUpload" class="hide"/>
|
||||
|
||||
<div class="pull-right">
|
||||
<div class="btn-group" ng-show="usesAddon('scheduler')">
|
||||
<button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" ng-disabled="appBusy">
|
||||
{{ 'terminal.scheduler' | tr }} <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li ng-repeat="task in schedulerTasks"><a href="" ng-click="terminalInject('scheduler', task)">{{ task.name }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- addon actions -->
|
||||
<button class="btn btn-success" ng-click="terminalInject('mysql')" ng-show="usesAddon('mysql')" ng-disabled="appBusy">MySQL</button>
|
||||
<button class="btn btn-success" ng-click="terminalInject('postgresql')" ng-show="usesAddon('postgresql')" ng-disabled="appBusy">Postgres</button>
|
||||
<button class="btn btn-success" ng-click="terminalInject('mongodb')" ng-show="usesAddon('mongodb')" ng-disabled="appBusy">MongoDB</button>
|
||||
<button class="btn btn-success" ng-click="terminalInject('redis')" ng-show="usesAddon('redis')" ng-disabled="appBusy">Redis</button>
|
||||
|
||||
<!-- terminal actions -->
|
||||
<button class="btn btn-primary" ng-click="restartApp()" ng-show="selected.type === 'app'" ng-disabled="appBusy"><i class="fa fa-sync-alt" ng-class="{ 'fa-spin': restartAppBusy }"></i> {{ 'terminal.restart' | tr }}</button>
|
||||
<button class="btn btn-primary" ng-click="uploadFile()" ng-show="selected.type === 'app' && !uploadProgress.busy" ng-disabled="appBusy"><i class="fa fa-upload"></i> {{ 'terminal.uploadToTmp' | tr }}</button>
|
||||
<button class="btn btn-primary" ng-click="uploadProgress.show()" ng-show="uploadProgress.busy" ng-disabled="appBusy"><i class="fa fa-circle-notch fa-spin"></i> {{ 'terminal.uploading' | tr }}</button>
|
||||
<button class="btn btn-primary" ng-click="downloadFile.show()" ng-show="selected.type === 'app'" ng-disabled="appBusy"><i class="fa fa-download"></i> {{ 'terminal.downloadAction' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="terminal-container" id="terminalContainer" ng-hide="appBusy"></div>
|
||||
<div class="terminal-container placeholder" ng-show="appBusy">
|
||||
<h4>
|
||||
<span ng-show="restartAppBusy">{{ 'terminal.busy.restarting' | tr }}</span>
|
||||
<span ng-show="selectedAppInfo.installationState === 'pending_debug' && selectedAppInfo.debugMode">{{ 'terminal.busy.restartingInPausedMode' | tr }}</span>
|
||||
<span ng-show="selectedAppInfo.installationState === 'pending_debug' && !selectedAppInfo.debugMode ">{{ 'terminal.busy.resuming' | tr }}</span>
|
||||
<span ng-show="selectedAppInfo.installationState === 'pending_installed'">{{ 'terminal.busy.installing' | tr }}</span>
|
||||
</h4>
|
||||
|
||||
<div class="progress" ng-show="appBusy" style="width: 80%">
|
||||
<div class="progress-bar progress-bar-striped active" role="progressbar" style="width: 100%"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="contextMenuBackdrop">
|
||||
<ul class="dropdown-menu" id="terminalContextMenu" style="position: absolute; display:none;">
|
||||
<li><a href="" ng-click="terminalCopy()">{{ 'terminal.contextmenu.copy' | tr }}</a></li>
|
||||
<li class="disabled"><a>{{ 'terminal.contextmenu.pasteInfo' | tr }}</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="" ng-click="terminalClear()">{{ 'terminal.contextmenu.clear' | tr }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -65,6 +65,12 @@ $state-danger-border: $brand-danger;
|
||||
src: url(3rdparty/Roboto-Light.ttf);
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: Roboto;
|
||||
font-weight: 700;
|
||||
src: url(3rdparty/Roboto-Bold.ttf);
|
||||
}
|
||||
|
||||
// ----------------------------
|
||||
// Bootstrap extension
|
||||
// ----------------------------
|
||||
@@ -320,6 +326,10 @@ h1, h2, h3 {
|
||||
z-index: 200;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.offscreen {
|
||||
position: absolute;
|
||||
left: -999em;
|
||||
@@ -685,7 +695,7 @@ multiselect {
|
||||
}
|
||||
|
||||
.card {
|
||||
min-height: 488px;
|
||||
min-height: 523px;
|
||||
}
|
||||
|
||||
@media(min-width:768px) {
|
||||
@@ -824,6 +834,19 @@ multiselect {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
// ----------------------------
|
||||
// Login and password forms
|
||||
// ----------------------------
|
||||
|
||||
.card-form-bottom-bar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card-form-bottom-bar > * {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
// ----------------------------
|
||||
// Appstore view
|
||||
// ----------------------------
|
||||
@@ -1071,6 +1094,10 @@ multiselect {
|
||||
max-width: 970px;
|
||||
}
|
||||
|
||||
.card-expand {
|
||||
max-width: initial;
|
||||
}
|
||||
|
||||
.text-success {
|
||||
color: #5CB85C;
|
||||
}
|
||||
@@ -1757,6 +1784,14 @@ tag-input {
|
||||
.logs {
|
||||
background: black;
|
||||
|
||||
.logs-error {
|
||||
color: white;
|
||||
width: 100%;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
margin-top: 200px;
|
||||
}
|
||||
|
||||
.logs-controls {
|
||||
margin: 5px;
|
||||
|
||||
@@ -2023,8 +2058,13 @@ tag-input {
|
||||
.has-background {
|
||||
|
||||
h1, h2, h3 {
|
||||
filter: drop-shadow(0 0 0.5px black);
|
||||
color: white;
|
||||
-webkit-text-stroke: 0.3px black;
|
||||
|
||||
.btn {
|
||||
color: white;
|
||||
-webkit-text-stroke: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
|
||||
@@ -51,7 +51,8 @@
|
||||
"save": "Gem",
|
||||
"close": "Luk",
|
||||
"no": "Nej",
|
||||
"yes": "Ja"
|
||||
"yes": "Ja",
|
||||
"delete": "Slet"
|
||||
},
|
||||
"username": "Brugernavn",
|
||||
"displayName": "Vis navn",
|
||||
@@ -61,7 +62,8 @@
|
||||
},
|
||||
"action": {
|
||||
"reboot": "Genstart",
|
||||
"logs": "Logfiler"
|
||||
"logs": "Logfiler",
|
||||
"showLogs": "Vis logfiler"
|
||||
},
|
||||
"clipboard": {
|
||||
"copied": "Kopieret til udklipsholderen",
|
||||
@@ -78,11 +80,7 @@
|
||||
"justNow": "lige nu",
|
||||
"yeserday": "I går",
|
||||
"minutesAgo": "{{ m }} minutter siden",
|
||||
"hoursAgo": "{{ h }} timer siden",
|
||||
"daysAgo": "{{ d }} dage siden",
|
||||
"weeksAgo": "{{ w }} uger siden",
|
||||
"monthsAgo": "{{ m }} måneder siden",
|
||||
"yearsAgo": "{{ y }} år siden"
|
||||
"hoursAgo": "{{ h }} timer siden"
|
||||
},
|
||||
"navbar": {
|
||||
"users": "Brugere"
|
||||
@@ -91,7 +89,9 @@
|
||||
"statusEnabled": "Aktiveret",
|
||||
"statusDisabled": "Slået fra",
|
||||
"loadingPlaceholder": "Indlæsning",
|
||||
"disableAction": "Deaktiver"
|
||||
"disableAction": "Deaktiver",
|
||||
"settings": "Indstillinger",
|
||||
"saveAction": "Gem"
|
||||
},
|
||||
"appstore": {
|
||||
"category": {
|
||||
@@ -182,7 +182,6 @@
|
||||
"title": "Tilslut en ekstern mappe",
|
||||
"description": "Cloudron synkroniserer brugere og grupper fra en ekstern LDAP- eller ActiveDirectory-server. Adgangskodebekræftelse til autentificering af disse brugere foretages mod den eksterne server. Synkroniseringen køres ikke automatisk, men skal udløses manuelt.",
|
||||
"bindUsername": "Bind DN/Benyttelsesnavn (valgfrit)",
|
||||
"subscriptionRequired": "Denne funktion er kun tilgængelig i de betalte abonnementer.",
|
||||
"subscriptionRequiredAction": "Oprettelse af abonnement nu",
|
||||
"noopInfo": "LDAP-godkendelse er ikke konfigureret.",
|
||||
"provider": "Udbyder",
|
||||
@@ -271,12 +270,6 @@
|
||||
"failed": "Følgende brugere blev ikke importeret:",
|
||||
"sendInviteCheckbox": "Send en e-mail med invitation til importerede brugere"
|
||||
},
|
||||
"makeLocalDialog": {
|
||||
"description": "Dette vil migrere brugeren fra den eksterne mappe til Cloudron.",
|
||||
"title": "Gør denne bruger lokal",
|
||||
"warning": "En nulstilling af adgangskode vil blive iværksat for at indstille en lokal adgangskode for denne bruger.",
|
||||
"submitAction": "Gør lokale"
|
||||
},
|
||||
"title": "Brugerkatalog",
|
||||
"newUserAction": "Ny bruger",
|
||||
"users": {
|
||||
@@ -296,7 +289,6 @@
|
||||
"invitationTooltip": "Inviter bruger",
|
||||
"mailmanagerTooltip": "Denne bruger kan administrere brugere og postkasser",
|
||||
"count": "Antal brugere i alt: {{ count }}",
|
||||
"makeLocalTooltip": "Gør brugeren lokal",
|
||||
"setGhostTooltip": "Udgive sig for at være"
|
||||
},
|
||||
"groups": {
|
||||
@@ -307,7 +299,7 @@
|
||||
"externalLdapTooltip": "Fra ekstern LDAP-mappe"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Indstillinger",
|
||||
"title": "Brugerindstillinger",
|
||||
"allowProfileEditCheckbox": "Tillad brugere at redigere deres navn og e-mail",
|
||||
"require2FACheckbox": "Kræv, at brugerne skal oprette 2FA",
|
||||
"subscriptionRequired": "Disse funktioner er kun tilgængelige i de betalte abonnementer.",
|
||||
@@ -507,7 +499,8 @@
|
||||
},
|
||||
"changeBackgroundImage": {
|
||||
"title": "Indstil baggrundsbillede"
|
||||
}
|
||||
},
|
||||
"enable2FANotAvailable": "Ikke tilgængelig for brugere fra ekstern autentificeringskilde"
|
||||
},
|
||||
"backups": {
|
||||
"location": {
|
||||
@@ -539,7 +532,7 @@
|
||||
"noApps": "Ingen apps",
|
||||
"cleanupBackups": "Oprydning af sikkerhedskopier",
|
||||
"backupNow": "Backup nu",
|
||||
"stopTask": "Stop {{ taskType === 'backup' ? 'Backup' : 'Oprydning' }}",
|
||||
"stopTask": "Stop Backup",
|
||||
"tooltipEditBackup": "Rediger sikkerhedskopi"
|
||||
},
|
||||
"backupDetails": {
|
||||
@@ -633,7 +626,8 @@
|
||||
"preserved": {
|
||||
"description": "Vedvarende backup uanset opbevaringspolitik",
|
||||
"tooltip": "Dette vil også bevare mailen og {{ appsLength }} app-backuppen(erne)."
|
||||
}
|
||||
},
|
||||
"remotePath": "Ekstern sti"
|
||||
}
|
||||
},
|
||||
"branding": {
|
||||
@@ -674,7 +668,8 @@
|
||||
"solrRunning": "Kører",
|
||||
"solrNotRunning": "Ikke kørende",
|
||||
"acl": "ACL for post",
|
||||
"aclOverview": "{{ dnsblZonesCount }} DNSBL-zone(r)"
|
||||
"aclOverview": "{{ dnsblZonesCount }} DNSBL-zone(r)",
|
||||
"virtualAllMail": "Mappen \"Al post\""
|
||||
},
|
||||
"eventlog": {
|
||||
"empty": "Logbogen er tom.",
|
||||
@@ -766,6 +761,10 @@
|
||||
},
|
||||
"action": {
|
||||
"queue": "Kø"
|
||||
},
|
||||
"changeVirtualAllMailDialog": {
|
||||
"title": "Mappen \"Al post\"",
|
||||
"description": "Mappen \"All Mail\" er en enkelt mappe, der indeholder alle mails i din indbakke. Mappen kan være nyttig i mailklienter, der ikke understøtter rekursiv mappesøgning."
|
||||
}
|
||||
},
|
||||
"network": {
|
||||
@@ -791,7 +790,8 @@
|
||||
},
|
||||
"dyndns": {
|
||||
"description": "Aktiver denne indstilling for at holde alle dine DNS-poster synkroniseret med en skiftende IP-adresse. Dette er nyttigt, når Cloudron kører i et netværk med en ofte skiftende offentlig IP-adresse, f.eks. en hjemmeforbindelse.",
|
||||
"title": "Dynamisk DNS"
|
||||
"title": "Dynamisk DNS",
|
||||
"showLogsAction": "Vis logfiler"
|
||||
},
|
||||
"title": "Netværk",
|
||||
"configureIp": {
|
||||
@@ -808,7 +808,13 @@
|
||||
},
|
||||
"configureIpv6": {
|
||||
"title": "Konfigurer IPv6-udbyder"
|
||||
}
|
||||
},
|
||||
"trustedIps": {
|
||||
"title": "Konfigurer tillidsfulde IP'er",
|
||||
"summary": "{{ trustCount }} IP'er, der er tillid til",
|
||||
"description": "Der vil blive stolet på HTTP-headere fra matchende IP-adresser"
|
||||
},
|
||||
"trustedIpRanges": "Tillid til IP'er og områder "
|
||||
},
|
||||
"services": {
|
||||
"configure": {
|
||||
@@ -924,7 +930,7 @@
|
||||
"reportPlaceholder": "Beskriv dit problem",
|
||||
"emailPlaceholder": "Angiv om nødvendigt en anden e-mail-adresse end ovenstående, så du kan kontaktes",
|
||||
"emailVerifyAction": "Bekræft nu",
|
||||
"communityAppDisclaimer": "Vi yder kun support via billetter til apps, der er installeret fra Core-repositoriet. Spørg i stedet i vores forum."
|
||||
"typeBilling": "Problemer med fakturering"
|
||||
},
|
||||
"remoteSupport": {
|
||||
"description": "Aktiver denne indstilling for at give supportteknikere mulighed for at oprette forbindelse til denne server via SSH.",
|
||||
@@ -1015,7 +1021,11 @@
|
||||
"netcupApiPassword": "API-adgangskode",
|
||||
"vultrToken": "Vultr Token",
|
||||
"jitsiHostname": "Jitsi placering",
|
||||
"hetznerToken": "Hetzner Token"
|
||||
"hetznerToken": "Hetzner Token",
|
||||
"porkbunSecretapikey": "Hemmelig API-nøgle",
|
||||
"cloudflareDefaultProxyStatus": "Aktiver proxying for nye DNS-poster",
|
||||
"porkbunApikey": "API-nøgle",
|
||||
"bunnyAccessKey": "Bunny Access Key"
|
||||
},
|
||||
"title": "Domæner og certs",
|
||||
"addDomain": "Tilføj domæne",
|
||||
@@ -1025,7 +1035,7 @@
|
||||
"tooltipRemove": "Fjern domæne",
|
||||
"changeDashboardDomain": {
|
||||
"title": "Ændre Dashboard-domæne",
|
||||
"description": "Dette vil flytte instrumentbrættet og e-mail-serveren til den<code>my</code>underdomæne til det valgte domæne.",
|
||||
"description": "Dette vil flytte dashboardet til <code>my</code>subdomænet i det valgte domæne.",
|
||||
"changeAction": "Ændre domæne",
|
||||
"cancelAction": "Annuller",
|
||||
"showLogsAction": "Vis logs"
|
||||
@@ -1044,7 +1054,8 @@
|
||||
"domainWellKnown": {
|
||||
"title": "Well-Known locations på {{ domain }}"
|
||||
},
|
||||
"tooltipWellKnown": "Indstil well-known lokationer"
|
||||
"tooltipWellKnown": "Indstil well-known lokationer",
|
||||
"count": "Samlede domæner: {{ count }}"
|
||||
},
|
||||
"notifications": {
|
||||
"markAllAsRead": "Markér alle som læst",
|
||||
@@ -1149,7 +1160,8 @@
|
||||
"cut": "Skær",
|
||||
"copy": "Kopier",
|
||||
"paste": "Indsæt",
|
||||
"selectAll": "Vælg alle"
|
||||
"selectAll": "Vælg alle",
|
||||
"open": "Åben"
|
||||
},
|
||||
"mtime": "Ændret"
|
||||
},
|
||||
@@ -1164,7 +1176,19 @@
|
||||
},
|
||||
"status": {
|
||||
"restartingApp": "genstart af app"
|
||||
}
|
||||
},
|
||||
"extractionInProgress": "Udvinding i gang",
|
||||
"uploader": {
|
||||
"exitWarning": "Upload er stadig i gang. Skal vi virkelig lukke denne side?",
|
||||
"uploading": "Uploading"
|
||||
},
|
||||
"textEditor": {
|
||||
"undo": "Fortryd",
|
||||
"redo": "Omarbejdning",
|
||||
"save": "Gem"
|
||||
},
|
||||
"pasteInProgress": "Indsætning i gang",
|
||||
"deleteInProgress": "Sletning i gang"
|
||||
},
|
||||
"email": {
|
||||
"incoming": {
|
||||
@@ -1418,7 +1442,8 @@
|
||||
"title": "Datakatalog",
|
||||
"dataDirPlaceholder": "Lad det være tomt for at bruge platformens standard",
|
||||
"moveAction": "Flyt data",
|
||||
"diskUsage": "Appen bruger i øjeblikket {{ size }} af lagerplads (pr. {{ date }})."
|
||||
"diskUsage": "Appen bruger i øjeblikket {{ size }} af lagerplads (pr. {{ date }}).",
|
||||
"mountTypeWarning": "Destinationsfilsystemet skal understøtte filtilladelser og ejerskab, for at flytningen kan fungere"
|
||||
},
|
||||
"mounts": {
|
||||
"title": "Montering",
|
||||
@@ -1612,7 +1637,8 @@
|
||||
"title": "Robots.txt",
|
||||
"txtPlaceholder": "Lad den være tom for at tillade alle robotter at indeksere denne app",
|
||||
"disableIndexingAction": "Deaktivere indeksering"
|
||||
}
|
||||
},
|
||||
"hstsPreload": "Aktiver HSTS-forudindlæsning for dette websted og alle underdomæner"
|
||||
},
|
||||
"uninstallDialog": {
|
||||
"title": "Afinstaller {{ app }}",
|
||||
@@ -1681,6 +1707,17 @@
|
||||
"label": "Etiket",
|
||||
"clearIconAction": "Ryd ikon",
|
||||
"clearIconDescription": "Dette vil forsøge at hente appens favicon ved lagring."
|
||||
},
|
||||
"servicesTabTitle": "Tjenester",
|
||||
"turn": {
|
||||
"title": "TURN Opsætning",
|
||||
"enable": "Konfigurer appen til at bruge den indbyggede TURN-server",
|
||||
"disable": "Du må ikke konfigurere appens TURN-indstillinger. Appens TURN-indstillinger skal ikke konfigureres. Du kan konfigurere dem inde i appen."
|
||||
},
|
||||
"redis": {
|
||||
"title": "Redis-konfiguration",
|
||||
"enable": "Konfigurer appen til at bruge Redis",
|
||||
"disable": "Deaktiver Redis"
|
||||
}
|
||||
},
|
||||
"passwordReset": {
|
||||
@@ -1809,7 +1846,9 @@
|
||||
"logs": {
|
||||
"title": "Logfiler",
|
||||
"clear": "Klart udsyn",
|
||||
"download": "Download komplette logs"
|
||||
"download": "Download komplette logs",
|
||||
"notFoundError": "Ingen sådan opgave eller app",
|
||||
"logsGoneError": "Logfil(er) ikke fundet"
|
||||
},
|
||||
"login": {
|
||||
"loginTo": "Log ind på",
|
||||
@@ -1818,7 +1857,9 @@
|
||||
"password": "Adgangskode",
|
||||
"2faToken": "2FA-token (hvis aktiveret)",
|
||||
"signInAction": "Log ind",
|
||||
"resetPasswordAction": "Nulstil adgangskode"
|
||||
"resetPasswordAction": "Nulstil adgangskode",
|
||||
"errorIncorrect2FAToken": "2FA-token er ugyldig",
|
||||
"errorInternal": "Intern fejl, prøv igen senere"
|
||||
},
|
||||
"lang": {
|
||||
"en": "English",
|
||||
@@ -1832,9 +1873,48 @@
|
||||
"zh_Hans": "Kinesisk (forenklet)",
|
||||
"es": "Spansk",
|
||||
"ru": "Russisk",
|
||||
"pt": "Portugisisk"
|
||||
"pt": "Portugisisk",
|
||||
"da": "Dansk"
|
||||
},
|
||||
"supportConfig": {
|
||||
"emailNotVerified": "Du bedes først bekræfte e-mailen på cloudron.io-kontoen for at sikre, at vi kan kontakte dig."
|
||||
}
|
||||
},
|
||||
"oidc": {
|
||||
"newClientDialog": {
|
||||
"title": "Tilføj klient",
|
||||
"description": "Tilføj nye OpenID connect-klientindstillinger.",
|
||||
"createAction": "Opret"
|
||||
},
|
||||
"client": {
|
||||
"name": "Navn",
|
||||
"id": "Klient-id",
|
||||
"secret": "Klientens secret",
|
||||
"signingAlgorithm": "Signeringsalgoritme",
|
||||
"loginRedirectUri": "Url til tilbagekaldelse af login (kommasepareret, hvis der er mere end én)",
|
||||
"logoutRedirectUri": "Url til tilbagekaldelse af logout (valgfrit)"
|
||||
},
|
||||
"title": "OpenID Connect-udbyder",
|
||||
"description": "Cloudron kan fungere som OpenID Connect-udbyder for interne apps og eksterne tjenester.",
|
||||
"editClientDialog": {
|
||||
"title": "Rediger klient {{ client }}"
|
||||
},
|
||||
"deleteClientDialog": {
|
||||
"title": "Virkelig slette klient {{ client }}?",
|
||||
"description": "Dette vil afbryde forbindelsen til alle eksterne OpenID-apps fra denne Cloudron, der bruger dette klient-id."
|
||||
},
|
||||
"env": {
|
||||
"discoveryUrl": "URL til opdagelse",
|
||||
"logoutUrl": "URL til logout",
|
||||
"profileEndpoint": "Profil slutpunkt",
|
||||
"keysEndpoint": "Nøgler Slutpunkt",
|
||||
"tokenEndpoint": "Token slutpunkt",
|
||||
"authEndpoint": "Auth-slutpunkt"
|
||||
},
|
||||
"clients": {
|
||||
"title": "Klienter",
|
||||
"newClient": "Ny klient",
|
||||
"empty": "Ingen klienten endnu"
|
||||
}
|
||||
},
|
||||
"automation": "Automatisering"
|
||||
}
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
"save": "Speichern",
|
||||
"close": "Schließen",
|
||||
"yes": "Ja",
|
||||
"no": "Nein"
|
||||
"no": "Nein",
|
||||
"delete": "Löschen"
|
||||
},
|
||||
"username": "Username",
|
||||
"displayName": "Name",
|
||||
@@ -77,12 +78,8 @@
|
||||
"prettyDate": {
|
||||
"justNow": "gerade eben",
|
||||
"yeserday": "Gestern",
|
||||
"yearsAgo": "vor {{ y }} Jahren",
|
||||
"minutesAgo": "vor {{ m }} Minuten",
|
||||
"hoursAgo": "vor {{ h }} Stunden",
|
||||
"daysAgo": "vor {{ d }} Tagen",
|
||||
"weeksAgo": "vor {{ w }} Wochen",
|
||||
"monthsAgo": "vor {{ m }} Monaten"
|
||||
"hoursAgo": "vor {{ h }} Stunden"
|
||||
},
|
||||
"disableAction": "Deaktivieren",
|
||||
"enableAction": "Aktivieren",
|
||||
@@ -91,7 +88,8 @@
|
||||
"users": "User"
|
||||
},
|
||||
"statusDisabled": "Deaktiviert",
|
||||
"loadingPlaceholder": "Laden"
|
||||
"loadingPlaceholder": "Laden",
|
||||
"settings": "Einstellungen"
|
||||
},
|
||||
"network": {
|
||||
"title": "Netzwerk",
|
||||
@@ -232,7 +230,6 @@
|
||||
"provider": "Anbieter",
|
||||
"noopInfo": "LDAP Authentifizierung ist nicht konfiguriert.",
|
||||
"subscriptionRequiredAction": "Abonnenement jetzt abschließen",
|
||||
"subscriptionRequired": "Diese Funktion ist nur im Abo enthalten.",
|
||||
"description": "Cloudron synchronisiert User und Gruppen aus dem externen LDAP- oder Active-Directory-Server. Passwörter beim Anmelden werden immer durch den externen Server validiert. Die Synchronisierung läuft nicht automatisch, sondern muss manuell gestartet werden.",
|
||||
"title": "Verbinde ein externes Verzeichnis",
|
||||
"providerOther": "Sonstige",
|
||||
@@ -244,7 +241,7 @@
|
||||
"subscriptionRequired": "Diese Funktionen sind nur im Abo enthalten.",
|
||||
"require2FACheckbox": "User müssen Zwei-Faktor-Authentifizierung (2FA) aktivieren",
|
||||
"allowProfileEditCheckbox": "Erlaube Usern ihren Namen und E-Mail-Adresse zu ändern",
|
||||
"title": "Einstellungen",
|
||||
"title": "User Einstellungen",
|
||||
"require2FAWarning": "Richte 2FA ein um nicht ausgesperrt zu werden."
|
||||
},
|
||||
"groups": {
|
||||
@@ -271,8 +268,7 @@
|
||||
"invitationTooltip": "User einladen",
|
||||
"mailmanagerTooltip": "Dieser User kann Benutzer und Postfächer verwalten.",
|
||||
"setGhostTooltip": "Als anderer User ausgeben",
|
||||
"count": "User insgesamt: {{ count }}",
|
||||
"makeLocalTooltip": "Mache user lokal"
|
||||
"count": "User insgesamt: {{ count }}"
|
||||
},
|
||||
"newUserAction": "Neuer User",
|
||||
"role": {
|
||||
@@ -423,12 +419,6 @@
|
||||
"all": "Alle User",
|
||||
"active": "Aktive User",
|
||||
"inactive": "Inaktive User"
|
||||
},
|
||||
"makeLocalDialog": {
|
||||
"description": "Dies migriert den User vom externen Verzeichnis zum Cloudron.",
|
||||
"warning": "Das Passwort wird zurückgesetzt um dem User ein lokale Passwort zu geben.",
|
||||
"title": "Mache den Benutzer lokal",
|
||||
"submitAction": "Änderungen lokal speichern"
|
||||
}
|
||||
},
|
||||
"profile": {
|
||||
@@ -679,8 +669,7 @@
|
||||
"report": "Meldung",
|
||||
"subscriptionRequiredDescription": "Antworten auf die häufigsten Fragen sind in der <a href=\"{{ supportViewLink }}\" target=\"_blank\">Dokumentation</a> verfügbar. Unser <a href=\"{{ forumLink }}\" target=\"_blank\">Forum</a> bietet einen Platz in die Community einzusteigen und sich auszutauschen.",
|
||||
"emailVerifyAction": "Jetzt verifizieren",
|
||||
"emailNotVerified": "Ihre cloudron.io Konto E-Mail {{ email }} ist nicht verifiziert. Bitte bestätigen Sie Ihre E-Mail Adresse, um Support-Tickets zu öffnen.",
|
||||
"communityAppDisclaimer": "Wir bieten nur Support über Tickets für Anwendungen, die aus dem offiziellen App Store installiert wurden. Bitte fragen Sie stattdessen in unserem Forum."
|
||||
"emailNotVerified": "Ihre cloudron.io Konto E-Mail {{ email }} ist nicht verifiziert. Bitte bestätigen Sie Ihre E-Mail Adresse, um Support-Tickets zu öffnen."
|
||||
},
|
||||
"remoteSupport": {
|
||||
"title": "Fernwartung",
|
||||
@@ -743,14 +732,18 @@
|
||||
"cloudflareEmail": "Cloudflare-E-Mail",
|
||||
"linodeToken": "Linode-Token",
|
||||
"mastodonHostname": "Mastodon Server-Domain",
|
||||
"matrixHostname": "Matrix Server Domäne",
|
||||
"matrixHostname": "Matrix Server-Pfad",
|
||||
"netcupApiPassword": "API Passwort",
|
||||
"netcupApiKey": "API Key",
|
||||
"netcupCustomerNumber": "Kundennummer",
|
||||
"vultrToken": "Vultr Token",
|
||||
"wellKnownDescription": "Die Werte werden von Cloudron verwendet, um auf <code>/.well-known/</code> URLs zu antworten. Beachten Sie, dass eine App auf der bloßen Domain <code>{{ domain }}</code> verfügbar sein muss, damit dies funktioniert. Siehe die <a href=\"{{docsLink}}\" target=\"_blank\">Dokumentation</a> für weitere Informationen.",
|
||||
"hetznerToken": "Hetzner Token",
|
||||
"jitsiHostname": "Jitsi Pfad"
|
||||
"jitsiHostname": "Jitsi Pfad",
|
||||
"cloudflareDefaultProxyStatus": "Proxying für neue DNS-Einträge aktivieren",
|
||||
"porkbunSecretapikey": "Geheimer API-Schlüssel",
|
||||
"porkbunApikey": "API-Schlüssel",
|
||||
"bunnyAccessKey": "Bunny Access Key"
|
||||
},
|
||||
"changeDashboardDomain": {
|
||||
"title": "Die Dashboard-Domäne ändern",
|
||||
@@ -899,7 +892,7 @@
|
||||
"title": "Logfiles"
|
||||
},
|
||||
"listing": {
|
||||
"stopTask": "Stop {{ taskType === 'backup' ? 'Backup' : 'Cleanup' }}",
|
||||
"stopTask": "Stop Backup",
|
||||
"backupNow": "Backup jetzt erstellen",
|
||||
"cleanupBackups": "Backups löschen",
|
||||
"tooltipDownloadBackupConfig": "Konfiguration herunterladen",
|
||||
@@ -1073,7 +1066,7 @@
|
||||
"welcomeEmail": {
|
||||
"welcomeTo": "Willkommen bei <%= cloudronName %>!",
|
||||
"subject": "Willkommen bei <%= cloudron %>",
|
||||
"inviteLinkActionText": "Öffnen den folgenden Link um dich anzumelden: <%- inviteLink %>",
|
||||
"inviteLinkActionText": "Öffne den folgenden Link, um dich anzumelden: <%- inviteLink %>",
|
||||
"expireNote": "Dieser Link ist 7 Tage gültig.",
|
||||
"invitor": "Diese Email wurde geschickt, weil Du von <%= invitor %> eingeladen wurdest.",
|
||||
"inviteLinkAction": "Starte hier",
|
||||
@@ -1365,7 +1358,8 @@
|
||||
"paste": "Einfügen",
|
||||
"copy": "Kopieren",
|
||||
"cut": "Ausschneiden",
|
||||
"edit": "Bearbeiten"
|
||||
"edit": "Bearbeiten",
|
||||
"open": "Öffnen"
|
||||
},
|
||||
"symlink": "Symlink zu {{ target }}",
|
||||
"mtime": "Geändert"
|
||||
@@ -1483,7 +1477,8 @@
|
||||
"title": "robots.txt",
|
||||
"txtPlaceholder": "Leer lassen, um allen Bots zu erlauben diese Anwendung in den Index aufzunehmen",
|
||||
"disableIndexingAction": "Indexierung deaktivieren"
|
||||
}
|
||||
},
|
||||
"hstsPreload": "Aktivieren Sie den HSTS-Preload für diese Website und alle Subdomains"
|
||||
},
|
||||
"backAction": "Zurück zu den Anwendungen",
|
||||
"email": {
|
||||
@@ -1610,9 +1605,9 @@
|
||||
},
|
||||
"storage": {
|
||||
"appdata": {
|
||||
"title": "Anwendungsdaten",
|
||||
"title": "Datenverzeichnis",
|
||||
"dataDirPlaceholder": "Leer lassen, um Systemvorgabe zu verwenden",
|
||||
"description": "Standardmäßig befinden sich die Daten dieser Anwendung unter <code>{{ storagePath }}</code>. Wenn dem Server der Speicherplatz ausgeht, kann durch Hinzufügen einer externen Festplatte, die Daten der Anwendung dorthin verschoben werden. Es wird nur das Ext4-Format unterstützt.",
|
||||
"description": "Wenn dem Server der Speicherplatz ausgeht, kann durch Hinzufügen einer <a href=\"/#/volumes\">externen Festplatte</a>, die Daten der Anwendung dorthin verschoben werden.",
|
||||
"moveAction": "Daten verschieben",
|
||||
"diskUsage": "Die App verwendet derzeit {{ size }} an Speicherplatz (ab {{ date }})."
|
||||
},
|
||||
@@ -1674,7 +1669,7 @@
|
||||
"subscriptionExpired": "Das Cloudron-Abonnement ist abgelaufen. Bitte ein Abonnement einrichten, um die Anwendung zu aktualisieren.",
|
||||
"title": "{{ app }} aktualisieren",
|
||||
"unstableWarning": "Dieses Update ist eine Vorabversion und gilt noch nicht als stabil. Vorsicht: Aktualisierung auf eigene Gefahr.",
|
||||
"changelogHeader": "Änderungen für neue Version {{ version }}:",
|
||||
"changelogHeader": "Änderungen für in der neuen Version {{ version }}:",
|
||||
"skipBackupCheckbox": "Backup überspringen",
|
||||
"setupSubscriptionAction": "Abonnenement abschließen",
|
||||
"updateAction": "Aktualisieren"
|
||||
@@ -1782,10 +1777,11 @@
|
||||
"pl": "Polnisch",
|
||||
"es": "Spanisch",
|
||||
"ru": "Russisch",
|
||||
"pt": "Portugiesisch"
|
||||
"pt": "Portugiesisch",
|
||||
"da": "Dänisch"
|
||||
},
|
||||
"volumes": {
|
||||
"description": "Datenträger sind Verzeichnisse auf dem Server, die von Anwendungen gemeinsam genutzt werden können. Dabei kann es sich um NFS/SSHFS/CIFS-Mounts oder externe Speicherplatten handeln, die an den Server angeschlossen sind. Datenträger werden dem App-Container unter <code>/media</code> zur Verfügung gestellt.",
|
||||
"description": "Datenträger sind Verzeichnisse auf dem Server, die von Anwendungen gemeinsam genutzt werden können.",
|
||||
"removeVolumeDialog": {
|
||||
"removeAction": "Entfernen",
|
||||
"description": "Dies wird den Datenträger <code>{{ volume }}</code> löschen. Daten innerhalb des Host-Pfades werden nicht entfernt.",
|
||||
@@ -1823,6 +1819,55 @@
|
||||
},
|
||||
"lang.ja": "Japanisch",
|
||||
"newLoginEmail": {
|
||||
"action": "Wenn Sie das waren, können Sie diese E-Mail getrost ignorieren. Wenn Sie das nicht waren, sollten Sie Ihr Passwort sofort ändern."
|
||||
"action": "Wenn Sie das waren, können Sie diese E-Mail getrost ignorieren. Wenn Sie das nicht waren, sollten Sie Ihr Passwort sofort ändern.",
|
||||
"salutation": "Hallo <%= user %>,",
|
||||
"notice": "Wir haben eine Anmeldung bei Ihrem Cloudron-Konto von einem neuen Gerät aus festgestellt.",
|
||||
"subject": "[<%= cloudron %>] Neue Anmeldung für Ihr Konto",
|
||||
"topic": "Wir haben eine neue Anmeldung für Ihr Cloudron-Konto festgestellt."
|
||||
},
|
||||
"storage": {
|
||||
"mounts": {
|
||||
"description": "Apps können auf gemountete <a href=\"/#/volumes\">Volumes</a> über das <code>/media/{volume name}</code> Verzeichnis zugreifen. Diese Daten sind nicht im Backup der App enthalten."
|
||||
}
|
||||
},
|
||||
"supportConfig": {
|
||||
"emailNotVerified": "Bitte verifizieren Sie zuerst die E-Mail Ihres cloudron.io-Kontos, um sicherzustellen, dass wir Sie kontaktieren können."
|
||||
},
|
||||
"oidc": {
|
||||
"newClientDialog": {
|
||||
"title": "Client hinzufügen",
|
||||
"description": "Neuen OpenID Connect Clienten hinzufügen.",
|
||||
"createAction": "Erstellen"
|
||||
},
|
||||
"client": {
|
||||
"name": "Name",
|
||||
"id": "Client ID",
|
||||
"signingAlgorithm": "Signatur Algorithmus",
|
||||
"loginRedirectUri": "Login Callback Url (bei mehreren mit Komma getrennt)",
|
||||
"logoutRedirectUri": "Logout Callback Url (optional)",
|
||||
"secret": "Client Geheimnis"
|
||||
},
|
||||
"title": "OpenID Connect Provider",
|
||||
"description": "Cloudron kann als OpenID Connect Provider für interne und externe Apps fungieren.",
|
||||
"editClientDialog": {
|
||||
"title": "Client {{ client }} bearbeiten"
|
||||
},
|
||||
"deleteClientDialog": {
|
||||
"title": "Wirklich Client {{ client }} löschen?",
|
||||
"description": "Damit werden alle externen OpenID Apps, die diese Clientendetails nutzen, getrennt."
|
||||
},
|
||||
"env": {
|
||||
"discoveryUrl": "Discovery URL",
|
||||
"logoutUrl": "Logout URL",
|
||||
"profileEndpoint": "Profil Endpunkt",
|
||||
"keysEndpoint": "Schlüssel Endpunkt",
|
||||
"tokenEndpoint": "Token Endpunkt",
|
||||
"authEndpoint": "Auth Endpunkt"
|
||||
},
|
||||
"clients": {
|
||||
"title": "Clienten",
|
||||
"newClient": "Neuer Client",
|
||||
"empty": "Noch keine Clienten erstellt"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
"auth": {
|
||||
"sso": "Log in with Cloudron credentials",
|
||||
"nosso": "Log in with dedicated account",
|
||||
"email": "Log in with email address"
|
||||
"email": "Log in with email address",
|
||||
"openid": "Log in with Cloudron OpenID"
|
||||
},
|
||||
"addAppAction": "Add App",
|
||||
"addAppproxyAction": "Add App Proxy",
|
||||
@@ -39,7 +40,8 @@
|
||||
"save": "Save",
|
||||
"close": "Close",
|
||||
"no": "No",
|
||||
"yes": "Yes"
|
||||
"yes": "Yes",
|
||||
"delete": "Delete"
|
||||
},
|
||||
"username": "Username",
|
||||
"displayName": "Display name",
|
||||
@@ -55,7 +57,8 @@
|
||||
},
|
||||
"action": {
|
||||
"reboot": "Reboot",
|
||||
"logs": "Logs"
|
||||
"logs": "Logs",
|
||||
"showLogs": "Show Logs"
|
||||
},
|
||||
"clipboard": {
|
||||
"copied": "Copied to clipboard",
|
||||
@@ -78,11 +81,7 @@
|
||||
"justNow": "just now",
|
||||
"yeserday": "Yesterday",
|
||||
"minutesAgo": "{{ m }} minutes ago",
|
||||
"hoursAgo": "{{ h }} hours ago",
|
||||
"daysAgo": "{{ d }} days ago",
|
||||
"weeksAgo": "{{ w }} weeks ago",
|
||||
"monthsAgo": "{{ m }} months ago",
|
||||
"yearsAgo": "{{ y }} years ago"
|
||||
"hoursAgo": "{{ h }} hours ago"
|
||||
},
|
||||
"navbar": {
|
||||
"users": "Users"
|
||||
@@ -91,7 +90,9 @@
|
||||
"enableAction": "Enable",
|
||||
"statusEnabled": "Enabled",
|
||||
"statusDisabled": "Disabled",
|
||||
"loadingPlaceholder": "Loading"
|
||||
"loadingPlaceholder": "Loading",
|
||||
"settings": "Settings",
|
||||
"saveAction": "Save"
|
||||
},
|
||||
"appstore": {
|
||||
"title": "App Store",
|
||||
@@ -169,7 +170,10 @@
|
||||
"loginAction": "Login",
|
||||
"createAccountAction": "Create Account",
|
||||
"switchToSignUpAction": "Don't have an account yet? Sign up",
|
||||
"switchToLoginAction": "Already have an account? Log in"
|
||||
"switchToLoginAction": "Already have an account? Log in",
|
||||
"setupWithTokenAction": "Setup",
|
||||
"setupToken": "Setup Token",
|
||||
"titleToken": "Sign up with Setup Token"
|
||||
},
|
||||
"categoryLabel": "Category",
|
||||
"ssofilter": {
|
||||
@@ -197,8 +201,7 @@
|
||||
"invitationTooltip": "Invite User",
|
||||
"setGhostTooltip": "Impersonate",
|
||||
"mailmanagerTooltip": "This user can manage users and mailboxes",
|
||||
"count": "Total users: {{ count }}",
|
||||
"makeLocalTooltip": "Make user local"
|
||||
"count": "Total users: {{ count }}"
|
||||
},
|
||||
"groups": {
|
||||
"title": "Groups",
|
||||
@@ -208,7 +211,7 @@
|
||||
"externalLdapTooltip": "From external LDAP directory"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Settings",
|
||||
"title": "User Settings",
|
||||
"allowProfileEditCheckbox": "Allow users to edit their name and email",
|
||||
"require2FACheckbox": "Require users to set up 2FA",
|
||||
"subscriptionRequired": "These features are only available in the paid plans.",
|
||||
@@ -218,8 +221,7 @@
|
||||
},
|
||||
"externalLdap": {
|
||||
"title": "Connect an External Directory",
|
||||
"description": "Cloudron will synchronize users and groups from an external LDAP or ActiveDirectory server. Password verification for authenticating those users is done against the external server. The synchronization is not run automatically but needs to be triggered manually.",
|
||||
"subscriptionRequired": "This feature is only available in the paid plans.",
|
||||
"description": "This setting will synchronize and authenticate users and groups from an external LDAP or Active Directory server. The synchronization is run periodically but can also be triggered manually.",
|
||||
"subscriptionRequiredAction": "Set up Subscription Now",
|
||||
"noopInfo": "LDAP authentication is not configured.",
|
||||
"provider": "Provider",
|
||||
@@ -233,15 +235,16 @@
|
||||
"groupFilter": "Group Filter",
|
||||
"groupnameField": "Groupname Field",
|
||||
"auth": "Auth",
|
||||
"autocreateUsersOnLogin": "Automatically create users when they login to Cloudron",
|
||||
"autocreateUsersOnLogin": "Automatically create users on login",
|
||||
"showLogsAction": "Show Logs",
|
||||
"syncAction": "Synchronize",
|
||||
"syncAction": "Sync",
|
||||
"configureAction": "Configure",
|
||||
"bindUsername": "Bind DN/Username (optional)",
|
||||
"bindPassword": "Bind Password (optional)",
|
||||
"errorSelfSignedCert": "Server is using an invalid or self-signed certificate.",
|
||||
"providerOther": "Other",
|
||||
"providerDisabled": "Disabled"
|
||||
"providerDisabled": "Disabled",
|
||||
"disableWarning": "The authentication source of all existing users will be reset to authenticate against the local password database."
|
||||
},
|
||||
"subscriptionDialog": {
|
||||
"title": "Subscription required",
|
||||
@@ -270,7 +273,9 @@
|
||||
"errorDisplayNameRequired": "Name is required",
|
||||
"activeCheckbox": "User is active",
|
||||
"displayNamePlaceholder": "Optional. If not provided, user can provide during sign up",
|
||||
"fallbackEmailPlaceholder": "Optional. If not specified, primary email will be used"
|
||||
"fallbackEmailPlaceholder": "Optional. If not specified, primary email will be used",
|
||||
"external2FA": "2FA setup is managed by external authentication source",
|
||||
"ldapGroups": "LDAP Groups"
|
||||
},
|
||||
"deleteUserDialog": {
|
||||
"title": "Delete user {{ username }}",
|
||||
@@ -359,7 +364,7 @@
|
||||
"description": "Cloudron can act as a central user directory server for external applications.",
|
||||
"enabled": "Enabled",
|
||||
"ipRestriction": {
|
||||
"description": "The directory server can be limited to specific IPs or ranges.",
|
||||
"description": "Limit Directory Server access to specific IPs or ranges. Lines starting with <code>#</code> are treated as comments.",
|
||||
"placeholder": "Line separated IP address or Subnet",
|
||||
"label": "Restrict Access"
|
||||
},
|
||||
@@ -367,7 +372,8 @@
|
||||
"label": "Bind Password",
|
||||
"description": "All LDAP queries have to be authenticated with this secret and the user DN <i>{{ userDN }}</i>",
|
||||
"url": "Server URL"
|
||||
}
|
||||
},
|
||||
"cloudflarePortWarning": "Cloudflare proxying must be disabled on the dashboard domain to access the LDAP server"
|
||||
},
|
||||
"userImportDialog": {
|
||||
"title": "Import Users",
|
||||
@@ -391,12 +397,6 @@
|
||||
"all": "All Users",
|
||||
"active": "Active Users",
|
||||
"inactive": "Inactive Users"
|
||||
},
|
||||
"makeLocalDialog": {
|
||||
"title": "Make this user local",
|
||||
"description": "This will migrate the user from the external directory to the Cloudron.",
|
||||
"warning": "A password reset will be initiated to set a local password for this user.",
|
||||
"submitAction": "Make local"
|
||||
}
|
||||
},
|
||||
"profile": {
|
||||
@@ -463,7 +463,10 @@
|
||||
"changeEmail": {
|
||||
"title": "Change primary email address",
|
||||
"errorEmailInvalid": "The Email address is not valid",
|
||||
"errorEmailRequired": "A valid email address is required"
|
||||
"errorEmailRequired": "A valid email address is required",
|
||||
"email": "New Email Address",
|
||||
"password": "Password for confirmation",
|
||||
"errorWrongPassword": "Wrong password"
|
||||
},
|
||||
"changeFallbackEmail": {
|
||||
"title": "Change password recovery email address",
|
||||
@@ -507,7 +510,8 @@
|
||||
},
|
||||
"changeBackgroundImage": {
|
||||
"title": "Set Background Image"
|
||||
}
|
||||
},
|
||||
"enable2FANotAvailable": "Not available for users from external authentication source"
|
||||
},
|
||||
"backups": {
|
||||
"title": "Backups",
|
||||
@@ -539,7 +543,7 @@
|
||||
"tooltipDownloadBackupConfig": "Download Backup Configuration",
|
||||
"cleanupBackups": "Cleanup Backups",
|
||||
"backupNow": "Backup now",
|
||||
"stopTask": "Stop {{ taskType === 'backup' ? 'Backup' : 'Cleanup' }}",
|
||||
"stopTask": "Stop Backup",
|
||||
"tooltipEditBackup": "Edit Backup",
|
||||
"tooltipPreservedBackup": "This backup will be preserved"
|
||||
},
|
||||
@@ -633,7 +637,8 @@
|
||||
"preserved": {
|
||||
"description": "Persist backup regardless of retention policy",
|
||||
"tooltip": "This will also preserve the mail and {{ appsLength }} app backup(s)."
|
||||
}
|
||||
},
|
||||
"remotePath": "Remote Path"
|
||||
}
|
||||
},
|
||||
"branding": {
|
||||
@@ -664,7 +669,7 @@
|
||||
"settings": {
|
||||
"title": "Settings",
|
||||
"info": "These settings are global and apply to all domains.",
|
||||
"location": "Mail server location",
|
||||
"location": "Mail Server Location",
|
||||
"maxMailSize": "Maximum email size",
|
||||
"spamFilter": "Spam filtering",
|
||||
"spamFilterOverview": "{{ blacklistCount }} address(es) on the blocklist.",
|
||||
@@ -675,7 +680,8 @@
|
||||
"solrRunning": "Running",
|
||||
"solrNotRunning": "Not Running",
|
||||
"acl": "Mail ACL",
|
||||
"aclOverview": "{{ dnsblZonesCount }} DNSBL zone(s)"
|
||||
"aclOverview": "{{ dnsblZonesCount }} DNSBL zone(s)",
|
||||
"virtualAllMail": "\"All Mail\" Folder"
|
||||
},
|
||||
"eventlog": {
|
||||
"title": "Email Event Log",
|
||||
@@ -709,7 +715,7 @@
|
||||
},
|
||||
"changeDomainDialog": {
|
||||
"title": "Change Email Server Location",
|
||||
"description": "Cloudron will make the necessary DNS changes across all the domains and restart the mail server. Desktop & Mobile email clients have to be re-configured to use this new location as the IMAP and SMTP server.",
|
||||
"description": "This will move the IMAP and SMTP server to the specified location.",
|
||||
"location": "Location",
|
||||
"locationPlaceholder": "Leave empty to use bare domain",
|
||||
"manualInfo": "Add an A record manually for {{ domain }} to this Cloudron's public IP"
|
||||
@@ -766,6 +772,10 @@
|
||||
},
|
||||
"action": {
|
||||
"queue": "Queue"
|
||||
},
|
||||
"changeVirtualAllMailDialog": {
|
||||
"title": "\"All Mail\" Folder",
|
||||
"description": "The \"All Mail\" folder is a single folder that contains all the mails in your Inbox. The folder can be useful in mail clients that do not support recursive folder search."
|
||||
}
|
||||
},
|
||||
"network": {
|
||||
@@ -792,7 +802,8 @@
|
||||
},
|
||||
"dyndns": {
|
||||
"title": "Dynamic DNS",
|
||||
"description": "Enable this option to keep all your DNS records in sync with a changing IP address. This is useful when Cloudron runs in a network with a frequently changing public IP address like a home connection."
|
||||
"description": "Enable this option to keep all your DNS records in sync with a changing IP address. This is useful when Cloudron runs in a network with a frequently changing public IP address like a home connection.",
|
||||
"showLogsAction": "Show Logs"
|
||||
},
|
||||
"configureIp": {
|
||||
"title": "Configure IP Provider",
|
||||
@@ -808,7 +819,13 @@
|
||||
},
|
||||
"configureIpv6": {
|
||||
"title": "Configure IPv6 Provider"
|
||||
}
|
||||
},
|
||||
"trustedIps": {
|
||||
"description": "HTTP headers from matching IP addresses will be trusted",
|
||||
"title": "Configure Trusted IPs",
|
||||
"summary": "{{ trustCount }} IPs trusted"
|
||||
},
|
||||
"trustedIpRanges": "Trusted IPs & Ranges "
|
||||
},
|
||||
"services": {
|
||||
"title": "Services",
|
||||
@@ -841,7 +858,7 @@
|
||||
"cloudronId": "Cloudron ID",
|
||||
"subscriptionEndsAt": "Canceled and ends on",
|
||||
"subscriptionSetupAction": "Upgrade to Premium",
|
||||
"subscriptionChangeAction": "Change Subscription",
|
||||
"subscriptionChangeAction": "Manage Subscription",
|
||||
"subscriptionReactivateAction": "Reactivate Subscription",
|
||||
"emailNotVerified": "Email not yet verified"
|
||||
},
|
||||
@@ -925,7 +942,7 @@
|
||||
"emailPlaceholder": "If needed, provide an email address different from above to reach you",
|
||||
"emailVerifyAction": "Verify now",
|
||||
"emailNotVerified": "Your cloudron.io account email {{ email }} is not verified. Please verify it to open support tickets.",
|
||||
"communityAppDisclaimer": "We only provide support via tickets for apps installed from the Core repository. Please ask in our forum instead."
|
||||
"typeBilling": "Billing Issue"
|
||||
},
|
||||
"remoteSupport": {
|
||||
"title": "Remote Support",
|
||||
@@ -934,6 +951,10 @@
|
||||
"warning": "Do not enable this option unless requested by the Cloudron support team.",
|
||||
"disableAction": "Disable SSH support access",
|
||||
"enableAction": "Enable SSH support access"
|
||||
},
|
||||
"help": {
|
||||
"title": "Help",
|
||||
"description": "Please use the following resources for help and support:\n* [Cloudron Forum]({{ forumLink }}) - Please use the Support and App specific categories for questions.\n* [Cloudron Docs & Knowledge Base]({{ docsLink }})\n* [Custom App Packaging & API]({{ packagingLink }})\n"
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
@@ -958,7 +979,19 @@
|
||||
"graphTitle": "Percentage",
|
||||
"graphSubtext": "Only apps using more than {{ threshold }} of cpu are shown"
|
||||
},
|
||||
"selectPeriodLabel": "Select Period"
|
||||
"selectPeriodLabel": "Select Period",
|
||||
"info": {
|
||||
"platformVersion": "Platform Version",
|
||||
"title": "Info",
|
||||
"vendor": "Vendor",
|
||||
"product": "Product",
|
||||
"memory": "Memory",
|
||||
"uptime": "Uptime",
|
||||
"activationTime": "Cloudron Creation Time"
|
||||
},
|
||||
"graphs": {
|
||||
"title": "Graphs"
|
||||
}
|
||||
},
|
||||
"eventlog": {
|
||||
"title": "Event Log",
|
||||
@@ -983,7 +1016,7 @@
|
||||
},
|
||||
"changeDashboardDomain": {
|
||||
"title": "Change Dashboard Domain",
|
||||
"description": "This will move the dashboard and the email server to the <code>my</code>subdomain of the selected domain.",
|
||||
"description": "This will move the dashboard to the <code>my</code>subdomain of the selected domain.",
|
||||
"changeAction": "Change Domain",
|
||||
"cancelAction": "Cancel",
|
||||
"showLogsAction": "Show Logs"
|
||||
@@ -1039,7 +1072,13 @@
|
||||
"hetznerToken": "Hetzner Token",
|
||||
"cloudflareDefaultProxyStatus": "Enable proxying for new DNS records",
|
||||
"porkbunApikey": "API Key",
|
||||
"porkbunSecretapikey": "Secret API Key"
|
||||
"porkbunSecretapikey": "Secret API Key",
|
||||
"bunnyAccessKey": "Bunny Access Key",
|
||||
"dnsimpleAccessToken": "Access Token",
|
||||
"ovhEndpoint": "Endpoint",
|
||||
"ovhConsumerKey": "Consumer Key",
|
||||
"ovhAppKey": "Application Key",
|
||||
"ovhAppSecret": "Application Secret"
|
||||
},
|
||||
"removeDialog": {
|
||||
"title": "Really remove {{ domain }}?",
|
||||
@@ -1055,7 +1094,8 @@
|
||||
"domainWellKnown": {
|
||||
"title": "Well-Known locations of {{ domain }}"
|
||||
},
|
||||
"tooltipWellKnown": "Set Well-Known Locations"
|
||||
"tooltipWellKnown": "Set Well-Known Locations",
|
||||
"count": "Total domains: {{ count }}"
|
||||
},
|
||||
"notifications": {
|
||||
"title": "Notifications",
|
||||
@@ -1067,7 +1107,9 @@
|
||||
"logs": {
|
||||
"title": "Logs",
|
||||
"clear": "Clear View",
|
||||
"download": "Download Full Logs"
|
||||
"download": "Download Full Logs",
|
||||
"notFoundError": "No such task or app",
|
||||
"logsGoneError": "Log file(s) not found"
|
||||
},
|
||||
"terminal": {
|
||||
"title": "Terminal",
|
||||
@@ -1112,7 +1154,8 @@
|
||||
"renameDialog": {
|
||||
"title": "Rename {{ fileName }}",
|
||||
"newName": "New Name",
|
||||
"rename": "Rename"
|
||||
"rename": "Rename",
|
||||
"reallyOverwrite": "A file with that name already exists. Overwrite existing file?"
|
||||
},
|
||||
"chownDialog": {
|
||||
"title": "Change ownership",
|
||||
@@ -1165,7 +1208,8 @@
|
||||
"cut": "Cut",
|
||||
"copy": "Copy",
|
||||
"paste": "Paste",
|
||||
"selectAll": "Select All"
|
||||
"selectAll": "Select All",
|
||||
"open": "Open"
|
||||
},
|
||||
"mtime": "Modified"
|
||||
},
|
||||
@@ -1180,7 +1224,19 @@
|
||||
},
|
||||
"status": {
|
||||
"restartingApp": "restarting app"
|
||||
}
|
||||
},
|
||||
"uploader": {
|
||||
"uploading": "Uploading",
|
||||
"exitWarning": "Upload still in progress. Really close this page?"
|
||||
},
|
||||
"textEditor": {
|
||||
"undo": "Undo",
|
||||
"redo": "Redo",
|
||||
"save": "Save"
|
||||
},
|
||||
"extractionInProgress": "Extraction in progress",
|
||||
"pasteInProgress": "Pasting in progress",
|
||||
"deleteInProgress": "Deletion in progress"
|
||||
},
|
||||
"email": {
|
||||
"backAction": "Back to Email",
|
||||
@@ -1454,7 +1510,8 @@
|
||||
"description": "If the server is running out of disk space, use this to move the app's data to a <a href=\"/#/volumes\">volume</a>. Any data here is part of the app's backup.",
|
||||
"dataDirPlaceholder": "Leave empty to use platform default",
|
||||
"moveAction": "Move Data",
|
||||
"diskUsage": "The app is currently using {{ size }} of storage (as of {{ date }})."
|
||||
"diskUsage": "The app is currently using {{ size }} of storage (as of {{ date }}).",
|
||||
"mountTypeWarning": "The destination file system must support file permissions and ownership for the move to work"
|
||||
},
|
||||
"mounts": {
|
||||
"title": "Mounts",
|
||||
@@ -1698,6 +1755,17 @@
|
||||
"label": "Label",
|
||||
"clearIconAction": "Clear Icon",
|
||||
"clearIconDescription": "This will try to fetch the app's favicon on save."
|
||||
},
|
||||
"servicesTabTitle": "Services",
|
||||
"turn": {
|
||||
"title": "TURN Setup",
|
||||
"enable": "Configure the app to use the built-in TURN server",
|
||||
"disable": "Do not configure the app's TURN settings. The app's TURN settings are left alone. You can configure it inside the app."
|
||||
},
|
||||
"redis": {
|
||||
"title": "Redis Configuration",
|
||||
"enable": "Configure the app to use Redis",
|
||||
"disable": "Disable Redis"
|
||||
}
|
||||
},
|
||||
"login": {
|
||||
@@ -1707,7 +1775,9 @@
|
||||
"password": "Password",
|
||||
"2faToken": "2FA Token (if enabled)",
|
||||
"signInAction": "Sign in",
|
||||
"resetPasswordAction": "Reset password"
|
||||
"resetPasswordAction": "Reset password",
|
||||
"errorIncorrect2FAToken": "2FA token is invalid",
|
||||
"errorInternal": "Internal error, try again later"
|
||||
},
|
||||
"passwordReset": {
|
||||
"title": "Password reset",
|
||||
@@ -1787,7 +1857,8 @@
|
||||
"zh_Hans": "Chinese (Simplified)",
|
||||
"es": "Spanish",
|
||||
"ru": "Russian",
|
||||
"pt": "Portuguese"
|
||||
"pt": "Portuguese",
|
||||
"da": "Danish"
|
||||
},
|
||||
"volumes": {
|
||||
"title": "Volumes",
|
||||
@@ -1824,7 +1895,11 @@
|
||||
"mountStatus": "Mount Status",
|
||||
"type": "Type",
|
||||
"localDirectory": "Local Directory",
|
||||
"remountActionTooltip": "Remount Volume"
|
||||
"remountActionTooltip": "Remount Volume",
|
||||
"editVolumeDialog": {
|
||||
"title": "Edit volume {{ name }}"
|
||||
},
|
||||
"editActionTooltip": "Edit Volume"
|
||||
},
|
||||
"newLoginEmail": {
|
||||
"subject": "[<%= cloudron %>] New login on your account",
|
||||
@@ -1840,5 +1915,43 @@
|
||||
"mounts": {
|
||||
"description": "Apps can access mounted <a href=\"/#/volumes\">volumes</a> via <code>/media/{volume name}</code> directory. This data is not included in the app's backup."
|
||||
}
|
||||
}
|
||||
},
|
||||
"oidc": {
|
||||
"newClientDialog": {
|
||||
"title": "Add Client",
|
||||
"description": "Add new OpenID connect client settings.",
|
||||
"createAction": "Create"
|
||||
},
|
||||
"client": {
|
||||
"name": "Name",
|
||||
"id": "Client ID",
|
||||
"secret": "Client Secret",
|
||||
"signingAlgorithm": "Signing Algorithm",
|
||||
"loginRedirectUri": "Login callback Url (comma separated if more than one)",
|
||||
"logoutRedirectUri": "Logout callback Url (optional)"
|
||||
},
|
||||
"title": "OpenID Connect Provider",
|
||||
"description": "Cloudron can act as an OpenID Connect provider for internal apps and external services.",
|
||||
"editClientDialog": {
|
||||
"title": "Edit Client {{ client }}"
|
||||
},
|
||||
"deleteClientDialog": {
|
||||
"title": "Really delete client {{ client }}?",
|
||||
"description": "This will disconnect all external OpenID apps from this Cloudron using this client ID."
|
||||
},
|
||||
"env": {
|
||||
"discoveryUrl": "Discovery URL",
|
||||
"logoutUrl": "Logout URL",
|
||||
"profileEndpoint": "Profile Endpoint",
|
||||
"keysEndpoint": "Keys Endpoint",
|
||||
"tokenEndpoint": "Token Endpoint",
|
||||
"authEndpoint": "Auth Endpoint"
|
||||
},
|
||||
"clients": {
|
||||
"title": "Clients",
|
||||
"newClient": "New client",
|
||||
"empty": "No clients yet"
|
||||
}
|
||||
},
|
||||
"automation": "Automation"
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
"switchToLoginAction": "¿Ya tienes una cuenta? Inicia sesión",
|
||||
"switchToSignUpAction": "¿No tienes una cuenta todavía? Regístrate",
|
||||
"createAccountAction": "Crear Cuenta",
|
||||
"loginAction": "Iniciar sesión",
|
||||
"loginAction": "Iniciar Sesión",
|
||||
"errorWrongPassword": "Contraseña errónea",
|
||||
"licenseCheckbox": "Acepto la <a href=\"{{ licenseLink }}\" target=\"_blank\">licencia de Cloudron</a>",
|
||||
"chooseAnOption": "Por favor escoge una opción…",
|
||||
@@ -72,7 +72,10 @@
|
||||
"email": "Email",
|
||||
"description": "Esta cuenta se usa para acceder a la App Store y administrar tu suscripción",
|
||||
"titleLogin": "Iniciar sesión en Cloudron.io",
|
||||
"titleSignUp": "Regístrate en Cloudron.io"
|
||||
"titleSignUp": "Regístrate en Cloudron.io",
|
||||
"setupWithTokenAction": "Ajustes",
|
||||
"setupToken": "Configurar Token",
|
||||
"titleToken": "Registrarse con el token de configuración"
|
||||
},
|
||||
"appNotFoundDialog": {
|
||||
"description": "No hay aplicación <b>{{ appId }}</b> con versión <b>{{ version }}</b>.",
|
||||
@@ -97,12 +100,14 @@
|
||||
},
|
||||
"action": {
|
||||
"logs": "Registros",
|
||||
"reboot": "Reiniciar"
|
||||
"reboot": "Reiniciar",
|
||||
"showLogs": "Mostrar registros"
|
||||
},
|
||||
"pagination": {
|
||||
"perPageSelector": "Mostrar {{ n }} por página",
|
||||
"next": "siguiente",
|
||||
"prev": "anterior"
|
||||
"prev": "anterior",
|
||||
"itemCount": "Encontrado {{ count }}"
|
||||
},
|
||||
"table": {
|
||||
"date": "Fecha"
|
||||
@@ -115,7 +120,8 @@
|
||||
"no": "No",
|
||||
"close": "Cerrar",
|
||||
"save": "Guardar",
|
||||
"cancel": "Cancelar"
|
||||
"cancel": "Cancelar",
|
||||
"delete": "Borrar"
|
||||
},
|
||||
"logout": "Salir",
|
||||
"offline": "Cloudron está desconectado. Reconectando…",
|
||||
@@ -123,12 +129,8 @@
|
||||
"prettyDate": {
|
||||
"justNow": "Ahora mismo",
|
||||
"yeserday": "Ayer",
|
||||
"yearsAgo": "hace {{ y }} años",
|
||||
"minutesAgo": "Hace {{ m }} minutos",
|
||||
"hoursAgo": "Hace {{ h }} horas",
|
||||
"daysAgo": "Hace {{ d }} días",
|
||||
"weeksAgo": "Hace {{ w }} semanas",
|
||||
"monthsAgo": "Hace {{ m }} meses"
|
||||
"hoursAgo": "Hace {{ h }} horas"
|
||||
},
|
||||
"multiselect": {
|
||||
"selected": "{{ n }} seleccionado",
|
||||
@@ -141,7 +143,10 @@
|
||||
},
|
||||
"enableAction": "Habilitar",
|
||||
"statusEnabled": "Habilitado",
|
||||
"statusDisabled": "Deshabilitado"
|
||||
"statusDisabled": "Deshabilitado",
|
||||
"loadingPlaceholder": "Cargando",
|
||||
"settings": "Ajustes",
|
||||
"saveAction": "Guardar"
|
||||
},
|
||||
"apps": {
|
||||
"domainsFilterHeader": "Todos los Dominios",
|
||||
@@ -161,12 +166,13 @@
|
||||
"description": "¿Qué te parece si instalas algunas? Echa un vistazo a la <a href=\"{{ appStoreLink }}\"> Tienda de Aplicaciones</a>",
|
||||
"title": "¡No hay aplicaciones instaladas todavía!"
|
||||
},
|
||||
"title": "Mis aplicaciones",
|
||||
"title": "Mis Aplicaciones",
|
||||
"groupsFilterHeader": "Todos los Grupos",
|
||||
"auth": {
|
||||
"nosso": "Inicia sesión con una cuenta dedicada",
|
||||
"sso": "Inicia sesión con las credenciales de Cloudron",
|
||||
"email": "Inicia sesión con el correo electrónico"
|
||||
"email": "Inicia sesión con el correo electrónico",
|
||||
"openid": "Iniciar sesión con Cloudron OpenID"
|
||||
},
|
||||
"addAppAction": "Añadir Aplicación",
|
||||
"addAppproxyAction": "Añadir Proxi de la Aplicación",
|
||||
@@ -205,7 +211,6 @@
|
||||
"provider": "Proveedor",
|
||||
"noopInfo": "La autentificación LDAP no está configurada.",
|
||||
"subscriptionRequiredAction": "Configura tu Suscripción Ahora",
|
||||
"subscriptionRequired": "Esta característica solo está habilitada en planes de pago.",
|
||||
"description": "Cloudron sincronizará usuarios y grupos desde un servidor LDAP o ActiveDirectory externo. La verificación de la contraseña para autentificar a esos usuarios se realiza en el servidor externo. La sincronización no se ejecuta automáticamente, sino que debe activarse manualmente.",
|
||||
"title": "Conectar un directorio externo",
|
||||
"auth": "Auth",
|
||||
@@ -218,7 +223,7 @@
|
||||
"subscriptionRequired": "Estas características solo están habilitadas para planes de pago.",
|
||||
"require2FACheckbox": "Requerir que los usuarios configuren 2FA",
|
||||
"allowProfileEditCheckbox": "Permitir a los usuarios editar su nombre y correo",
|
||||
"title": "Ajustes",
|
||||
"title": "Ajustes de usuario",
|
||||
"require2FAWarning": "Configura primero 2FA para tu cuenta para evitar que la bloqueen."
|
||||
},
|
||||
"groups": {
|
||||
@@ -245,7 +250,6 @@
|
||||
"setGhostTooltip": "Suplantar",
|
||||
"invitationTooltip": "Invitar Usuario",
|
||||
"mailmanagerTooltip": "Este usuario puede administrar usuarios y buzones de correo",
|
||||
"makeLocalTooltip": "Hacer que el usuario sea local",
|
||||
"count": "Total usuarios: {{ count }}"
|
||||
},
|
||||
"newUserAction": "Nuevo Usuario",
|
||||
@@ -389,12 +393,6 @@
|
||||
"all": "Todos los Usuarios",
|
||||
"active": "Usuarios Activos",
|
||||
"inactive": "Usuarios Inactivos"
|
||||
},
|
||||
"makeLocalDialog": {
|
||||
"title": "Hacer este usuario local",
|
||||
"description": "Esto migrará el usuario desde un directorio externo a Cloudron.",
|
||||
"submitAction": "Hacer local",
|
||||
"warning": "Se iniciará un restablecimiento de contraseña para establecer una contraseña local para este usuario."
|
||||
}
|
||||
},
|
||||
"backups": {
|
||||
@@ -404,7 +402,7 @@
|
||||
"description": "Ten cuidado al cargar estos registros en un servidor público, ya que pueden contener información confidencial."
|
||||
},
|
||||
"listing": {
|
||||
"stopTask": "Parar {{ taskType === 'backup' ? 'Backup' : 'Cleanup' }}",
|
||||
"stopTask": "Parar Backup",
|
||||
"backupNow": "Hacer Copia de Seguridad Ahora",
|
||||
"cleanupBackups": "Borrar Copias de Seguridad",
|
||||
"tooltipDownloadBackupConfig": "Descarga Configuración de la Copia de Seguridad",
|
||||
@@ -521,7 +519,8 @@
|
||||
"preserved": {
|
||||
"description": "Copia de seguridad persistente independientemente de la política de retención",
|
||||
"tooltip": "Esto también conservará el correo y las copias de seguridad de la aplicación {{ appsLength }}."
|
||||
}
|
||||
},
|
||||
"remotePath": "Ruta remota"
|
||||
}
|
||||
},
|
||||
"profile": {
|
||||
@@ -611,7 +610,7 @@
|
||||
"errorPasswordsDontMatch": "Las contraseñas no coinciden",
|
||||
"errorPasswordRequired": "Se requiere una contraseña",
|
||||
"newPasswordRepeat": "Repite nueva contraseña",
|
||||
"newPassword": "Nueva contraseña",
|
||||
"newPassword": "Nueva Contraseña",
|
||||
"currentPassword": "Contraseña actual",
|
||||
"title": "Cambia tu contraseña"
|
||||
},
|
||||
@@ -632,7 +631,8 @@
|
||||
},
|
||||
"changeBackgroundImage": {
|
||||
"title": "Establecer imagen de fondo"
|
||||
}
|
||||
},
|
||||
"enable2FANotAvailable": "No disponible para usuarios de una fuente de autentificación externa"
|
||||
},
|
||||
"emails": {
|
||||
"eventlog": {
|
||||
@@ -679,7 +679,8 @@
|
||||
"info": "Esta configuración es global y se aplica a todos los dominios.",
|
||||
"title": "Ajustes",
|
||||
"acl": "Correo ACL",
|
||||
"aclOverview": "{{ dnsblZonesCount }} zona(s) DNSBL"
|
||||
"aclOverview": "{{ dnsblZonesCount }} zona(s) DNSBL",
|
||||
"virtualAllMail": "Carpeta \"Todos los correos\""
|
||||
},
|
||||
"domains": {
|
||||
"testEmailTooltip": "Enviar Email de prueba",
|
||||
@@ -722,7 +723,7 @@
|
||||
"manualInfo": "Agrega un registro A manualmente para el {{dominio}} a la IP pública de este Cloudron",
|
||||
"locationPlaceholder": "Dejar vacío para usar el dominio desnudo",
|
||||
"location": "Ubicación",
|
||||
"description": "Cloudron realizará los cambios de DNS necesarios en todos los dominios y reiniciará el servidor de correo. Los clientes de correo electrónico de escritorio y móviles deben reconfigurarse para usar esta nueva ubicación como servidor IMAP y SMTP.",
|
||||
"description": "Esto moverá el servidor IMAP y SMTP a la ubicación especificada.",
|
||||
"title": "Cambiar ubicación del Servidor de Correo"
|
||||
},
|
||||
"aclDialog": {
|
||||
@@ -750,6 +751,10 @@
|
||||
},
|
||||
"action": {
|
||||
"queue": "Cola"
|
||||
},
|
||||
"changeVirtualAllMailDialog": {
|
||||
"title": "Carpeta \"Todos los correos\"",
|
||||
"description": "La carpeta \"Todos los correos\" es una carpeta única que contiene todos los correos electrónicos de su bandeja de entrada. La carpeta puede resultar útil en clientes de correo que no admiten la búsqueda recursiva de carpetas."
|
||||
}
|
||||
},
|
||||
"branding": {
|
||||
@@ -794,7 +799,8 @@
|
||||
},
|
||||
"dyndns": {
|
||||
"description": "Habilite esta opción para mantener todos sus registros DNS sincronizados con una dirección IP cambiante. Esto es útil cuando Cloudron se ejecuta en una red con una dirección IP pública que cambia con frecuencia, como una conexión doméstica.",
|
||||
"title": "DNS Dinámico"
|
||||
"title": "DNS Dinámico",
|
||||
"showLogsAction": "Mostrar registros"
|
||||
},
|
||||
"ipv4": {
|
||||
"address": "Dirección IPv4"
|
||||
@@ -806,7 +812,13 @@
|
||||
},
|
||||
"configureIpv6": {
|
||||
"title": "Configurar Proveedor de IPv6"
|
||||
}
|
||||
},
|
||||
"trustedIps": {
|
||||
"summary": "{{ trustCount }} IPs confiables",
|
||||
"description": "Se confiará en los encabezados HTTP de direcciones IP coincidentes",
|
||||
"title": "Configurar IP confiables"
|
||||
},
|
||||
"trustedIpRanges": "Rangos e IPs confiables "
|
||||
},
|
||||
"services": {
|
||||
"configure": {
|
||||
@@ -826,7 +838,7 @@
|
||||
"service": "Servicio",
|
||||
"description": "Los servicios de Cloudron implementan funcionalidades como bases de datos, correo electrónico y autentificación.",
|
||||
"title": "Servicios",
|
||||
"refresh": "Actualizar"
|
||||
"refresh": "Refrescar"
|
||||
},
|
||||
"settings": {
|
||||
"appstoreAccount": {
|
||||
@@ -905,7 +917,7 @@
|
||||
"domains": {
|
||||
"title": "Dominios y Certificados",
|
||||
"changeDashboardDomain": {
|
||||
"description": "Esto moverá el Panel y el Servidor de Correo al subdominio <code>my</code> del dominio seleccionado.",
|
||||
"description": "Esto moverá el panel al subdominio <code>my</code> del dominio seleccionado.",
|
||||
"showLogsAction": "Mostrar Registros",
|
||||
"cancelAction": "Cancelar",
|
||||
"changeAction": "Cambiar Dominio",
|
||||
@@ -954,7 +966,16 @@
|
||||
"vultrToken": "Token Vultr",
|
||||
"jitsiHostname": "Ubicación de Jitsi",
|
||||
"wellKnownDescription": "Cloudron utilizará los valores para responder a las URLs <code>/.well-known/</code> . Ten en cuenta que la aplicación debe estar disponible en el dominio desnudo <code>{{ domain }}</code> para que esto funcione. Consulta <a href=\"{{docsLink}}\" target=\"_blank\">esta documentación</a> para más información.",
|
||||
"hetznerToken": "Token de Hetzner"
|
||||
"hetznerToken": "Token de Hetzner",
|
||||
"bunnyAccessKey": "Clave de acceso Bunny",
|
||||
"cloudflareDefaultProxyStatus": "Habilitar proxy para nuevos registros DNS",
|
||||
"porkbunApikey": "Clave API",
|
||||
"porkbunSecretapikey": "Clave API secreta",
|
||||
"dnsimpleAccessToken": "Token de acceso",
|
||||
"ovhEndpoint": "Punto final",
|
||||
"ovhConsumerKey": "Clave del consumidor",
|
||||
"ovhAppKey": "Clave de Aplicación",
|
||||
"ovhAppSecret": "Clave Secreta Aplicación"
|
||||
},
|
||||
"subscriptionRequired": {
|
||||
"setupAction": "Configura tu suscripción",
|
||||
@@ -986,7 +1007,8 @@
|
||||
"domainWellKnown": {
|
||||
"title": "Ubicaciones Well-known de {{ domain }}"
|
||||
},
|
||||
"tooltipWellKnown": "Establece las ubicaciones Well-Known"
|
||||
"tooltipWellKnown": "Establece las ubicaciones Well-Known",
|
||||
"count": "Dominios totales: {{ count }}"
|
||||
},
|
||||
"app": {
|
||||
"appInfo": {
|
||||
@@ -1042,7 +1064,8 @@
|
||||
"dataDirPlaceholder": "Dejar vacío para usar la plataforma predeterminada",
|
||||
"description": "Si el servidor se está quedando sin espacio en disco, usa esto para mover los datos de la aplicación a un <a href=\"/#/volumes\">volumen</a>. Cualquier dato aquí es parte de la copia de seguridad de la aplicación.",
|
||||
"moveAction": "Mover datos",
|
||||
"diskUsage": "Actualmente, la aplicación está usando {{ size }} de almacenamiento (hasta el {{ date }})."
|
||||
"diskUsage": "Actualmente, la aplicación está usando {{ size }} de almacenamiento (hasta el {{ date }}).",
|
||||
"mountTypeWarning": "El sistema de archivos de destino debe admitir permisos y propiedad de los archivos para que el traslado funcione"
|
||||
}
|
||||
},
|
||||
"logsActionTooltip": "Registros",
|
||||
@@ -1102,7 +1125,8 @@
|
||||
"saveAction": "Guardar",
|
||||
"description": "La configuración de esta opción anulará cualquier encabezado CSP enviado por la propia aplicación",
|
||||
"title": "Política de seguridad de contenido"
|
||||
}
|
||||
},
|
||||
"hstsPreload": "Habilitar la carga previa de HSTS para este sitio y todos los subdominios"
|
||||
},
|
||||
"email": {
|
||||
"from": {
|
||||
@@ -1211,7 +1235,8 @@
|
||||
"description": "Todos los datos generados entre ahora y la última copia de seguridad conocida se perderán de forma irrevocable. Se recomienda crear una copia de seguridad de los datos actuales antes de intentar una importación.",
|
||||
"title": "Importar Backup",
|
||||
"uploadAction": "Subir Configuración de Backup",
|
||||
"importAction": "Importar"
|
||||
"importAction": "Importar",
|
||||
"remotePath": "Ruta del Backup"
|
||||
},
|
||||
"restoreDialog": {
|
||||
"warning": "Todos los datos generados entre ahora y la última copia de seguridad conocida se perderán de forma irrevocable. Se recomienda crear una copia de seguridad de los datos actuales antes de intentar una restauración.",
|
||||
@@ -1314,6 +1339,17 @@
|
||||
"label": "Etiqueta",
|
||||
"clearIconAction": "Borrar icono",
|
||||
"clearIconDescription": "Esto intentará obtener el favicon de la aplicación al guardar."
|
||||
},
|
||||
"servicesTabTitle": "Servicios",
|
||||
"turn": {
|
||||
"title": "Configuración de TURN",
|
||||
"enable": "Configura la aplicación para utilizar el servidor TURN integrado",
|
||||
"disable": "No configures los ajustes de la aplicación TURN. Su configuración se deja como está. Puedes hacer los ajustes dentro de la aplicación."
|
||||
},
|
||||
"redis": {
|
||||
"title": "Configuración de Redis",
|
||||
"enable": "Configura la aplicación para usar Redis",
|
||||
"disable": "Deshabilitar Redis"
|
||||
}
|
||||
},
|
||||
"lang": {
|
||||
@@ -1328,7 +1364,8 @@
|
||||
"en": "Inglés",
|
||||
"es": "Español",
|
||||
"ru": "Ruso",
|
||||
"pt": "Portugués"
|
||||
"pt": "Portugués",
|
||||
"da": "Danés"
|
||||
},
|
||||
"system": {
|
||||
"title": "Información del Sistema",
|
||||
@@ -1349,9 +1386,22 @@
|
||||
"title": "Uso del Disco",
|
||||
"usedInfo": "{{ used }} usados de {{ size }}",
|
||||
"uninstalledApp": "Aplicación desinstalada",
|
||||
"volumeContent": "Este disco es el volumen <code>{{ name }}</code>"
|
||||
"volumeContent": "Este disco es el volumen <code>{{ name }}</code>",
|
||||
"diskSpeed": "Velocidad: {{ speed }} MB/seg"
|
||||
},
|
||||
"selectPeriodLabel": "Seleccionar Periodo"
|
||||
"selectPeriodLabel": "Seleccionar Periodo",
|
||||
"info": {
|
||||
"title": "Información",
|
||||
"memory": "Memoria",
|
||||
"uptime": "Tiempo de actividad",
|
||||
"activationTime": "Tiempo de creación de Cloudron",
|
||||
"platformVersion": "Versión de plataforma",
|
||||
"product": "Producto",
|
||||
"vendor": "Vendedor"
|
||||
},
|
||||
"graphs": {
|
||||
"title": "Gráficos"
|
||||
}
|
||||
},
|
||||
"support": {
|
||||
"remoteSupport": {
|
||||
@@ -1381,9 +1431,13 @@
|
||||
"emailPlaceholder": "Si es necesario, proporciona una dirección de correo electrónico diferente de la anterior para contactarte",
|
||||
"emailVerifyAction": "Verificar ahora",
|
||||
"emailNotVerified": "El correo electrónico de su cuenta cloudron.io {{email}} no está verificado. Verifíquelo para abrir tickets de soporte.",
|
||||
"communityAppDisclaimer": "Solo brindamos soporte a través de tickets para aplicaciones instaladas desde el repositorio principal. Por favor, si no es tu caso pregunta en nuestro foro ."
|
||||
"typeBilling": "Problema de facturación"
|
||||
},
|
||||
"title": "Soporte"
|
||||
"title": "Soporte",
|
||||
"help": {
|
||||
"title": "Ayuda",
|
||||
"description": "Utiliza los siguientes recursos para obtener ayuda y soporte:\n* [Foro de Cloudron]({{ forumLink }}) - Utiliza las categorías específicas de Soporte y Aplicación si tiene preguntas.\n* [Base de conocimientos y documentos de Cloudron]({{ docsLink }})\n* [API y empaquetado de aplicaciones personalizadas]({{ packagingLink }})\n"
|
||||
}
|
||||
},
|
||||
"volumes": {
|
||||
"removeVolumeDialog": {
|
||||
@@ -1408,7 +1462,7 @@
|
||||
"removeVolumeActionTooltip": "Borrar Volumen",
|
||||
"openFileManagerActionTooltip": "Abrir Gestor de Archivos",
|
||||
"name": "Nombre",
|
||||
"hostPath": "Punto de montaje",
|
||||
"hostPath": "Objetivo",
|
||||
"addVolumeAction": "Añade un Volumen",
|
||||
"title": "Volúmenes",
|
||||
"description": "Los volúmenes son sistemas de archivos locales o remotos. Se pueden usar como el almacenamiento de datos principal de una aplicación o como una ubicación de almacenamiento compartida entre aplicaciones.",
|
||||
@@ -1420,7 +1474,11 @@
|
||||
"title": "Actualizar Volumen {{ volume }}"
|
||||
},
|
||||
"tooltipEdit": "Editar Volumen",
|
||||
"remountActionTooltip": "Volver a montar Volumen"
|
||||
"remountActionTooltip": "Volver a montar Volumen",
|
||||
"editVolumeDialog": {
|
||||
"title": "Editar volumen {{ name }}"
|
||||
},
|
||||
"editActionTooltip": "Editar Volumen"
|
||||
},
|
||||
"eventlog": {
|
||||
"filterAllEvents": "Todos los Eventos",
|
||||
@@ -1454,7 +1512,8 @@
|
||||
"renameDialog": {
|
||||
"title": "Renombrar {{ fileName }}",
|
||||
"newName": "Nuevo Nombre",
|
||||
"rename": "Renombrar"
|
||||
"rename": "Renombrar",
|
||||
"reallyOverwrite": "Ya existe un archivo con ese nombre. ¿Sobrescribir el archivo existente?"
|
||||
},
|
||||
"chownDialog": {
|
||||
"newOwner": "Nuevo propietario",
|
||||
@@ -1499,7 +1558,8 @@
|
||||
"copy": "Copiar",
|
||||
"paste": "Pegar",
|
||||
"selectAll": "Seleccionar todo",
|
||||
"download": "Descargar"
|
||||
"download": "Descargar",
|
||||
"open": "Abrir"
|
||||
},
|
||||
"mtime": "Modificado"
|
||||
},
|
||||
@@ -1514,12 +1574,26 @@
|
||||
},
|
||||
"extract": {
|
||||
"error": "La extracción falló: {{ message }}"
|
||||
}
|
||||
},
|
||||
"extractionInProgress": "Extracción en progreso",
|
||||
"uploader": {
|
||||
"exitWarning": "Subida en progreso... ¿quieres realmente cerrar esta página?",
|
||||
"uploading": "Subiendo"
|
||||
},
|
||||
"textEditor": {
|
||||
"undo": "Deshacer",
|
||||
"redo": "Rehacer",
|
||||
"save": "Guardar"
|
||||
},
|
||||
"pasteInProgress": "Pegado en progreso",
|
||||
"deleteInProgress": "Borrado en progreso"
|
||||
},
|
||||
"logs": {
|
||||
"download": "Descarga los Registros Completos",
|
||||
"clear": "Borrar Vista",
|
||||
"title": "Registros"
|
||||
"title": "Registros",
|
||||
"notFoundError": "No existe esa tarea o aplicación",
|
||||
"logsGoneError": "Archivo(s) de registro no encontrados"
|
||||
},
|
||||
"email": {
|
||||
"signature": {
|
||||
@@ -1755,7 +1829,7 @@
|
||||
"newPassword": {
|
||||
"errorLength": "La contraseña debe tener al menos 8 y un máximo de 265 caracteres",
|
||||
"title": "Establecer nueva contraseña",
|
||||
"password": "Nueva contraseña",
|
||||
"password": "Nueva Contraseña",
|
||||
"passwordRepeat": "Repetir Contraseña",
|
||||
"errorMismatch": "Las contraseñas no coinciden"
|
||||
},
|
||||
@@ -1815,8 +1889,10 @@
|
||||
"username": "Nombre de usuario",
|
||||
"password": "Contraseña",
|
||||
"2faToken": "Token 2FA (si está habilitado)",
|
||||
"signInAction": "Iniciar sesión",
|
||||
"resetPasswordAction": "Resetear contraseña"
|
||||
"signInAction": "Iniciar Sesión",
|
||||
"resetPasswordAction": "Resetear contraseña",
|
||||
"errorIncorrect2FAToken": "El token 2FA es inválido",
|
||||
"errorInternal": "Error interno, prueba de nuevo más tarde"
|
||||
},
|
||||
"newLoginEmail": {
|
||||
"subject": "[<% = cloudron%>] Nuevo inicio de sesión en tu cuenta",
|
||||
@@ -1832,5 +1908,43 @@
|
||||
"mounts": {
|
||||
"description": "Las aplicaciones pueden acceder a <a href=\"/#/volumes\">volúmenes</a> montados a través del directorio <code>/media/{volume name}</code>. Estos datos no están incluidos en la copia de seguridad de la aplicación."
|
||||
}
|
||||
}
|
||||
},
|
||||
"oidc": {
|
||||
"newClientDialog": {
|
||||
"title": "Añadir Cliente",
|
||||
"description": "Agrega una nueva configuración de cliente de conexión de OpenID.",
|
||||
"createAction": "Crear"
|
||||
},
|
||||
"client": {
|
||||
"name": "Nombre",
|
||||
"id": "ID de cliente",
|
||||
"secret": "Secreto de cliente",
|
||||
"signingAlgorithm": "Algoritmo de firma",
|
||||
"loginRedirectUri": "URL de devolución de llamada de inicio de sesión (separadas por comas si hay más de una)",
|
||||
"logoutRedirectUri": "URL de devolución de llamada de cierre de sesión (opcional)"
|
||||
},
|
||||
"title": "Proveedor de conexión OpenID",
|
||||
"description": "Cloudron puede actuar como proveedor de OpenID Connect para aplicaciones internas y servicios externos.",
|
||||
"editClientDialog": {
|
||||
"title": "Editar cliente {{ client }}"
|
||||
},
|
||||
"deleteClientDialog": {
|
||||
"title": "¿Realmente quieres borrar el cliente {{ client }}?",
|
||||
"description": "Esto desconectará todas las aplicaciones OpenID externas de este Cloudron que utilicen este ID de cliente."
|
||||
},
|
||||
"env": {
|
||||
"discoveryUrl": "URL de descubrimiento",
|
||||
"logoutUrl": "URL de cierre de sesión",
|
||||
"profileEndpoint": "Punto final del perfil",
|
||||
"keysEndpoint": "Punto final de claves",
|
||||
"tokenEndpoint": "Punto final del Token",
|
||||
"authEndpoint": "Punto final de autenticación"
|
||||
},
|
||||
"clients": {
|
||||
"title": "Clientes",
|
||||
"newClient": "Nuevo cliente",
|
||||
"empty": "No hay clientes aún"
|
||||
}
|
||||
},
|
||||
"automation": "Automatización"
|
||||
}
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
"auth": {
|
||||
"nosso": "Se connecter avec un compte dédié",
|
||||
"email": "Se connecter avec une adresse email",
|
||||
"sso": "Se connecter avec vos identifiants Cloudron"
|
||||
"sso": "Se connecter avec vos identifiants Cloudron",
|
||||
"openid": "Se connecter avec Cloudron OpenID"
|
||||
},
|
||||
"addAppAction": "Ajouter Application",
|
||||
"addAppproxyAction": "Ajouter Proxy d'application",
|
||||
@@ -39,7 +40,8 @@
|
||||
"cancel": "Annuler",
|
||||
"save": "Sauvegarder",
|
||||
"no": "Non",
|
||||
"yes": "Oui"
|
||||
"yes": "Oui",
|
||||
"delete": "Supprimer"
|
||||
},
|
||||
"username": "Nom d'utilisateur",
|
||||
"actions": "Actions",
|
||||
@@ -50,11 +52,13 @@
|
||||
"pagination": {
|
||||
"prev": "préc.",
|
||||
"next": "suiv.",
|
||||
"perPageSelector": "Afficher {{ n }} par page"
|
||||
"perPageSelector": "Afficher {{ n }} par page",
|
||||
"itemCount": "Trouvé {{ count }}"
|
||||
},
|
||||
"action": {
|
||||
"logs": "Journaux",
|
||||
"reboot": "Redémarrer"
|
||||
"reboot": "Redémarrer",
|
||||
"showLogs": "Afficher Journaux"
|
||||
},
|
||||
"rebootDialog": {
|
||||
"rebootAction": "Redémarrer maintenant",
|
||||
@@ -77,11 +81,7 @@
|
||||
"yeserday": "Hier",
|
||||
"justNow": "À l'instant",
|
||||
"hoursAgo": "Il y a {{ h }} heures",
|
||||
"daysAgo": "Il y a {{ d }} jours",
|
||||
"weeksAgo": "Il y a {{ w }} semaines",
|
||||
"yearsAgo": "Il y a {{ y }} ans",
|
||||
"minutesAgo": "Il y a {{ m }} minutes",
|
||||
"monthsAgo": "Il y a {{ m }} mois"
|
||||
"minutesAgo": "Il y a {{ m }} minutes"
|
||||
},
|
||||
"statusEnabled": "Activé",
|
||||
"statusDisabled": "Désactivé",
|
||||
@@ -89,7 +89,10 @@
|
||||
"users": "Utilisateurs"
|
||||
},
|
||||
"disableAction": "Désactiver",
|
||||
"enableAction": "Activer"
|
||||
"enableAction": "Activer",
|
||||
"loadingPlaceholder": "Chargement",
|
||||
"settings": "Paramètres",
|
||||
"saveAction": "Sauvegarde"
|
||||
},
|
||||
"users": {
|
||||
"title": "Annuaire des utilisateurs",
|
||||
@@ -110,8 +113,7 @@
|
||||
"setGhostTooltip": "Emprunter l'identité",
|
||||
"invitationTooltip": "Envoyer une invitation à l'utilisateur",
|
||||
"mailmanagerTooltip": "Cet utilisateur peut gérer les utilisateurs et les boîtes mail",
|
||||
"count": "Total des utilisateurs : {{ count }}",
|
||||
"makeLocalTooltip": "Rendre l'utilisateur local"
|
||||
"count": "Total des utilisateurs : {{ count }}"
|
||||
},
|
||||
"newUserAction": "Nouvel utilisateur",
|
||||
"groups": {
|
||||
@@ -122,7 +124,7 @@
|
||||
"externalLdapTooltip": "Depuis un annuaire LDAP externe"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Paramètres",
|
||||
"title": "Paramètres Utilisateur",
|
||||
"allowProfileEditCheckbox": "Autoriser les utilisateurs à modifier leur nom et leur adresse email",
|
||||
"saveAction": "Enregistrer",
|
||||
"subscriptionRequired": "Ces fonctionnalités sont uniquement disponibles dans la version payante.",
|
||||
@@ -142,7 +144,6 @@
|
||||
"groupnameField": "Champ nom du groupe",
|
||||
"syncGroups": "Groupes synchronisés",
|
||||
"filter": "Filtre",
|
||||
"subscriptionRequired": "Cette fonctionnalité est disponible uniquement dans la version payante.",
|
||||
"acceptSelfSignedCert": "Accepter le certificat auto-signé",
|
||||
"usernameField": "Champ nom d'utilisateur",
|
||||
"groupFilter": "Filtre des groupes",
|
||||
@@ -268,12 +269,6 @@
|
||||
"title": "Lien d'invitation envoyé",
|
||||
"body": "Email envoyé à {{ email }}"
|
||||
},
|
||||
"makeLocalDialog": {
|
||||
"description": "Cela migrera l'utilisateur du répertoire externe vers le Cloudron.",
|
||||
"submitAction": "Rendre local",
|
||||
"title": "Rendre cet utilisateur local",
|
||||
"warning": "Une réinitialisation du mot de passe sera initiée pour définir un mot de passe local pour cet utilisateur."
|
||||
},
|
||||
"exposedLdap": {
|
||||
"secret": {
|
||||
"label": "Mot de passe de liaison",
|
||||
@@ -504,7 +499,8 @@
|
||||
"port": "Port",
|
||||
"cifsSealSupport": "Utilisez le cryptage du sceau. Nécessite au moins SMB v3",
|
||||
"chown": "Le système de fichiers distant prend en charge chown",
|
||||
"encryptedFilenames": "Crypter les noms de fichiers"
|
||||
"encryptedFilenames": "Crypter les noms de fichiers",
|
||||
"encryptFilenames": "Fichiers Cryptés"
|
||||
},
|
||||
"backupDetails": {
|
||||
"title": "Informations sur la sauvegarde",
|
||||
@@ -525,7 +521,7 @@
|
||||
"tooltipDownloadBackupConfig": "Télécharger le fichier de configuration de la sauvegarde",
|
||||
"cleanupBackups": "Supprimer toutes les sauvegardes",
|
||||
"backupNow": "Faire une sauvegarder maintenant",
|
||||
"stopTask": "Interrompre {{ taskType === 'backup' ? 'la sauvegarde' : 'Nettoyer' }}",
|
||||
"stopTask": "Interrompre la sauvegarde",
|
||||
"noBackups": "Aucune sauvegarde n'a encore été effectuée.",
|
||||
"contents": "Contenu",
|
||||
"version": "Version",
|
||||
@@ -546,7 +542,8 @@
|
||||
"preserved": {
|
||||
"description": "Sauvegarde persistante quelle que soit la politique de rétention",
|
||||
"tooltip": "Cela préservera également le courrier et les sauvegardes d'application {{ appsLength }}."
|
||||
}
|
||||
},
|
||||
"remotePath": "Répertoire Distant"
|
||||
}
|
||||
},
|
||||
"emails": {
|
||||
@@ -602,7 +599,8 @@
|
||||
"solrEnabled": "Activé",
|
||||
"solrRunning": "Actif",
|
||||
"acl": "Adresse ACL (liste de contrôle d'accès)",
|
||||
"aclOverview": "{{ dnsblZonesCount }} liste(s) DNSBL"
|
||||
"aclOverview": "{{ dnsblZonesCount }} liste(s) DNSBL",
|
||||
"virtualAllMail": "Dossier \"Tout les Emails\""
|
||||
},
|
||||
"domains": {
|
||||
"disabled": "Désactivé",
|
||||
@@ -861,7 +859,10 @@
|
||||
"titleLogin": "Se connecter à Cloudron.io",
|
||||
"description": "Ce compte permet d'accéder à l'App Store et de gérer votre abonnement",
|
||||
"2faToken": "Jeton 2FA (si activé)",
|
||||
"intendedUse": "Type d'usage"
|
||||
"intendedUse": "Type d'usage",
|
||||
"setupWithTokenAction": "Configuration",
|
||||
"setupToken": "Configuration Jeton",
|
||||
"titleToken": "Se connecter avec un Jeton"
|
||||
},
|
||||
"title": "App Store",
|
||||
"appNotFoundDialog": {
|
||||
@@ -1743,7 +1744,9 @@
|
||||
"usageInfo": "{{ available | prettyDiskSize }}</b> sur <b>{{ size | prettyDiskSize }}</b> disponible(s)",
|
||||
"mountedAt": "{{ filesystem }} <small>monté sur</small> {{ mountpoint }}",
|
||||
"title": "Utilisation du disque",
|
||||
"usedInfo": "{{ used }} utilisé de {{ size }}"
|
||||
"usedInfo": "{{ used }} utilisé de {{ size }}",
|
||||
"uninstalledApp": "Désinstaller App",
|
||||
"diskSpeed": "Vitesse : {{ speed }} MB/sec"
|
||||
},
|
||||
"title": "Info système"
|
||||
},
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"apps": {
|
||||
"tagsFilterHeaderAll": "Semua Tag",
|
||||
"adminPageActionTooltip": "Halaman Admin",
|
||||
"domainsFilterHeader": "Semua Domain",
|
||||
"groupsFilterHeader": "Semua Grup",
|
||||
"addAppAction": "Tambah Aplikasi",
|
||||
"title": "Aplikasi Saya",
|
||||
"tagsFilterHeader": "Tag: {{ tags }}"
|
||||
},
|
||||
"main": {
|
||||
"dialog": {
|
||||
"no": "Tidak",
|
||||
"yes": "Ya",
|
||||
"delete": "Hapus",
|
||||
"save": "Simpan"
|
||||
},
|
||||
"table": {
|
||||
"date": "Tanggal"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -727,7 +727,7 @@
|
||||
"title": "Logs"
|
||||
},
|
||||
"listing": {
|
||||
"stopTask": "Ferma {{ taskType === 'backup' ? 'Backup' : 'Pulizia' }}",
|
||||
"stopTask": "Ferma Backup",
|
||||
"backupNow": "Esegui il backup adesso",
|
||||
"cleanupBackups": "Pulizia Backup",
|
||||
"tooltipDownloadBackupConfig": "Scarica Configurazione Backup",
|
||||
@@ -932,7 +932,6 @@
|
||||
"server": "URL del Server",
|
||||
"noopInfo": "L'autenticazione LDAP non è configurata.",
|
||||
"subscriptionRequiredAction": "Attiva un piano a pagamento",
|
||||
"subscriptionRequired": "Questa funzionalità è disponibile solo nei piani a pagamento.",
|
||||
"description": "Cloudron sincronizzerà utenti e gruppi da un server LDAP o ActiveDirectory esterni. La verifica della password per l'autenticazione di tali utenti viene eseguita sul server esterno. La sincronizzazione non viene eseguita automaticamente ma deve essere attivata manualmente.",
|
||||
"auth": "Auth",
|
||||
"groupnameField": "Campo Groupname",
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
"auth": {
|
||||
"nosso": "Log in met specifiek account",
|
||||
"sso": "Log in met Cloudron aanmeldgegevens",
|
||||
"email": "Log in met e-mailadres"
|
||||
"email": "Log in met e-mailadres",
|
||||
"openid": "Log in met Cloudron OpenID"
|
||||
},
|
||||
"addAppAction": "App toevoegen",
|
||||
"addAppproxyAction": "App Proxy toevoegen",
|
||||
@@ -38,7 +39,8 @@
|
||||
"save": "Opslaan",
|
||||
"close": "Sluiten",
|
||||
"no": "Nee",
|
||||
"yes": "Ja"
|
||||
"yes": "Ja",
|
||||
"delete": "Verwijder"
|
||||
},
|
||||
"username": "Gebruikersnaam",
|
||||
"displayName": "Naam",
|
||||
@@ -54,7 +56,8 @@
|
||||
},
|
||||
"action": {
|
||||
"reboot": "Herstart",
|
||||
"logs": "Logbestanden"
|
||||
"logs": "Logbestanden",
|
||||
"showLogs": "Toon logbestanden"
|
||||
},
|
||||
"clipboard": {
|
||||
"copied": "Gekopieerd naar klembord",
|
||||
@@ -78,11 +81,7 @@
|
||||
"justNow": "zojuist",
|
||||
"yeserday": "Gisteren",
|
||||
"minutesAgo": "{{ m }} minuten geleden",
|
||||
"hoursAgo": "{{ h }} uur geleden",
|
||||
"daysAgo": "{{ d }} dagen geleden",
|
||||
"weeksAgo": "{{ w }} weken geleden",
|
||||
"monthsAgo": "{{ m }} maanden geleden",
|
||||
"yearsAgo": "{{ y }} jaren geleden"
|
||||
"hoursAgo": "{{ h }} uur geleden"
|
||||
},
|
||||
"navbar": {
|
||||
"users": "Gebruikers"
|
||||
@@ -91,7 +90,9 @@
|
||||
"enableAction": "Inschakelen",
|
||||
"statusEnabled": "Ingeschakeld",
|
||||
"statusDisabled": "Uitgeschakeld",
|
||||
"loadingPlaceholder": "Laden"
|
||||
"loadingPlaceholder": "Laden",
|
||||
"settings": "Instellingen",
|
||||
"saveAction": "Opslaan"
|
||||
},
|
||||
"appstore": {
|
||||
"title": "App Store",
|
||||
@@ -164,7 +165,10 @@
|
||||
"loginAction": "Inloggen",
|
||||
"createAccountAction": "Account aanmaken",
|
||||
"switchToSignUpAction": "Nog geen account? Registreer",
|
||||
"switchToLoginAction": "Al een account? Log in"
|
||||
"switchToLoginAction": "Al een account? Log in",
|
||||
"setupWithTokenAction": "Instellen",
|
||||
"setupToken": "Instel Token",
|
||||
"titleToken": "Inloggen met Instel Token"
|
||||
},
|
||||
"searchPlaceholder": "Zoek voor alternatieven zoals Github, Dropbox, Slack, Trello, …",
|
||||
"appNotFoundDialog": {
|
||||
@@ -197,8 +201,7 @@
|
||||
"invitationTooltip": "Gebruiker uitnodigen",
|
||||
"setGhostTooltip": "Nabootsen",
|
||||
"mailmanagerTooltip": "Deze gebruiker kan gebruikers en mailboxen beheren",
|
||||
"count": "Totaal gebruikers: {{ count }}",
|
||||
"makeLocalTooltip": "Maak gebruiker lokaal"
|
||||
"count": "Totaal gebruikers: {{ count }}"
|
||||
},
|
||||
"groups": {
|
||||
"title": "Groepen",
|
||||
@@ -208,7 +211,7 @@
|
||||
"newGroupAction": "Nieuwe groep"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Instellingen",
|
||||
"title": "Gebruiker instellingen",
|
||||
"require2FACheckbox": "Gebruikers moeten 2FA activeren",
|
||||
"subscriptionRequired": "Deze functies zijn alleen beschikbaar voor betaalde abonnementen.",
|
||||
"subscriptionRequiredAction": "Abonnement nemen",
|
||||
@@ -218,7 +221,6 @@
|
||||
},
|
||||
"externalLdap": {
|
||||
"title": "Verbind met een externe lijst",
|
||||
"subscriptionRequired": "Deze functie is alleen beschikbaar voor betaalde abonnementen.",
|
||||
"subscriptionRequiredAction": "Neem nu een abonnement",
|
||||
"noopInfo": "LDAP authenticatie is niet geconfigureerd.",
|
||||
"provider": "Aanbieder",
|
||||
@@ -232,16 +234,17 @@
|
||||
"groupnameField": "Veld voor groepsnaam",
|
||||
"server": "Server URL",
|
||||
"showLogsAction": "Toon logbestanden",
|
||||
"syncAction": "Synchroniseer",
|
||||
"syncAction": "Sync",
|
||||
"configureAction": "Configureer",
|
||||
"bindUsername": "Bind DN/Username (optioneel)",
|
||||
"bindPassword": "Bind Password (optioneel)",
|
||||
"errorSelfSignedCert": "Server gebruikt een ongeldig of zelf-ondertekend certificaat.",
|
||||
"description": "Cloudron synchroniseert gebruikers en groepen van een extern LDAP of ActiveDirectory server. Wachtwoordverificatie vindt plaats door de externe server. De synchronisatie is niet automatisch en dient handmatig gestart te worden.",
|
||||
"description": "Deze instelling synchroniseert en authentificeert gebruikers en groepen van een extern LDAP of ActiveDirectory server. De synchronisatie is periodiek maar kan ook handmatig gestart worden.",
|
||||
"auth": "Authenticatie",
|
||||
"autocreateUsersOnLogin": "Maak automatisch gebruikers aan na inloggen bij deze Cloudron",
|
||||
"autocreateUsersOnLogin": "Maak automatisch gebruikers bij inloggen",
|
||||
"providerOther": "Anders",
|
||||
"providerDisabled": "Uitgeschakeld"
|
||||
"providerDisabled": "Uitgeschakeld",
|
||||
"disableWarning": "De authentificatie-bron van alle bestaande gebruikers zal worden omgezet naar authentificatie via de lokale wachtwoord database."
|
||||
},
|
||||
"subscriptionDialog": {
|
||||
"title": "Abonnement benodigd",
|
||||
@@ -270,7 +273,8 @@
|
||||
"errorInvalidUsername": "Dit is geen geldige gebruikersnaam",
|
||||
"usernamePlaceholder": "Optioneel. Indien niet ingevuld mag de gebruiker bij registratie zelf kiezen",
|
||||
"fallbackEmailPlaceholder": "Optioneel. Indien niet ingevoerd zal de primaire e-mail gebruikt worden",
|
||||
"displayNamePlaceholder": "Optioneel. Indien niet ingevoerd kan de gebruiker het kiezen tijdens eerste aanmelding"
|
||||
"displayNamePlaceholder": "Optioneel. Indien niet ingevoerd kan de gebruiker het kiezen tijdens eerste aanmelding",
|
||||
"external2FA": "2FA instellingen worden beheerd door een externe authenticatie bron"
|
||||
},
|
||||
"deleteUserDialog": {
|
||||
"deleteAction": "Verwijder",
|
||||
@@ -357,17 +361,18 @@
|
||||
"exposedLdap": {
|
||||
"ipRestriction": {
|
||||
"placeholder": "Regelgescheiden IP adres of Subnet",
|
||||
"description": "De lijstserver kan beperkt worden tot specifieke IP's of bereiken.",
|
||||
"description": "Beperk de toegang tot de Directory Server tot specifieke IP's of bereiken. Regels die starten met <code>#</code> worden beschouwd als commentaar.",
|
||||
"label": "Beperk toegang"
|
||||
},
|
||||
"enabled": "Ingeschakeld",
|
||||
"title": "Lijst server",
|
||||
"description": "Cloudron kan ingezet worden als gebruikerslijstserver voor externe applicaties.",
|
||||
"title": "Directory Server",
|
||||
"description": "Cloudron kan ingezet worden als gebruikers Directory Server voor externe applicaties.",
|
||||
"secret": {
|
||||
"label": "Koppel wachtwoord",
|
||||
"description": "Alle LDAP verzoeken moeten geauthentiseerd worden met dit geheim en de gebruiker DN <i>{{ userDN }}</i>",
|
||||
"url": "Server URL"
|
||||
}
|
||||
},
|
||||
"cloudflarePortWarning": "Cloudflare proxy moet uitgeschakeld zijn op het domein van het dashboard om de LDAP server te kunnen bereiken"
|
||||
},
|
||||
"userImportDialog": {
|
||||
"title": "Importeer gebruikers",
|
||||
@@ -391,12 +396,6 @@
|
||||
"all": "Alle gebruikers",
|
||||
"active": "Actieve gebruikers",
|
||||
"inactive": "Inactieve gebruikers"
|
||||
},
|
||||
"makeLocalDialog": {
|
||||
"title": "Maak deze gebruiker lokaal",
|
||||
"description": "De gebruiker wordt hiermee gemigreerd van de externe gebruikerslijst naar die van Cloudron.",
|
||||
"warning": "Een wachtwoord herstel wordt geïnitieerd om een lokaal wachtwoord in te stellen voor deze gebruiker.",
|
||||
"submitAction": "Maak lokaal"
|
||||
}
|
||||
},
|
||||
"profile": {
|
||||
@@ -463,7 +462,10 @@
|
||||
"changeEmail": {
|
||||
"title": "Primair e-mailadres aanpassen",
|
||||
"errorEmailInvalid": "Het e-mailadres is niet geldig",
|
||||
"errorEmailRequired": "Een geldig e-mailadres is verplicht"
|
||||
"errorEmailRequired": "Een geldig e-mailadres is verplicht",
|
||||
"email": "Nieuw e-mailadres",
|
||||
"errorWrongPassword": "Onjuist wachtwoord",
|
||||
"password": "Wachtwoord ter bevestiging"
|
||||
},
|
||||
"changeFallbackEmail": {
|
||||
"errorEmailRequired": "Een geldig e-mailadres is verplicht",
|
||||
@@ -507,7 +509,8 @@
|
||||
},
|
||||
"changeBackgroundImage": {
|
||||
"title": "Stel achtergrond afbeelding in"
|
||||
}
|
||||
},
|
||||
"enable2FANotAvailable": "Niet beschikbaar voor gebruikers met een externe authenticatie bron"
|
||||
},
|
||||
"backups": {
|
||||
"title": "Backups",
|
||||
@@ -537,7 +540,7 @@
|
||||
"noApps": "Geen apps",
|
||||
"cleanupBackups": "Backups opschonen",
|
||||
"backupNow": "Backup maken",
|
||||
"stopTask": "Stop {{ taskType === 'backup' ? 'Backup' : 'Cleanup' }}",
|
||||
"stopTask": "Stop Backup",
|
||||
"appCount": "{{ appCount }} apps",
|
||||
"tooltipDownloadBackupConfig": "Download Backup Configuratie",
|
||||
"tooltipEditBackup": "Bewerk Backup",
|
||||
@@ -633,7 +636,8 @@
|
||||
"description": "Backup behouden, ongeacht het bewaarbeleid"
|
||||
},
|
||||
"title": "Bewerk Backup",
|
||||
"label": "Label"
|
||||
"label": "Label",
|
||||
"remotePath": "Extern pad"
|
||||
}
|
||||
},
|
||||
"branding": {
|
||||
@@ -664,7 +668,7 @@
|
||||
"settings": {
|
||||
"title": "Instellingen",
|
||||
"info": "Deze instellingen zijn generiek voor alle domeinen.",
|
||||
"location": "Mail server locatie",
|
||||
"location": "Mail Server Locatie",
|
||||
"maxMailSize": "Maximale e-mail grootte",
|
||||
"spamFilter": "Spam filtering",
|
||||
"spamFilterOverview": "{{ blacklistCount }} adres(sen) op de blokkeerlijst.",
|
||||
@@ -675,7 +679,8 @@
|
||||
"solrFts": "Zoek volledige tekst (Solr)",
|
||||
"solrDisabled": "Uitgeschakeld",
|
||||
"acl": "E-mail ACL",
|
||||
"aclOverview": "{{ dnsblZonesCount }} DNSBL zone(s)"
|
||||
"aclOverview": "{{ dnsblZonesCount }} DNSBL zone(s)",
|
||||
"virtualAllMail": "\"Alle E-mail\" map"
|
||||
},
|
||||
"eventlog": {
|
||||
"title": "E-mail logboek",
|
||||
@@ -712,7 +717,7 @@
|
||||
"manualInfo": "Voeg handmatig een A record toe voor {{ domain }} die verwijst naar het IP van deze Cloudron",
|
||||
"locationPlaceholder": "Leeg laten om hoofddomein te gebruiken",
|
||||
"title": "E-mail server locatie aanpassen",
|
||||
"description": "Cloudron zorgt voor de benodigde DNS aanpassingen van alle domeinen en herstart de e-mail server. Desktop & mobiele e-mailprogramma's moeten opnieuw geconfigureerd worden met deze nieuwe locatie als IMAP en SMTP server."
|
||||
"description": "Dit verhuist de IMAP en SMTP server naar de aangegeven lokatie."
|
||||
},
|
||||
"changeMailSizeDialog": {
|
||||
"title": "Maximale e-mail grootte aanpassen",
|
||||
@@ -766,6 +771,10 @@
|
||||
},
|
||||
"action": {
|
||||
"queue": "Wachtrij"
|
||||
},
|
||||
"changeVirtualAllMailDialog": {
|
||||
"title": "\"Alle E-mail\" map",
|
||||
"description": "De \"Alle E-mail\" map is een enkele map die alle e-mails bevat van je mailbox. Deze map kan handig zijn indien een e-mailprogramma \"zoek in alle mappen\" niet ondersteunt."
|
||||
}
|
||||
},
|
||||
"domains": {
|
||||
@@ -813,7 +822,15 @@
|
||||
"jitsiHostname": "Jitsi Locatie",
|
||||
"wellKnownDescription": "De waardes worden door Cloudron gebruikt om te reageren op <code>/.well-known/</code> URLs. Let op: de app moet bereikbaar zijn op het hoofddomein <code>{{ domain }}</code> om te kunnen werken. Lees de <a href=\"{{docsLink}}\" target=\"_blank\">documentatie</a> voor meer informatie.",
|
||||
"hetznerToken": "Hetzner Token",
|
||||
"cloudflareDefaultProxyStatus": "Inschakelen proxy voor nieuwe DNS regels"
|
||||
"cloudflareDefaultProxyStatus": "Inschakelen proxy voor nieuwe DNS regels",
|
||||
"porkbunApikey": "API sleutel",
|
||||
"porkbunSecretapikey": "Geheime API sleutel",
|
||||
"bunnyAccessKey": "Bunny toegangssleutel",
|
||||
"dnsimpleAccessToken": "Toegangstoken",
|
||||
"ovhEndpoint": "Eindpunt",
|
||||
"ovhConsumerKey": "Consumer sleutel",
|
||||
"ovhAppKey": "Applicatie sleutel",
|
||||
"ovhAppSecret": "Applicatie geheim"
|
||||
},
|
||||
"title": "Domeinen & Certificaten",
|
||||
"addDomain": "Domein toevoegen",
|
||||
@@ -832,7 +849,7 @@
|
||||
"cancelAction": "Annuleer",
|
||||
"showLogsAction": "Toon logbestanden",
|
||||
"title": "Dashboard-domein aanpassen",
|
||||
"description": "Hierdoor verhuist het Dashboard en de e-mailserver naar het <code>my</code> subdomein van het geselecteerde domein."
|
||||
"description": "Hierdoor verhuist het Dashboard naar het <code>my</code> subdomein van het geselecteerde domein."
|
||||
},
|
||||
"subscriptionRequired": {
|
||||
"title": "Abonnement verplicht",
|
||||
@@ -853,7 +870,8 @@
|
||||
"domainWellKnown": {
|
||||
"title": "Well-Known locaties van {{ domain }}"
|
||||
},
|
||||
"tooltipWellKnown": "Well-Known Locaties instellen"
|
||||
"tooltipWellKnown": "Well-Known Locaties instellen",
|
||||
"count": "Totaal domeinen: {{ count }}"
|
||||
},
|
||||
"app": {
|
||||
"email": {
|
||||
@@ -961,7 +979,8 @@
|
||||
"dataDirPlaceholder": "Laat leeg om platformstandaard te gebruiken",
|
||||
"moveAction": "Verplaats data",
|
||||
"description": "Als de server onvoldoende schijfruimte heeft, gebruik dit om de app data te verplaatsen naar een <a href=\"/#/volumes\">volume</a>. Alle data daar is onderdeel van de app's backup.",
|
||||
"diskUsage": "De app gebruikt momenteel {{ size }} aan opslag (sinds {{ date }})."
|
||||
"diskUsage": "De app gebruikt momenteel {{ size }} aan opslag (sinds {{ date }}).",
|
||||
"mountTypeWarning": "Het bestemmingsbestandssysteem moet bestandsmachtigingen en eigendom ondersteunen om de verhuizing te laten werken"
|
||||
},
|
||||
"mounts": {
|
||||
"title": "Koppelpunten",
|
||||
@@ -1000,7 +1019,8 @@
|
||||
"title": "Robots.txt",
|
||||
"disableIndexingAction": "Indexering uitschakelen",
|
||||
"txtPlaceholder": "Leeg laten om toe te staan dat bots deze app indexeren"
|
||||
}
|
||||
},
|
||||
"hstsPreload": "Schakel HSTS preload in voor deze site en alle subdomeinen"
|
||||
},
|
||||
"updates": {
|
||||
"info": {
|
||||
@@ -1164,7 +1184,7 @@
|
||||
"service": "Dienst (start eenmalig)"
|
||||
},
|
||||
"title": "Crontab",
|
||||
"saveAction": "Bewaar",
|
||||
"saveAction": "Opslaan",
|
||||
"addCommonPattern": "Voeg gemeenschappelijk patroon toe",
|
||||
"description": "Eigen app-specifieke cron jobs kunnen hier toegevoegd worden. Let op: standaard cron jobs voor deze applicatie zijn al geïntegreerd in de app en hoef je hier niet te configureren."
|
||||
},
|
||||
@@ -1182,6 +1202,17 @@
|
||||
"label": "Label",
|
||||
"clearIconAction": "Icoon verwijderen",
|
||||
"clearIconDescription": "Hiermee wordt geprobeerd de favicon van de app op te halen na opslaan."
|
||||
},
|
||||
"servicesTabTitle": "Diensten",
|
||||
"turn": {
|
||||
"title": "TURN Instellen",
|
||||
"enable": "Configureer de app om de ingebouwde TURN server te gebruiken",
|
||||
"disable": "Configureer de TURN-instellingen van de app niet. De TURN-instellingen van de app worden met rust gelaten. Je kunt het in de app configureren."
|
||||
},
|
||||
"redis": {
|
||||
"title": "Redis configuratie",
|
||||
"enable": "Configureer de app om Redis te gebruiken",
|
||||
"disable": "Redis uitschakelen"
|
||||
}
|
||||
},
|
||||
"network": {
|
||||
@@ -1208,7 +1239,8 @@
|
||||
},
|
||||
"dyndns": {
|
||||
"title": "Dynamische DNS",
|
||||
"description": "Schakel deze optie in om je DNS records synchroon te houden met je veranderende IP adres. Dit is handig als je Cloudron opgenomen is in een netwerk waarbij het publieke IP adres steeds wisselt zoals in een thuissituatie."
|
||||
"description": "Schakel deze optie in om je DNS records synchroon te houden met je veranderende IP adres. Dit is handig als je Cloudron opgenomen is in een netwerk waarbij het publieke IP adres steeds wisselt zoals in een thuissituatie.",
|
||||
"showLogsAction": "Toon logbestanden"
|
||||
},
|
||||
"configureIp": {
|
||||
"title": "Configureer IP aanbieder",
|
||||
@@ -1224,7 +1256,13 @@
|
||||
},
|
||||
"configureIpv6": {
|
||||
"title": "Configureer IPv6 aanbieder"
|
||||
}
|
||||
},
|
||||
"trustedIps": {
|
||||
"description": "HTTP headers van bijbehorende IP adressen worden vertrouwd",
|
||||
"summary": "{{ trustCount }} IP’s vertrouwd",
|
||||
"title": "Configureer vertrouwde IP’s"
|
||||
},
|
||||
"trustedIpRanges": "Vertrouwde IP’s & bereiken "
|
||||
},
|
||||
"services": {
|
||||
"title": "Diensten",
|
||||
@@ -1254,7 +1292,7 @@
|
||||
"cloudronId": "Cloudron ID",
|
||||
"subscriptionEndsAt": "Opgezegd en eindigt op",
|
||||
"subscriptionSetupAction": "Upgrade naar Premium",
|
||||
"subscriptionChangeAction": "Abonnement wijzigen",
|
||||
"subscriptionChangeAction": "Beheer abonnement",
|
||||
"subscriptionReactivateAction": "Abonnement heractiveren",
|
||||
"title": "Cloudron.io Account",
|
||||
"description": "Een Cloudron.io account wordt gebruikt voor toegang tot de App Store en om je abonnement te beheren.",
|
||||
@@ -1341,7 +1379,7 @@
|
||||
"sshCheckbox": "Sta toe dat ondersteuningsmedewerkers toegang krijgen tot deze server middels SSH",
|
||||
"emailVerifyAction": "Verifieer nu",
|
||||
"emailNotVerified": "Je cloudron.io account e-mail {{ email }} is niet geverifieerd. Verifieer het om support tickets te kunnen openen.",
|
||||
"communityAppDisclaimer": "We geven alleen ondersteuning via tickets voor apps die geïnstalleerd zijn via de App Store. Kijk in ons forum voor overige ondersteuning."
|
||||
"typeBilling": "Factureringsprobleem"
|
||||
},
|
||||
"remoteSupport": {
|
||||
"title": "Ondersteuning op afstand",
|
||||
@@ -1350,6 +1388,10 @@
|
||||
"disableAction": "SSH ondersteuningstoegang uitschakelen",
|
||||
"enableAction": "SSH ondersteuningstoegang inschakelen",
|
||||
"description": "Met het inschakelen van deze optie geeft je ondersteuningsmedewerkers toegang tot deze server middels SSH."
|
||||
},
|
||||
"help": {
|
||||
"title": "Hulp",
|
||||
"description": "Gebruik de volgende bronnen voor hulp en ondersteuning:\n* [Cloudron Forum]({{ forumLink }}) - Gebruik de Support en App specifieke categorieën voor vragen.\n* [Cloudron Docs & Knowledge Base]({{ docsLink }})\n* [Custom App Packaging & API]({{ packagingLink }})\n"
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
@@ -1374,7 +1416,19 @@
|
||||
"graphTitle": "Percentage",
|
||||
"graphSubtext": "Alleen apps die meer dan {{ threshold }} van de CPU gebruiken worden getoond"
|
||||
},
|
||||
"selectPeriodLabel": "Selecteer periode"
|
||||
"selectPeriodLabel": "Selecteer periode",
|
||||
"info": {
|
||||
"title": "Info",
|
||||
"vendor": "Leverancier",
|
||||
"memory": "Geheugen",
|
||||
"uptime": "Uptime",
|
||||
"activationTime": "Cloudron installatie tijd",
|
||||
"platformVersion": "Platform Versie",
|
||||
"product": "Product"
|
||||
},
|
||||
"graphs": {
|
||||
"title": "Grafieken"
|
||||
}
|
||||
},
|
||||
"eventlog": {
|
||||
"title": "Logboek",
|
||||
@@ -1394,7 +1448,9 @@
|
||||
"logs": {
|
||||
"title": "Logbestanden",
|
||||
"clear": "Leegmaken",
|
||||
"download": "Download volledige logbestanden"
|
||||
"download": "Download volledige logbestanden",
|
||||
"notFoundError": "Geen taak of app gevonden",
|
||||
"logsGoneError": "Log bestand(en) niet gevonden"
|
||||
},
|
||||
"terminal": {
|
||||
"title": "Terminal",
|
||||
@@ -1439,7 +1495,8 @@
|
||||
"renameDialog": {
|
||||
"title": "Hernoem {{ fileName }}",
|
||||
"newName": "Nieuwe naam",
|
||||
"rename": "Hernoem"
|
||||
"rename": "Hernoem",
|
||||
"reallyOverwrite": "Een bestand met die naam bestaat al. Wil je het bestaande bestand overschrijven?"
|
||||
},
|
||||
"chownDialog": {
|
||||
"newOwner": "Nieuwe eigenaar",
|
||||
@@ -1492,7 +1549,8 @@
|
||||
"paste": "Plakken",
|
||||
"copy": "Kopiëren",
|
||||
"cut": "Knippen",
|
||||
"edit": "Bewerk"
|
||||
"edit": "Bewerk",
|
||||
"open": "Open"
|
||||
},
|
||||
"mtime": "Bewerkt"
|
||||
},
|
||||
@@ -1507,13 +1565,25 @@
|
||||
},
|
||||
"newDirectory": {
|
||||
"errorAlreadyExists": "Bestaat al"
|
||||
}
|
||||
},
|
||||
"uploader": {
|
||||
"exitWarning": "Uploaden nog bezig. Weet je zeker dat je deze pagina wilt sluiten?",
|
||||
"uploading": "Uploaden"
|
||||
},
|
||||
"extractionInProgress": "Bezig met uitpakken",
|
||||
"textEditor": {
|
||||
"undo": "Ongedaan maken",
|
||||
"redo": "Opnieuw doen",
|
||||
"save": "Opslaan"
|
||||
},
|
||||
"pasteInProgress": "Bezig met plakken",
|
||||
"deleteInProgress": "Bezig met verwijderen"
|
||||
},
|
||||
"email": {
|
||||
"backAction": "Terug naar e-mail",
|
||||
"config": {
|
||||
"title": "E-mailconfiguratie {{ domain }}",
|
||||
"clientConfiguration": "Configureren E-mail clients"
|
||||
"clientConfiguration": "Configureren E-mail programma's"
|
||||
},
|
||||
"incoming": {
|
||||
"disableAction": "Uitschakelen",
|
||||
@@ -1559,7 +1629,7 @@
|
||||
"incomingPasswordUsage": "Wachtwoord van de eigenaar van de mailbox",
|
||||
"enabled": "Cloudron e-mailserver is geconfigureerd voor inkomende e-mails voor dit domein.",
|
||||
"disabled": "Cloudron e-mailserver ontvangt geen inkomende e-mails voor dit domein.",
|
||||
"howToConnectDescription": "Gebruik onderstaande gegevens om e-mail clients in te stellen."
|
||||
"howToConnectDescription": "Gebruik onderstaande gegevens om e-mail programma's in te stellen."
|
||||
},
|
||||
"outbound": {
|
||||
"tabTitle": "Uitgaand",
|
||||
@@ -1658,7 +1728,7 @@
|
||||
},
|
||||
"addMailinglistDialog": {
|
||||
"title": "Maillijst toevoegen",
|
||||
"members": "Lijst leden",
|
||||
"members": "Ledenlijst",
|
||||
"membersInfo": "Plaats meerdere e-mailadressen elk op een nieuwe regel",
|
||||
"membersOnlyCheckbox": "Het versturen van e-mail aan deze lijst beperken tot de leden",
|
||||
"name": "Naam"
|
||||
@@ -1686,7 +1756,7 @@
|
||||
"updateMailinglistDialog": {
|
||||
"activeCheckbox": "Mailing-lijst is actief"
|
||||
},
|
||||
"howToConnectInfoModal": "Configureren e-mail clients",
|
||||
"howToConnectInfoModal": "Configureren e-mail programma's",
|
||||
"mailboxImportDialog": {
|
||||
"title": "Importeer Mailboxen",
|
||||
"description": "Upload een JSON of CSV bestand met een schema zoals beschreven in onze <a href=\"{{ docsLink }}\" target=\"_blank\">documentatie</a>.",
|
||||
@@ -1704,7 +1774,9 @@
|
||||
"password": "Wachtwoord",
|
||||
"resetPasswordAction": "Herstel wachtwoord",
|
||||
"2faToken": "2FA Token (indien ingeschakeld)",
|
||||
"errorIncorrectCredentials": "Onjuiste gebruikersnaam of wachtwoord"
|
||||
"errorIncorrectCredentials": "Onjuiste gebruikersnaam of wachtwoord",
|
||||
"errorIncorrect2FAToken": "2FA token is niet geldig",
|
||||
"errorInternal": "Interne fout, probeer later opnieuw"
|
||||
},
|
||||
"passwordReset": {
|
||||
"title": "Wachtwoord herstellen",
|
||||
@@ -1764,7 +1836,11 @@
|
||||
"mountStatus": "Koppel status",
|
||||
"localDirectory": "Lokale map",
|
||||
"type": "Type",
|
||||
"remountActionTooltip": "Her-koppel Volume"
|
||||
"remountActionTooltip": "Her-koppel Volume",
|
||||
"editVolumeDialog": {
|
||||
"title": "Bewerk volume {{ name }}"
|
||||
},
|
||||
"editActionTooltip": "Bewerk Volume"
|
||||
},
|
||||
"lang": {
|
||||
"it": "Italiaans",
|
||||
@@ -1777,7 +1853,8 @@
|
||||
"pl": "Pools",
|
||||
"es": "Spaans",
|
||||
"ru": "Russisch",
|
||||
"pt": "Portugees"
|
||||
"pt": "Portugees",
|
||||
"da": "Deens"
|
||||
},
|
||||
"passwordResetEmail": {
|
||||
"subject": "[<%= cloudron %>] Wachtwoord herstellen",
|
||||
@@ -1837,5 +1914,43 @@
|
||||
"mounts": {
|
||||
"description": "Apps kunnen toegang krijgen tot <a href=\"/#/volumes\">volumes</a> via <code>/media/{volume name}</code> directory. Deze data is niet opgenomen in de app backup."
|
||||
}
|
||||
}
|
||||
},
|
||||
"oidc": {
|
||||
"newClientDialog": {
|
||||
"title": "Client toevoegen",
|
||||
"description": "Nieuwe OpenID Connect client instellingen toevoegen.",
|
||||
"createAction": "Aanmaken"
|
||||
},
|
||||
"client": {
|
||||
"name": "Naam",
|
||||
"id": "Client ID",
|
||||
"secret": "Client geheim",
|
||||
"signingAlgorithm": "Ondertekeningsalgoritme",
|
||||
"loginRedirectUri": "Login callback URL (met komma gescheiden indien meer dan één)",
|
||||
"logoutRedirectUri": "Logout callback URL (optioneel)"
|
||||
},
|
||||
"title": "OpenID Connect aanbieder",
|
||||
"description": "Cloudron kan als een OpenID Connect aanbieder voor interne apps en externe diensten fungeren.",
|
||||
"editClientDialog": {
|
||||
"title": "Bewerk Client {{ client }}"
|
||||
},
|
||||
"deleteClientDialog": {
|
||||
"title": "Weet je zeker dat je Client {{ client }} wilt verwijderen?",
|
||||
"description": "Hiermee worden alle externe OpenID apps met dit Client ID losgekoppeld."
|
||||
},
|
||||
"env": {
|
||||
"discoveryUrl": "Discovery URL",
|
||||
"logoutUrl": "Logout URL",
|
||||
"profileEndpoint": "Profiel Eindpunt",
|
||||
"keysEndpoint": "Sleutels Eindpunt",
|
||||
"tokenEndpoint": "Token Eindpunt",
|
||||
"authEndpoint": "Auth Eindpunt"
|
||||
},
|
||||
"clients": {
|
||||
"title": "Clients",
|
||||
"newClient": "Nieuwe Client",
|
||||
"empty": "Nog geen Clients"
|
||||
}
|
||||
},
|
||||
"automation": "Automatisering"
|
||||
}
|
||||
|
||||
@@ -77,11 +77,7 @@
|
||||
"justNow": "agora mesmo",
|
||||
"yeserday": "Ontem",
|
||||
"minutesAgo": "{{ m }} minutos atrás",
|
||||
"hoursAgo": "{{ h }} horas atrás",
|
||||
"daysAgo": "{{ d }} dias atrás",
|
||||
"weeksAgo": "{{ w }} semanas atrás",
|
||||
"monthsAgo": "{{ m }} meses atrás",
|
||||
"yearsAgo": "{{ y }} anos atrás"
|
||||
"hoursAgo": "{{ h }} horas atrás"
|
||||
},
|
||||
"navbar": {
|
||||
"users": "Utilizadores"
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
"auth": {
|
||||
"sso": "Войдите, используя учётную запись Cloudron",
|
||||
"email": "Войдите, используя email",
|
||||
"nosso": "Войдите, используя Вашу учётную запись"
|
||||
"nosso": "Войдите, используя Вашу учётную запись",
|
||||
"openid": "Войти с помощью Cloudron OpenID"
|
||||
},
|
||||
"noAccess": {
|
||||
"description": "После открытия доступа приложения отобразятся здесь.",
|
||||
@@ -45,14 +46,10 @@
|
||||
"rebootAction": "Перезагрузить сейчас"
|
||||
},
|
||||
"prettyDate": {
|
||||
"yearsAgo": "{{ y }} лет назад",
|
||||
"justNow": "только что",
|
||||
"yeserday": "Вчера",
|
||||
"minutesAgo": "{{ m }} минут назад",
|
||||
"hoursAgo": "{{ h }} часов назад",
|
||||
"daysAgo": "{{ d }} дней назад",
|
||||
"weeksAgo": "{{ w }} недель назад",
|
||||
"monthsAgo": "{{ m }} месяцев назад"
|
||||
"hoursAgo": "{{ h }} часов назад"
|
||||
},
|
||||
"logout": "Выйти",
|
||||
"dialog": {
|
||||
@@ -60,7 +57,8 @@
|
||||
"save": "Сохранить",
|
||||
"close": "Закрыть",
|
||||
"no": "Нет",
|
||||
"yes": "Да"
|
||||
"yes": "Да",
|
||||
"delete": "Удалить"
|
||||
},
|
||||
"username": "Имя пользователя",
|
||||
"displayName": "Отображаемое имя",
|
||||
@@ -76,7 +74,8 @@
|
||||
},
|
||||
"action": {
|
||||
"reboot": "Перезагрузка",
|
||||
"logs": "Логи"
|
||||
"logs": "Логи",
|
||||
"showLogs": "Показать логи"
|
||||
},
|
||||
"searchPlaceholder": "Поиск",
|
||||
"multiselect": {
|
||||
@@ -91,7 +90,9 @@
|
||||
"enableAction": "Включить",
|
||||
"statusEnabled": "Включено",
|
||||
"statusDisabled": "Выключено",
|
||||
"loadingPlaceholder": "Загрузка"
|
||||
"loadingPlaceholder": "Загрузка",
|
||||
"settings": "Настройки",
|
||||
"saveAction": "Сохранить"
|
||||
},
|
||||
"appstore": {
|
||||
"category": {
|
||||
@@ -195,8 +196,7 @@
|
||||
"invitationTooltip": "Пригласить пользователя",
|
||||
"setGhostTooltip": "Обезличить",
|
||||
"mailmanagerTooltip": "Этот пользователь может управлять другими пользователями и почтовыми ящиками",
|
||||
"count": "Всего пользователей: {{ count }}",
|
||||
"makeLocalTooltip": "Сделать пользователя локальным"
|
||||
"count": "Всего пользователей: {{ count }}"
|
||||
},
|
||||
"title": "Каталог пользователей",
|
||||
"newUserAction": "Новый пользователь",
|
||||
@@ -208,7 +208,7 @@
|
||||
"externalLdapTooltip": "Из внешнего LDAP каталога"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Настройки",
|
||||
"title": "Настройки пользователя",
|
||||
"allowProfileEditCheckbox": "Разрешить пользователям редактировать своё имя и адрес электронной почты",
|
||||
"require2FACheckbox": "Требовать от пользователей настройки 2FA",
|
||||
"subscriptionRequired": "Данные функции доступны только в платной подписке.",
|
||||
@@ -221,10 +221,9 @@
|
||||
"bindPassword": "Привязать пароль (необязательно)",
|
||||
"bindUsername": "Привязать Уникальное имя (DN)/Имя пользователя (необязательно)",
|
||||
"title": "Подключиться к удалённому каталогу",
|
||||
"subscriptionRequired": "Данная функция доступна только в платной подписке.",
|
||||
"subscriptionRequiredAction": "Настроить подписку сейчас",
|
||||
"noopInfo": "LDAP аутентификация не настроена.",
|
||||
"provider": "Источник",
|
||||
"provider": "Поставщик",
|
||||
"server": "URL сервера",
|
||||
"acceptSelfSignedCert": "Принимать самоподписанный сертификат",
|
||||
"baseDn": "Корневой элемент",
|
||||
@@ -234,7 +233,7 @@
|
||||
"groupBaseDn": "Групповой корневой элемент",
|
||||
"groupFilter": "Фильтр группы",
|
||||
"groupnameField": "Поле с именем группы",
|
||||
"auth": "Войти",
|
||||
"auth": "Авторизоваться",
|
||||
"autocreateUsersOnLogin": "Автоматически создавать пользователей после их входа в Cloudron",
|
||||
"showLogsAction": "Показать логи",
|
||||
"syncAction": "Синхронизировать",
|
||||
@@ -263,10 +262,10 @@
|
||||
"errorEmailRequired": "Требуется адрес электронной почты",
|
||||
"errorInvalidUsername": "Неверное имя пользователя",
|
||||
"usernamePlaceholder": "Необязательно. Если не указано, пользователь может выбрать во время регистрации",
|
||||
"displayName": "Показать имя",
|
||||
"displayName": "Отображаемое имя",
|
||||
"email": "Электронная почта",
|
||||
"primaryEmail": "Основной адрес электронной почты",
|
||||
"recoveryEmail": "Пароль восстановления электронной почты",
|
||||
"recoveryEmail": "Электронная почта для восстановления пароля",
|
||||
"errorDisplayNameRequired": "Требуется имя",
|
||||
"activeCheckbox": "Пользователь активен",
|
||||
"fallbackEmailPlaceholder": "Необязательно. Если не указано, будет использоваться основной почтовый ящик",
|
||||
@@ -294,7 +293,7 @@
|
||||
"description": "Ссылка для сброса пароля отправлена на электронную почту {{ email }}:",
|
||||
"sendEmailLinkAction": "Отправить ссылку пользователю по электронной почте",
|
||||
"emailSent": "Отправлено",
|
||||
"newLinkAction": "Отправить ссылку для сброса пароля",
|
||||
"newLinkAction": "Отправить ссылку для сброса",
|
||||
"reset2FAAction": "Сбросить 2FA",
|
||||
"sendAction": "Отправить письмо",
|
||||
"descriptionLink": "Скопировать ссылку для сброса пароля",
|
||||
@@ -391,12 +390,6 @@
|
||||
"all": "Все пользователи",
|
||||
"active": "Активные пользователи",
|
||||
"inactive": "Неактивные пользователи"
|
||||
},
|
||||
"makeLocalDialog": {
|
||||
"title": "Установить этого пользователя локально",
|
||||
"description": "Данное действие перенесёт пользователя с внешней директории LDAP в Cloudron.",
|
||||
"warning": "Для создания локального пароля пользователя его прежний пароль будет сброшен.",
|
||||
"submitAction": "Сделать локальным"
|
||||
}
|
||||
},
|
||||
"profile": {
|
||||
@@ -409,7 +402,7 @@
|
||||
"changePassword": {
|
||||
"currentPassword": "Текущий пароль",
|
||||
"errorPasswordInvalid": "Пароль должен быть не менее 8 и не более 265 символов",
|
||||
"title": "Изменить пароль",
|
||||
"title": "Изменить ваш пароль",
|
||||
"newPassword": "Новый пароль",
|
||||
"newPasswordRepeat": "Повторите новый пароль",
|
||||
"errorPasswordRequired": "Требуется пароль",
|
||||
@@ -507,7 +500,8 @@
|
||||
},
|
||||
"changeBackgroundImage": {
|
||||
"title": "Установить фоновое изображение"
|
||||
}
|
||||
},
|
||||
"enable2FANotAvailable": "Недоступно для пользователей из удалённых источников"
|
||||
},
|
||||
"app": {
|
||||
"uninstallDialog": {
|
||||
@@ -644,7 +638,8 @@
|
||||
"moveAction": "Переместить данные",
|
||||
"dataDirPlaceholder": "Оставьте пустым, чтобы сохранить настройку по умолчанию",
|
||||
"description": "Если на диске заканчивается место, вы можете перенести данные приложения в <a href=\"/#/volumes\">том</a>. Любые данные по этому пути станут частью резервной копии приложения.",
|
||||
"diskUsage": "Приложение использует {{ size }} хранилища (по состоянию на {{ date }})."
|
||||
"diskUsage": "Приложение использует {{ size }} хранилища (по состоянию на {{ date }}).",
|
||||
"mountTypeWarning": "Чтобы перемещение прошло успешно конечная файловая система должна поддерживать разрешения и права доступа к файлам"
|
||||
},
|
||||
"mounts": {
|
||||
"volume": "Том",
|
||||
@@ -837,6 +832,17 @@
|
||||
"label": "Метка",
|
||||
"clearIconAction": "Очистить иконку",
|
||||
"clearIconDescription": "Это действие попытается загрузить favicon после сохранения."
|
||||
},
|
||||
"servicesTabTitle": "Службы",
|
||||
"turn": {
|
||||
"title": "Настроить TURN",
|
||||
"enable": "Настроить использование встроенного TURN сервера в приложении",
|
||||
"disable": "Не настраивать TURN сервер для данного приложения. Вы можете настроить его самостоятельно внутри самого приложения."
|
||||
},
|
||||
"redis": {
|
||||
"title": "Настроить Redis",
|
||||
"enable": "Настроить использование Redis в приложении",
|
||||
"disable": "Отключить Redis"
|
||||
}
|
||||
},
|
||||
"backups": {
|
||||
@@ -852,7 +858,7 @@
|
||||
"remount": "Перемонтировать хранилище"
|
||||
},
|
||||
"listing": {
|
||||
"stopTask": "Остановить {{ taskType === 'backup' ? 'Backup' : 'Cleanup' }}",
|
||||
"stopTask": "Остановить Backup",
|
||||
"title": "Список резервных копий",
|
||||
"noBackups": "Ещё не было создано ни одной резервной копии.",
|
||||
"version": "Версия",
|
||||
@@ -963,7 +969,8 @@
|
||||
"preserved": {
|
||||
"description": "Хранить резервную копию, игнорируя политику хранения",
|
||||
"tooltip": "Также будет сохранена почта и {{ appsLength } резервных копий."
|
||||
}
|
||||
},
|
||||
"remotePath": "Удаленный путь"
|
||||
}
|
||||
},
|
||||
"branding": {
|
||||
@@ -1005,7 +1012,8 @@
|
||||
"acl": "Почтовый ACL (Access Control List)",
|
||||
"maxMailSize": "Максимальный размер письма",
|
||||
"solrFts": "Полный поиск по тексту (Solr)",
|
||||
"aclOverview": "{{ dnsblZonesCount }} DNSBL зон"
|
||||
"aclOverview": "{{ dnsblZonesCount }} DNSBL зон",
|
||||
"virtualAllMail": "Папка \"Вся почта\""
|
||||
},
|
||||
"eventlog": {
|
||||
"title": "Журнал событий электронной почты",
|
||||
@@ -1039,7 +1047,7 @@
|
||||
},
|
||||
"changeDomainDialog": {
|
||||
"title": "Изменить расположение сервера электронной почты",
|
||||
"description": "Cloudron внесет необходимые изменения в DNS во всех доменах и перезапустит почтовый сервер. Настольные и мобильные почтовые клиенты должны быть повторно настроены для использования нового расположения сервера IMAP и SMTP.",
|
||||
"description": "Данное действие перенесёт IMAP и SMTP сервер в указанное расположение.",
|
||||
"location": "Расположение",
|
||||
"locationPlaceholder": "Оставьте пустым, чтобы использовать основной домен",
|
||||
"manualInfo": "Вручную добавьте A запись для {{ domain }}, указав публичный IP Вашего Cloudron"
|
||||
@@ -1096,6 +1104,10 @@
|
||||
},
|
||||
"action": {
|
||||
"queue": "Очередь"
|
||||
},
|
||||
"changeVirtualAllMailDialog": {
|
||||
"title": "Папка \"Вся почта\"",
|
||||
"description": "Папка \"Вся почта\" содержит все электронные письма из вашего почтового ящика. Данная папка может быть полезна в том случае, когда ваш почтовый клиент не поддерживает рекурсивный поиск по папкам."
|
||||
}
|
||||
},
|
||||
"network": {
|
||||
@@ -1122,7 +1134,8 @@
|
||||
},
|
||||
"dyndns": {
|
||||
"title": "Динамический DNS",
|
||||
"description": "Включите эту опцию, чтобы синхронизировать все ваши DNS-записи с изменяющимся IP-адресом. Это полезно, когда Cloudron работает в сети с часто меняющимся общедоступным IP-адресом, например, в домашних сетях."
|
||||
"description": "Включите эту опцию, чтобы синхронизировать все ваши DNS-записи с изменяющимся IP-адресом. Это полезно, когда Cloudron работает в сети с часто меняющимся общедоступным IP-адресом, например, в домашних сетях.",
|
||||
"showLogsAction": "Показать логи"
|
||||
},
|
||||
"configureIp": {
|
||||
"title": "Настроить источник IP",
|
||||
@@ -1138,7 +1151,13 @@
|
||||
},
|
||||
"configureIpv6": {
|
||||
"title": "Настройка IPv6"
|
||||
}
|
||||
},
|
||||
"trustedIps": {
|
||||
"summary": "{{ trustCount }} IP доверены",
|
||||
"title": "Настроить доверенные IP",
|
||||
"description": "HTTP заголовки от совпадающих IP адресов будут доверены"
|
||||
},
|
||||
"trustedIpRanges": "Доверенные IP и диапазоны "
|
||||
},
|
||||
"services": {
|
||||
"title": "Службы",
|
||||
@@ -1255,7 +1274,7 @@
|
||||
"subscriptionRequired": "Тикеты поддержки доступны только в платной подписке.",
|
||||
"subscriptionRequiredDescription": "Вы можете найти ответы на свои вопросы в нашей <a href=\"{{ supportViewLink }}\" target=\"_blank\">документации</a>или попросить помощи на <a href=\"{{ forumLink }}\" target=\"_blank\">форуме</a>.",
|
||||
"emailNotVerified": "Ваш адрес электронной почты {{ email }} в cloudron.io не подтверждён. Пожалуйста, подтвердите его для доступа к тикетам поддержки.",
|
||||
"communityAppDisclaimer": "Клиентская поддержка осуществляется только для приложений, установленных из основного репозитория. Пожалуйста, задайте свой вопрос на форуме."
|
||||
"typeBilling": "Проблема с выставлением счетов"
|
||||
},
|
||||
"remoteSupport": {
|
||||
"subscriptionRequired": "Удалённая поддержка доступна только в платной подписке.",
|
||||
@@ -1315,7 +1334,7 @@
|
||||
"changeAction": "Изменить домен",
|
||||
"cancelAction": "Отменить",
|
||||
"showLogsAction": "Показать логи",
|
||||
"description": "Данное действие переместит панель управления и сервер электронной почты на <code>my</code> поддомен выбранного домена."
|
||||
"description": "Данное действие переместит панель управления на <code>my</code> поддомен выбранного домена."
|
||||
},
|
||||
"subscriptionRequired": {
|
||||
"title": "Требуется подписка",
|
||||
@@ -1366,7 +1385,15 @@
|
||||
"jitsiHostname": "Расположение Jitsi",
|
||||
"wellKnownDescription": "Значения будут использованы Cloudron для <code>/.well-known/</code> адресов. Учтите, что для функционирования необходимо, чтобы приложение было доступно на основном домене <code>{{ domain }}</code>. Подробнее можно узнать в <a href=\"{{docsLink}}\" target=\"_blank\">документации</a>.",
|
||||
"hetznerToken": "Токен Hetzner",
|
||||
"cloudflareDefaultProxyStatus": "Активировать прокси для новых DNS записей"
|
||||
"cloudflareDefaultProxyStatus": "Активировать прокси для новых DNS записей",
|
||||
"porkbunApikey": "API Ключ",
|
||||
"porkbunSecretapikey": "Secret API Ключ",
|
||||
"bunnyAccessKey": "Ключ доступа Bunny",
|
||||
"dnsimpleAccessToken": "Токен доступа",
|
||||
"ovhEndpoint": "Конечная точка",
|
||||
"ovhConsumerKey": "Ключ пользователя",
|
||||
"ovhAppKey": "Ключ приложения",
|
||||
"ovhAppSecret": "Секрет приложения"
|
||||
},
|
||||
"addDomain": "Добавить домен",
|
||||
"removeDialog": {
|
||||
@@ -1383,7 +1410,8 @@
|
||||
"domainWellKnown": {
|
||||
"title": "Общеизвестные расположения {{ domain }}"
|
||||
},
|
||||
"tooltipWellKnown": "Установить общеизвестные расположения"
|
||||
"tooltipWellKnown": "Установить общеизвестные расположения",
|
||||
"count": "Всего доменов: {{ count }}"
|
||||
},
|
||||
"notifications": {
|
||||
"title": "Уведомления",
|
||||
@@ -1395,7 +1423,9 @@
|
||||
"logs": {
|
||||
"title": "Логи",
|
||||
"clear": "Очистить обзор",
|
||||
"download": "Скачать полные логи"
|
||||
"download": "Скачать полные логи",
|
||||
"notFoundError": "Задача или приложение не существует",
|
||||
"logsGoneError": "Файл(ы) журнала не найден(ы)"
|
||||
},
|
||||
"terminal": {
|
||||
"title": "Терминал",
|
||||
@@ -1480,7 +1510,8 @@
|
||||
"cut": "Вырезать",
|
||||
"paste": "Вставить",
|
||||
"selectAll": "Выбрать все",
|
||||
"copy": "Скопировать"
|
||||
"copy": "Скопировать",
|
||||
"open": "Открыть"
|
||||
},
|
||||
"symlink": "Символическая ссылка на {{ target }}",
|
||||
"mtime": "Изменён"
|
||||
@@ -1508,7 +1539,19 @@
|
||||
},
|
||||
"status": {
|
||||
"restartingApp": "перезапускаем приложение"
|
||||
}
|
||||
},
|
||||
"extractionInProgress": "Идёт извлечение",
|
||||
"uploader": {
|
||||
"exitWarning": "Загрузка ещё не завершена. Вы уверены, что хотите закрыть страницу?",
|
||||
"uploading": "Загружаем"
|
||||
},
|
||||
"textEditor": {
|
||||
"undo": "Отменить операцию",
|
||||
"redo": "Повторить операцию",
|
||||
"save": "Сохранить"
|
||||
},
|
||||
"pasteInProgress": "Выполняется копирование / перемещение",
|
||||
"deleteInProgress": "Выполняется удаление"
|
||||
},
|
||||
"email": {
|
||||
"outbound": {
|
||||
@@ -1705,7 +1748,9 @@
|
||||
"loginTo": "Войти в",
|
||||
"username": "Имя пользователя",
|
||||
"2faToken": "2FA Токен (если включен)",
|
||||
"errorIncorrectCredentials": "Неправильное имя пользователя или пароль"
|
||||
"errorIncorrectCredentials": "Неправильное имя пользователя или пароль",
|
||||
"errorIncorrect2FAToken": "Неверный 2FA токен",
|
||||
"errorInternal": "Внутренняя ошибка, попробуйте позже"
|
||||
},
|
||||
"passwordReset": {
|
||||
"title": "Сброс пароля",
|
||||
@@ -1765,7 +1810,11 @@
|
||||
"title": "Тома",
|
||||
"hostPath": "Назначение",
|
||||
"description": "Тома - локальные или удаленные файловые системы. Они могут быть использованы для хранения данных приложений или для создания общей директории для нескольких приложений.",
|
||||
"localDirectory": "Локальный каталог"
|
||||
"localDirectory": "Локальный каталог",
|
||||
"editVolumeDialog": {
|
||||
"title": "Редактирование тома {{ name }}"
|
||||
},
|
||||
"editActionTooltip": "Редактировать том"
|
||||
},
|
||||
"lang": {
|
||||
"en": "Английский",
|
||||
@@ -1779,7 +1828,8 @@
|
||||
"zh_Hans": "Китайский (Упрощенный)",
|
||||
"es": "Испанский",
|
||||
"ru": "Русский",
|
||||
"pt": "Португальский"
|
||||
"pt": "Португальский",
|
||||
"da": "Датский"
|
||||
},
|
||||
"setupAccount": {
|
||||
"username": "Имя пользователя",
|
||||
@@ -1838,5 +1888,43 @@
|
||||
"mounts": {
|
||||
"description": "Приложения могут получить доступ к смонтированным <a href=\"/#/volumes\">томам</a> по пути <code>/media/{имя тома}</code>. Данные таких томов не будут включаться в резервные копии приложения."
|
||||
}
|
||||
}
|
||||
},
|
||||
"oidc": {
|
||||
"newClientDialog": {
|
||||
"createAction": "Создать",
|
||||
"title": "Добавить клиента",
|
||||
"description": "Добавить настройки нового клиента OpenID connect."
|
||||
},
|
||||
"client": {
|
||||
"name": "Имя",
|
||||
"id": "ID Клиента",
|
||||
"secret": "Секрет",
|
||||
"signingAlgorithm": "Метод подписи",
|
||||
"loginRedirectUri": "URL обратного вызова (если больше одного, отделите их запятой)",
|
||||
"logoutRedirectUri": "URL обратного вызова для выхода из системы (необязательно)"
|
||||
},
|
||||
"clients": {
|
||||
"title": "Клиенты",
|
||||
"newClient": "Новый клиент",
|
||||
"empty": "Клиенты не найдены"
|
||||
},
|
||||
"title": "Поставщик OpenID Сonnect",
|
||||
"description": "Cloudron может выступать в качестве поставщика OpenID connect для внутренних приложений и внешних сервисов.",
|
||||
"editClientDialog": {
|
||||
"title": "Редактировать клиента {{ client }}"
|
||||
},
|
||||
"deleteClientDialog": {
|
||||
"title": "Вы точно хотите удалить клиента {{ client }}?",
|
||||
"description": "Это действие отключит все внешние OpenID приложения, использующие данный клиент ID, от Cloudron."
|
||||
},
|
||||
"env": {
|
||||
"discoveryUrl": "URL обнаружения",
|
||||
"logoutUrl": "URL выхода из системы",
|
||||
"profileEndpoint": "Конечная точка профиля",
|
||||
"keysEndpoint": "Конечная точка ключей",
|
||||
"tokenEndpoint": "Конечная точка токена",
|
||||
"authEndpoint": "Конечная точка аутентификации"
|
||||
}
|
||||
},
|
||||
"automation": "Автоматизация"
|
||||
}
|
||||
|
||||
@@ -18,12 +18,18 @@
|
||||
"title": "Chưa có app cài đặt!",
|
||||
"description": "Cài đặt một vài app nhé? Hãy xem trong <a href=\"{{ appStoreLink }}\">Cửa hàng App</a>"
|
||||
},
|
||||
"groupsFilterHeader": "Chọn nhóm",
|
||||
"groupsFilterHeader": "Tất cả Nhóm",
|
||||
"auth": {
|
||||
"email": "Đăng nhập bằng email",
|
||||
"sso": "Đăng nhập với tên & mật khẩu trên Cloudron",
|
||||
"nosso": "Đăng nhập vào tài khoản riêng"
|
||||
}
|
||||
},
|
||||
"addAppAction": "Thêm App",
|
||||
"addApplinkAction": "Thêm đường link App",
|
||||
"filter": {
|
||||
"clearAll": "Xoá tất cả"
|
||||
},
|
||||
"addAppproxyAction": "Thêm proxy cho app"
|
||||
},
|
||||
"main": {
|
||||
"logout": "Thoát",
|
||||
@@ -32,7 +38,8 @@
|
||||
"save": "Lưu",
|
||||
"close": "Đóng",
|
||||
"no": "Không",
|
||||
"yes": "Có"
|
||||
"yes": "Có",
|
||||
"delete": "Xoá"
|
||||
},
|
||||
"username": "Tên đăng nhập",
|
||||
"displayName": "Tên hiển thị",
|
||||
@@ -42,11 +49,13 @@
|
||||
"pagination": {
|
||||
"prev": "trước",
|
||||
"next": "tiếp",
|
||||
"perPageSelector": "Hiển thị {{ n }} trên một trang"
|
||||
"perPageSelector": "Hiển thị {{ n }} trên một trang",
|
||||
"itemCount": "Đã tìm thấy {{ count }}"
|
||||
},
|
||||
"action": {
|
||||
"reboot": "Khởi động lại",
|
||||
"logs": "Log"
|
||||
"logs": "Log",
|
||||
"showLogs": "Hiển thị log"
|
||||
},
|
||||
"clipboard": {
|
||||
"clickToCopy": "Bấm để copy",
|
||||
@@ -71,11 +80,7 @@
|
||||
"justNow": "mới đây",
|
||||
"yeserday": "Hôm qua",
|
||||
"minutesAgo": "{{ m }} phút trước",
|
||||
"hoursAgo": "{{ h }} tiếng trước",
|
||||
"yearsAgo": "{{ y }} năm trước",
|
||||
"daysAgo": "{{ d }} ngày trước",
|
||||
"weeksAgo": "{{ w }} tuần trước",
|
||||
"monthsAgo": "{{ m }} tháng trước"
|
||||
"hoursAgo": "{{ h }} tiếng trước"
|
||||
},
|
||||
"statusEnabled": "Đã bật",
|
||||
"statusDisabled": "Đã tắt",
|
||||
@@ -83,7 +88,10 @@
|
||||
"users": "Người dùng"
|
||||
},
|
||||
"enableAction": "Bật",
|
||||
"disableAction": "Tắt"
|
||||
"disableAction": "Tắt",
|
||||
"loadingPlaceholder": "Đang tải",
|
||||
"settings": "Cài đặt",
|
||||
"saveAction": "Lưu"
|
||||
},
|
||||
"appstore": {
|
||||
"title": "Cửa hàng App",
|
||||
@@ -138,7 +146,8 @@
|
||||
"configuredForCloudronEmail": "App này đã được cấu hình sẵn để sử dụng với <a href=\"{{ emailDocsLink }}\" target=\"_blank\">Cloudron Email</a>.",
|
||||
"doInstallAction": "Tải về {{ dnsOverwrite ? 'and overwrite DNS' : '' }}",
|
||||
"cloudflarePortWarning": "Cần tắt proxy Cloudflare để tên miền app này có thể truy cập được vào cổng",
|
||||
"titleAndVersion": "App này đóng gói phần mềm {{ title }} {{ version }}"
|
||||
"titleAndVersion": "App này đóng gói phần mềm {{ title }} {{ version }}",
|
||||
"portReadOnly": "chỉ-đọc"
|
||||
},
|
||||
"appNotFoundDialog": {
|
||||
"title": "Không tìm thấy app",
|
||||
@@ -230,7 +239,6 @@
|
||||
"subscriptionRequiredAction": "Cài đặt gói đăng ký ngay",
|
||||
"description": "Cloudron sẽ đồng bộ người dùng và nhóm từ server LDAP hay ActiveDirectory bên ngoài. Xác minh mật khẩu cho người dùng được dựa trên server ngoài. Việc đồng bộ hoá không được chạy tự động mà cần được khởi động bằng tay.",
|
||||
"title": "Kết nối thư mục ngoài",
|
||||
"subscriptionRequired": "Tính năng này chỉ có trong gói trả phí.",
|
||||
"providerOther": "Khác",
|
||||
"providerDisabled": "Đã tắt"
|
||||
},
|
||||
@@ -251,8 +259,7 @@
|
||||
"invitationTooltip": "Mời Người dùng",
|
||||
"setGhostTooltip": "Nhập vai",
|
||||
"count": "Tổng ng dùng: {{ count }}",
|
||||
"mailmanagerTooltip": "Người dùng này có thể quản lý những ng dùng khác và cả những hộp thư",
|
||||
"makeLocalTooltip": "Người dùng địa phương"
|
||||
"mailmanagerTooltip": "Người dùng này có thể quản lý những ng dùng khác và cả những hộp thư"
|
||||
},
|
||||
"settings": {
|
||||
"saveAction": "Lưu",
|
||||
@@ -260,7 +267,7 @@
|
||||
"subscriptionRequired": "Chức năng này chỉ có trong gói trả phí.",
|
||||
"require2FACheckbox": "Yêu cầu người dùng cài đặt Mã xác minh 2 bước",
|
||||
"allowProfileEditCheckbox": "Cho phép người dùng chỉnh sửa tên và email",
|
||||
"title": "Cài đặt",
|
||||
"title": "Cài đặt Người dùng",
|
||||
"require2FAWarning": "Hãy cài đặt Mã xác minh 2 Bước cho tài khoản của bạn trước đề phòng bị khoá ra khỏi TK."
|
||||
},
|
||||
"groups": {
|
||||
@@ -332,8 +339,9 @@
|
||||
"label": "Giới hạn quyền truy cập"
|
||||
},
|
||||
"secret": {
|
||||
"label": "Mã bí mật",
|
||||
"description": "Tất cả những yêu cầu LDAP cần phải được xác minh với mã bí mật này và tên người dùng user DN <i>{{ userDN }}</i>"
|
||||
"label": "Mật khẩu bind",
|
||||
"description": "Tất cả những yêu cầu LDAP cần phải được xác minh với mã bí mật này và tên người dùng user DN <i>{{ userDN }}</i>",
|
||||
"url": "URL máy chủ"
|
||||
}
|
||||
},
|
||||
"userImportDialog": {
|
||||
@@ -356,12 +364,6 @@
|
||||
"all": "Tất cả Người dùng",
|
||||
"active": "Những người dùng đang hoạt động"
|
||||
},
|
||||
"makeLocalDialog": {
|
||||
"description": "Chức năng này sẽ di chuyển người dùng từ chỉ mục ngoài vào trong Cloudron.",
|
||||
"title": "Người dùng địa phương",
|
||||
"warning": "Phần đặt lại mật khẩu sẽ được kích hoạt để đặt một mật khẩu địa phương cho người dùng này.",
|
||||
"submitAction": "Địa phương hoá"
|
||||
},
|
||||
"setGhostDialog": {
|
||||
"generatePassword": "Tạo mật khẩu",
|
||||
"title": "Tạo mật khẩu để nhập vai người dùng {{ username }}",
|
||||
@@ -439,7 +441,8 @@
|
||||
"description": "Mã API mới:",
|
||||
"copyNow": "Xin copy mã API này bây giờ. Nó sẽ không được hiển thị lại vì lý do an ninh.",
|
||||
"generateToken": "Tạo mã API",
|
||||
"name": "Tên cho mã API"
|
||||
"name": "Tên cho mã API",
|
||||
"access": "Truy cập API"
|
||||
},
|
||||
"enable2FAAction": "Bật xác minh hai bước",
|
||||
"primaryEmail": "Email chính",
|
||||
@@ -462,7 +465,10 @@
|
||||
"name": "Tên",
|
||||
"expiresAt": "Hết hiệu lực vào",
|
||||
"lastUsed": "Lần dùng cuối",
|
||||
"neverUsed": "chưa từng dùng"
|
||||
"neverUsed": "chưa từng dùng",
|
||||
"readonly": "Chỉ đọc",
|
||||
"scope": "Mức độ bao phủ",
|
||||
"readwrite": "Đọc và Ghi"
|
||||
},
|
||||
"loginTokens": {
|
||||
"title": "Mã đăng nhập",
|
||||
@@ -544,7 +550,7 @@
|
||||
"mountPoint": "Điểm mount",
|
||||
"noopNote": "Lựa chọn này sẽ làm hỏng tính năng sao lưu và khôi phục của Cloudron và chỉ nên dùng khi test hệ thống. Xin đảm bảo rằng server được sao lưu toàn bộ bằng những phương tiện khác.",
|
||||
"format": "Định dạng lưu trữ",
|
||||
"encryptedFilenames": "Mã hoá tên tập tin",
|
||||
"encryptedFilenames": "Tên tập tin đã mã hoá",
|
||||
"chown": "Hệ thống tập tin bên ngoài có hỗ trợ chown",
|
||||
"username": "Tên đăng nhập",
|
||||
"server": "IP hoặc hostname máy chủ",
|
||||
@@ -556,7 +562,8 @@
|
||||
"user": "Người dùng",
|
||||
"privateKey": "Mật mã riêng",
|
||||
"diskPath": "Đường dẫn đến ổ đĩa",
|
||||
"cifsSealSupport": "Dùng mã hoá SEAL. Cần SMB thấp nhất là phiên bản v3"
|
||||
"cifsSealSupport": "Dùng mã hoá SEAL. Cần SMB thấp nhất là phiên bản v3",
|
||||
"encryptFilenames": "Mã hoá tên tập tin"
|
||||
},
|
||||
"cleanupBackups": {
|
||||
"description": "Các bản sao lưu được dọn sạch tự động dựa trên thời gian lưu giữ. Thao tác này sẽ xoá ngay lập tức các bản sao lưu đang có.",
|
||||
@@ -588,7 +595,7 @@
|
||||
"title": "Log"
|
||||
},
|
||||
"listing": {
|
||||
"stopTask": "Dừng {{ taskType === 'backup' ? 'Backup' : 'Cleanup' }}",
|
||||
"stopTask": "Dừng Backup",
|
||||
"backupNow": "Sao lưu ngay bây giờ",
|
||||
"cleanupBackups": "Dọn sạch bản sao lưu",
|
||||
"tooltipDownloadBackupConfig": "Tải xuống cấu hình bản sao lưu",
|
||||
@@ -628,7 +635,9 @@
|
||||
"password": "Mật khẩu",
|
||||
"username": "Tên đăng nhập",
|
||||
"errorIncorrectCredentials": "Không đúng tên đăng nhập hoặc mật khẩu",
|
||||
"loginTo": "Đăng nhập vào"
|
||||
"loginTo": "Đăng nhập vào",
|
||||
"errorIncorrect2FAToken": "Mã bảo mật 2 Bước không đúng",
|
||||
"errorInternal": "Lỗi nội bộ hệ thống, vui lòng thử lại sau"
|
||||
},
|
||||
"setupAccount": {
|
||||
"username": "Tên đăng nhập",
|
||||
@@ -767,7 +776,8 @@
|
||||
"noAliases": "Không có tên gọi khác nào được chỉnh.",
|
||||
"aliases": "Tên gọi khác",
|
||||
"owner": "Chủ hộp thư",
|
||||
"title": "Chỉnh sửa hộp thư {{ name }}@{{ domain }}"
|
||||
"title": "Chỉnh sửa hộp thư {{ name }}@{{ domain }}",
|
||||
"enableStorageQuota": "Bật giới hạn lưu trữ"
|
||||
},
|
||||
"addMailboxDialog": {
|
||||
"owner": "Chủ hộp thư",
|
||||
@@ -850,7 +860,8 @@
|
||||
},
|
||||
"dyndns": {
|
||||
"description": "Bật lựa chọn này để đồng bộ các bản ghi DNS với một địa chỉ IP thường xuyên thay đổi. Việc này hữu ích khi Cloudron chạy trên hệ thống mạng với địa chỉ IP hay thay đổi như kết nối mạng ở nhà.",
|
||||
"title": "DNS động"
|
||||
"title": "DNS động",
|
||||
"showLogsAction": "Hiển thị log"
|
||||
},
|
||||
"firewall": {
|
||||
"configure": {
|
||||
@@ -883,7 +894,13 @@
|
||||
},
|
||||
"configureIpv6": {
|
||||
"title": "Cài đặt nhà cung cấp IPv6"
|
||||
}
|
||||
},
|
||||
"trustedIps": {
|
||||
"summary": "{{ trustCount }} địa chỉ IP được tin tưởng",
|
||||
"description": "Những HTTP header từ những địa chỉ IP trùng khớp sẽ được chấp thuận cho qua",
|
||||
"title": "Thiết lập những địa chỉ IP đáng tin cậy"
|
||||
},
|
||||
"trustedIpRanges": "Địa chỉ IP & Vùng được tin cậy "
|
||||
},
|
||||
"emails": {
|
||||
"typeFilterHeader": "Tất cả sự kiện",
|
||||
@@ -918,7 +935,7 @@
|
||||
"locationPlaceholder": "Để trống để dùng tên miền gốc",
|
||||
"location": "Vị trí",
|
||||
"title": "Thay đổi vị trí đặt mail server",
|
||||
"description": "Cloudron sẽ thay đổi những giá trị DNS cần thiết cho tất cả tên miền và khởi động lại mail server. Những client nhận mail trên máy tính hay điện thoại cần được cài đặt lại để sử dụng vị trí mới này làm IMAP và SMTP server."
|
||||
"description": "Hành động này sẽ di chuyển server IMAP và SMTP đến vị trí được xác định."
|
||||
},
|
||||
"eventlog": {
|
||||
"searchPlaceholder": "Tìm kiếm",
|
||||
@@ -937,7 +954,10 @@
|
||||
"queued": "Xếp hàng",
|
||||
"outgoing": "Gửi mail ra",
|
||||
"incoming": "Nhận mail vào",
|
||||
"deferred": "Trì hoãn lại"
|
||||
"deferred": "Trì hoãn lại",
|
||||
"overQuotaInfo": "Hộp thư {{ mailbox }} đã đầy {{ quotaPercent }}%",
|
||||
"underQuotaInfo": "Hộp thư {{ mailbox }} đã rơi xuống còn {{ quotaPercent }}% của hạn mức",
|
||||
"quota": "Hạn mức hộp thư"
|
||||
},
|
||||
"empty": "Log sự kiện hiện đang trống.",
|
||||
"details": "Chi tiết",
|
||||
@@ -954,8 +974,8 @@
|
||||
"solrEnabled": "Đã bật",
|
||||
"solrDisabled": "Đã tắt",
|
||||
"changeDomainProgress": "Thay đổi tên miền email:",
|
||||
"spamFilterOverview": "{{ blacklistCount }} email có trong danh sách đen.",
|
||||
"location": "Nơi đặt mail server",
|
||||
"spamFilterOverview": "{{ blacklistCount }} email có trong danh sách bị chặn.",
|
||||
"location": "Nơi đặt máy chủ mail",
|
||||
"spamFilter": "Lọc spam",
|
||||
"maxMailSize": "Kích cỡ mail tối đa",
|
||||
"info": "Các cài đặt này áp dụng cho tất cả các tên miền.",
|
||||
@@ -985,6 +1005,19 @@
|
||||
"dnsblZonesInfo": "Địa chỉ IP đang muốn kết nối đến được dò tìm trong những danh sách IP bị chặn này",
|
||||
"dnsblZonesPlaceholder": "Tên vùng (ghi xuống dòng)",
|
||||
"title": "Đổi danh sách quản lý truy cập mail"
|
||||
},
|
||||
"queue": {
|
||||
"empty": "Danh sách mail chờ đang trống",
|
||||
"title": "Danh sách mail chờ gửi",
|
||||
"rcptTo": "Gửi cho",
|
||||
"mailFrom": "Đến từ",
|
||||
"details": "Chi tiết",
|
||||
"discardTooltip": "Bỏ qua",
|
||||
"queueTime": "Thời gian chờ",
|
||||
"resendTooltip": "Gửi lại ngay"
|
||||
},
|
||||
"action": {
|
||||
"queue": "Cho vào hàng chờ gửi sau"
|
||||
}
|
||||
},
|
||||
"branding": {
|
||||
@@ -1013,10 +1046,11 @@
|
||||
"selectPeriodLabel": "Chọn khoảng thời gian",
|
||||
"cpuUsage": {
|
||||
"graphTitle": "Phần trăm sử dụng",
|
||||
"title": "Dung lượng CPU"
|
||||
"title": "Dung lượng CPU",
|
||||
"graphSubtext": "Chỉ những app sử dụng hơn {{ threshold }} cpu mới được hiển thị"
|
||||
},
|
||||
"systemMemory": {
|
||||
"graphSubtext": "Các giá trị bộ nhớ riêng từng app không hiển thị chồng lên nhau",
|
||||
"graphSubtext": "Chỉ những app sử dụng hơn {{ threshold }} bộ nhớ mới được hiển thị",
|
||||
"title": "Bộ nhớ hệ thống"
|
||||
},
|
||||
"diskUsage": {
|
||||
@@ -1024,7 +1058,11 @@
|
||||
"diskContent": "Ổ đĩa {{ type }} này hiện chứa",
|
||||
"usageInfo": "Còn {{ available | prettyDiskSize }}</b> trống trong tổng <b>{{ size | prettyDiskSize }}</b>",
|
||||
"mountedAt": "{{ filesystem }} <small>được gắn ở</small> {{ mountpoint }}",
|
||||
"title": "Dung lượng ổ đĩa"
|
||||
"title": "Dung lượng ổ đĩa",
|
||||
"usedInfo": "{{ used }} đã dùng trong tổng {{ size }}",
|
||||
"volumeContent": "Ổ đĩa này thuộc volume <code>{{ name }}</code>",
|
||||
"uninstalledApp": "App đã xoá",
|
||||
"diskSpeed": "Tốc độ: {{ speed }} MB/s"
|
||||
},
|
||||
"title": "Hệ thống"
|
||||
},
|
||||
@@ -1179,7 +1217,8 @@
|
||||
"download": "Tải xuống",
|
||||
"extract": "Giải nén tại đây",
|
||||
"chown": "Đổi quyền sở hữu",
|
||||
"rename": "Đổi tên"
|
||||
"rename": "Đổi tên",
|
||||
"open": "Mở"
|
||||
},
|
||||
"name": "Tên",
|
||||
"symlink": "Liên kết symlink đến {{ target }}",
|
||||
@@ -1237,7 +1276,19 @@
|
||||
},
|
||||
"removeDialog": {
|
||||
"reallyDelete": "Chắc chắn xoá?"
|
||||
}
|
||||
},
|
||||
"uploader": {
|
||||
"exitWarning": "Vẫn đang tải lên. Bạn có chắc muốn đóng trang này?",
|
||||
"uploading": "Đang tải lên"
|
||||
},
|
||||
"textEditor": {
|
||||
"undo": "Hoàn tác",
|
||||
"redo": "Xóa hoàn tác",
|
||||
"save": "Lưu"
|
||||
},
|
||||
"extractionInProgress": "Đang giải nén",
|
||||
"pasteInProgress": "Đang dán",
|
||||
"deleteInProgress": "Đang xoá"
|
||||
},
|
||||
"terminal": {
|
||||
"contextmenu": {
|
||||
@@ -1269,7 +1320,9 @@
|
||||
"logs": {
|
||||
"download": "Tải xuống tất cả log",
|
||||
"clear": "Làm sạch phần xem log",
|
||||
"title": "Log"
|
||||
"title": "Log",
|
||||
"notFoundError": "Không có tác vụ hay app đó",
|
||||
"logsGoneError": "Tập tin log không được tìm thấy"
|
||||
},
|
||||
"notifications": {
|
||||
"clearAll": "Xoá hết",
|
||||
@@ -1327,7 +1380,11 @@
|
||||
"wellKnownDescription": "Những giá trị nhập vào này sẽ được dùng bởi Cloudron để phản hồi về những đường link <code>/.well-known/</code>. Lưu ý rằng một app cần được đang chạy cài đặt sẵn trên tên miền gốc <code>{{ domain }}</code> để tính năng này có thể hoạt động được. Xem phần <a href=\"{{docsLink}}\" target=\"_blank\">hướng dẫn sử dụng</a> để biết thêm thông tin.",
|
||||
"vultrToken": "Mật mã Vultr",
|
||||
"jitsiHostname": "Vị trí Jitsi",
|
||||
"hetznerToken": "Mật mã Hetzner"
|
||||
"hetznerToken": "Mật mã Hetzner",
|
||||
"cloudflareDefaultProxyStatus": "Bật tính năng proxy cho những bản ghi DNS mới",
|
||||
"porkbunSecretapikey": "Mã bí mật API",
|
||||
"bunnyAccessKey": "Mã truy cập Bunny",
|
||||
"porkbunApikey": "Key API"
|
||||
},
|
||||
"subscriptionRequired": {
|
||||
"description": "Để thêm tên miền, hãy đăng ký gói trả phí.",
|
||||
@@ -1362,7 +1419,8 @@
|
||||
"domainWellKnown": {
|
||||
"title": "Những vị trí Well-Known của {{ domain }}"
|
||||
},
|
||||
"tooltipWellKnown": "Cài đặt những vị trí Well-Known"
|
||||
"tooltipWellKnown": "Cài đặt những vị trí Well-Known",
|
||||
"count": "Tổng số tên miền: {{ count }}"
|
||||
},
|
||||
"app": {
|
||||
"appInfo": {
|
||||
@@ -1427,7 +1485,8 @@
|
||||
"time": "Tạo ra lúc",
|
||||
"packageVersion": "Phiên bản đóng gói",
|
||||
"description": "Bản sao lưu là những bản chụp snapshot hoàn chỉnh của app. Bạn có thể dùng các bản sao lưu để khôi phục hoặc nhân bản app này.",
|
||||
"title": "Bản sao lưu"
|
||||
"title": "Bản sao lưu",
|
||||
"downloadBackupTooltip": "Tải bản sao lưu"
|
||||
}
|
||||
},
|
||||
"updates": {
|
||||
@@ -1447,8 +1506,10 @@
|
||||
"packageVersion": "Phiên bản đóng gói",
|
||||
"appId": "ID của app",
|
||||
"description": "Tên app và phiên bản",
|
||||
"title": "Thông tin app"
|
||||
}
|
||||
"title": "Thông tin app",
|
||||
"repository": "Repo của bản đống gói"
|
||||
},
|
||||
"noUpdates": "Không có phiên bản mới"
|
||||
},
|
||||
"security": {
|
||||
"robots": {
|
||||
@@ -1460,7 +1521,8 @@
|
||||
"saveAction": "Lưu",
|
||||
"title": "Chính sách an ninh nội dung",
|
||||
"description": "Cài đặt lựa chọn này sẽ ghi chèn lên những CSP header gửi từ app này ra"
|
||||
}
|
||||
},
|
||||
"hstsPreload": "Bật HSTS preload cho trang web này và tất cả tên miền phụ"
|
||||
},
|
||||
"email": {
|
||||
"csp": {
|
||||
@@ -1494,7 +1556,10 @@
|
||||
"24h": "24 tiếng trước",
|
||||
"12h": "12 tiếng trước",
|
||||
"6h": "6 tiếng"
|
||||
}
|
||||
},
|
||||
"diskTitle": "Dung lượng ổ đĩa",
|
||||
"diskIOTotal": "tổng: đọc {{ read }} / ghi {{ write }}",
|
||||
"networkIOTotal": "tổng: vào {{ inbound }} / ra {{ outbound }}"
|
||||
},
|
||||
"storage": {
|
||||
"mounts": {
|
||||
@@ -1503,13 +1568,20 @@
|
||||
"noMounts": "Không có volume được gắn thêm.",
|
||||
"volume": "Volume",
|
||||
"title": "Thư mục mount thêm",
|
||||
"readOnly": "Chỉ cho phép đọc"
|
||||
"readOnly": "Chỉ cho phép đọc",
|
||||
"permissions": {
|
||||
"readOnly": "Chỉ cho phép đọc",
|
||||
"readWrite": "Đọc và ghi",
|
||||
"label": "Quyền cấp phép"
|
||||
}
|
||||
},
|
||||
"appdata": {
|
||||
"moveAction": "Chuyển dữ liệu",
|
||||
"dataDirPlaceholder": "Để trống để dùng giá trị mặc định của hệ thống",
|
||||
"description": "Nếu hệ thống đang chạy sắp hết dung lượng ổ đĩa, hãy dùng chức năng này để dời những dữ liệu của app sang qua <a href=\"/#/volumes\">volume</a>. Bất cứ dữ liệu nào trong đây đều được sao lưu như một phần trong tổng thể app.",
|
||||
"title": "Thư mục Dữ liệu"
|
||||
"title": "Thư mục Dữ liệu",
|
||||
"diskUsage": "App hiện đang dùng {{ size }} trong bộ lưu trữ (tính đến ngày{{ date }}).",
|
||||
"mountTypeWarning": "Hệ thống tập tin điểm cuối phải hỗ trợ quyền cấp phép và sở hữu cho tập tin để có thể di chuyển dữ liệu"
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
@@ -1618,7 +1690,7 @@
|
||||
"setupSubscriptionAction": "Cài đặt gói đăng ký",
|
||||
"skipBackupCheckbox": "Bỏ qua sao lưu",
|
||||
"subscriptionExpired": "Gói đăng ký Cloudron của bạn đã hết hạn. Xin cài đặt một gói đăng ký để cập nhật app.",
|
||||
"changelogHeader": "Những thay đổi trong phiên bản mới {{ version}}:",
|
||||
"changelogHeader": "Những thay đổi trong phiên bản dóng gói mới {{ version}}:",
|
||||
"unstableWarning": "Bản cập nhật này là phiên bản ra mắt sớm và chưa được ổn định. Xin lưu ý rủi ro khi cập nhật.",
|
||||
"title": "Cập nhật {{ app }}"
|
||||
},
|
||||
@@ -1626,7 +1698,8 @@
|
||||
"importAction": "Nhập vào",
|
||||
"uploadAction": "Tải lên cấu hình bản sao lưu",
|
||||
"description": "Những dữ liệu được tạo ra tính từ thời điểm này và lần sao lưu cuối cùng sẽ bị mất vĩnh viễn. Bạn nên tạo một bản sao lưu của những dữ liệu hiện tại trước khi thực hiện việc nhập vào.",
|
||||
"title": "Nhập bản sao lưu vào"
|
||||
"title": "Nhập bản sao lưu vào",
|
||||
"remotePath": "Đường dẫn bản sao lưu"
|
||||
},
|
||||
"repairDialog": {
|
||||
"retryAction": "Thử lại {{ task }}",
|
||||
@@ -1665,7 +1738,30 @@
|
||||
"eventlogTabTitle": "Log sự kiện",
|
||||
"sftpInfoAction": "Quyền truy cập SFPT",
|
||||
"cronTabTitle": "Tác vụ lặp lai cron",
|
||||
"forumUrlAction": "Cần trợ giúp? Hãy hỏi thử trên diễn đàn nhé"
|
||||
"forumUrlAction": "Cần trợ giúp? Hãy hỏi thử trên diễn đàn nhé",
|
||||
"servicesTabTitle": "Dịch vụ",
|
||||
"turn": {
|
||||
"title": "Cài đặt TURN",
|
||||
"enable": "Thiết lập app để sử dụng máy chủ TURN được cài sẵn",
|
||||
"disable": "Không thiết lập TURN cho app này. Các cài đặt TURN cho app được giữ nguyên. Bạn có thể tuỳ chỉnh thêm trong app."
|
||||
},
|
||||
"redis": {
|
||||
"title": "Thiết lập Redis",
|
||||
"enable": "Thiết lập app sử dụng Redis"
|
||||
},
|
||||
"addApplinkDialog": {
|
||||
"title": "Thêm link app bên ngoài"
|
||||
},
|
||||
"editApplinkDialog": {
|
||||
"deleteAction": "Xoá",
|
||||
"title": "Chỉnh sửa link app"
|
||||
},
|
||||
"applinks": {
|
||||
"clearIconDescription": "Hệ thống sẽ lấy favicon của app sau khi bạn bấm lưu.",
|
||||
"upstreamUri": "Đường dẫn bên ngoài",
|
||||
"label": "Nhãn",
|
||||
"clearIconAction": "Xoá biểu tượng"
|
||||
}
|
||||
},
|
||||
"volumes": {
|
||||
"name": "Tên volume",
|
||||
@@ -1692,7 +1788,7 @@
|
||||
},
|
||||
"removeVolumeActionTooltip": "Xoá volume",
|
||||
"openFileManagerActionTooltip": "Mở Quản lý tập tin",
|
||||
"hostPath": "Đường dẫn mount",
|
||||
"hostPath": "Điểm đến",
|
||||
"addVolumeAction": "Thêm volume",
|
||||
"updateVolumeDialog": {
|
||||
"title": "Cập nhật Volume {{ volume }}"
|
||||
@@ -1724,7 +1820,9 @@
|
||||
"de": "Tiếng Đức",
|
||||
"en": "Tiếng Anh",
|
||||
"es": "Tiếng Tây Ban Nha",
|
||||
"ru": "Tiếng Nga"
|
||||
"ru": "Tiếng Nga",
|
||||
"da": "Tiếng Đan Mạch",
|
||||
"pt": "Tiếng Bồ Đào Nha"
|
||||
},
|
||||
"passwordResetEmail": {
|
||||
"subject": "[<%= cloudron %>] Đặt lại mật khẩu",
|
||||
@@ -1771,5 +1869,43 @@
|
||||
"mounts": {
|
||||
"description": "Các app có thể truy cập vào <a href=\"/#/volumes\">những volume</a> được mount lên thông qua thư mục <code>/media/{volume name}</code>. Dữ liệu này không được bao gồm trong phần bản sao lưu của app."
|
||||
}
|
||||
}
|
||||
},
|
||||
"oidc": {
|
||||
"newClientDialog": {
|
||||
"title": "Thêm client",
|
||||
"description": "Thêm cài đặt client kết nối OpenID mới.",
|
||||
"createAction": "Tạo"
|
||||
},
|
||||
"client": {
|
||||
"loginRedirectUri": "Đường dẫn callback khi đăng nhập (viết cách ra bởi dấu phẩy nếu có nhiều hơn một)",
|
||||
"name": "Tên",
|
||||
"id": "ID client",
|
||||
"secret": "Mật khẩu client",
|
||||
"signingAlgorithm": "Thuật toán ký mã hoá",
|
||||
"logoutRedirectUri": "Đường dẫn callback khi đăng nhập (không bắt buộc)"
|
||||
},
|
||||
"description": "Cloudron có thể làm nhà cung cấp kết nối OpenID cho các app trong và ngoài hệ thống.",
|
||||
"clients": {
|
||||
"title": "Client",
|
||||
"newClient": "Thêm client mới",
|
||||
"empty": "Chưa có client"
|
||||
},
|
||||
"title": "Nhà cung cấp kết nối OpenID",
|
||||
"editClientDialog": {
|
||||
"title": "Chỉnh sửa client {{ client }}"
|
||||
},
|
||||
"deleteClientDialog": {
|
||||
"title": "Chắc chắn muốn xoá client {{ client }}?",
|
||||
"description": "Thao tác này sẽ ngắt kết nối tất cả app OpenID bên ngoài có trong Cloudron sử dụng ID client này."
|
||||
},
|
||||
"env": {
|
||||
"discoveryUrl": "Đường dẫn Tìm kiếm",
|
||||
"logoutUrl": "Đường dẫn đăng xuất",
|
||||
"profileEndpoint": "Điểm cuối hồ sơ",
|
||||
"keysEndpoint": "Điểm cuối mật mã",
|
||||
"authEndpoint": "Điểm cuối Auth",
|
||||
"tokenEndpoint": "Điểm cuối token"
|
||||
}
|
||||
},
|
||||
"automation": "Tự động hoá"
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
"appCount": "{{ appCount }} 个应用",
|
||||
"cleanupBackups": "清理备份",
|
||||
"backupNow": "现在备份",
|
||||
"stopTask": "停止 {{ taskType === 'backup' ? '备份' : '清理' }}",
|
||||
"stopTask": "停止 备份",
|
||||
"tooltipDownloadBackupConfig": "下载备份配置",
|
||||
"tooltipPreservedBackup": "该备份将会被保留",
|
||||
"tooltipEditBackup": "编辑备份"
|
||||
@@ -299,11 +299,7 @@
|
||||
"justNow": "现在",
|
||||
"yeserday": "昨天",
|
||||
"hoursAgo": "{{ h }} 小时前",
|
||||
"daysAgo": "{{ d }} 天前",
|
||||
"weeksAgo": "{{ w }} 周前",
|
||||
"yearsAgo": "{{ y }} 年前",
|
||||
"minutesAgo": "{{ m }} 分钟前",
|
||||
"monthsAgo": "{{ m }} 个月前"
|
||||
"minutesAgo": "{{ m }} 分钟前"
|
||||
},
|
||||
"statusEnabled": "已启用",
|
||||
"statusDisabled": "已停用",
|
||||
@@ -409,7 +405,6 @@
|
||||
"empty": "没有用户",
|
||||
"resetPasswordTooltip": "重设密码",
|
||||
"transferOwnershipTooltip": "转让所有权",
|
||||
"makeLocalTooltip": "设为本地用户",
|
||||
"invitationTooltip": "邀请用户",
|
||||
"setGhostTooltip": "模拟该用户",
|
||||
"mailmanagerTooltip": "该用户可以管理用户和邮箱",
|
||||
@@ -433,7 +428,6 @@
|
||||
},
|
||||
"externalLdap": {
|
||||
"title": "连接外部用户目录",
|
||||
"subscriptionRequired": "这个功能仅在付费订阅后可用。",
|
||||
"subscriptionRequiredAction": "现在就设置订阅",
|
||||
"noopInfo": "LDAP 认证未配置。",
|
||||
"provider": "Provider",
|
||||
@@ -553,12 +547,6 @@
|
||||
"setPassword": "设置密码",
|
||||
"generatePassword": "生成密码"
|
||||
},
|
||||
"makeLocalDialog": {
|
||||
"title": "将该用户改为本地用户",
|
||||
"warning": "会为该用户触发一次密码重置来设置本地密码。",
|
||||
"description": "该操作将会将用户从外部用户目录迁移到 Cloudron。",
|
||||
"submitAction": "设为本地用户"
|
||||
},
|
||||
"exposedLdap": {
|
||||
"secret": {
|
||||
"label": "密钥",
|
||||
|
||||
@@ -12,12 +12,41 @@
|
||||
<div ng-bind-html="app.manifest.postInstallMessage | markdown2html"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="form-group pull-left" ng-show="postInstallMessage.openApp">
|
||||
<input type="checkbox" id="appPostInstallConfirmCheckbox" ng-model="postInstallMessage.confirmed">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.close' | tr }}</button>
|
||||
<a class="btn btn-success" ng-href="{{ postInstallMessage.confirmed ? ('https://' + app.fqdn) : '' }}" target="_blank" ng-disabled="!postInstallMessage.confirmed" ng-click="postInstallMessage.submit()" ng-show="postInstallMessage.openApp">{{ 'app.appInfo.openAction' | tr:{ app: app.manifest.title } }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal postinstall confirm -->
|
||||
<div class="modal fade" id="appPostInstallConfirmModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<img ng-src="{{appPostInstallConfirm.app.iconUrl}}" onerror="this.onerror=null;this.src='img/appicon_fallback.png'" class="app-info-icon"/>
|
||||
<h5 class="app-info-title">
|
||||
{{ appPostInstallConfirm.app.manifest.title }}
|
||||
<span class="app-info-meta text-small">{{ 'app.appInfo.package' | tr }} <a ng-href="/#/appstore/{{appPostInstallConfirm.app.manifest.id}}?version={{appPostInstallConfirm.app.manifest.version}}">v{{ appPostInstallConfirm.app.manifest.version }}</a> </span>
|
||||
<br/>
|
||||
<span ng-show="appPostInstallConfirm.app.manifest.documentationUrl"><a target="_blank" ng-href="{{appPostInstallConfirm.app.manifest.documentationUrl}}">{{ 'app.docsAction' | tr }}</a> </span>
|
||||
<br/>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p ng-show="appPostInstallConfirm.app.manifest.addons.email">{{ 'app.appInfo.ssoEmail' | tr }}</p>
|
||||
<p ng-show="appPostInstallConfirm.app.sso && !appPostInstallConfirm.app.manifest.addons.email">{{ 'app.appInfo.sso' | tr }}</p>
|
||||
|
||||
<div ng-bind-html="appPostInstallConfirm.app.manifest.postInstallMessage | markdown2html"></div>
|
||||
<div ng-show="appPostInstallConfirm.app.manifest.documentationUrl" ng-bind-html="'app.appInfo.appDocsUrl' | tr:{ docsUrl: appPostInstallConfirm.app.manifest.documentationUrl, title: appPostInstallConfirm.app.manifest.title, forumUrl: (appPostInstallConfirm.app.manifest.forumUrl || 'https://forum.cloudron.io') }"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="form-group pull-left">
|
||||
<input type="checkbox" id="appPostInstallConfirmCheckbox" ng-model="appPostInstallConfirm.confirmed">
|
||||
<label class="control-label" for="appPostInstallConfirmCheckbox">{{ 'app.appInfo.postInstallConfirmCheckbox' | tr }}</label>
|
||||
</div>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.close' | tr }}</button>
|
||||
<a class="btn btn-success" ng-href="{{ postInstallMessage.confirmed ? ('https://' + app.fqdn) : '' }}" target="_blank" ng-disabled="!postInstallMessage.confirmed" ng-click="postInstallMessage.submit()" ng-show="postInstallMessage.openApp">{{ 'app.appInfo.openAction' | tr:{ app: app.manifest.title } }}</a>
|
||||
<a class="btn btn-success" ng-href="{{ appPostInstallConfirm.confirmed ? ('https://' + appPostInstallConfirm.app.fqdn) : '' }}" target="_blank" ng-disabled="!appPostInstallConfirm.confirmed" ng-click="appPostInstallConfirm.submit()">{{ 'app.appInfo.openAction' | tr:{ app: appPostInstallConfirm.app.manifest.title } }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -69,6 +98,46 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal backup details -->
|
||||
<div class="modal fade" id="backupDetailsModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" style="width: 750px">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'backups.backupDetails.title' | tr }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-1 text-muted">{{ 'backups.backupDetails.id' | tr }}:</div>
|
||||
<div class="col-xs-11 text-right">{{ backupDetails.backup.id }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-2 text-muted">{{ 'backups.backupEdit.label' | tr }}:</div>
|
||||
<div class="col-xs-10 text-right">{{ backupDetails.backup.label }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-2 text-muted">{{ 'backups.backupEdit.remotePath' | tr }}:</div>
|
||||
<div class="col-xs-10 text-right">{{ backupDetails.backup.remotePath }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-2 text-muted">{{ 'backups.backupDetails.date' | tr }}:</div>
|
||||
<div class="col-xs-10 text-right">{{ backupDetails.backup.creationTime | prettyLongDate }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-2 text-muted">{{ 'backups.backupDetails.version' | tr }}:</div>
|
||||
<div class="col-xs-10 text-right">v{{ backupDetails.backup.packageVersion }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-2 text-muted">{{ 'backups.backupDetails.format' | tr }}:</div>
|
||||
<div class="col-xs-10 text-right">{{ backupDetails.backup.format }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">{{ 'main.dialog.close' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal edit individual backup (label and retention sec) -->
|
||||
<div class="modal fade" id="editBackupModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
@@ -368,6 +437,11 @@
|
||||
<select class="form-control" name="region" id="inputimportBackupVultrRegion" ng-model="importBackup.endpoint" ng-options="a.value as a.name for a in vultrRegions" ng-disabled="importBackup.busy" ng-required="importBackup.provider === 'vultr-objectstorage'"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': importBackup.error.region }" ng-show="importBackup.provider === 'contabo-objectstorage'">
|
||||
<label class="control-label" for="inputimportBackupContaboRegion">{{ 'backups.configureBackupStorage.region' | tr }}</label>
|
||||
<select class="form-control" name="region" id="inputimportBackupContaboRegion" ng-model="importBackup.endpoint" ng-options="a.value as a.name for a in contaboRegions" ng-disabled="importBackup.busy" ng-required="importBackup.provider === 'contabo-objectstorage'"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': importBackup.error.accessKeyId }" ng-show="s3like(importBackup.provider)">
|
||||
<label class="control-label" for="inputImportBackupAccessKeyId">{{ 'backups.configureBackupStorage.s3AccessKeyId' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="importBackup.accessKeyId" id="inputImportBackupAccessKeyId" name="accessKeyId" ng-disabled="importBackup.busy" ng-required="s3like(importBackup.provider)">
|
||||
@@ -581,9 +655,9 @@
|
||||
<i ng-hide="app.installationState === 'pending_start' || app.installationState === 'pending_stop'" class="fas" ng-class="{ 'fa-power-off': !uninstall.startButton, 'fa-play': uninstall.startButton }"></i>
|
||||
</button>
|
||||
<div class="btn-group btn-group-sm" role="group">
|
||||
<a class="btn btn-sm btn-default" ng-href="{{ '/logs.html?appId=' + app.id }}" target="_blank" uib-tooltip="{{ 'app.logsActionTooltip' | tr }}" tooltip-append-to-body="true" tooltip-placement="bottom"><i class="fas fa-align-left"></i></a>
|
||||
<a class="btn btn-sm btn-default" ng-if="app.type !== APP_TYPES.PROXIED" ng-href="{{ '/terminal.html?id=' + app.id }}" target="_blank" uib-tooltip="{{ 'app.terminalActionTooltip' | tr }}" tooltip-append-to-body="true" tooltip-placement="bottom"><i class="fa fa-terminal"></i></a>
|
||||
<a class="btn btn-sm btn-default" ng-if="app.manifest.addons.localstorage" ng-href="{{ '/filemanager.html?type=app&id=' + app.id }}" target="_blank" uib-tooltip="{{ 'app.filemanagerActionTooltip' | tr }}" tooltip-append-to-body="true" tooltip-placement="bottom"><i class="fas fa-folder"></i></a>
|
||||
<a class="btn btn-sm btn-default" ng-href="{{ '/frontend/logs.html?appId=' + app.id }}" target="_blank" uib-tooltip="{{ 'app.logsActionTooltip' | tr }}" tooltip-append-to-body="true" tooltip-placement="bottom"><i class="fas fa-align-left"></i></a>
|
||||
<a class="btn btn-sm btn-default" ng-if="app.type !== APP_TYPES.PROXIED" ng-href="{{ '/frontend/terminal.html?id=' + app.id }}" target="_blank" uib-tooltip="{{ 'app.terminalActionTooltip' | tr }}" tooltip-append-to-body="true" tooltip-placement="bottom"><i class="fa fa-terminal"></i></a>
|
||||
<a class="btn btn-sm btn-default" ng-if="app.manifest.addons.localstorage" ng-href="{{ '/frontend/filemanager.html#/home/app/' + app.id }}" target="_blank" uib-tooltip="{{ 'app.filemanagerActionTooltip' | tr }}" tooltip-append-to-body="true" tooltip-placement="bottom"><i class="fas fa-folder"></i></a>
|
||||
</div>
|
||||
<div class="dropdown" style="display: inline-block">
|
||||
<button class="btn btn-sm btn-default dropdown-toggle" type="button" data-toggle="dropdown" uib-tooltip="{{ 'app.docsActionTooltip' | tr }}" tooltip-append-to-body="true" tooltip-placement="bottom">
|
||||
@@ -632,6 +706,7 @@
|
||||
<div ng-click="setView('proxy')" ng-class="{ 'active': view === 'proxy' }" ng-show="app.type === APP_TYPES.PROXIED">Proxy</div>
|
||||
<div ng-click="setView('access')" ng-class="{ 'active': view === 'access' }" ng-show="app.accessLevel === 'admin'">{{ 'app.accessControlTabTitle' | tr }}</div>
|
||||
<div ng-click="setView('resources')" ng-class="{ 'active': view === 'resources' }" ng-show="app.type !== APP_TYPES.PROXIED">{{ 'app.resourcesTabTitle' | tr }}</div>
|
||||
<div ng-click="setView('services')" ng-class="{ 'active': view === 'services' }" ng-show="app.type !== APP_TYPES.PROXIED && (app.manifest.addons.turn.optional || app.manifest.addons.redis.optional)">{{ 'app.servicesTabTitle' | tr }}</div>
|
||||
<div ng-click="setView('storage')" ng-class="{ 'active': view === 'storage' }" ng-show="app.accessLevel === 'admin' && app.type !== APP_TYPES.PROXIED">{{ 'app.storageTabTitle' | tr }}</div>
|
||||
<div ng-click="setView('graphs')" ng-class="{ 'active': view === 'graphs' }" ng-show="app.type !== APP_TYPES.PROXIED">{{ 'app.graphsTabTitle' | tr }}</div>
|
||||
<div ng-click="setView('security')" ng-class="{ 'active': view === 'security' }">{{ 'app.securityTabTitle' | tr }}</div>
|
||||
@@ -747,12 +822,13 @@
|
||||
<div ng-repeat="(env, info) in location.portBindingsInfo">
|
||||
<ng-form name="portInfo_form">
|
||||
<div class="form-group" ng-class="{ 'has-error': (!portInfo_form.itemName{{$index}}.$dirty && location.error.port) || (portInfo_form.itemName{{$index}}.$dirty && portInfo_form.itemName{{$index}}.$invalid) }">
|
||||
<label class="control-label" for="locationPortInput{{env}}"><input type="checkbox" ng-model="location.portBindingsEnabled[env]">
|
||||
<label class="control-label" style="width: 100%" for="locationPortInput{{env}}"><input type="checkbox" ng-model="location.portBindingsEnabled[env]">
|
||||
{{ info.title }}
|
||||
<sup>
|
||||
<a popover-placement="top-right" popover-trigger="outsideClick" uib-popover="{{info.description}} ({{ HOST_PORT_MIN }} - {{ HOST_PORT_MAX }})"><i class="fa fa-question-circle"></i></a>
|
||||
</sup>
|
||||
<small style="padding-left: 5px;" ng-show="info.readOnly">{{ 'appstore.installDialog.portReadOnly' | tr }}</small>
|
||||
<span ng-show="info.portCount" style="display: block; float: right">({{ info.portCount }} ports) {{ location.portBindings[env] }} to {{ location.portBindings[env] + info.portCount - 1 }}</span>
|
||||
</label>
|
||||
<input type="number" class="form-control" ng-model="location.portBindings[env]" ng-disabled="!location.portBindingsEnabled[env]" ng-readonly="info.readOnly" id="locationPortInput{{env}}" later-name="itemName{{$index}}" min="{{HOST_PORT_MIN}}" max="{{HOST_PORT_MAX}}" required>
|
||||
<p class="text-small text-warning text-bold" ng-show="location.domain.provider === 'cloudflare'">{{ 'appstore.installDialog.cloudflarePortWarning' | tr }} </p>
|
||||
@@ -965,6 +1041,61 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" ng-show="view === 'services'">
|
||||
<div class="row" ng-show="app.manifest.addons.turn.optional">
|
||||
<div class="col-md-12">
|
||||
<label class="control-label">{{ 'app.turn.title' | tr }} <sup><a ng-href="https://docs.cloudron.io/apps/#turn" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></label>
|
||||
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" ng-model="services.enableTurn" value="1"> {{ 'app.turn.enable' | tr }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" ng-model="services.enableTurn" value="0"> {{ 'app.turn.disable' | tr }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 text-right">
|
||||
<br/>
|
||||
<button class="btn btn-outline btn-primary pull-right" ng-click="services.submitTurn()" ng-disabled="app.enableTurn === services.enableTurn || services.busy || app.error || app.taskId" tooltip-enable="app.error || app.taskId" uib-tooltip="{{ app.error ? 'App is in error state' : 'App is busy' }}">
|
||||
<i class="fa fa-circle-notch fa-spin" ng-show="services.busy"></i> {{ 'main.saveAction' | tr }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr ng-show="app.manifest.addons.turn.optional && app.manifest.addons.redis.optional">
|
||||
|
||||
<div class="row" ng-show="app.manifest.addons.redis.optional">
|
||||
<div class="col-md-12">
|
||||
<label class="control-label">{{ 'app.redis.title' | tr }} <sup><a ng-href="https://docs.cloudron.io/apps/#redis" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></label>
|
||||
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" ng-model="services.enableRedis" value="1"> {{ 'app.redis.enable' | tr }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" ng-model="services.enableRedis" value="0"> {{ 'app.redis.disable' | tr }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 text-right">
|
||||
<br/>
|
||||
<button class="btn btn-outline btn-primary pull-right" ng-click="services.submitRedis()" ng-disabled="app.enablRedis === services.enableRedis || services.busy || app.error || app.taskId" tooltip-enable="app.error || app.taskId" uib-tooltip="{{ app.error ? 'App is in error state' : 'App is busy' }}">
|
||||
<i class="fa fa-circle-notch fa-spin" ng-show="services.busy"></i> {{ 'main.saveAction' | tr }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card" ng-show="view === 'storage'">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@@ -973,6 +1104,7 @@
|
||||
<p ng-bind-html="'app.storage.appdata.description' | tr:{ storagePath: ('/home/yellowtent/appsdata/' + app.id) }"></p>
|
||||
<form role="form" name="storageDataDirForm" ng-submit="storage.submitDataDir()" autocomplete="off">
|
||||
<select class="form-control" ng-model="storage.location" ng-options="location.displayName for location in storage.locationOptions track by location.id"></select>
|
||||
<p class="text-warning" ng-show="storage.location.type === 'volume' && storage.location.mountType === 'mountpoint'" ng-bind-html="'app.storage.appdata.mountTypeWarning' | tr"></p>
|
||||
|
||||
<br/>
|
||||
|
||||
@@ -985,6 +1117,7 @@
|
||||
<input class="ng-hide" type="submit" ng-disabled="!storageDataDirForm.$dirty || storageDataDirForm.$invalid || storage.busyDataDir || app.error || app.taskId"/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right">
|
||||
@@ -1021,6 +1154,7 @@
|
||||
</select>
|
||||
</td>
|
||||
<td class="text-right no-wrap" style="vertical-align: middle">
|
||||
<a class="btn btn-xs btn-default" ng-href="{{ '/frontend/filemanager.html#/home/volume/' + mount.volume.id }}" target="_blank" uib-tooltip="{{ 'volumes.openFileManagerActionTooltip' | tr }}"><i class="fas fa-folder"></i></a>
|
||||
<button class="btn btn-danger btn-xs" ng-click="storage.delMount($event, $index)"><i class="far fa-trash-alt"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1401,8 +1535,8 @@
|
||||
<tr ng-repeat="backup in backups.backups">
|
||||
<td><i class="fas fa-archive" ng-show="backup.preserveSecs === -1" uib-tooltip="{{ 'backups.listing.tooltipPreservedBackup' | tr }}"></i></td>
|
||||
<!-- <td><div class="hand clipboard" data-clipboard-text="{{ backup.id }}" uib-tooltip="{{ copyBackupIdDone ? ('main.clipboard.copied' | tr) : ('main.clipboard.clickToCopyBackupId' | tr) }}" tooltip-placement="right"><i class="fa fa-copy"></i></div></td> -->
|
||||
<td><div>v{{ backup.packageVersion }}</div></td>
|
||||
<td><span uib-tooltip="{{ backup.creationTime | prettyLongDate }}">{{ backup.creationTime | prettyDate }} <b ng-show="backup.label">({{ backup.label }})</b></span></td>
|
||||
<td ng-click="backupDetails.show(backup)" class="hand"><div>v{{ backup.packageVersion }}</div></td>
|
||||
<td ng-click="backupDetails.show(backup)" class="hand"><span uib-tooltip="{{ backup.creationTime | prettyLongDate }}">{{ backup.creationTime | prettyDate }} <b ng-show="backup.label">({{ backup.label }})</b></span></td>
|
||||
<td class="text-center" style="vertical-align: bottom">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-xs btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
|
||||
+106
-5
@@ -10,7 +10,8 @@
|
||||
/* global Clipboard */
|
||||
/* global SECRET_PLACEHOLDER */
|
||||
/* global APP_TYPES, STORAGE_PROVIDERS, BACKUP_FORMATS */
|
||||
/* global REGIONS_S3, REGIONS_WASABI, REGIONS_DIGITALOCEAN, REGIONS_EXOSCALE, REGIONS_SCALEWAY, REGIONS_LINODE, REGIONS_OVH, REGIONS_IONOS, REGIONS_UPCLOUD, REGIONS_VULTR */
|
||||
/* global REGIONS_S3, REGIONS_WASABI, REGIONS_DIGITALOCEAN, REGIONS_EXOSCALE, REGIONS_SCALEWAY, REGIONS_LINODE, REGIONS_OVH, REGIONS_IONOS, REGIONS_UPCLOUD, REGIONS_VULTR */
|
||||
/* global onAppClick */
|
||||
|
||||
angular.module('Application').controller('AppController', ['$scope', '$location', '$translate', '$timeout', '$interval', '$route', '$routeParams', 'Client', function ($scope, $location, $translate, $timeout, $interval, $route, $routeParams, Client) {
|
||||
$scope.s3Regions = REGIONS_S3;
|
||||
@@ -23,6 +24,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
$scope.ionosRegions = REGIONS_IONOS;
|
||||
$scope.upcloudRegions = REGIONS_UPCLOUD;
|
||||
$scope.vultrRegions = REGIONS_VULTR;
|
||||
$scope.contaboRegions = REGIONS_VULTR;
|
||||
|
||||
$scope.storageProviders = STORAGE_PROVIDERS;
|
||||
|
||||
@@ -75,6 +77,31 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
});
|
||||
};
|
||||
|
||||
$scope.appPostInstallConfirm = {
|
||||
app: {},
|
||||
message: '',
|
||||
confirmed: false,
|
||||
|
||||
show: function (app) {
|
||||
$scope.appPostInstallConfirm.app = app;
|
||||
$scope.appPostInstallConfirm.message = app.manifest.postInstallMessage;
|
||||
$scope.appPostInstallConfirm.confirmed = false;
|
||||
|
||||
$('#appPostInstallConfirmModal').modal('show');
|
||||
|
||||
return false; // prevent propagation and default
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
if (!$scope.appPostInstallConfirm.confirmed) return;
|
||||
|
||||
$scope.appPostInstallConfirm.app.pendingPostInstallConfirmation = false;
|
||||
delete localStorage['confirmPostInstall_' + $scope.appPostInstallConfirm.app.id];
|
||||
|
||||
$('#appPostInstallConfirmModal').modal('hide');
|
||||
}
|
||||
};
|
||||
|
||||
$scope.postInstallMessage = {
|
||||
confirmed: false,
|
||||
openApp: false,
|
||||
@@ -435,7 +462,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
|
||||
$scope.access.error = {};
|
||||
$scope.access.ftp = app.manifest.addons.localstorage && app.manifest.addons.localstorage.ftp;
|
||||
$scope.access.ssoAuth = (app.manifest.addons['ldap'] || app.manifest.addons['proxyAuth']) && app.sso;
|
||||
$scope.access.ssoAuth = (app.manifest.addons['ldap'] || app.manifest.addons['oidc'] || app.manifest.addons['proxyAuth']) && app.sso;
|
||||
$scope.access.accessRestrictionOption = app.accessRestriction ? 'groups' : 'any';
|
||||
$scope.access.accessRestrictionOptionCur = app.accessRestriction ? 'groups' : 'any';
|
||||
$scope.access.accessRestriction = { users: [], groups: [] };
|
||||
@@ -585,6 +612,54 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
},
|
||||
};
|
||||
|
||||
$scope.services = {
|
||||
error: {},
|
||||
|
||||
busy: false,
|
||||
enableTurn: '1', // curse of radio buttons
|
||||
enableRedis: '1',
|
||||
|
||||
show: function () {
|
||||
var app = $scope.app;
|
||||
|
||||
$scope.services.error = {};
|
||||
$scope.services.enableTurn = app.enableTurn ? '1' : '0';
|
||||
$scope.services.enableRedis = app.enableRedis ? '1' : '0';
|
||||
},
|
||||
|
||||
submitTurn: function () {
|
||||
$scope.services.busy = true;
|
||||
$scope.services.error = {};
|
||||
|
||||
Client.configureApp($scope.app.id, 'turn', { enable: $scope.services.enableTurn === '1' }, function (error) {
|
||||
if (error && error.statusCode === 400) {
|
||||
$scope.services.busy = false;
|
||||
$scope.services.error.turn = true;
|
||||
return;
|
||||
}
|
||||
if (error) return Client.error(error);
|
||||
|
||||
$timeout(function () { $scope.services.busy = false; }, 1000);
|
||||
});
|
||||
},
|
||||
|
||||
submitRedis: function () {
|
||||
$scope.services.busy = true;
|
||||
$scope.services.error = {};
|
||||
|
||||
Client.configureApp($scope.app.id, 'redis', { enable: $scope.services.enableRedis === '1' }, function (error) {
|
||||
if (error && error.statusCode === 400) {
|
||||
$scope.services.busy = false;
|
||||
$scope.services.error.redis = true;
|
||||
return;
|
||||
}
|
||||
if (error) return Client.error(error);
|
||||
|
||||
$timeout(function () { $scope.services.busy = false; }, 1000);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
$scope.storage = {
|
||||
error: {},
|
||||
|
||||
@@ -613,7 +688,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
];
|
||||
|
||||
$scope.volumes.forEach(function (volume) {
|
||||
$scope.storage.locationOptions.push({ id: volume.id, type: 'volume', value: volume.id, displayName: 'Volume - ' + volume.name });
|
||||
$scope.storage.locationOptions.push({ id: volume.id, type: 'volume', value: volume.id, displayName: 'Volume - ' + volume.name, mountType: volume.mountType });
|
||||
});
|
||||
|
||||
$scope.storage.location = $scope.storage.locationOptions.find(function (l) { return l.id === (app.storageVolumeId || 'default'); });
|
||||
@@ -1183,6 +1258,15 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
}
|
||||
};
|
||||
|
||||
$scope.backupDetails = {
|
||||
backup: null,
|
||||
|
||||
show: function (backup) {
|
||||
$scope.backupDetails.backup = backup;
|
||||
$('#backupDetailsModal').modal('show');
|
||||
}
|
||||
};
|
||||
|
||||
$scope.backups = {
|
||||
busy: false,
|
||||
busyCreate: false,
|
||||
@@ -1259,7 +1343,8 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
|| provider === 'exoscale-sos' || provider === 'digitalocean-spaces'
|
||||
|| provider === 'scaleway-objectstorage' || provider === 'wasabi' || provider === 'backblaze-b2' || provider === 'cloudflare-r2'
|
||||
|| provider === 'linode-objectstorage' || provider === 'ovh-objectstorage' || provider === 'ionos-objectstorage'
|
||||
|| provider === 'vultr-objectstorage' || provider === 'upcloud-objectstorage' || provider === 'idrive-e2';
|
||||
|| provider === 'vultr-objectstorage' || provider === 'upcloud-objectstorage' || provider === 'idrive-e2'
|
||||
|| provider === 'contabo-objectstorage';
|
||||
};
|
||||
|
||||
$scope.mountlike = function (provider) {
|
||||
@@ -1357,6 +1442,10 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
} else if (backupConfig.provider === 'vultr-objectstorage') {
|
||||
backupConfig.region = $scope.vultrRegions.find(function (x) { return x.value === $scope.importBackup.endpoint; }).region;
|
||||
backupConfig.signatureVersion = 'v4';
|
||||
} else if (backupConfig.provider === 'contabo-objectstorage') {
|
||||
backupConfig.region = $scope.contaboRegions.find(function (x) { return x.value === $scope.importBackup.endpoint; }).region;
|
||||
backupConfig.signatureVersion = 'v4';
|
||||
backupConfig.s3ForcePathStyle = true; // https://docs.contabo.com/docs/products/Object-Storage/technical-description (no virtual buckets)
|
||||
} else if (backupConfig.provider === 'upcloud-objectstorage') {
|
||||
var m = /^.*\.(.*)\.upcloudobjects.com$/.exec(backupConfig.endpoint);
|
||||
backupConfig.region = m ? m[1] : 'us-east-1'; // let it fail in validation phase if m is not valid
|
||||
@@ -1453,6 +1542,10 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
|
||||
$('#importBackupModal').modal('hide');
|
||||
|
||||
// clear potential post-install flag
|
||||
$scope.app.pendingPostInstallConfirmation = false;
|
||||
delete localStorage['confirmPostInstall_' + $scope.app.id];
|
||||
|
||||
refreshApp($scope.app.id, function (error) {
|
||||
if (error) return Client.error(error);
|
||||
|
||||
@@ -2040,7 +2133,15 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
};
|
||||
|
||||
Object.keys($scope.backupConfig).forEach(function (k) {
|
||||
if ($scope.backupConfig[k] !== SECRET_PLACEHOLDER) tmp[k] = $scope.backupConfig[k];
|
||||
var v = $scope.backupConfig[k];
|
||||
if (v && typeof v === 'object') { // to hide mountOptions.password and the likes
|
||||
tmp[k] = {};
|
||||
Object.keys(v).forEach(function (j) {
|
||||
if (v[j] !== SECRET_PLACEHOLDER) tmp[k][j] = v[j];
|
||||
});
|
||||
} else {
|
||||
if ($scope.backupConfig[k] !== SECRET_PLACEHOLDER) tmp[k] = v;
|
||||
}
|
||||
});
|
||||
|
||||
var filename = 'app-backup-config-' + (new Date()).toISOString().replace(/:|T/g,'-').replace(/\..*/,'') + ' (' + $scope.app.fqdn + ')' + '.json';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!-- Modal postinstall confirm -->
|
||||
<div class="modal fade" id="appPostInstallConfirmModal" tabindex="-1" role="dialog">
|
||||
<div class="modal fade" id="appsPostInstallConfirmModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@@ -21,8 +21,8 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="form-group pull-left">
|
||||
<input type="checkbox" id="appPostInstallConfirmCheckbox" ng-model="appPostInstallConfirm.confirmed">
|
||||
<label class="control-label" for="appPostInstallConfirmCheckbox">{{ 'app.appInfo.postInstallConfirmCheckbox' | tr }}</label>
|
||||
<input type="checkbox" id="appsPostInstallConfirmCheckbox" ng-model="appPostInstallConfirm.confirmed">
|
||||
<label class="control-label" for="appsPostInstallConfirmCheckbox">{{ 'app.appInfo.postInstallConfirmCheckbox' | tr }}</label>
|
||||
</div>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.close' | tr }}</button>
|
||||
<a class="btn btn-success" ng-href="{{ appPostInstallConfirm.confirmed ? ('https://' + appPostInstallConfirm.app.fqdn) : '' }}" target="_blank" ng-disabled="!appPostInstallConfirm.confirmed" ng-click="appPostInstallConfirm.submit()">{{ 'app.appInfo.openAction' | tr:{ app: appPostInstallConfirm.app.manifest.title } }}</a>
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
<div class="animateMeOpacity ng-hide" ng-show="installedApps.length > 0">
|
||||
<div class="app-grid">
|
||||
<div class="grid-item" ng-class="{ 'stopped': app.runState === 'stopped' }" ng-repeat="app in installedApps | selectedGroupAccessFilter:selectedGroup | selectedStateFilter:selectedState | selectedTagFilter:selectedTags | selectedDomainFilter:selectedDomain | appSearchFilter:appSearch | orderBy:'fqdn'">
|
||||
<div class="grid-item" ng-class="{ 'stopped': app.runState === 'stopped' }" ng-repeat="app in installedApps | selectedGroupAccessFilter:selectedGroup | selectedStateFilter:selectedState | selectedTagFilter:selectedTags | selectedDomainFilter:selectedDomain | appSearchFilter:appSearch | orderBy:labelOrFQDN">
|
||||
<div class="grid-item-content" uib-tooltip="{{ app.fqdn }}">
|
||||
<a ng-show="app.type !== APP_TYPES.LINK && isOperator(app)" ng-href="#/app/{{ app.id}}/display" class="btn btn-lg btn-default grid-item-action"><i class="fas fa-cog"></i></a>
|
||||
<div ng-show="app.type === APP_TYPES.LINK && isOperator(app)" ng-click="applinksEdit.show(app)" class="btn btn-lg btn-default grid-item-action"><i class="fas fa-cog"></i></div>
|
||||
@@ -182,7 +182,8 @@
|
||||
</div>
|
||||
|
||||
<div class="usermanagement-indicator" ng-show="app.type !== APP_TYPES.LINK">
|
||||
<i class="fas fa-user" ng-show="app.ssoAuth && !app.manifest.addons.email" uib-tooltip="{{ 'apps.auth.sso' | tr }}" tooltip-placement="right"></i>
|
||||
<i class="fa-brands fa-openid" ng-show="app.ssoAuth && app.manifest.addons.oidc" uib-tooltip="{{ 'apps.auth.openid' | tr }}" tooltip-placement="right"></i>
|
||||
<i class="fas fa-user" ng-show="app.ssoAuth && (!app.manifest.addons.oidc && !app.manifest.addons.email)" uib-tooltip="{{ 'apps.auth.sso' | tr }}" tooltip-placement="right"></i>
|
||||
<i class="far fa-user" ng-show="!app.ssoAuth && !app.manifest.addons.email" uib-tooltip="{{ 'apps.auth.nosso' | tr }}" tooltip-placement="right"></i>
|
||||
<i class="fas fa-envelope" ng-show="app.manifest.addons.email" uib-tooltip="{{ 'apps.auth.email' | tr }}" tooltip-placement="right"></i>
|
||||
</div>
|
||||
|
||||
+13
-10
@@ -45,6 +45,11 @@ angular.module('Application').controller('AppsController', ['$scope', '$translat
|
||||
if (tr['app.states.updateAvailable']) $scope.states[3].label = tr['app.states.updateAvailable'];
|
||||
});
|
||||
|
||||
// for sorting of the app grid items
|
||||
$scope.labelOrFQDN = function (item) {
|
||||
return item.label || item.fqdn;
|
||||
};
|
||||
|
||||
$scope.$watch('selectedTags', function (newVal, oldVal) {
|
||||
if (newVal === oldVal) return;
|
||||
|
||||
@@ -91,7 +96,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$translat
|
||||
$scope.appPostInstallConfirm.message = app.manifest.postInstallMessage;
|
||||
$scope.appPostInstallConfirm.confirmed = false;
|
||||
|
||||
$('#appPostInstallConfirmModal').modal('show');
|
||||
$('#appsPostInstallConfirmModal').modal('show');
|
||||
|
||||
return false; // prevent propagation and default
|
||||
},
|
||||
@@ -102,7 +107,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$translat
|
||||
$scope.appPostInstallConfirm.app.pendingPostInstallConfirmation = false;
|
||||
delete localStorage['confirmPostInstall_' + $scope.appPostInstallConfirm.app.id];
|
||||
|
||||
$('#appPostInstallConfirmModal').modal('hide');
|
||||
$('#appsPostInstallConfirmModal').modal('hide');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -187,21 +192,19 @@ angular.module('Application').controller('AppsController', ['$scope', '$translat
|
||||
accessRestriction.groups = $scope.applinksEdit.accessRestriction.groups.map(function (g) { return g.id; });
|
||||
}
|
||||
|
||||
var icon;
|
||||
if ($scope.applinksEdit.icon.data === '__original__') { // user reset the icon
|
||||
icon = '';
|
||||
} else if ($scope.applinksEdit.icon.data) { // user loaded custom icon
|
||||
icon = $scope.applinksEdit.icon.data.replace(/^data:image\/[a-z]+;base64,/, '');
|
||||
}
|
||||
|
||||
var data = {
|
||||
upstreamUri: $scope.applinksEdit.upstreamUri,
|
||||
label: $scope.applinksEdit.label,
|
||||
accessRestriction: accessRestriction,
|
||||
icon: icon,
|
||||
tags: $scope.applinksEdit.tags.split(' ').map(function (t) { return t.trim(); }).filter(function (t) { return !!t; })
|
||||
};
|
||||
|
||||
if ($scope.applinksEdit.icon.data === '__original__') { // user reset the icon
|
||||
data.icon = '';
|
||||
} else if ($scope.applinksEdit.icon.data) { // user loaded custom icon
|
||||
data.icon = $scope.applinksEdit.icon.data.replace(/^data:image\/[a-z]+;base64,/, '');
|
||||
}
|
||||
|
||||
Client.updateApplink($scope.applinksEdit.id, data, function (error) {
|
||||
$scope.applinksEdit.busyEdit = false;
|
||||
|
||||
|
||||
@@ -211,24 +211,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal select community repo -->
|
||||
<div class="modal fade" id="communityRepoModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Enable Community Repository</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
App packages from the community repository are not maintained by the Cloudron team. We cannot provide app packages specific help for those apps if they stop working or if data migration on update fails.
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.close' | tr }}</button>
|
||||
<button type="button" class="btn btn-danger" ng-click="enableCommunityRepo.accept()">{{ 'main.dialog.yes' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal applinks add -->
|
||||
<div class="modal fade" id="applinksAddModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
@@ -299,8 +281,9 @@
|
||||
<!-- appstore login -->
|
||||
<div ng-show="ready && !validSubscription" class="container card card-small appstore-login ng-cloak">
|
||||
<div class="col-md-12 text-center">
|
||||
<h1 ng-show="appstoreLogin.register">{{ 'appstore.accountDialog.titleSignUp' | tr }}</h1>
|
||||
<h1 ng-hide="appstoreLogin.register">{{ 'appstore.accountDialog.titleLogin' | tr }}</h1>
|
||||
<h1 ng-show="appstoreLogin.setupType === 'signup'">{{ 'appstore.accountDialog.titleSignUp' | tr }}</h1>
|
||||
<h1 ng-show="appstoreLogin.setupType === 'login'">{{ 'appstore.accountDialog.titleLogin' | tr }}</h1>
|
||||
<h1 ng-show="appstoreLogin.setupType === 'setupToken'">{{ 'appstore.accountDialog.titleToken' | tr }}</h1>
|
||||
</div>
|
||||
<div class="col-md-12 text-center">
|
||||
<p>{{ 'appstore.accountDialog.description' | tr }}</p>
|
||||
@@ -311,54 +294,121 @@
|
||||
<div class="col-md-12">
|
||||
<br/>
|
||||
|
||||
<form name="appstoreLoginForm" role="form" novalidate ng-submit="appstoreLogin.submit()" autocomplete="off">
|
||||
<input type="password" style="display: none;">
|
||||
<div ng-show="appstoreLogin.setupType === 'signup'">
|
||||
<form name="appstoreSignupForm" role="form" novalidate ng-submit="appstoreLogin.submit()" autocomplete="off">
|
||||
<input type="password" style="display: none;">
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': (appstoreLoginForm.email.$dirty && appstoreLoginForm.email.$invalid) || appstoreLogin.error.generic }">
|
||||
<div class="form-group" ng-class="{ 'has-error': (appstoreSignupForm.email.$dirty && appstoreSignupForm.email.$invalid) || appstoreLogin.error.generic }">
|
||||
<label class="control-label">{{ 'appstore.accountDialog.email' | tr }}</label>
|
||||
<input type="email" class="form-control" ng-model="appstoreLogin.email" id="inputAppstoreLoginEmail" name="email" required autofocus>
|
||||
<div class="control-label" ng-show="(!appstoreLoginForm.email.$dirty && appstoreLogin.error.email) || (appstoreLoginForm.email.$dirty && appstoreLoginForm.email.$invalid) || appstoreLogin.error.email">
|
||||
<small class="text-danger" ng-show="appstoreLogin.error.email">{{ appstoreLogin.error.email }}</small>
|
||||
<input type="email" class="form-control" ng-model="appstoreLogin.email" id="inputAppstoreSignupEmail" name="email" required autofocus>
|
||||
<div class="control-label" ng-show="(!appstoreSignupForm.email.$dirty && appstoreLogin.error.email) || (appstoreSignupForm.email.$dirty && appstoreSignupForm.email.$invalid) || appstoreLogin.error.email">
|
||||
<small class="text-danger" ng-show="appstoreLogin.error.email">{{ appstoreLogin.error.email }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': (!appstoreLoginForm.password.$dirty && appstoreLogin.error.password) || (appstoreLoginForm.password.$dirty && appstoreLoginForm.password.$invalid) || appstoreLogin.error.generic }">
|
||||
<div class="form-group" ng-class="{ 'has-error': (!appstoreSignupForm.password.$dirty && appstoreLogin.error.signupPassword) || (appstoreSignupForm.password.$dirty && appstoreSignupForm.password.$invalid) || appstoreLogin.error.generic }">
|
||||
<label class="control-label">{{ 'appstore.accountDialog.password' | tr }}</label>
|
||||
<input type="password" class="form-control" ng-model="appstoreLogin.password" id="inputAppstoreSignupPassword" name="password" required password-reveal>
|
||||
<div class="control-label" ng-show="(!appstoreSignupForm.password.$dirty && appstoreLogin.error.signupPassword) || (appstoreSignupForm.password.$dirty && appstoreSignupForm.password.$invalid)">
|
||||
<small ng-show="!appstoreSignupForm.password.$dirty && appstoreLogin.error.signupPassword">{{ 'appstore.accountDialog.errorWrongPassword' | tr }}</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="appstoreLogin.termsAccepted" ng-required="true"><span ng-bind-html="'appstore.accountDialog.licenseCheckbox' | tr:{ licenseLink: 'https://cloudron.io/legal/license.html' }"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
<center>
|
||||
<button type="submit" class="btn btn-lg btn-success" ng-disabled="appstoreSignupForm.$invalid || appstoreLogin.busy">
|
||||
<i class="fa fa-circle-notch fa-spin" ng-show="appstoreLogin.busy"></i> {{ 'appstore.accountDialog.createAccountAction' | tr }}
|
||||
</button>
|
||||
</center>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div ng-show="appstoreLogin.setupType === 'login'">
|
||||
<form name="appstoreLoginForm" role="form" novalidate ng-submit="appstoreLogin.submit()" autocomplete="off">
|
||||
<input type="password" style="display: none;">
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': (appstoreLoginForm.email.$dirty && appstoreLoginForm.email.$invalid) || appstoreLogin.error.generic }">
|
||||
<label class="control-label">{{ 'appstore.accountDialog.email' | tr }}</label>
|
||||
<input type="email" class="form-control" ng-model="appstoreLogin.email" name="email" required autofocus>
|
||||
<div class="control-label" ng-show="(!appstoreLoginForm.email.$dirty && appstoreLogin.error.email) || (appstoreLoginForm.email.$dirty && appstoreLoginForm.email.$invalid) || appstoreLogin.error.email">
|
||||
<small class="text-danger" ng-show="appstoreLogin.error.email">{{ appstoreLogin.error.email }}</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': (!appstoreLoginForm.password.$dirty && appstoreLogin.error.loginPassword) || (appstoreLoginForm.password.$dirty && appstoreLoginForm.password.$invalid) || appstoreLogin.error.generic }">
|
||||
<label class="control-label">{{ 'appstore.accountDialog.password' | tr }}</label>
|
||||
<input type="password" class="form-control" ng-model="appstoreLogin.password" id="inputAppstoreLoginPassword" name="password" required password-reveal>
|
||||
<div class="control-label" ng-show="(!appstoreLoginForm.password.$dirty && appstoreLogin.error.password) || (appstoreLoginForm.password.$dirty && appstoreLoginForm.password.$invalid)">
|
||||
<small ng-show="!appstoreLoginForm.password.$dirty && appstoreLogin.error.password">{{ 'appstore.accountDialog.errorWrongPassword' | tr }}</small>
|
||||
<div class="control-label" ng-show="(!appstoreLoginForm.password.$dirty && appstoreLogin.error.loginPassword) || (appstoreLoginForm.password.$dirty && appstoreLoginForm.password.$invalid)">
|
||||
<small ng-show="!appstoreLoginForm.password.$dirty && appstoreLogin.error.loginPassword">{{ 'appstore.accountDialog.errorWrongPassword' | tr }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-hide="appstoreLogin.register" ng-class="{ 'has-error': appstoreLogin.error.totpToken }">
|
||||
<div class="form-group" ng-class="{ 'has-error': appstoreLogin.error.totpToken }">
|
||||
<label class="control-label">{{ 'appstore.accountDialog.2faToken' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="appstoreLogin.totpToken" id="inputAppstoreLoginTotpToken" name="totpToken">
|
||||
<div class="control-label" ng-show="appstoreLogin.error.totpToken">
|
||||
<small ng-show="appstoreLogin.error.totpToken">{{ appstoreLogin.error.totpToken }}</small>
|
||||
<small ng-show="appstoreLogin.error.totpToken">{{ appstoreLogin.error.totpToken }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="appstoreLogin.termsAccepted"><span ng-bind-html="'appstore.accountDialog.licenseCheckbox' | tr:{ licenseLink: 'https://cloudron.io/legal/license.html' }"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
<center>
|
||||
<button type="submit" class="btn btn-lg btn-success" ng-disabled="appstoreLoginForm.$invalid || appstoreLogin.busy || !appstoreLogin.termsAccepted">
|
||||
<i class="fa fa-circle-notch fa-spin" ng-show="appstoreLogin.busy"></i> <span ng-hide="appstoreLogin.register">{{ 'appstore.accountDialog.loginAction' | tr }}</span><span ng-show="appstoreLogin.register">{{ 'appstore.accountDialog.createAccountAction' | tr }}</span>
|
||||
</button>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="appstoreLogin.termsAccepted" ng-required="true"><span ng-bind-html="'appstore.accountDialog.licenseCheckbox' | tr:{ licenseLink: 'https://cloudron.io/legal/license.html' }"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
<center>
|
||||
<button type="submit" class="btn btn-lg btn-success" ng-disabled="appstoreLoginForm.$invalid || appstoreLogin.busy">
|
||||
<i class="fa fa-circle-notch fa-spin" ng-show="appstoreLogin.busy"></i> {{ 'appstore.accountDialog.loginAction' | tr }}
|
||||
</button>
|
||||
</center>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div ng-show="appstoreLogin.setupType === 'setupToken'">
|
||||
<form name="appstoreSetupTokenForm" role="form" novalidate ng-submit="appstoreLogin.submit()" autocomplete="off">
|
||||
<input type="password" style="display: none;">
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': appstoreLogin.error.setupToken }">
|
||||
<label class="control-label">{{ 'appstore.accountDialog.setupToken' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="appstoreLogin.setupToken" id="inputAppstoreSetupToken" name="setupToken" ng-required="true">
|
||||
<div class="control-label" ng-show="appstoreLogin.error.setupToken">
|
||||
<small ng-show="appstoreLogin.error.setupToken">{{ appstoreLogin.error.setupToken }}</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="appstoreLogin.termsAccepted" ng-required="true"><span ng-bind-html="'appstore.accountDialog.licenseCheckbox' | tr:{ licenseLink: 'https://cloudron.io/legal/license.html' }"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
<a href="" ng-click="appstoreLogin.register = true" ng-hide="appstoreLogin.register">{{ 'appstore.accountDialog.switchToSignUpAction' | tr }}</a>
|
||||
<a href="" ng-click="appstoreLogin.register = false" ng-show="appstoreLogin.register">{{ 'appstore.accountDialog.switchToLoginAction' | tr }}</a>
|
||||
</center>
|
||||
<center>
|
||||
<button type="submit" class="btn btn-lg btn-success" ng-disabled="appstoreSetupTokenForm.$invalid || appstoreLogin.busy">
|
||||
<i class="fa fa-circle-notch fa-spin" ng-show="appstoreLogin.busy"></i> {{ 'appstore.accountDialog.setupWithTokenAction' | tr }}
|
||||
</button>
|
||||
</center>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<br/>
|
||||
|
||||
<center>
|
||||
<a href="" ng-click="appstoreLogin.setupType = 'signup'" ng-show="appstoreLogin.setupType === 'login'">{{ 'appstore.accountDialog.switchToSignUpAction' | tr }}</a>
|
||||
<a href="" ng-click="appstoreLogin.setupType = 'login'" ng-show="appstoreLogin.setupType === 'signup' || appstoreLogin.setupType === 'setupToken'">{{ 'appstore.accountDialog.switchToLoginAction' | tr }}</a>
|
||||
<span ng-show="appstoreLogin.setupType !== 'setupToken'"> or <a href="" ng-click="appstoreLogin.setupType = 'setupToken'">use a setup token</a></span>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -372,17 +422,6 @@
|
||||
|
||||
<div ng-show="ready && validSubscription" class="ng-cloak appstore-toolbar">
|
||||
<div class="appstore-toolbar-content">
|
||||
<!-- <div class="dropdown">
|
||||
<button class="btn btn-outline dropdown-toggle" type="button" data-toggle="dropdown">
|
||||
{{ repository | capitalize }} Packages
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="" ng-click="setCoreRepository();">Core</a></li>
|
||||
<li><a href="" ng-click="enableCommunityRepo.show();">Community</a></li>
|
||||
</ul>
|
||||
</div> -->
|
||||
|
||||
<div class="dropdown">
|
||||
<button class="btn dropdown-toggle" type="button" data-toggle="dropdown" ng-class="{ 'btn-primary': '' !== category && 'recent' !== category && 'new' !== category }">
|
||||
{{ categoryButtonLabel(category) }}
|
||||
|
||||
@@ -25,31 +25,8 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
|
||||
$scope.cachedCategory = ''; // used to cache the selected category while searching
|
||||
$scope.searchString = '';
|
||||
$scope.validSubscription = false;
|
||||
$scope.unstableApps = false;
|
||||
$scope.subscription = {};
|
||||
$scope.memory = null; // { memory, swap }
|
||||
$scope.repository = 'core'; // core or community
|
||||
|
||||
$scope.setCoreRepository = function () {
|
||||
if ($scope.repository === 'core') return;
|
||||
|
||||
$scope.repository = 'core';
|
||||
$scope.showCategory($scope.category);
|
||||
};
|
||||
|
||||
$scope.enableCommunityRepo = {
|
||||
show: function () {
|
||||
if ($scope.repository === 'community') return;
|
||||
|
||||
$('#communityRepoModal').modal('show');
|
||||
},
|
||||
|
||||
accept: function () {
|
||||
$scope.repository = 'community';
|
||||
$scope.showCategory($scope.category);
|
||||
$('#communityRepoModal').modal('hide');
|
||||
}
|
||||
};
|
||||
|
||||
$scope.showView = function (view) {
|
||||
// wait for dialog to be fully closed to avoid modal behavior breakage when moving to a different view already
|
||||
@@ -67,6 +44,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
|
||||
// If new categories added make sure the translation below exists
|
||||
$scope.categories = [
|
||||
{ id: 'analytics', icon: 'fa fa-chart-line', label: 'Analytics'},
|
||||
{ id: 'automation', icon: 'fa fa-robot', label: 'Automation'},
|
||||
{ id: 'blog', icon: 'fa fa-font', label: 'Blog'},
|
||||
{ id: 'chat', icon: 'fa fa-comments', label: 'Chat'},
|
||||
{ id: 'crm', icon: 'fab fa-connectdevelop', label: 'CRM'},
|
||||
@@ -86,6 +64,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
|
||||
{ id: 'notes', icon: 'fa fa-sticky-note', label: 'Notes'},
|
||||
{ id: 'project', icon: 'fas fa-project-diagram', label: 'Project Management'},
|
||||
{ id: 'sync', icon: 'fa fa-sync-alt', label: 'File Sync'},
|
||||
{ id: 'voip', icon: 'fa fa-headset', label: 'VoIP'},
|
||||
{ id: 'vpn', icon: 'fa fa-user-secret', label: 'VPN'},
|
||||
{ id: 'wiki', icon: 'fab fa-wikipedia-w', label: 'Wiki'},
|
||||
];
|
||||
@@ -245,7 +224,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
|
||||
|
||||
var manifest = app.manifest;
|
||||
$scope.appInstall.optionalSso = !!manifest.optionalSso;
|
||||
$scope.appInstall.customAuth = !(manifest.addons['ldap'] || manifest.addons['proxyAuth']);
|
||||
$scope.appInstall.customAuth = !(manifest.addons['ldap'] || manifest.addons['oidc'] || manifest.addons['proxyAuth']);
|
||||
|
||||
$scope.appInstall.accessRestrictionOption = $scope.groups.length ? '' : 'any'; // make the user select an ACL conciously if groups are used
|
||||
$scope.appInstall.accessRestriction = { users: [], groups: [] };
|
||||
@@ -437,22 +416,24 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
|
||||
email: '',
|
||||
password: '',
|
||||
totpToken: '',
|
||||
register: true,
|
||||
setupType: 'login',
|
||||
termsAccepted: false,
|
||||
setupToken: '',
|
||||
|
||||
submit: function () {
|
||||
$scope.appstoreLogin.error = {};
|
||||
$scope.appstoreLogin.busy = true;
|
||||
|
||||
Client.registerCloudron($scope.appstoreLogin.email, $scope.appstoreLogin.password, $scope.appstoreLogin.totpToken, $scope.appstoreLogin.register, function (error) {
|
||||
var func = $scope.appstoreLogin.setupToken ? Client.registerCloudronWithSetupToken.bind(null, $scope.appstoreLogin.setupToken) : Client.registerCloudron.bind(null, $scope.appstoreLogin.email, $scope.appstoreLogin.password, $scope.appstoreLogin.totpToken, $scope.appstoreLogin.setupType === 'register');
|
||||
func(function (error) {
|
||||
if (error) {
|
||||
$scope.appstoreLogin.busy = false;
|
||||
|
||||
if (error.statusCode === 409) {
|
||||
$scope.appstoreLogin.error.email = 'An account with this email already exists';
|
||||
$scope.appstoreLogin.password = '';
|
||||
$scope.appstoreLoginForm.email.$setPristine();
|
||||
$scope.appstoreLoginForm.password.$setPristine();
|
||||
$scope.appstoreSignupForm.email.$setPristine();
|
||||
$scope.appstoreSignupForm.password.$setPristine();
|
||||
$('#inputAppstoreLoginEmail').focus();
|
||||
} else if (error.statusCode === 412) {
|
||||
if (error.message.indexOf('TOTP token missing') !== -1) {
|
||||
@@ -463,7 +444,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
|
||||
$scope.appstoreLogin.totpToken = '';
|
||||
setTimeout(function () { $('#inputAppstoreLoginTotpToken').focus(); }, 0);
|
||||
} else {
|
||||
$scope.appstoreLogin.error.password = 'Wrong email or password';
|
||||
$scope.appstoreLogin.error.loginPassword = 'Wrong email or password';
|
||||
$scope.appstoreLogin.password = '';
|
||||
$('#inputAppstoreLoginPassword').focus();
|
||||
$scope.appstoreLoginForm.password.$setPristine();
|
||||
@@ -475,11 +456,18 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
|
||||
$scope.appstoreLogin.password = '';
|
||||
$scope.appstoreLoginForm.email.$setPristine();
|
||||
$scope.appstoreLoginForm.password.$setPristine();
|
||||
$scope.appstoreSignupForm.email.$setPristine();
|
||||
$scope.appstoreSignupForm.password.$setPristine();
|
||||
$('#inputAppstoreLoginEmail').focus();
|
||||
} else {
|
||||
console.error(error);
|
||||
$scope.appstoreLogin.error.generic = error.message;
|
||||
}
|
||||
} else if (error.statusCode === 402) {
|
||||
$scope.appstoreLogin.error.setupToken = 'Invalid or expired setup token';
|
||||
$scope.appstoreLogin.setupToken = '';
|
||||
$scope.appstoreSetupTokenForm.setupToken.$setPristine();
|
||||
$('#inputAppstoreSetupToken').focus();
|
||||
} else {
|
||||
console.error(error);
|
||||
$scope.appstoreLogin.error.generic = error.message || 'Please retry later';
|
||||
@@ -500,7 +488,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
|
||||
|
||||
$scope.category = '';
|
||||
|
||||
Client.getAppstoreAppsFast($scope.repository, function (error, apps) {
|
||||
Client.getAppstoreAppsFast(function (error, apps) {
|
||||
if (error) return $timeout($scope.search, 1000);
|
||||
|
||||
var token = $scope.searchString.toUpperCase();
|
||||
@@ -557,7 +545,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
|
||||
|
||||
$scope.cachedCategory = $scope.category;
|
||||
|
||||
Client.getAppstoreAppsFast($scope.repository, function (error, apps) {
|
||||
Client.getAppstoreAppsFast(function (error, apps) {
|
||||
if (error) return $timeout($scope.showCategory.bind(null, category), 1000);
|
||||
|
||||
if (!$scope.category) {
|
||||
@@ -783,7 +771,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
|
||||
}
|
||||
|
||||
function init() {
|
||||
Client.getAppstoreAppsFast($scope.repository, function (error) {
|
||||
Client.getAppstoreAppsFast(function (error) {
|
||||
if (error && error.statusCode === 402) {
|
||||
$scope.validSubscription = false;
|
||||
$scope.ready = true;
|
||||
@@ -799,12 +787,14 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
|
||||
getSubscription(function (error, validSubscription) {
|
||||
if (error) console.error('Failed to get subscription.', error);
|
||||
|
||||
// autofocus login
|
||||
if (!validSubscription) setTimeout(function () { $('[name=appstoreLoginForm]').find('[autofocus]:first').focus(); }, 1000);
|
||||
|
||||
$scope.validSubscription = validSubscription;
|
||||
$scope.ready = true;
|
||||
|
||||
|
||||
// refresh everything in background
|
||||
Client.getAppstoreApps($scope.repository, function (error) { if (error) console.error('Failed to fetch apps.', error); });
|
||||
Client.getAppstoreApps(function (error) { if (error) console.error('Failed to fetch apps.', error); });
|
||||
Client.refreshConfig(); // refresh domain, user, group limit etc
|
||||
fetchUsers();
|
||||
fetchGroups();
|
||||
@@ -849,10 +839,5 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
|
||||
});
|
||||
});
|
||||
|
||||
// autofocus if appstore login is shown
|
||||
$scope.$watch('validSubscription', function (newValue/*, oldValue */) {
|
||||
if (!newValue) setTimeout(function () { $('[name=appstoreLoginForm]').find('[autofocus]:first').focus(); }, 1000);
|
||||
});
|
||||
|
||||
$('.modal-backdrop').remove();
|
||||
}]);
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
<div class="col-xs-2 text-muted">{{ 'backups.backupEdit.label' | tr }}:</div>
|
||||
<div class="col-xs-10 text-right">{{ backupDetails.backup.label }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-2 text-muted">{{ 'backups.backupEdit.remotePath' | tr }}:</div>
|
||||
<div class="col-xs-10 text-right">{{ backupDetails.backup.remotePath }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-2 text-muted">{{ 'backups.backupDetails.date' | tr }}:</div>
|
||||
<div class="col-xs-10 text-right">{{ backupDetails.backup.creationTime | prettyLongDate }}</div>
|
||||
@@ -101,47 +105,47 @@
|
||||
<div class="modal-body">{{ 'backups.cleanupBackups.description' | tr }}</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="submit" class="btn btn-outline btn-success pull-right" ng-click="createBackup.startCleanup()">{{ 'backups.cleanupBackups.cleanupNow' | tr }}</button>
|
||||
<button type="submit" class="btn btn-outline btn-success pull-right" ng-click="cleanupBackups.start()">{{ 'backups.cleanupBackups.cleanupNow' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- modal backup config -->
|
||||
<div class="modal fade" id="configureScheduleAndRetentionModal" tabindex="-1" role="dialog">
|
||||
<!-- modal backup schedule config -->
|
||||
<div class="modal fade" id="backupPolicyModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'backups.configureBackupSchedule.title' | tr }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form name="configureScheduleAndRetentionForm" role="form" novalidate ng-submit="configureScheduleAndRetention.submit()" autocomplete="off">
|
||||
<p class="has-error text-center" ng-show="configureScheduleAndRetention.error">{{ configureScheduleAndRetention.error.generic }}</p>
|
||||
<form name="backupPolicyForm" role="form" novalidate ng-submit="backupPolicy.submit()" autocomplete="off">
|
||||
<p class="has-error text-center" ng-show="backupPolicy.error">{{ backupPolicy.error.generic }}</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="backupSchedule">{{ 'backups.configureBackupSchedule.schedule' | tr }}</label>
|
||||
<p ng-bind-html="'backups.configureBackupSchedule.scheduleDescription' | tr"></p>
|
||||
|
||||
<div class="row" style="margin-left: 20px;">
|
||||
<div class="col-md-5" ng-class="{ 'has-error': !configureScheduleAndRetention.days.length }">
|
||||
{{ 'backups.configureBackupSchedule.days' | tr }}: <multiselect id="backupSchedule" class="input-sm stretch" ng-model="configureScheduleAndRetention.days" options="a.name for a in cronDays" data-multiple="true" ng-required></multiselect>
|
||||
<div class="col-md-5" ng-class="{ 'has-error': !backupPolicy.days.length }">
|
||||
{{ 'backups.configureBackupSchedule.days' | tr }}: <multiselect id="backupSchedule" class="input-sm stretch" ng-model="backupPolicy.days" options="a.name for a in cronDays" data-multiple="true" ng-required></multiselect>
|
||||
</div>
|
||||
|
||||
<div class="col-md-5" ng-class="{ 'has-error': !configureScheduleAndRetention.hours.length }">
|
||||
{{ 'backups.configureBackupSchedule.hours' | tr }}: <multiselect class="input-sm stretch" ng-model="configureScheduleAndRetention.hours" options="a.name for a in cronHours" data-multiple="true"></multiselect>
|
||||
<div class="col-md-5" ng-class="{ 'has-error': !backupPolicy.hours.length }">
|
||||
{{ 'backups.configureBackupSchedule.hours' | tr }}: <multiselect class="input-sm stretch" ng-model="backupPolicy.hours" options="a.name for a in cronHours" data-multiple="true"></multiselect>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="backupRetention">{{ 'backups.configureBackupSchedule.retentionPolicy' | tr }}</label>
|
||||
<select class="form-control" id="backupRetention" ng-model="configureScheduleAndRetention.retentionPolicy" ng-options="a.value as a.name for a in retentionPolicies"></select>
|
||||
<select class="form-control" id="backupRetention" ng-model="backupPolicy.retention" ng-options="a.value as a.name for a in backupRetentions"></select>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer ">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="submit" class="btn btn-outline btn-success pull-right" ng-click="configureScheduleAndRetention.submit()" ng-disabled="!configureScheduleAndRetention.valid() || configureScheduleAndRetention.busy"><i class="fa fa-circle-notch fa-spin" ng-show="configureScheduleAndRetention.busy"></i><span> {{ 'main.dialog.save' | tr }}</span></button>
|
||||
<button type="submit" class="btn btn-outline btn-success pull-right" ng-click="backupPolicy.submit()" ng-disabled="!backupPolicy.valid() || backupPolicy.busy"><i class="fa fa-circle-notch fa-spin" ng-show="backupPolicy.busy"></i><span> {{ 'main.dialog.save' | tr }}</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -173,7 +177,7 @@
|
||||
<div class="form-group" ng-class="{ 'has-error': configureBackup.error.mountPoint || (configureBackupForm.mountPoint.$dirty && !configureBackup.mountPoint) }" ng-show="configureBackup.provider === 'mountpoint'">
|
||||
<label class="control-label" for="inputConfigureMountPoint">{{ 'backups.configureBackupStorage.mountPoint' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="configureBackup.mountPoint" id="inputConfigureMountPoint" name="mountPoint" ng-disabled="configureBackup.busy" placeholder="/mnt/backups" ng-required="configureBackup.provider === 'mountpoint'">
|
||||
<p ng-show="configureBackup.provider === 'mointpoint'" ng-bind-html="'backups.configureBackupStorage.mountPointDescription' | tr:{ providerDocsLink: 'https://docs.cloudron.io/backups/#'+configureBackup.provider }"></p>
|
||||
<p ng-show="configureBackup.provider === 'mountpoint'" ng-bind-html="'backups.configureBackupStorage.mountPointDescription' | tr:{ providerDocsLink: 'https://docs.cloudron.io/backups/#'+configureBackup.provider }"></p>
|
||||
</div>
|
||||
|
||||
<!-- CIFS/NFS/SSHFS -->
|
||||
@@ -207,10 +211,16 @@
|
||||
<input type="password" class="form-control" ng-model="configureBackup.mountOptions.password" id="configureBackupPassword" name="cifsPassword" ng-disabled="configureBackup.busy" password-reveal>
|
||||
</div>
|
||||
|
||||
<!-- EXT4 -->
|
||||
<div class="form-group" ng-class="{ 'has-error': configureBackup.error.diskPath || !configureBackup.mountOptions.diskPath }" ng-show="configureBackup.provider === 'ext4' || configureBackup.provider === 'xfs'">
|
||||
<!-- EXT4/XFS -->
|
||||
<div class="form-group" ng-class="{ 'has-error': configureBackup.error.diskPath || !configureBackup.mountOptions.diskPath }" ng-show="configureBackup.provider === 'xfs' || configureBackup.provider === 'ext4'">
|
||||
<label class="control-label" for="inputConfigureDiskPath">{{ 'backups.configureBackupStorage.diskPath' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="configureBackup.mountOptions.diskPath" id="inputConfigureDiskPath" name="diskPath" ng-disabled="configureBackup.busy" placeholder="/dev/disk/by-uuid/uuid" ng-required="configureBackup.provider === 'ext4' || configureBackup.provider === 'xfs'">
|
||||
<input type="text" class="form-control" ng-model="configureBackup.mountOptions.diskPath" id="inputConfigureDiskPath" name="diskPath" ng-disabled="configureBackup.busy" placeholder="/dev/disk/by-uuid/uuid" ng-required="configureBackup.provider === 'xfs' || configureBackup.provider === 'ext4'">
|
||||
</div>
|
||||
|
||||
<!-- Disk -->
|
||||
<div class="form-group" ng-class="{ 'has-error': configureBackup.error.diskPath || !configureBackup.mountOptions.diskPath }" ng-show="configureBackup.provider === 'disk'">
|
||||
<label class="control-label">{{ 'backups.configureBackupStorage.diskPath' | tr }}</label>
|
||||
<select class="form-control" ng-model="configureBackup.disk" ng-options="item as item.label for item in configureBackup.blockDevices track by item.path" ng-required="configureBackup.provider === 'disk'"></select>
|
||||
</div>
|
||||
|
||||
<!-- SSHFS -->
|
||||
@@ -325,6 +335,11 @@
|
||||
<select class="form-control" name="region" id="inputConfigureBackupVultrRegion" ng-model="configureBackup.endpoint" ng-options="a.value as a.name for a in vultrRegions" ng-disabled="configureBackup.busy" ng-required="configureBackup.provider === 'vultr-objectstorage'"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': configureBackup.error.region }" ng-show="configureBackup.provider === 'contabo-objectstorage'">
|
||||
<label class="control-label" for="inputConfigureBackupContaboRegion">{{ 'backups.configureBackupStorage.region' | tr }}</label>
|
||||
<select class="form-control" name="region" id="inputConfigureBackupContaboRegion" ng-model="configureBackup.endpoint" ng-options="a.value as a.name for a in contaboRegions" ng-disabled="configureBackup.busy" ng-required="configureBackup.provider === 'contabo-objectstorage'"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': configureBackup.error.accessKeyId }" ng-show="s3like(configureBackup.provider)">
|
||||
<label class="control-label" for="inputConfigureBackupAccessKeyId">{{ 'backups.configureBackupStorage.s3AccessKeyId' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="configureBackup.accessKeyId" id="inputConfigureBackupAccessKeyId" name="accessKeyId" ng-disabled="configureBackup.busy" ng-required="s3like(configureBackup.provider)">
|
||||
@@ -376,10 +391,10 @@
|
||||
<div uib-collapse="!configureBackup.advancedVisible">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">{{ 'backups.configureBackupStorage.memoryLimit' | tr }}: <b>{{ configureBackup.memoryLimit | prettyBinarySize:'800 MB' }}</b></label>
|
||||
<label class="control-label">{{ 'backups.configureBackupStorage.memoryLimit' | tr }}: <b>{{ configureBackup.memoryLimit | prettyBinarySize:'1024 MB' }}</b></label>
|
||||
<p class="small">{{ 'backups.configureBackupStorage.memoryLimitDescription' | tr }}</p>
|
||||
<div style="padding: 0 10px;">
|
||||
<slider id="sliderConfigureBackupMemoryLimit" ng-model="configureBackup.memoryLimit" step="134217728" tooltip="hide" ticks="configureBackup.memoryTicks" ticks-snap-bounds="67108864"></slider>
|
||||
<slider id="sliderConfigureBackupMemoryLimit" ng-model="configureBackup.memoryLimit" tooltip="hide" step="268435456" ticks="configureBackup.memoryTicks"></slider>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -468,8 +483,8 @@
|
||||
<div class="col-xs-6 text-right no-wrap">
|
||||
<span ng-show="backupConfig.provider === 'filesystem'">{{ backupConfig.backupFolder }}</span>
|
||||
<span ng-show="mountlike(backupConfig.provider)">
|
||||
<i class="fa fa-circle" ng-style="{ color: backupConfig.mountStatus.state === 'active' ? '#27CE65' : '#d9534f' }" ng-show="backupConfig.mountStatus" uib-tooltip="{{ backupConfig.mountStatus.message }}"></i>
|
||||
<span ng-show="backupConfig.provider === 'filesystem' || backupConfig.provider === 'ext4' || backupConfig.provider === 'xfs' || backupConfig.provider === 'mountpoint'">{{ backupConfig.mountOptions.diskPath || backupConfig.mountPoint }}{{ (backupConfig.prefix ? '/' : '') + backupConfig.prefix }}</span>
|
||||
<i class="fa fa-circle" ng-style="{ color: mountStatus.state === 'active' ? '#27CE65' : '#d9534f' }" ng-show="mountStatus" uib-tooltip="{{ mountStatus.message }}"></i>
|
||||
<span ng-show="backupConfig.provider === 'disk' || backupConfig.provider === 'filesystem' || backupConfig.provider === 'ext4' || backupConfig.provider === 'xfs' || backupConfig.provider === 'mountpoint'">{{ backupConfig.mountOptions.diskPath || backupConfig.mountPoint }}{{ (backupConfig.prefix ? '/' : '') + backupConfig.prefix }}</span>
|
||||
<span ng-show="backupConfig.provider === 'cifs' || backupConfig.provider === 'nfs' || backupConfig.provider === 'sshfs'">{{ backupConfig.mountOptions.host }}:{{ backupConfig.mountOptions.remoteDir }}{{ (backupConfig.prefix ? '/' : '') + backupConfig.prefix }}</span>
|
||||
</span>
|
||||
|
||||
@@ -507,8 +522,23 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left">
|
||||
<h3>{{ 'backups.schedule.title' | tr }}</h3>
|
||||
<div class="text-left section-header">
|
||||
<h3>
|
||||
{{ 'backups.schedule.title' | tr }}
|
||||
<!-- <a class="btn btn-sm btn-default pull-right" ng-href="/frontend/logs.html?taskId={{cleanupBackups.taskId}}" target="_blank" uib-tooltip="{{ 'backups.logs.showLogs' | tr }}"><i class="fas fa-align-left"></i></a> -->
|
||||
<div class="btn-group btn-group-sm pull-right">
|
||||
<button type="button" class="btn btn-small btn-default dropdown-toggle" ng-show="cleanupTasks.length" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" uib-tooltip="{{ 'backups.logs.showLogs' | tr }}">
|
||||
<i class="fas fa-align-left"></i> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li ng-repeat="task in cleanupTasks">
|
||||
<a ng-href="/frontend/logs.html?taskId={{task.id}}" target="_blank" class="text-right">
|
||||
{{ task.ts | prettyLongDate }} <i class="fa" style="margin-left: 20px" ng-class="{ 'status-active fa-check-circle': !task.active && task.success, 'fa-circle-notch fa-spin': task.active, 'status-error fa-times-circle': !task.active && !task.success }"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="card" style="margin-bottom: 15px;">
|
||||
@@ -518,7 +548,7 @@
|
||||
<span class="text-muted">{{ 'backups.schedule.schedule' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ prettyBackupSchedule(backupConfig.schedulePattern) }}</span>
|
||||
<span>{{ prettyBackupSchedule(backupPolicy.currentPolicy.schedule) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -526,19 +556,34 @@
|
||||
<span class="text-muted">{{ 'backups.schedule.retentionPolicy' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ prettyBackupRetentionPolicy(backupConfig.retentionPolicy) }}</span>
|
||||
<span>{{ prettyBackupRetention(backupPolicy.currentPolicy.retention) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right">
|
||||
<button class="btn btn-outline btn-primary pull-right" ng-show="user.isAtLeastOwner" ng-click="configureScheduleAndRetention.show()">{{ 'backups.schedule.configure' | tr }}</button>
|
||||
<button class="btn btn-default" ng-click="cleanupBackups.ask()" ng-disabled="cleanupBackups.busy" style="margin-right: 5px"><i class="fa fa-circle-notch fa-spin" ng-show="cleanupBackups.busy"></i> {{ 'backups.listing.cleanupBackups' | tr }}</button>
|
||||
<button class="btn btn-outline btn-primary pull-right" ng-show="user.isAtLeastOwner" ng-click="backupPolicy.show()">{{ 'backups.schedule.configure' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left">
|
||||
<h3>{{ 'backups.listing.title' | tr }}</h3>
|
||||
<div class="text-left section-header">
|
||||
<h3>
|
||||
{{ 'backups.listing.title' | tr }}
|
||||
<div class="btn-group btn-group-sm pull-right">
|
||||
<button type="button" class="btn btn-small btn-default dropdown-toggle" ng-show="backupTasks.length" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" uib-tooltip="{{ 'backups.logs.showLogs' | tr }}">
|
||||
<i class="fas fa-align-left"></i> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li ng-repeat="task in backupTasks">
|
||||
<a ng-href="/frontend/logs.html?taskId={{task.id}}" target="_blank" class="text-right">
|
||||
{{ task.ts | prettyLongDate }} <i class="fa" style="margin-left: 20px" ng-class="{ 'status-active fa-check-circle': !task.active && task.success, 'fa-circle-notch fa-spin': task.active, 'status-error fa-times-circle': !task.active && !task.success }"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="card card-large">
|
||||
@@ -594,22 +639,8 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right">
|
||||
<button class="btn btn-default" ng-click="createBackup.cleanupBackups()" ng-show="!createBackup.busy" style="margin-right: 5px">{{ 'backups.listing.cleanupBackups' | tr }}</button>
|
||||
<button class="btn btn-outline btn-primary" ng-click="createBackup.startBackup()" ng-show="!createBackup.busy">{{ 'backups.listing.backupNow' | tr }}</button>
|
||||
<button class="btn btn-outline btn-danger" ng-click="createBackup.stopTask()" ng-show="createBackup.busy">{{ 'backups.listing.stopTask' | tr:{ taskType: createBackup.taskType } }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left">
|
||||
<h3>{{ 'backups.logs.title' | tr }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="card card-large" style="margin-bottom: 15px;">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<p>{{ 'backups.logs.description' | tr }}</p>
|
||||
<a class="btn btn-primary pull-right" ng-href="/logs.html?taskId={{createBackup.taskId}}" ng-disabled="!createBackup.taskId" target="_blank">{{ 'backups.logs.showLogs' | tr }}</a>
|
||||
<button class="btn btn-outline btn-danger" ng-click="createBackup.stopTask()" ng-show="createBackup.busy">{{ 'backups.listing.stopTask' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+200
-80
@@ -1,22 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
/* global $, angular, TASK_TYPES, SECRET_PLACEHOLDER, STORAGE_PROVIDERS, BACKUP_FORMATS, APP_TYPES */
|
||||
/* global REGIONS_S3, REGIONS_WASABI, REGIONS_DIGITALOCEAN, REGIONS_EXOSCALE, REGIONS_SCALEWAY, REGIONS_LINODE, REGIONS_OVH, REGIONS_IONOS, REGIONS_UPCLOUD, REGIONS_VULTR */
|
||||
/* global REGIONS_S3, REGIONS_WASABI, REGIONS_DIGITALOCEAN, REGIONS_EXOSCALE, REGIONS_SCALEWAY, REGIONS_LINODE, REGIONS_OVH, REGIONS_IONOS, REGIONS_UPCLOUD, REGIONS_VULTR , REGIONS_CONTABO */
|
||||
|
||||
angular.module('Application').controller('BackupsController', ['$scope', '$location', '$rootScope', '$timeout', 'Client', function ($scope, $location, $rootScope, $timeout, Client) {
|
||||
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastAdmin) $location.path('/'); });
|
||||
|
||||
$scope.SECRET_PLACEHOLDER = SECRET_PLACEHOLDER;
|
||||
$scope.MIN_MEMORY_LIMIT = 800 * 1024 * 1024;
|
||||
$scope.MIN_MEMORY_LIMIT = 1024 * 1024 * 1024; // 1 GB
|
||||
|
||||
$scope.config = Client.getConfig();
|
||||
$scope.user = Client.getUserInfo();
|
||||
$scope.memory = null; // { memory, swap }
|
||||
|
||||
$scope.mountStatus = null; // { state, message }
|
||||
$scope.manualBackupApps = [];
|
||||
|
||||
$scope.backupConfig = {};
|
||||
$scope.backups = [];
|
||||
$scope.backupTasks = [];
|
||||
$scope.cleanupTasks = [];
|
||||
|
||||
$scope.s3Regions = REGIONS_S3;
|
||||
$scope.wasabiRegions = REGIONS_WASABI;
|
||||
@@ -28,12 +30,13 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
$scope.ionosRegions = REGIONS_IONOS;
|
||||
$scope.upcloudRegions = REGIONS_UPCLOUD;
|
||||
$scope.vultrRegions = REGIONS_VULTR;
|
||||
$scope.contaboRegions = REGIONS_CONTABO;
|
||||
|
||||
$scope.storageProviders = STORAGE_PROVIDERS.concat([
|
||||
{ name: 'No-op (Only for testing)', value: 'noop' }
|
||||
]);
|
||||
|
||||
$scope.retentionPolicies = [
|
||||
$scope.backupRetentions = [
|
||||
{ name: '2 days', value: { keepWithinSecs: 2 * 24 * 60 * 60 }},
|
||||
{ name: '1 week', value: { keepWithinSecs: 7 * 24 * 60 * 60 }}, // default
|
||||
{ name: '1 month', value: { keepWithinSecs: 30 * 24 * 60 * 60 }},
|
||||
@@ -83,8 +86,8 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
return prettyDay + ' at ' + prettyHour;
|
||||
};
|
||||
|
||||
$scope.prettyBackupRetentionPolicy = function (retentionPolicy) {
|
||||
var tmp = $scope.retentionPolicies.find(function (p) { return angular.equals(p.value, retentionPolicy); });
|
||||
$scope.prettyBackupRetention = function (retention) {
|
||||
var tmp = $scope.backupRetentions.find(function (p) { return angular.equals(p.value, retention); });
|
||||
return tmp ? tmp.name : '';
|
||||
};
|
||||
|
||||
@@ -119,11 +122,9 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
message: '',
|
||||
errorMessage: '',
|
||||
taskId: '',
|
||||
taskType: TASK_TYPES.TASK_BACKUP,
|
||||
|
||||
checkStatus: function () {
|
||||
// TODO support both task types TASK_BACKUP and TASK_CLEAN_BACKUPS
|
||||
Client.getLatestTaskByType($scope.createBackup.taskType, function (error, task) {
|
||||
init: function () {
|
||||
Client.getLatestTaskByType(TASK_TYPES.TASK_BACKUP, function (error, task) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
if (!task) return;
|
||||
@@ -143,6 +144,8 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
$scope.createBackup.percent = 100; // indicates that 'result' is valid
|
||||
$scope.createBackup.errorMessage = data.success ? '' : data.error.message;
|
||||
|
||||
getBackupTasks();
|
||||
|
||||
return fetchBackups();
|
||||
}
|
||||
|
||||
@@ -158,7 +161,6 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
$scope.createBackup.percent = 0;
|
||||
$scope.createBackup.message = '';
|
||||
$scope.createBackup.errorMessage = '';
|
||||
$scope.createBackup.taskType = TASK_TYPES.TASK_BACKUP;
|
||||
|
||||
Client.startBackup(function (error, taskId) {
|
||||
if (error) {
|
||||
@@ -177,32 +179,14 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.createBackup.taskId = taskId;
|
||||
$scope.createBackup.updateStatus();
|
||||
});
|
||||
},
|
||||
|
||||
cleanupBackups: function () {
|
||||
$('#cleanupBackupsModal').modal('show');
|
||||
},
|
||||
|
||||
startCleanup: function () {
|
||||
$scope.createBackup.busy = true;
|
||||
$scope.createBackup.percent = 0;
|
||||
$scope.createBackup.message = '';
|
||||
$scope.createBackup.errorMessage = '';
|
||||
$scope.createBackup.taskType = TASK_TYPES.TASK_CLEAN_BACKUPS;
|
||||
|
||||
$('#cleanupBackupsModal').modal('hide');
|
||||
|
||||
Client.cleanupBackups(function (error, taskId) {
|
||||
if (error) console.error(error);
|
||||
getBackupTasks();
|
||||
|
||||
$scope.createBackup.taskId = taskId;
|
||||
$scope.createBackup.updateStatus();
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
stopTask: function () {
|
||||
Client.stopTask($scope.createBackup.taskId, function (error) {
|
||||
if (error) {
|
||||
@@ -214,6 +198,7 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
}
|
||||
|
||||
$scope.createBackup.busy = false;
|
||||
getBackupTasks();
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -221,6 +206,62 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
}
|
||||
};
|
||||
|
||||
$scope.cleanupBackups = {
|
||||
busy: false,
|
||||
taskId: 0,
|
||||
|
||||
init: function () {
|
||||
Client.getLatestTaskByType(TASK_TYPES.TASK_CLEAN_BACKUPS, function (error, task) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
if (!task) return;
|
||||
|
||||
$scope.cleanupBackups.taskId = task.id;
|
||||
$scope.cleanupBackups.updateStatus();
|
||||
|
||||
getCleanupTasks();
|
||||
});
|
||||
},
|
||||
|
||||
updateStatus: function () {
|
||||
Client.getTask($scope.cleanupBackups.taskId, function (error, data) {
|
||||
if (error) return window.setTimeout($scope.cleanupBackups.updateStatus, 5000);
|
||||
|
||||
if (!data.active) {
|
||||
$scope.cleanupBackups.busy = false;
|
||||
|
||||
getCleanupTasks();
|
||||
fetchBackups();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.cleanupBackups.busy = true;
|
||||
$scope.cleanupBackups.message = data.message;
|
||||
window.setTimeout($scope.cleanupBackups.updateStatus, 3000);
|
||||
});
|
||||
},
|
||||
|
||||
ask: function () {
|
||||
$('#cleanupBackupsModal').modal('show');
|
||||
},
|
||||
|
||||
start: function () {
|
||||
$scope.cleanupBackups.busy = true;
|
||||
|
||||
$('#cleanupBackupsModal').modal('hide');
|
||||
|
||||
Client.cleanupBackups(function (error, taskId) {
|
||||
if (error) console.error(error);
|
||||
|
||||
$scope.cleanupBackups.taskId = taskId;
|
||||
$scope.cleanupBackups.updateStatus();
|
||||
|
||||
getCleanupTasks();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.listBackups = {
|
||||
};
|
||||
|
||||
@@ -229,11 +270,12 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
|| provider === 'exoscale-sos' || provider === 'digitalocean-spaces'
|
||||
|| provider === 'scaleway-objectstorage' || provider === 'wasabi' || provider === 'backblaze-b2' || provider === 'cloudflare-r2'
|
||||
|| provider === 'linode-objectstorage' || provider === 'ovh-objectstorage' || provider === 'ionos-objectstorage'
|
||||
|| provider === 'vultr-objectstorage' || provider === 'upcloud-objectstorage' || provider === 'idrive-e2';
|
||||
|| provider === 'vultr-objectstorage' || provider === 'upcloud-objectstorage' || provider === 'idrive-e2'
|
||||
|| provider === 'contabo-objectstorage';
|
||||
};
|
||||
|
||||
$scope.mountlike = function (provider) {
|
||||
return provider === 'sshfs' || provider === 'cifs' || provider === 'nfs' || provider === 'mountpoint' || provider === 'ext4' || provider === 'xfs';
|
||||
return provider === 'sshfs' || provider === 'cifs' || provider === 'nfs' || provider === 'mountpoint' || provider === 'ext4' || provider === 'xfs' || provider === 'disk';
|
||||
};
|
||||
|
||||
// https://stackoverflow.com/questions/3665115/how-to-create-a-file-in-memory-for-user-to-download-but-not-through-server#18197341
|
||||
@@ -261,7 +303,7 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
if ($scope.backupConfig[k] !== SECRET_PLACEHOLDER) tmp[k] = $scope.backupConfig[k];
|
||||
});
|
||||
|
||||
var filename = 'cloudron-backup-config-' + (new Date()).toISOString().replace(/:|T/g,'-').replace(/\..*/,'') + '.json';
|
||||
var filename = 'cloudron-backup-config-' + (new Date()).toISOString().replace(/:|T/g,'-').replace(/\..*/,'') + ' (' + $scope.config.adminFqdn + ')' + '.json';
|
||||
download(filename, JSON.stringify(tmp, null, 4));
|
||||
};
|
||||
|
||||
@@ -307,68 +349,76 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
}
|
||||
};
|
||||
|
||||
$scope.configureScheduleAndRetention = {
|
||||
$scope.backupPolicy = {
|
||||
busy: false,
|
||||
error: {},
|
||||
|
||||
retentionPolicy: $scope.retentionPolicies[0],
|
||||
currentPolicy: null,
|
||||
|
||||
retention: null,
|
||||
days: [],
|
||||
hours: [],
|
||||
|
||||
init: function () {
|
||||
Client.getBackupPolicy(function (error, policy) {
|
||||
if (error) Client.error(error);
|
||||
$scope.backupPolicy.currentPolicy = policy;
|
||||
});
|
||||
},
|
||||
|
||||
show: function () {
|
||||
$scope.configureScheduleAndRetention.error = {};
|
||||
$scope.configureScheduleAndRetention.busy = false;
|
||||
$scope.backupPolicy.error = {};
|
||||
$scope.backupPolicy.busy = false;
|
||||
|
||||
var selectedPolicy = $scope.retentionPolicies.find(function (x) { return angular.equals(x.value, $scope.backupConfig.retentionPolicy); });
|
||||
if (!selectedPolicy) selectedPolicy = $scope.retentionPolicies[0];
|
||||
var selectedRetention = $scope.backupRetentions.find(function (x) { return angular.equals(x.value, $scope.backupPolicy.currentPolicy.retention); });
|
||||
if (!selectedRetention) selectedRetention = $scope.backupRetentions[0];
|
||||
|
||||
$scope.configureScheduleAndRetention.retentionPolicy = selectedPolicy.value;
|
||||
$scope.backupPolicy.retention = selectedRetention.value;
|
||||
|
||||
var tmp = $scope.backupConfig.schedulePattern.split(' ');
|
||||
var tmp = $scope.backupPolicy.currentPolicy.schedule.split(' ');
|
||||
var hours = tmp[2].split(','), days = tmp[5].split(',');
|
||||
if (days[0] === '*') {
|
||||
$scope.configureScheduleAndRetention.days = angular.copy($scope.cronDays, []);
|
||||
$scope.backupPolicy.days = angular.copy($scope.cronDays, []);
|
||||
} else {
|
||||
$scope.configureScheduleAndRetention.days = days.map(function (day) { return $scope.cronDays[parseInt(day, 10)]; });
|
||||
$scope.backupPolicy.days = days.map(function (day) { return $scope.cronDays[parseInt(day, 10)]; });
|
||||
}
|
||||
$scope.configureScheduleAndRetention.hours = hours.map(function (hour) { return $scope.cronHours[parseInt(hour, 10)]; });
|
||||
$scope.backupPolicy.hours = hours.map(function (hour) { return $scope.cronHours[parseInt(hour, 10)]; });
|
||||
|
||||
$('#configureScheduleAndRetentionModal').modal('show');
|
||||
$('#backupPolicyModal').modal('show');
|
||||
},
|
||||
|
||||
valid: function () {
|
||||
return $scope.configureScheduleAndRetention.days.length && $scope.configureScheduleAndRetention.hours.length;
|
||||
return $scope.backupPolicy.days.length && $scope.backupPolicy.hours.length;
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
if (!$scope.configureScheduleAndRetention.days.length) return;
|
||||
if (!$scope.configureScheduleAndRetention.hours.length) return;
|
||||
if (!$scope.backupPolicy.days.length) return;
|
||||
if (!$scope.backupPolicy.hours.length) return;
|
||||
|
||||
$scope.configureScheduleAndRetention.error = {};
|
||||
$scope.configureScheduleAndRetention.busy = true;
|
||||
|
||||
// start with the full backupConfig since the api requires all fields
|
||||
var backupConfig = $scope.backupConfig;
|
||||
backupConfig.retentionPolicy = $scope.configureScheduleAndRetention.retentionPolicy;
|
||||
$scope.backupPolicy.error = {};
|
||||
$scope.backupPolicy.busy = true;
|
||||
|
||||
var daysPattern;
|
||||
if ($scope.configureScheduleAndRetention.days.length === 7) daysPattern = '*';
|
||||
else daysPattern = $scope.configureScheduleAndRetention.days.map(function (d) { return d.value; });
|
||||
if ($scope.backupPolicy.days.length === 7) daysPattern = '*';
|
||||
else daysPattern = $scope.backupPolicy.days.map(function (d) { return d.value; });
|
||||
|
||||
var hoursPattern;
|
||||
if ($scope.configureScheduleAndRetention.hours.length === 24) hoursPattern = '*';
|
||||
else hoursPattern = $scope.configureScheduleAndRetention.hours.map(function (d) { return d.value; });
|
||||
if ($scope.backupPolicy.hours.length === 24) hoursPattern = '*';
|
||||
else hoursPattern = $scope.backupPolicy.hours.map(function (d) { return d.value; });
|
||||
|
||||
backupConfig.schedulePattern ='00 00 ' + hoursPattern + ' * * ' + daysPattern;
|
||||
var policy = {
|
||||
retention: $scope.backupPolicy.retention,
|
||||
schedule: '00 00 ' + hoursPattern + ' * * ' + daysPattern
|
||||
};
|
||||
|
||||
Client.setBackupConfig(backupConfig, function (error) {
|
||||
$scope.configureScheduleAndRetention.busy = false;
|
||||
Client.setBackupPolicy(policy, function (error) {
|
||||
$scope.backupPolicy.busy = false;
|
||||
|
||||
if (error) {
|
||||
if (error.statusCode === 424) {
|
||||
$scope.configureScheduleAndRetention.error.generic = error.message;
|
||||
$scope.backupPolicy.error.generic = error.message;
|
||||
} else if (error.statusCode === 400) {
|
||||
$scope.configureScheduleAndRetention.error.generic = error.message;
|
||||
$scope.backupPolicy.error.generic = error.message;
|
||||
} else {
|
||||
console.error('Unable to change schedule or retention.', error);
|
||||
}
|
||||
@@ -376,13 +426,18 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
return;
|
||||
}
|
||||
|
||||
$('#configureScheduleAndRetentionModal').modal('hide');
|
||||
$('#backupPolicyModal').modal('hide');
|
||||
|
||||
getBackupConfig();
|
||||
$scope.backupPolicy.init();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.$watch('configureBackup.disk', function (newValue) {
|
||||
if (!newValue) return;
|
||||
$scope.configureBackup.mountOptions.diskPath = '/dev/disk/by-uuid/' + newValue.uuid;
|
||||
});
|
||||
|
||||
$scope.configureBackup = {
|
||||
busy: false,
|
||||
error: {},
|
||||
@@ -414,6 +469,8 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
downloadConcurrency: '',
|
||||
syncConcurrency: '', // sort of similar to upload
|
||||
|
||||
blockDevices: [],
|
||||
disk: null,
|
||||
mountOptions: {
|
||||
host: '',
|
||||
remoteDir: '',
|
||||
@@ -448,6 +505,7 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
$scope.configureBackup.syncConcurrency = $scope.configureBackup.provider === 's3' ? 20 : 10;
|
||||
$scope.configureBackup.copyConcurrency = $scope.configureBackup.provider === 's3' ? 500 : 10;
|
||||
|
||||
$scope.configureBackup.disk = null;
|
||||
$scope.configureBackup.mountOptions = { host: '', remoteDir: '', username: '', password: '', diskPath: '', seal: false, user: '', port: 22, privateKey: '' };
|
||||
},
|
||||
|
||||
@@ -482,12 +540,13 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
$scope.configureBackup.useHardlinks = !$scope.backupConfig.noHardlinks;
|
||||
$scope.configureBackup.chown = $scope.backupConfig.chown;
|
||||
|
||||
$scope.configureBackup.memoryLimit = $scope.backupConfig.memoryLimit;
|
||||
var limits = $scope.backupConfig.limits || {};
|
||||
$scope.configureBackup.memoryLimit = Math.max(limits.memoryLimit, $scope.MIN_MEMORY_LIMIT);
|
||||
|
||||
$scope.configureBackup.uploadPartSize = $scope.backupConfig.uploadPartSize || ($scope.configureBackup.provider === 'scaleway-objectstorage' ? 100 * 1024 * 1024 : 10 * 1024 * 1024);
|
||||
$scope.configureBackup.downloadConcurrency = $scope.backupConfig.downloadConcurrency || ($scope.backupConfig.provider === 's3' ? 30 : 10);
|
||||
$scope.configureBackup.syncConcurrency = $scope.backupConfig.syncConcurrency || ($scope.backupConfig.provider === 's3' ? 20 : 10);
|
||||
$scope.configureBackup.copyConcurrency = $scope.backupConfig.copyConcurrency || ($scope.backupConfig.provider === 's3' ? 500 : 10);
|
||||
$scope.configureBackup.uploadPartSize = limits.uploadPartSize || ($scope.configureBackup.provider === 'scaleway-objectstorage' ? 100 * 1024 * 1024 : 10 * 1024 * 1024);
|
||||
$scope.configureBackup.downloadConcurrency = limits.downloadConcurrency || ($scope.backupConfig.provider === 's3' ? 30 : 10);
|
||||
$scope.configureBackup.syncConcurrency = limits.syncConcurrency || ($scope.backupConfig.provider === 's3' ? 20 : 10);
|
||||
$scope.configureBackup.copyConcurrency = limits.copyConcurrency || ($scope.backupConfig.provider === 's3' ? 500 : 10);
|
||||
|
||||
var totalMemory = Math.max(($scope.memory.memory + $scope.memory.swap) * 1.5, 2 * 1024 * 1024);
|
||||
$scope.configureBackup.memoryTicks = [ $scope.MIN_MEMORY_LIMIT ];
|
||||
@@ -513,7 +572,28 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
privateKey: mountOptions.privateKey || ''
|
||||
};
|
||||
|
||||
$('#configureBackupModal').modal('show');
|
||||
Client.getBlockDevices(function (error, result) {
|
||||
if (error) return console.error('Failed to list blockdevices:', error);
|
||||
|
||||
// only offer non /, /boot or /home disks
|
||||
result = result.filter(function (d) { return d.mountpoint !== '/' && d.mountpoint !== '/home' && d.mountpoint !== '/boot'; });
|
||||
// only offer xfs and ext4 disks
|
||||
result = result.filter(function (d) { return d.type === 'xfs' || d.type === 'ext4'; });
|
||||
|
||||
// amend label for UI
|
||||
result.forEach(function (d) {
|
||||
d.label = d.path;
|
||||
|
||||
// pre-select current if set
|
||||
if (d.path === $scope.configureBackup.mountOptions.diskPath || ('/dev/disk/by-uuid/' + d.uuid) === $scope.configureBackup.mountOptions.diskPath) {
|
||||
$scope.configureBackup.disk = d;
|
||||
}
|
||||
});
|
||||
|
||||
$scope.configureBackup.blockDevices = result;
|
||||
|
||||
$('#configureBackupModal').modal('show');
|
||||
});
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
@@ -523,10 +603,12 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
var backupConfig = {
|
||||
provider: $scope.configureBackup.provider,
|
||||
format: $scope.configureBackup.format,
|
||||
memoryLimit: $scope.configureBackup.memoryLimit,
|
||||
// required for api call to provide all fields
|
||||
schedulePattern: $scope.backupConfig.schedulePattern,
|
||||
retentionPolicy: $scope.backupConfig.retentionPolicy
|
||||
retentionPolicy: $scope.backupConfig.retentionPolicy,
|
||||
limits: {
|
||||
memoryLimit: $scope.configureBackup.memoryLimit,
|
||||
},
|
||||
};
|
||||
if ($scope.configureBackup.password) {
|
||||
backupConfig.password = $scope.configureBackup.password;
|
||||
@@ -570,6 +652,10 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
} else if (backupConfig.provider === 'vultr-objectstorage') {
|
||||
backupConfig.region = $scope.vultrRegions.find(function (x) { return x.value === $scope.configureBackup.endpoint; }).region;
|
||||
backupConfig.signatureVersion = 'v4';
|
||||
} else if (backupConfig.provider === 'contabo-objectstorage') {
|
||||
backupConfig.region = $scope.contaboRegions.find(function (x) { return x.value === $scope.configureBackup.endpoint; }).region;
|
||||
backupConfig.signatureVersion = 'v4';
|
||||
backupConfig.s3ForcePathStyle = true; // https://docs.contabo.com/docs/products/Object-Storage/technical-description (no virtual buckets)
|
||||
} else if (backupConfig.provider === 'upcloud-objectstorage') { // the UI sets region and endpoint
|
||||
var m = /^.*\.(.*)\.upcloudobjects.com$/.exec(backupConfig.endpoint);
|
||||
backupConfig.region = m ? m[1] : 'us-east-1'; // let it fail in validation phase if m is not valid
|
||||
@@ -615,7 +701,7 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
backupConfig.mountOptions.port = $scope.configureBackup.mountOptions.port;
|
||||
backupConfig.mountOptions.privateKey = $scope.configureBackup.mountOptions.privateKey;
|
||||
}
|
||||
} else if (backupConfig.provider === 'ext4' || backupConfig.provider === 'xfs') {
|
||||
} else if (backupConfig.provider === 'ext4' || backupConfig.provider === 'xfs' || backupConfig.provider === 'disk') {
|
||||
backupConfig.mountOptions.diskPath = $scope.configureBackup.mountOptions.diskPath;
|
||||
} else if (backupConfig.provider === 'mountpoint') {
|
||||
backupConfig.mountPoint = $scope.configureBackup.mountPoint;
|
||||
@@ -627,12 +713,12 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
backupConfig.noHardlinks = !$scope.configureBackup.useHardlinks;
|
||||
}
|
||||
|
||||
backupConfig.uploadPartSize = $scope.configureBackup.uploadPartSize;
|
||||
backupConfig.limits.uploadPartSize = $scope.configureBackup.uploadPartSize;
|
||||
|
||||
if (backupConfig.format === 'rsync') {
|
||||
backupConfig.downloadConcurrency = $scope.configureBackup.downloadConcurrency;
|
||||
backupConfig.syncConcurrency = $scope.configureBackup.syncConcurrency;
|
||||
backupConfig.copyConcurrency = $scope.configureBackup.copyConcurrency;
|
||||
backupConfig.limits.downloadConcurrency = $scope.configureBackup.downloadConcurrency;
|
||||
backupConfig.limits.syncConcurrency = $scope.configureBackup.syncConcurrency;
|
||||
backupConfig.limits.copyConcurrency = $scope.configureBackup.copyConcurrency;
|
||||
}
|
||||
|
||||
Client.setBackupConfig(backupConfig, function (error) {
|
||||
@@ -727,6 +813,35 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.backupConfig = backupConfig;
|
||||
$scope.mountStatus = null;
|
||||
|
||||
if (!$scope.mountlike($scope.backupConfig.provider)) return;
|
||||
|
||||
Client.getBackupMountStatus(function (error, mountStatus) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.mountStatus = mountStatus;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function getBackupTasks() {
|
||||
Client.getTasksByType(TASK_TYPES.TASK_BACKUP, function (error, tasks) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
if (!tasks.length) return;
|
||||
|
||||
$scope.backupTasks = tasks.slice(0, 10);
|
||||
});
|
||||
}
|
||||
|
||||
function getCleanupTasks() {
|
||||
Client.getTasksByType(TASK_TYPES.TASK_CLEAN_BACKUPS, function (error, tasks) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
if (!tasks.length) return;
|
||||
|
||||
$scope.cleanupTasks = tasks.slice(0, 10);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -742,7 +857,12 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
|
||||
$scope.manualBackupApps = Client.getInstalledApps().filter(function (app) { return app.type !== APP_TYPES.LINK && !app.enableBackup; });
|
||||
|
||||
// show backup status
|
||||
$scope.createBackup.checkStatus();
|
||||
$scope.createBackup.init();
|
||||
$scope.cleanupBackups.init();
|
||||
$scope.backupPolicy.init();
|
||||
|
||||
getBackupTasks();
|
||||
getCleanupTasks();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/* global $:false */
|
||||
|
||||
angular.module('Application').controller('BrandingController', ['$scope', '$location', 'Client', function ($scope, $location, Client) {
|
||||
Client.onReady(function () { if (Client.getUserInfo().role !== 'owner') $location.path('/'); });
|
||||
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastAdmin) $location.path('/'); });
|
||||
|
||||
$scope.user = Client.getUserInfo();
|
||||
$scope.config = Client.getConfig();
|
||||
|
||||
@@ -98,6 +98,25 @@
|
||||
<input type="text" class="form-control" ng-model="domainConfigure.netcupApiPassword" name="netcupApiPassword" ng-disabled="domainConfigure.busy" ng-required="domainConfigure.provider === 'netcup'">
|
||||
</div>
|
||||
|
||||
<!-- OVH -->
|
||||
<div class="form-group" ng-class="{ 'has-error': false }" ng-show="domainConfigure.provider === 'ovh'">
|
||||
<label class="control-label" for="inputConfigureOvhEndpoint">{{ 'domains.domainDialog.ovhEndpoint' | tr }}</label>
|
||||
<select class="form-control" name="endpoint" id="inputConfigureOvhEndpoint" ng-model="domainConfigure.ovhEndpoint" ng-options="a.value as a.name for a in ovhEndpoints" ng-disabled="domainConfigure.busy" ng-required="domainConfigure.provider === 'ovh'"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': false }" ng-show="domainConfigure.provider === 'ovh'">
|
||||
<label class="control-label">{{ 'domains.domainDialog.ovhConsumerKey' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="domainConfigure.ovhConsumerKey" name="ovhConsumerKey" ng-disabled="domainConfigure.busy" ng-required="domainConfigure.provider === 'ovh'">
|
||||
</div>
|
||||
<div class="form-group" ng-class="{ 'has-error': false }" ng-show="domainConfigure.provider === 'ovh'">
|
||||
<label class="control-label">{{ 'domains.domainDialog.ovhAppKey' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="domainConfigure.ovhAppKey" name="ovhAppKey" ng-disabled="domainConfigure.busy" ng-minlength="1" ng-required="domainConfigure.provider === 'ovh'">
|
||||
</div>
|
||||
<div class="form-group" ng-class="{ 'has-error': false }" ng-show="domainConfigure.provider === 'ovh'">
|
||||
<label class="control-label">{{ 'domains.domainDialog.ovhAppSecret' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="domainConfigure.ovhAppSecret" name="ovhAppSecret" ng-disabled="domainConfigure.busy" ng-required="domainConfigure.provider === 'ovh'">
|
||||
</div>
|
||||
|
||||
<!-- Porkbun -->
|
||||
<div class="form-group" ng-class="{ 'has-error': false }" ng-show="domainConfigure.provider === 'porkbun'">
|
||||
<label class="control-label">{{ 'domains.domainDialog.porkbunApikey' | tr }}</label>
|
||||
@@ -109,6 +128,14 @@
|
||||
</div>
|
||||
|
||||
<!-- Cloudflare -->
|
||||
<div class="form-group" ng-class="{ 'has-error': false }" ng-show="domainConfigure.provider === 'cloudflare'">
|
||||
<label class="control-label">{{ 'domains.domainDialog.cloudflareTokenType' | tr }}</label>
|
||||
<select class="form-control" ng-model="domainConfigure.cloudflareTokenType">
|
||||
<option value="GlobalApiKey">{{ 'domains.domainDialog.cloudflareTokenTypeGlobalApiKey' | tr }}</option>
|
||||
<option value="ApiToken">{{ 'domains.domainDialog.cloudflareTokenTypeApiToken' | tr }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': false }" ng-show="domainConfigure.provider === 'cloudflare'">
|
||||
<label class="control-label" ng-show="domainConfigure.cloudflareTokenType === 'GlobalApiKey'">{{ 'domains.domainDialog.cloudflareTokenTypeGlobalApiKey' | tr }}</label>
|
||||
<label class="control-label" ng-show="domainConfigure.cloudflareTokenType === 'ApiToken'">{{ 'domains.domainDialog.cloudflareTokenTypeApiToken' | tr }}</label>
|
||||
@@ -126,20 +153,24 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': false }" ng-show="domainConfigure.provider === 'cloudflare'">
|
||||
<label class="control-label">{{ 'domains.domainDialog.cloudflareTokenType' | tr }}</label>
|
||||
<select class="form-control" ng-model="domainConfigure.cloudflareTokenType">
|
||||
<option value="GlobalApiKey">{{ 'domains.domainDialog.cloudflareTokenTypeGlobalApiKey' | tr }}</option>
|
||||
<option value="ApiToken">{{ 'domains.domainDialog.cloudflareTokenTypeApiToken' | tr }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Linode -->
|
||||
<div class="form-group" ng-class="{ 'has-error': false }" ng-show="domainConfigure.provider === 'linode'">
|
||||
<label class="control-label">{{ 'domains.domainDialog.linodeToken' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="domainConfigure.linodeToken" name="linodeToken" ng-disabled="domainConfigure.busy" ng-required="domainConfigure.provider === 'linode'">
|
||||
</div>
|
||||
|
||||
<!-- Bunny -->
|
||||
<div class="form-group" ng-class="{ 'has-error': false }" ng-show="domainConfigure.provider === 'bunny'">
|
||||
<label class="control-label">{{ 'domains.domainDialog.bunnyAccessKey' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="domainConfigure.bunnyAccessKey" name="bunnyAccessKey" ng-disabled="domainConfigure.busy" ng-required="domainConfigure.provider === 'bunny'">
|
||||
</div>
|
||||
|
||||
<!-- dnsimple -->
|
||||
<div class="form-group" ng-class="{ 'has-error': false }" ng-show="domainConfigure.provider === 'dnsimple'">
|
||||
<label class="control-label">{{ 'domains.domainDialog.dnsimpleAccessToken' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="domainConfigure.dnsimpleAccessToken" name="dnsimpleAccessToken" ng-disabled="domainConfigure.busy" ng-required="domainConfigure.provider === 'dnsimple'">
|
||||
</div>
|
||||
|
||||
<!-- Hetzner -->
|
||||
<div class="form-group" ng-class="{ 'has-error': false }" ng-show="domainConfigure.provider === 'hetzner'">
|
||||
<label class="control-label">{{ 'domains.domainDialog.hetznerToken' | tr }}</label>
|
||||
@@ -325,15 +356,15 @@
|
||||
{{ prettyProviderName(domain) }}
|
||||
</td>
|
||||
<td class="text-right no-wrap" style="vertical-align: bottom">
|
||||
<button class="btn btn-xs btn-default" ng-click="domainWellKnown.show(domain)" title="{{ 'domains.tooltipWellKnown' | tr }}"><i class="fa fa-atlas"></i></button>
|
||||
<button class="btn btn-xs btn-default" ng-click="domainConfigure.show(domain)" title="{{ 'domains.tooltipEdit' | tr }}"><i class="fa fa-pencil-alt"></i></button>
|
||||
<button class="btn btn-xs btn-danger" ng-click="domainRemove.show(domain)" title="{{ 'domains.tooltipRemove' | tr }}" ng-disabled="domain.domain === config.adminDomain"><i class="far fa-trash-alt"></i></button>
|
||||
<button class="btn btn-xs btn-default" ng-click="domainWellKnown.show(domain)" uib-tooltip="{{ 'domains.tooltipWellKnown' | tr }}"><i class="fa fa-atlas"></i></button>
|
||||
<button class="btn btn-xs btn-default" ng-click="domainConfigure.show(domain)" uib-tooltip="{{ 'domains.tooltipEdit' | tr }}"><i class="fa fa-pencil-alt"></i></button>
|
||||
<button class="btn btn-xs btn-danger" ng-click="domainRemove.show(domain)" uib-tooltip="{{ 'domains.tooltipRemove' | tr }}" ng-disabled="domain.domain === config.adminDomain"><i class="far fa-trash-alt"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pull-left">
|
||||
{{ 'main.pagination.itemCount' | tr:{ count: (domains | filter:domainSearchString).length } }}
|
||||
{{ 'domains.count' | tr:{ count: (domains | filter:domainSearchString).length } }}
|
||||
</div>
|
||||
<div class="pull-right" ng-show="domains.length > pageSize">
|
||||
<button class="btn btn-default btn-outline btn-xs" ng-click="showPrevPage()" ng-class="{ 'btn-primary': currentPage > 1 }" ng-disabled="currentPage <= 1"><i class="fa fa-angle-double-left"></i> {{ 'main.pagination.prev' | tr }}</button>
|
||||
@@ -344,8 +375,22 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left">
|
||||
<h3>{{ 'domains.renewCerts.title' | tr }}</h3>
|
||||
<div class="text-left section-header">
|
||||
<h3>
|
||||
{{ 'domains.renewCerts.title' | tr }}
|
||||
<div class="btn-group btn-group-sm pull-right">
|
||||
<button type="button" class="btn btn-small btn-default dropdown-toggle" ng-show="renewCerts.tasks.length" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" uib-tooltip="{{ 'domains.renewCerts.showLogsAction' | tr }}">
|
||||
<i class="fas fa-align-left"></i> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li ng-repeat="task in renewCerts.tasks">
|
||||
<a ng-href="/frontend/logs.html?taskId={{task.id}}" target="_blank" class="text-right">
|
||||
{{ task.ts | prettyLongDate }} <i class="fa" style="margin-left: 20px" ng-class="{ 'status-active fa-check-circle': !task.active && task.success, 'fa-circle-notch fa-spin': task.active, 'status-error fa-times-circle': !task.active && !task.success }"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
@@ -369,14 +414,27 @@
|
||||
<p ng-hide="renewCerts.busy">
|
||||
<div class="has-error" ng-show="!renewCerts.active">{{ renewCerts.errorMessage }}</div>
|
||||
</p>
|
||||
<a class="btn btn-primary pull-right" ng-href="/logs.html?taskId={{renewCerts.taskId}}" ng-disabled="!renewCerts.taskId" target="_blank">{{ 'domains.renewCerts.showLogsAction' | tr }}</a>
|
||||
<button class="btn btn-outline btn-primary pull-right" ng-click="renewCerts.renew()" ng-disabled="renewCerts.busy" style="margin-right: 10px">{{ 'domains.renewCerts.renewAllAction' | tr }}</button>
|
||||
<button class="btn btn-outline btn-primary pull-right" ng-click="renewCerts.renew()" ng-disabled="renewCerts.busy">{{ 'domains.renewCerts.renewAllAction' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left">
|
||||
<h3>{{ 'domains.syncDns.title' | tr }}</h3>
|
||||
<div class="text-left section-header">
|
||||
<h3>
|
||||
{{ 'domains.syncDns.title' | tr }}
|
||||
<div class="btn-group btn-group-sm pull-right">
|
||||
<button type="button" class="btn btn-small btn-default dropdown-toggle" ng-show="syncDns.tasks.length" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" uib-tooltip="{{ 'domains.renewCerts.showLogsAction' | tr }}">
|
||||
<i class="fas fa-align-left"></i> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li ng-repeat="task in syncDns.tasks">
|
||||
<a ng-href="/frontend/logs.html?taskId={{task.id}}" target="_blank" class="text-right">
|
||||
{{ task.ts | prettyLongDate }} <i class="fa" style="margin-left: 20px" ng-class="{ 'status-active fa-check-circle': !task.active && task.success, 'fa-circle-notch fa-spin': task.active, 'status-error fa-times-circle': !task.active && !task.success }"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
@@ -400,14 +458,27 @@
|
||||
<p ng-hide="syncDns.busy">
|
||||
<div class="has-error" ng-show="!syncDns.active">{{ syncDns.errorMessage }}</div>
|
||||
</p>
|
||||
<a class="btn btn-primary pull-right" ng-href="/logs.html?taskId={{syncDns.taskId}}" ng-disabled="!syncDns.taskId" target="_blank">{{ 'domains.syncDns.showLogsAction' | tr }}</a>
|
||||
<button class="btn btn-outline btn-primary pull-right" ng-click="syncDns.sync()" ng-disabled="syncDns.busy" style="margin-right: 10px">{{ 'domains.syncDns.syncAction' | tr }}</button>
|
||||
<button class="btn btn-outline btn-primary pull-right" ng-click="syncDns.sync()" ng-disabled="syncDns.busy">{{ 'domains.syncDns.syncAction' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left">
|
||||
<h3>{{ 'domains.changeDashboardDomain.title' | tr }}</h3>
|
||||
<div class="text-left section-header">
|
||||
<h3>
|
||||
{{ 'domains.changeDashboardDomain.title' | tr }}
|
||||
<div class="btn-group btn-group-sm pull-right">
|
||||
<button type="button" class="btn btn-small btn-default dropdown-toggle" ng-show="changeDashboard.tasks.length" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" uib-tooltip="{{ 'domains.renewCerts.showLogsAction' | tr }}">
|
||||
<i class="fas fa-align-left"></i> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li ng-repeat="task in changeDashboard.tasks">
|
||||
<a ng-href="/frontend/logs.html?taskId={{task.id}}" target="_blank" class="text-right">
|
||||
{{ task.ts | prettyLongDate }} <i class="fa" style="margin-left: 20px" ng-class="{ 'status-active fa-check-circle': !task.active && task.success, 'fa-circle-notch fa-spin': task.active, 'status-error fa-times-circle': !task.active && !task.success }"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
@@ -432,16 +503,15 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<p ng-show="changeDashboard.busy">{{ changeDashboard.message }}</p>
|
||||
<p ng-hide="changeDashboard.busy">
|
||||
<div class="has-error" ng-show="!changeDashboard.active">{{ changeDashboard.errorMessage }}</div>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<div class="col-md-4 text-right">
|
||||
<button class="btn btn-outline btn-primary" ng-click="changeDashboard.change()" ng-hide="changeDashboard.busy" ng-disabled="changeDashboard.selectedDomain.domain === changeDashboard.adminDomain.domain">{{ 'domains.changeDashboardDomain.changeAction' | tr }}</button>
|
||||
<button class="btn btn-outline btn-danger" ng-click="changeDashboard.stop()" ng-show="changeDashboard.busy" style="margin-right: 10px">{{ 'domains.changeDashboardDomain.cancelAction' | tr }}</button>
|
||||
<a class="btn btn-primary pull-right" ng-href="/logs.html?taskId={{changeDashboard.taskId}}" ng-show="changeDashboard.busy" target="_blank">{{ 'domains.changeDashboardDomain.showLogsAction' | tr }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/* global async */
|
||||
/* global angular */
|
||||
/* global $, TASK_TYPES */
|
||||
/* global $, TASK_TYPES, ENDPOINTS_OVH */
|
||||
|
||||
angular.module('Application').controller('DomainsController', ['$scope', '$location', 'Client', function ($scope, $location, Client) {
|
||||
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastAdmin) $location.path('/'); });
|
||||
@@ -11,7 +11,7 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
$scope.domains = [];
|
||||
$scope.ready = false;
|
||||
$scope.domainSearchString = '';
|
||||
$scope.pageSize = 10;
|
||||
$scope.pageSize = localStorage.cloudronPageSize || 10;
|
||||
$scope.currentPage = 1;
|
||||
|
||||
$scope.showNextPage = function () {
|
||||
@@ -44,8 +44,10 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
// keep in sync with setupdns.js
|
||||
$scope.dnsProvider = [
|
||||
{ name: 'AWS Route53', value: 'route53' },
|
||||
{ name: 'Bunny', value: 'bunny' },
|
||||
{ name: 'Cloudflare', value: 'cloudflare' },
|
||||
{ name: 'DigitalOcean', value: 'digitalocean' },
|
||||
{ name: 'DNSimple', value: 'dnsimple' },
|
||||
{ name: 'Gandi LiveDNS', value: 'gandi' },
|
||||
{ name: 'GoDaddy', value: 'godaddy' },
|
||||
{ name: 'Google Cloud DNS', value: 'gcdns' },
|
||||
@@ -54,6 +56,7 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
{ name: 'Name.com', value: 'namecom' },
|
||||
{ name: 'Namecheap', value: 'namecheap' },
|
||||
{ name: 'Netcup', value: 'netcup' },
|
||||
{ name: 'OVH', value: 'ovh' },
|
||||
{ name: 'Porkbun', value: 'porkbun' },
|
||||
{ name: 'Vultr', value: 'vultr' },
|
||||
{ name: 'Wildcard', value: 'wildcard' },
|
||||
@@ -63,15 +66,18 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
|
||||
$scope.prettyProviderName = function (domain) {
|
||||
switch (domain.provider) {
|
||||
case 'bunny': return 'Bunny';
|
||||
case 'route53': return 'AWS Route53';
|
||||
case 'cloudflare': return 'Cloudflare';
|
||||
case 'digitalocean': return 'DigitalOcean';
|
||||
case 'dnsimple': return 'dnsimple';
|
||||
case 'gandi': return 'Gandi LiveDNS';
|
||||
case 'hetzner': return 'Hetzner DNS';
|
||||
case 'linode': return 'Linode';
|
||||
case 'namecom': return 'Name.com';
|
||||
case 'namecheap': return 'Namecheap';
|
||||
case 'netcup': return 'Netcup';
|
||||
case 'ovh': return 'OVH';
|
||||
case 'gcdns': return 'Google Cloud';
|
||||
case 'godaddy': return 'GoDaddy';
|
||||
case 'vultr': return 'Vultr';
|
||||
@@ -83,6 +89,8 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
}
|
||||
};
|
||||
|
||||
$scope.ovhEndpoints = ENDPOINTS_OVH;
|
||||
|
||||
$scope.needsPort80 = function (dnsProvider, tlsProvider) {
|
||||
return ((dnsProvider === 'manual' || dnsProvider === 'noop' || dnsProvider === 'wildcard') &&
|
||||
(tlsProvider === 'letsencrypt-prod' || tlsProvider === 'letsencrypt-staging'));
|
||||
@@ -246,6 +254,8 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
cloudflareDefaultProxyStatus: false,
|
||||
cloudflareTokenType: 'GlobalApiKey',
|
||||
linodeToken: '',
|
||||
bunnyAccessKey: '',
|
||||
dnsimpleAccessToken: '',
|
||||
hetznerToken: '',
|
||||
vultrToken: '',
|
||||
nameComToken: '',
|
||||
@@ -255,6 +265,10 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
netcupCustomerNumber: '',
|
||||
netcupApiKey: '',
|
||||
netcupApiPassword: '',
|
||||
ovhEndpoint: 'ovh-eu',
|
||||
ovhConsumerKey: '',
|
||||
ovhAppKey: '',
|
||||
ovhAppSecret: '',
|
||||
porkbunSecretapikey: '',
|
||||
porkbunApikey: '',
|
||||
|
||||
@@ -303,6 +317,8 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
}
|
||||
$scope.domainConfigure.digitalOceanToken = domain.provider === 'digitalocean' ? domain.config.token : '';
|
||||
$scope.domainConfigure.linodeToken = domain.provider === 'linode' ? domain.config.token : '';
|
||||
$scope.domainConfigure.bunnyAccessKey = domain.provider === 'bunny' ? domain.config.accessKey : '';
|
||||
$scope.domainConfigure.dnsimpleAccessToken = domain.provider === 'dnsimple' ? domain.config.accessToken : '';
|
||||
$scope.domainConfigure.hetznerToken = domain.provider === 'hetzner' ? domain.config.token : '';
|
||||
$scope.domainConfigure.vultrToken = domain.provider === 'vultr' ? domain.config.token : '';
|
||||
$scope.domainConfigure.gandiApiKey = domain.provider === 'gandi' ? domain.config.token : '';
|
||||
@@ -324,6 +340,11 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
$scope.domainConfigure.netcupApiKey = domain.provider === 'netcup' ? domain.config.apiKey : '';
|
||||
$scope.domainConfigure.netcupApiPassword = domain.provider === 'netcup' ? domain.config.apiPassword : '';
|
||||
|
||||
$scope.domainConfigure.ovhEndpoint = domain.provider === 'ovh' ? domain.config.endpoint : '';
|
||||
$scope.domainConfigure.ovhConsumerKey = domain.provider === 'ovh' ? domain.config.consumerKey : '';
|
||||
$scope.domainConfigure.ovhAppKey = domain.provider === 'ovh' ? domain.config.appKey : '';
|
||||
$scope.domainConfigure.ovhAppSecret = domain.provider === 'ovh' ? domain.config.appSecret : '';
|
||||
|
||||
$scope.domainConfigure.porkbunApikey = domain.provider === 'porkbun' ? domain.config.apikey : '';
|
||||
$scope.domainConfigure.porkbunSecretapikey = domain.provider === 'porkbun' ? domain.config.secretapikey : '';
|
||||
|
||||
@@ -373,6 +394,10 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
data.token = $scope.domainConfigure.digitalOceanToken;
|
||||
} else if (provider === 'linode') {
|
||||
data.token = $scope.domainConfigure.linodeToken;
|
||||
} else if (provider === 'bunny') {
|
||||
data.accessKey = $scope.domainConfigure.bunnyAccessKey;
|
||||
} else if (provider === 'dnsimple') {
|
||||
data.accessToken = $scope.domainConfigure.dnsimpleAccessToken;
|
||||
} else if (provider === 'hetzner') {
|
||||
data.token = $scope.domainConfigure.hetznerToken;
|
||||
} else if (provider === 'vultr') {
|
||||
@@ -397,6 +422,11 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
data.customerNumber = $scope.domainConfigure.netcupCustomerNumber;
|
||||
data.apiKey = $scope.domainConfigure.netcupApiKey;
|
||||
data.apiPassword = $scope.domainConfigure.netcupApiPassword;
|
||||
} else if (provider === 'ovh') {
|
||||
data.endpoint = $scope.domainConfigure.ovhEndpoint;
|
||||
data.consumerKey = $scope.domainConfigure.ovhConsumerKey;
|
||||
data.appKey = $scope.domainConfigure.ovhAppKey;
|
||||
data.appSecret = $scope.domainConfigure.ovhAppSecret;
|
||||
} else if (provider === 'porkbun') {
|
||||
data.apikey = $scope.domainConfigure.porkbunApikey;
|
||||
data.secretapikey = $scope.domainConfigure.porkbunSecretapikey;
|
||||
@@ -466,6 +496,10 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
$scope.domainConfigure.netcupCustomerNumber = '';
|
||||
$scope.domainConfigure.netcupApiKey = '';
|
||||
$scope.domainConfigure.netcupApiPassword = '';
|
||||
$scope.domainConfigure.ovhEndpoint = '';
|
||||
$scope.domainConfigure.ovhConsumerKey = '';
|
||||
$scope.domainConfigure.ovhAppKey = '';
|
||||
$scope.domainConfigure.ovhAppSecret = '';
|
||||
$scope.domainConfigure.porkbunApikey = '';
|
||||
$scope.domainConfigure.porkbunSecretapikey = '';
|
||||
$scope.domainConfigure.vultrToken = '';
|
||||
@@ -483,21 +517,20 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
percent: 0,
|
||||
message: '',
|
||||
errorMessage: '',
|
||||
taskId: '',
|
||||
tasks: [],
|
||||
|
||||
checkStatus: function () {
|
||||
Client.getLatestTaskByType(TASK_TYPES.TASK_CHECK_CERTS, function (error, task) {
|
||||
refreshTasks: function () {
|
||||
Client.getTasksByType(TASK_TYPES.TASK_CHECK_CERTS, function (error, tasks) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
if (!task) return;
|
||||
|
||||
$scope.renewCerts.taskId = task.id;
|
||||
$scope.renewCerts.updateStatus();
|
||||
$scope.renewCerts.tasks = tasks.slice(0, 10);
|
||||
if ($scope.renewCerts.tasks.length && $scope.renewCerts.tasks[0].active) $scope.renewCerts.updateStatus();
|
||||
});
|
||||
},
|
||||
|
||||
updateStatus: function () {
|
||||
Client.getTask($scope.renewCerts.taskId, function (error, data) {
|
||||
var taskId = $scope.renewCerts.tasks[0].id;
|
||||
|
||||
Client.getTask(taskId, function (error, data) {
|
||||
if (error) return window.setTimeout($scope.renewCerts.updateStatus, 5000);
|
||||
|
||||
if (!data.active) {
|
||||
@@ -506,6 +539,8 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
$scope.renewCerts.percent = 100; // indicates that 'result' is valid
|
||||
$scope.renewCerts.errorMessage = data.success ? '' : data.error.message;
|
||||
|
||||
$scope.renewCerts.refreshTasks(); // update the tasks list dropdown
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -523,15 +558,13 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
$scope.renewCerts.errorMessage = '';
|
||||
|
||||
// always rebuild the nginx configs when triggered via the UI. we assume user is clicking this because something is wrong
|
||||
Client.renewCerts({ rebuild: true }, function (error, taskId) {
|
||||
Client.renewCerts({ rebuild: true }, function (error /*, taskId */) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
$scope.renewCerts.errorMessage = error.message;
|
||||
|
||||
$scope.renewCerts.busy = false;
|
||||
} else {
|
||||
$scope.renewCerts.taskId = taskId;
|
||||
$scope.renewCerts.updateStatus();
|
||||
$scope.renewCerts.refreshTasks();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -542,21 +575,19 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
percent: 0,
|
||||
message: '',
|
||||
errorMessage: '',
|
||||
taskId: '',
|
||||
tasks: [],
|
||||
|
||||
checkStatus: function () {
|
||||
Client.getLatestTaskByType(TASK_TYPES.TASK_SYNC_DNS_RECORDS, function (error, task) {
|
||||
refreshTasks: function () {
|
||||
Client.getTasksByType(TASK_TYPES.TASK_SYNC_DNS_RECORDS, function (error, tasks) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
if (!task) return;
|
||||
|
||||
$scope.syncDns.taskId = task.id;
|
||||
$scope.syncDns.updateStatus();
|
||||
$scope.syncDns.tasks = tasks.slice(0, 10);
|
||||
if ($scope.syncDns.tasks.length && $scope.syncDns.tasks[0].active) $scope.syncDns.updateStatus();
|
||||
});
|
||||
},
|
||||
|
||||
updateStatus: function () {
|
||||
Client.getTask($scope.syncDns.taskId, function (error, data) {
|
||||
var taskId = $scope.syncDns.tasks[0].id;
|
||||
Client.getTask(taskId, function (error, data) {
|
||||
if (error) return window.setTimeout($scope.syncDns.updateStatus, 5000);
|
||||
|
||||
if (!data.active) {
|
||||
@@ -565,6 +596,8 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
$scope.syncDns.percent = 100; // indicates that 'result' is valid
|
||||
$scope.syncDns.errorMessage = data.success ? '' : data.error.message;
|
||||
|
||||
$scope.syncDns.refreshTasks(); // update the tasks list dropdown
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -581,15 +614,13 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
$scope.syncDns.message = '';
|
||||
$scope.syncDns.errorMessage = '';
|
||||
|
||||
Client.setDnsRecords({}, function (error, taskId) {
|
||||
Client.setDnsRecords({}, function (error /*, taskId */) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
$scope.syncDns.errorMessage = error.message;
|
||||
|
||||
$scope.syncDns.busy = false;
|
||||
} else {
|
||||
$scope.syncDns.taskId = taskId;
|
||||
$scope.syncDns.updateStatus();
|
||||
$scope.syncDns.refreshTasks();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -643,24 +674,21 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
taskId: '',
|
||||
selectedDomain: null,
|
||||
adminDomain: null,
|
||||
tasks: [],
|
||||
|
||||
refreshTasks: function () {
|
||||
Client.getTasksByType(TASK_TYPES.TASK_PREPARE_DASHBOARD_LOCATION, function (error, tasks) {
|
||||
if (error) return console.error(error);
|
||||
$scope.changeDashboard.tasks = tasks.slice(0, 10);
|
||||
if ($scope.changeDashboard.tasks.length && $scope.changeDashboard.tasks[0].active) $scope.changeDashboard.updateStatus();
|
||||
});
|
||||
},
|
||||
|
||||
stop: function () {
|
||||
Client.stopTask($scope.changeDashboard.taskId, function (error) {
|
||||
if (error) console.error(error);
|
||||
$scope.changeDashboard.busy = false;
|
||||
});
|
||||
},
|
||||
|
||||
// this function is not called intentionally. currently, we do switching in two steps - prepare and set
|
||||
// if the user refreshed the UI in the middle of prepare, then it would be awkward to resume/call 'set' when the
|
||||
// user visits the UI the next time around.
|
||||
checkStatus: function () {
|
||||
Client.getLatestTaskByType('prepareDashboardDomain', function (error, task) {
|
||||
if (error) return console.error(error);
|
||||
if (!task) return;
|
||||
|
||||
$scope.changeDashboard.taskId = task.id;
|
||||
$scope.changeDashboard.updateStatus();
|
||||
$scope.changeDashboard.refreshTasks();
|
||||
});
|
||||
},
|
||||
|
||||
@@ -715,7 +743,7 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
$scope.changeDashboard.busy = false;
|
||||
} else {
|
||||
$scope.changeDashboard.taskId = taskId;
|
||||
$scope.changeDashboard.updateStatus();
|
||||
$scope.changeDashboard.refreshTasks();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -728,7 +756,9 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
$scope.ready = true;
|
||||
});
|
||||
|
||||
$scope.renewCerts.checkStatus();
|
||||
$scope.renewCerts.refreshTasks();
|
||||
$scope.syncDns.refreshTasks();
|
||||
$scope.changeDashboard.refreshTasks();
|
||||
});
|
||||
|
||||
document.getElementById('gcdnsKeyFileInput').onchange = readFileLocally($scope.domainConfigure.gcdnsKey, 'content', 'keyFileName');
|
||||
|
||||
@@ -725,7 +725,7 @@
|
||||
<div id="collapse_dns_{{ record.value }}" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<p ng-show="record.name === 'MX' && domain.provider === 'namecheap'">{{ 'email.dnsStatus.namecheapInfo' | tr }} <sup><a ng-href="https://docs.cloudron.io/domains/#namecheap-dns" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></p>
|
||||
<p ng-show="record.name === 'PTR'">{{ 'email.dnsStatus.ptrInfo' | tr }} <sup><a ng-href="https://docs.cloudron.io/troubleshooting/#ptr-record" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></p>
|
||||
<p ng-show="record.name === 'PTR'">{{ 'email.dnsStatus.ptrInfo' | tr }} <sup><a ng-href="https://docs.cloudron.io/email/#ptr-record" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></p>
|
||||
<p ng-show="expectedDnsRecords[record.value].name">{{ 'email.dnsStatus.hostname' | tr }}: <b ng-click-select><tt>{{ expectedDnsRecords[record.value].name }}</tt></b></p>
|
||||
<p ng-hide="expectedDnsRecords[record.value].name">{{ 'email.dnsStatus.domain' | tr }}: <b ng-click-select><tt>{{ expectedDnsRecords[record.value].domain }}</tt></b></p>
|
||||
<p>{{ 'email.dnsStatus.type' | tr }}: <b ng-click-select><tt>{{ expectedDnsRecords[record.value].type }}</tt></b></p>
|
||||
|
||||
@@ -64,6 +64,12 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
Client.openSubscriptionSetup($scope.$parent.subscription);
|
||||
};
|
||||
|
||||
function updateMailUsage(mailboxName, quotaLimit) {
|
||||
if (!$scope.mailUsage) $scope.mailUsage = {};
|
||||
if (!$scope.mailUsage[mailboxName]) $scope.mailUsage[mailboxName] = {};
|
||||
$scope.mailUsage[mailboxName].quotaLimit = quotaLimit;
|
||||
}
|
||||
|
||||
function refreshMailUsage() {
|
||||
Client.getMailUsage($scope.domain.domain, function (error, usage) {
|
||||
if (error) console.error(error);
|
||||
@@ -646,7 +652,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
}
|
||||
|
||||
function done() {
|
||||
$scope.mailUsage[$scope.mailboxes.edit.name + '@' + $scope.domain.domain].quotaLimit = $scope.mailboxes.edit.storageQuotaEnabled ? $scope.mailboxes.edit.storageQuota : 0; // hack to avoid refresh
|
||||
updateMailUsage($scope.mailboxes.edit.name + '@' + $scope.domain.domain, $scope.mailboxes.edit.storageQuotaEnabled ? $scope.mailboxes.edit.storageQuota : 0); // hack to avoid refresh
|
||||
|
||||
$scope.mailboxes.edit.busy = false;
|
||||
$scope.mailboxes.edit.error = null;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<h1>
|
||||
{{ 'emails.eventlog.title' | tr }}
|
||||
|
||||
<a class="btn btn-default btn-outline pull-right" href="/logs.html?id=mail" target="_blank">{{ 'main.action.logs' | tr }}</a>
|
||||
<a class="btn btn-default btn-outline pull-right" href="/frontend/logs.html?id=mail" target="_blank">{{ 'main.action.logs' | tr }}</a>
|
||||
<a class="btn btn-default btn-outline pull-right" href="#/emails-queue">{{ 'emails.action.queue' | tr }}</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/* global angular */
|
||||
|
||||
angular.module('Application').controller('EmailsEventlogController', ['$scope', '$location', '$translate', '$timeout', 'Client', function ($scope, $location, $translate, $timeout, Client) {
|
||||
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastOwner) $location.path('/'); });
|
||||
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastAdmin) $location.path('/'); });
|
||||
|
||||
$scope.ready = false;
|
||||
$scope.config = Client.getConfig();
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<h1>
|
||||
{{ 'emails.queue.title' | tr }}
|
||||
|
||||
<a class="btn btn-default btn-outline pull-right" href="/logs.html?id=mail" target="_blank">{{ 'main.action.logs' | tr }}</a>
|
||||
<a class="btn btn-default btn-outline pull-right" href="/frontend/logs.html?id=mail" target="_blank">{{ 'main.action.logs' | tr }}</a>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/* global angular */
|
||||
|
||||
angular.module('Application').controller('EmailsQueueController', ['$scope', '$location', '$translate', '$timeout', 'Client', function ($scope, $location, $translate, $timeout, Client) {
|
||||
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastOwner) $location.path('/'); });
|
||||
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastAdmin) $location.path('/'); });
|
||||
|
||||
$scope.ready = false;
|
||||
$scope.config = Client.getConfig();
|
||||
|
||||
+102
-97
@@ -1,50 +1,3 @@
|
||||
<!-- Modal change mail server domain -->
|
||||
<div class="modal fade" id="mailLocationModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'emails.changeDomainDialog.title' | tr }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div ng-bind-html=" 'emails.changeDomainDialog.description' | tr "></div>
|
||||
<br>
|
||||
|
||||
<form name="mailLocationForm" role="form" novalidate ng-submit="mailLocation.submit()" autocomplete="off">
|
||||
<div class="form-group" ng-class="{ 'has-error': (mailLocationForm.subdomain.$dirty && mailLocationForm.subdomain.$invalid) || (!mailLocationForm.subdomain.$dirty && mailLocation.error)}">
|
||||
<label class="control-label">{{ 'emails.changeDomainDialog.location' | tr }}</label>
|
||||
|
||||
<div class="has-error" ng-show="mailLocation.error">{{ mailLocation.error.message }}</div>
|
||||
|
||||
<div class="input-group form-inline">
|
||||
<input type="text" class="form-control" ng-model="mailLocation.subdomain" id="mailLocationLocationInput" name="location" placeholder="{{ 'emails.changeDomainDialog.locationPlaceholder' | tr }}" autofocus>
|
||||
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span>{{ (!mailLocation.subdomain ? '' : '.') + mailLocation.domain.domain }}</span>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
||||
<li ng-repeat="domain in domains">
|
||||
<a href="" ng-click="mailLocation.domain = domain">{{ domain.domain }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="text-center text-warning text-bold" ng-show="mailLocation.domain.provider === 'manual'" ng-bind-html="'emails.changeDomainDialog.manualInfo' | tr:{ domain: mailLocation.domain.domain }"></p>
|
||||
|
||||
<input class="ng-hide" type="submit" ng-disabled="mailLocationForm.$invalid"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="mailLocation.submit()" ng-disabled="mailLocationForm.$invalid || mailLocation.busy"><i class="fa fa-circle-notch fa-spin" ng-show="mailLocation.busy"></i> {{ 'main.dialog.save' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal change max email size -->
|
||||
<div class="modal fade" id="maxEmailSizeChangeModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
@@ -71,30 +24,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal change mailbox sharing -->
|
||||
<div class="modal fade" id="mailboxSharingChangeModal" tabindex="-1" role="dialog">
|
||||
<!-- Modal change virtual all mail -->
|
||||
<div class="modal fade" id="virtualAllMailChangeModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'emails.mailboxSharingDialog.title' | tr }}</h4>
|
||||
<h4 class="modal-title">{{ 'emails.changeVirtualAllMailDialog.title' | tr }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div ng-bind-html=" 'emails.mailboxSharingDialog.description' | tr "></div>
|
||||
<br>
|
||||
<form name="mailboxSharingChangeForm" role="form" novalidate ng-submit="mailboxSharing.submit()" autocomplete="off">
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="mailboxSharing.enable">{{ 'emails.mailboxSharing.mailboxSharingCheckbox' | tr }}</input>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<input class="ng-hide" type="submit"/>
|
||||
</form>
|
||||
<div ng-bind-html=" 'emails.changeVirtualAllMailDialog.description' | tr "></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="mailboxSharing.submit()" ng-disabled="mailboxSharing.enable === mailboxSharing.enabled"><i class="fa fa-circle-notch fa-spin" ng-show="mailboxSharing.busy"></i> {{ 'main.dialog.save' | tr }}</button>
|
||||
<button class="btn btn-primary" ng-click="virtualAllMail.submit(!virtualAllMail.enabled)"><i class="fa fa-circle-notch fa-spin" ng-show="virtualAllMail.busy"></i> {{ virtualAllMail.enabled ? ('main.disableAction' | tr) : ('main.enableAction' | tr) }} </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -214,14 +156,13 @@
|
||||
{{ 'emails.title' | tr }}
|
||||
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-default" ng-show="user.isAtLeastOwner" href="#/emails-queue">{{ 'emails.action.queue' | tr }}</a>
|
||||
<a class="btn btn-default" ng-show="user.isAtLeastOwner" href="#/emails-eventlog">{{ 'eventlog.title' | tr }}</a>
|
||||
<!-- hidden for now, until we see a purpose -->
|
||||
<!-- <a class="btn btn-sm btn-default" ng-disabled="user.isAtLeastOwner" href="/filemanager.html?id=mail&type=mail" target="_blank" uib-tooltip="{{ 'app.filemanagerActionTooltip' | tr }}" tooltip-append-to-body="true" tooltip-placement="bottom"><i class="fas fa-folder"></i></a> -->
|
||||
<a class="btn btn-default" ng-show="user.isAtLeastAdmin" href="#/emails-queue">{{ 'emails.action.queue' | tr }}</a>
|
||||
<a class="btn btn-default" ng-show="user.isAtLeastAdmin" href="#/emails-eventlog">{{ 'eventlog.title' | tr }}</a>
|
||||
</div>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<!-- domain listing -->
|
||||
<div class="text-left">
|
||||
<h3>{{ 'emails.domains.title' | tr }}</h3>
|
||||
</div>
|
||||
@@ -254,10 +195,20 @@
|
||||
</td>
|
||||
<td class="elide-table-cell no-padding">
|
||||
<a href="/#/email/{{ domain.domain }}" class="email-domain-list-item">
|
||||
<span ng-show="domain.inbound && domain.outbound && domain.usage === null">{{ 'main.loadingPlaceholder' | tr }} ...</span>
|
||||
<span ng-show="domain.inbound && domain.outbound && domain.usage !== null">{{ 'emails.domains.stats' | tr:{ mailboxCount: domain.mailboxCount, usage: (domain.usage | prettyDecimalSize) } }}</span>
|
||||
<span ng-show="!domain.inbound && domain.outbound">{{ 'emails.domains.outbound' | tr }}</span>
|
||||
<span ng-show="!domain.inbound && !domain.outbound">{{ 'emails.domains.disabled' | tr }}</span>
|
||||
<span ng-switch on="domain.loading">
|
||||
<span ng-switch-when="true">{{ 'main.loadingPlaceholder' | tr }} ...</span>
|
||||
<span ng-switch-default>
|
||||
<span ng-switch on="domain.inbound">
|
||||
<span ng-switch-when="true">
|
||||
<span ng-show="domain.loadingUsage">{{ 'emails.domains.stats' | tr:{ mailboxCount: domain.mailboxCount } }} {{ 'main.loadingPlaceholder' | tr }} ... </span>
|
||||
<span ng-show="!domain.loadingUsage">{{ 'emails.domains.stats' | tr:{ mailboxCount: domain.mailboxCount, usage: (domain.usage | prettyDecimalSize) } }}</span>
|
||||
</span>
|
||||
<span ng-switch-default>
|
||||
<span ng-show="domain.outbound">{{ 'emails.domains.outbound' | tr }}</span>
|
||||
<span ng-show="!domain.outbound">{{ 'emails.domains.disabled' | tr }}</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-right no-wrap">
|
||||
@@ -271,11 +222,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left" ng-show="user.isAtLeastOwner">
|
||||
<!-- mailbox sharing -->
|
||||
<div class="text-left section-header" ng-show="user.isAtLeastAdmin">
|
||||
<h3>{{ 'emails.mailboxSharing.title' | tr }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="card" ng-show="user.isAtLeastOwner" style="margin-bottom: 15px;">
|
||||
<div class="card" ng-show="user.isAtLeastAdmin" style="margin-bottom: 15px;">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<p>{{ 'emails.mailboxSharing.description' | tr }}</p>
|
||||
@@ -291,28 +243,94 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left" ng-show="user.isAtLeastOwner">
|
||||
<!-- server location -->
|
||||
<div class="text-left section-header" ng-show="user.isAtLeastAdmin">
|
||||
<h3>
|
||||
{{ 'emails.settings.location' | tr }}
|
||||
<div class="btn-group btn-group-sm pull-right">
|
||||
<button type="button" class="btn btn-small btn-default dropdown-toggle" ng-show="mailLocation.tasks.length" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" uib-tooltip="{{ 'main.action.showLogs' | tr }}">
|
||||
<i class="fas fa-align-left"></i> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li ng-repeat="task in mailLocation.tasks">
|
||||
<a ng-href="/frontend/logs.html?taskId={{task.id}}" target="_blank" class="text-right">
|
||||
{{ task.ts | prettyLongDate }} <i class="fa" style="margin-left: 20px" ng-class="{ 'status-active fa-check-circle': !task.active && task.success, 'fa-circle-notch fa-spin': task.active, 'status-error fa-times-circle': !task.active && !task.success }"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<p ng-bind-html="'emails.changeDomainDialog.description' | tr"></p>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="input-group form-inline">
|
||||
<input type="text" class="form-control" ng-model="mailLocation.subdomain" id="mailLocationLocationInput" name="location" placeholder="{{ 'emails.changeDomainDialog.locationPlaceholder' | tr }}" autofocus>
|
||||
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span>{{ (!mailLocation.subdomain ? '' : '.') + mailLocation.domain.domain }}</span>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
||||
<li ng-repeat="domain in domains">
|
||||
<a href="" ng-click="mailLocation.domain = domain">{{ domain.domain }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="margin-bottom: 10px;">
|
||||
<div ng-show="mailLocation.busy" class="progress progress-striped active animateMe">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" style="width: {{ mailLocation.percent }}%"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="text-center text-warning text-bold" ng-show="mailLocation.domain.provider === 'manual'" ng-bind-html="'emails.changeDomainDialog.manualInfo' | tr:{ domain: mailLocation.domain.domain }"></p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<p ng-show="mailLocation.busy">{{ mailLocation.message }}</p>
|
||||
<p ng-hide="mailLocation.busy">
|
||||
<div class="has-error" ng-show="!mailLocation.active">{{ mailLocation.errorMessage }}</div>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<!-- save is always enabled so that user can "redo" the task -->
|
||||
<button class="btn btn-outline btn-primary" ng-click="mailLocation.change()" ng-hide="mailLocation.busy">{{ 'main.dialog.save' | tr }}</button>
|
||||
<button class="btn btn-outline btn-danger" ng-click="mailLocation.stop()" ng-show="mailLocation.busy" style="margin-right: 10px">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- settings -->
|
||||
<div class="text-left section-header" ng-show="user.isAtLeastAdmin">
|
||||
<h3>{{ 'emails.settings.title' | tr }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="card" ng-show="user.isAtLeastOwner" style="margin-bottom: 15px;">
|
||||
<div class="card" ng-show="user.isAtLeastAdmin" style="margin-bottom: 15px;">
|
||||
<p ng-bind-html=" 'emails.settings.info' | tr "></p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'emails.settings.location' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ mailLocation.currentLocation.subdomain + (!mailLocation.currentLocation.subdomain ? '' : '.') + mailLocation.currentLocation.domain.domain }}
|
||||
<a ng-hide="mailLocation.busy" href="" ng-click="mailLocation.show()"><i class="fa fa-edit text-small"></i></a> <!-- ng-disabled does not work for links -->
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'emails.settings.maxMailSize' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ maxEmailSize.currentSize | prettyDecimalSize }} <a href="" ng-click="maxEmailSize.show()"><i class="fa fa-edit text-small"></i></a></span>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'emails.settings.virtualAllMail' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ virtualAllMail.enabled ? 'main.statusEnabled' : 'main.statusDisabled' | tr }} <a href="" ng-click="virtualAllMail.show()"><i class="fa fa-edit text-small"></i></a></span>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'emails.settings.acl' | tr }}</span>
|
||||
</div>
|
||||
@@ -341,19 +359,6 @@
|
||||
<a href="" ng-click="solrConfig.show()"><i class="fa fa-edit text-small"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="mailLocation.busy">
|
||||
<div class="col-md-12" style="margin-top: 10px;">
|
||||
{{ 'emails.settings.changeDomainProgress' | tr }}
|
||||
<div style="display: flex; margin: 4px 0;">
|
||||
<div class="progress progress-striped active animateMe" style="flex-grow: 1;">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" style="width: {{ mailLocation.percent }}%"></div>
|
||||
</div>
|
||||
<div ng-show="mailLocation.taskMinutesActive >= 2" class="text-danger hand" style="margin: 0 4px;" ng-click="mailLocation.stopTask()" uib-tooltip="Cancel Task"><i class="fas fa-times"></i></div>
|
||||
</div>
|
||||
<p>{{ mailLocation.message }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
+138
-94
@@ -1,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
/* global $, angular, TASK_TYPES */
|
||||
/* global async */
|
||||
|
||||
angular.module('Application').controller('EmailsController', ['$scope', '$location', '$translate', '$timeout', 'Client', function ($scope, $location, $translate, $timeout, Client) {
|
||||
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastMailManager) $location.path('/'); });
|
||||
@@ -10,39 +11,30 @@ angular.module('Application').controller('EmailsController', ['$scope', '$locati
|
||||
$scope.user = Client.getUserInfo();
|
||||
$scope.domains = [];
|
||||
|
||||
// this is required because we need to rewrite the MAIL_SERVER_NAME env var
|
||||
$scope.reconfigureEmailApps = function () {
|
||||
var installedApps = Client.getInstalledApps();
|
||||
for (var i = 0; i < installedApps.length; i++) {
|
||||
if (!installedApps[i].manifest.addons.email) continue;
|
||||
|
||||
Client.repairApp(installedApps[i].id, { }, function (error) {
|
||||
if (error) console.error(error);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.mailLocation = {
|
||||
busy: false,
|
||||
error: null,
|
||||
percent: 0,
|
||||
message: '',
|
||||
errorMessage: '',
|
||||
|
||||
currentLocation: { domain: null, subdomain: '' },
|
||||
domain: null,
|
||||
subdomain: '',
|
||||
taskId: null,
|
||||
percent: 0,
|
||||
taskMinutesActive: 0,
|
||||
message: '',
|
||||
errorMessage: '',
|
||||
reconfigure: false,
|
||||
tasks: [],
|
||||
|
||||
stopTask: function () {
|
||||
Client.getLatestTaskByType(TASK_TYPES.TASK_CHANGE_MAIL_LOCATION, function (error, task) {
|
||||
refreshTasks: function () {
|
||||
Client.getTasksByType(TASK_TYPES.TASK_CHANGE_MAIL_LOCATION, function (error, tasks) {
|
||||
if (error) return console.error(error);
|
||||
if (!task.id) return;
|
||||
$scope.mailLocation.tasks = tasks.slice(0, 10);
|
||||
if ($scope.mailLocation.tasks.length && $scope.mailLocation.tasks[0].active) $scope.mailLocation.updateStatus();
|
||||
});
|
||||
},
|
||||
|
||||
Client.stopTask(task.id, function (error) {
|
||||
if (error) console.error(error);
|
||||
});
|
||||
stop: function () {
|
||||
Client.stopTask($scope.mailLocation.tasks[0].id, function (error) {
|
||||
if (error) console.error(error);
|
||||
$scope.mailLocation.busy = false;
|
||||
$scope.mailLocation.refreshTasks();
|
||||
});
|
||||
},
|
||||
|
||||
@@ -50,46 +42,26 @@ angular.module('Application').controller('EmailsController', ['$scope', '$locati
|
||||
Client.getMailLocation(function (error, location) {
|
||||
if (error) return console.error('Failed to get max email location', error);
|
||||
|
||||
$scope.mailLocation.currentLocation.subdomain = location.subdomain;
|
||||
$scope.mailLocation.currentLocation.domain = $scope.domains.find(function (d) { return location.domain === d.domain; });
|
||||
$scope.mailLocation.currentLocation.subdomain = $scope.mailLocation.subdomain = location.subdomain;
|
||||
$scope.mailLocation.currentLocation.domain = $scope.mailLocation.domain = $scope.domains.find(function (d) { return location.domain === d.domain; });
|
||||
|
||||
Client.getLatestTaskByType(TASK_TYPES.TASK_CHANGE_MAIL_LOCATION, function (error, task) {
|
||||
if (error) return console.error(error);
|
||||
if (!task) return;
|
||||
|
||||
$scope.mailLocation.taskId = task.id;
|
||||
$scope.mailLocation.reconfigure = task.active; // if task is active when this view reloaded, reconfigure email apps when task done
|
||||
$scope.mailLocation.updateStatus();
|
||||
});
|
||||
$scope.mailLocation.refreshTasks();
|
||||
});
|
||||
},
|
||||
|
||||
show: function () {
|
||||
$scope.mailLocation.busy = false;
|
||||
$scope.mailLocation.error = null;
|
||||
|
||||
$scope.mailLocation.domain = $scope.mailLocation.currentLocation.domain;
|
||||
$scope.mailLocation.subdomain = $scope.mailLocation.currentLocation.subdomain;
|
||||
|
||||
$scope.mailLocationForm.$setUntouched();
|
||||
$scope.mailLocationForm.$setPristine();
|
||||
|
||||
$('#mailLocationModal').modal('show');
|
||||
},
|
||||
|
||||
updateStatus: function () {
|
||||
Client.getTask($scope.mailLocation.taskId, function (error, data) {
|
||||
var taskId = $scope.mailLocation.tasks[0].id;
|
||||
|
||||
Client.getTask(taskId, function (error, data) {
|
||||
if (error) return window.setTimeout($scope.mailLocation.updateStatus, 5000);
|
||||
|
||||
if (!data.active) {
|
||||
$scope.mailLocation.taskId = null;
|
||||
$scope.mailLocation.busy = false;
|
||||
$scope.mailLocation.message = '';
|
||||
$scope.mailLocation.percent = 0;
|
||||
$scope.taskMinutesActive = 0;
|
||||
$scope.mailLocation.percent = 100;
|
||||
$scope.mailLocation.errorMessage = data.success ? '' : data.error.message;
|
||||
|
||||
if ($scope.mailLocation.reconfigure) $scope.reconfigureEmailApps();
|
||||
$scope.mailLocation.refreshTasks(); // update the tasks list dropdown
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -97,32 +69,26 @@ angular.module('Application').controller('EmailsController', ['$scope', '$locati
|
||||
$scope.mailLocation.busy = true;
|
||||
$scope.mailLocation.percent = data.percent;
|
||||
$scope.mailLocation.message = data.message;
|
||||
$scope.mailLocation.taskMinutesActive = moment().diff(moment(data.creationTime), 'minutes');
|
||||
|
||||
window.setTimeout($scope.mailLocation.updateStatus, 1000);
|
||||
});
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
change: function () {
|
||||
$scope.mailLocation.busy = true;
|
||||
$scope.mailLocation.percent = 0;
|
||||
$scope.mailLocation.message = '';
|
||||
$scope.mailLocation.errorMessage = '';
|
||||
|
||||
Client.setMailLocation($scope.mailLocation.subdomain, $scope.mailLocation.domain.domain, function (error, result) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
$scope.mailLocation.errorMessage = error.message;
|
||||
$scope.mailLocation.busy = false;
|
||||
$scope.mailLocation.error = error;
|
||||
return;
|
||||
} else {
|
||||
$scope.mailLocation.refreshTasks();
|
||||
}
|
||||
|
||||
// update UI immediately
|
||||
$scope.mailLocation.currentLocation = { subdomain: $scope.mailLocation.subdomain, domain: $scope.mailLocation.domain };
|
||||
|
||||
$scope.mailLocation.taskId = result.taskId;
|
||||
$scope.mailLocation.reconfigure = true; // reconfigure email apps when task done
|
||||
$scope.mailLocation.updateStatus();
|
||||
|
||||
Client.refreshConfig(); // update config.mailFqdn
|
||||
|
||||
$('#mailLocationModal').modal('hide');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -168,6 +134,41 @@ angular.module('Application').controller('EmailsController', ['$scope', '$locati
|
||||
}
|
||||
};
|
||||
|
||||
$scope.virtualAllMail = {
|
||||
busy: false,
|
||||
error: null,
|
||||
enabled: false,
|
||||
|
||||
refresh: function () {
|
||||
Client.getVirtualAllMail(function (error, enabled) {
|
||||
if (error) return console.error('Failed to get max email size', error);
|
||||
|
||||
$scope.virtualAllMail.enabled = enabled;
|
||||
});
|
||||
},
|
||||
|
||||
show: function() {
|
||||
$scope.virtualAllMail.busy = false;
|
||||
$scope.virtualAllMail.error = null;
|
||||
|
||||
$('#virtualAllMailChangeModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function (enable) {
|
||||
$scope.virtualAllMail.busy = true;
|
||||
|
||||
Client.setVirtualAllMail(enable, function (error) {
|
||||
$scope.virtualAllMail.busy = false;
|
||||
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.virtualAllMail.enabled = enable;
|
||||
|
||||
$('#virtualAllMailChangeModal').modal('hide');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.mailboxSharing = {
|
||||
busy: false,
|
||||
error: null,
|
||||
@@ -404,43 +405,83 @@ angular.module('Application').controller('EmailsController', ['$scope', '$locati
|
||||
}
|
||||
};
|
||||
|
||||
function refreshDomainStatuses() {
|
||||
$scope.domains.forEach(function (domain) {
|
||||
domain.usage = null; // used by ui to show 'loading'
|
||||
function refreshMailStatus(domain, done) {
|
||||
Client.getMailStatusForDomain(domain.domain, function (error, result) {
|
||||
if (error) {
|
||||
console.error('Failed to fetch mail status for domain', domain.domain, error);
|
||||
return done();
|
||||
}
|
||||
|
||||
Client.getMailStatusForDomain(domain.domain, function (error, result) {
|
||||
if (error) return console.error('Failed to fetch mail status for domain', domain.domain, error);
|
||||
domain.status = result;
|
||||
|
||||
domain.status = result;
|
||||
domain.statusOk = Object.keys(result).every(function (k) {
|
||||
if (k === 'dns') return Object.keys(result.dns).every(function (k) { return result.dns[k].status; });
|
||||
|
||||
domain.statusOk = Object.keys(result).every(function (k) {
|
||||
if (k === 'dns') return Object.keys(result.dns).every(function (k) { return result.dns[k].status; });
|
||||
if (!('status' in result[k])) return true; // if status is not present, the test was not run
|
||||
|
||||
if (!('status' in result[k])) return true; // if status is not present, the test was not run
|
||||
|
||||
return result[k].status;
|
||||
});
|
||||
return result[k].status;
|
||||
});
|
||||
|
||||
Client.getMailConfigForDomain(domain.domain, function (error, mailConfig) {
|
||||
if (error) return console.error('Failed to fetch mail config for domain', domain.domain, error);
|
||||
done();
|
||||
});
|
||||
}
|
||||
|
||||
domain.inbound = mailConfig.enabled;
|
||||
domain.outbound = mailConfig.relay.provider !== 'noop';
|
||||
function refreshMailConfig(domain, done) {
|
||||
Client.getMailConfigForDomain(domain.domain, function (error, mailConfig) {
|
||||
if (error) {
|
||||
console.error('Failed to fetch mail config for domain', domain.domain, error);
|
||||
return done();
|
||||
}
|
||||
|
||||
// do this even if no outbound since people forget to remove mailboxes
|
||||
Client.getMailboxCount(domain.domain, function (error, count) {
|
||||
if (error) return console.error('Failed to fetch mailboxes for domain', domain.domain, error);
|
||||
domain.inbound = mailConfig.enabled;
|
||||
domain.outbound = mailConfig.relay.provider !== 'noop';
|
||||
|
||||
domain.mailboxCount = count;
|
||||
// do this even if no outbound since people forget to remove mailboxes
|
||||
Client.getMailboxCount(domain.domain, function (error, count) {
|
||||
if (error) {
|
||||
console.error('Failed to fetch mailboxes for domain', domain.domain, error);
|
||||
return done();
|
||||
}
|
||||
|
||||
Client.getMailUsage(domain.domain, function (error, usage) {
|
||||
if (error) return console.error('Failed to fetch usage for domain', domain.domain, error);
|
||||
domain.mailboxCount = count;
|
||||
|
||||
domain.usage = 0;
|
||||
// quotaValue can be missing for deleted mailboxes that are on disk but removed from dovecot/ldap itself
|
||||
Object.keys(usage).forEach(function (m) { domain.usage += (usage[m].quotaValue || usage[m].diskSize); });
|
||||
});
|
||||
done();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function refreshMailUsage(domain, done) {
|
||||
Client.getMailUsage(domain.domain, function (error, usage) {
|
||||
if (error) {
|
||||
console.error('Failed to fetch usage for domain', domain.domain, error);
|
||||
return done();
|
||||
}
|
||||
|
||||
domain.usage = 0;
|
||||
// we used to use quotaValue here but it's quite different wrt diskSize. so choose diskSize consistently
|
||||
// also, quotaValue can be missing for deleted mailboxes that are on disk but removed from dovecot/ldap itself
|
||||
Object.keys(usage).forEach(function (m) { domain.usage += usage[m].diskSize; });
|
||||
|
||||
done();
|
||||
});
|
||||
}
|
||||
|
||||
function refreshDomainStatuses() {
|
||||
async.each($scope.domains, function (domain, iteratorDone) {
|
||||
async.series([
|
||||
refreshMailStatus.bind(null, domain),
|
||||
refreshMailConfig.bind(null, domain),
|
||||
], function () {
|
||||
domain.loading = false;
|
||||
iteratorDone();
|
||||
});
|
||||
}, function () {
|
||||
// mail usage is loaded separately with a cancellation check. when there are a lot of domains, it runs a long time in background and slows down loading of new views
|
||||
async.eachLimit($scope.domains, 5, function (domain, itemDone) {
|
||||
if ($scope.$$destroyed) return itemDone(); // abort!
|
||||
refreshMailUsage(domain, function () {
|
||||
domain.loadingUsage = false;
|
||||
itemDone();
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -450,12 +491,15 @@ angular.module('Application').controller('EmailsController', ['$scope', '$locati
|
||||
Client.getDomains(function (error, domains) {
|
||||
if (error) return console.error('Unable to get domain listing.', error);
|
||||
|
||||
domains.forEach(function (domain) { domain.loading = true; domain.loadingUsage = true; }); // used by ui to show 'loading'
|
||||
$scope.domains = domains;
|
||||
|
||||
$scope.ready = true;
|
||||
|
||||
if ($scope.user.isAtLeastOwner) {
|
||||
if ($scope.user.isAtLeastAdmin) {
|
||||
$scope.mailLocation.refresh();
|
||||
$scope.maxEmailSize.refresh();
|
||||
$scope.virtualAllMail.refresh();
|
||||
$scope.mailboxSharing.refresh();
|
||||
$scope.spamConfig.refresh();
|
||||
$scope.solrConfig.refresh();
|
||||
|
||||
@@ -32,7 +32,6 @@ angular.module('Application').controller('EventLogController', ['$scope', '$loca
|
||||
{ name: 'app.start', value: 'app.start' },
|
||||
{ name: 'app.stop', value: 'app.stop' },
|
||||
{ name: 'app.restart', value: 'app.restart' },
|
||||
{ name: 'Apptask Crash', value: 'app.task.crash' },
|
||||
{ name: 'backup.cleanup', value: 'backup.cleanup.start' },
|
||||
{ name: 'backup.cleanup.finish', value: 'backup.cleanup.finish' },
|
||||
{ name: 'backup.finish', value: 'backup.finish' },
|
||||
@@ -47,10 +46,12 @@ angular.module('Application').controller('EventLogController', ['$scope', '$loca
|
||||
{ name: 'cloudron.update', value: 'cloudron.update' },
|
||||
{ name: 'cloudron.update.finish', value: 'cloudron.update.finish' },
|
||||
{ name: 'dashboard.domain.update', value: 'dashboard.domain.update' },
|
||||
{ name: 'directoryserver.configure', value: 'directoryserver.configure' },
|
||||
{ name: 'dyndns.update', value: 'dyndns.update' },
|
||||
{ name: 'domain.add', value: 'domain.add' },
|
||||
{ name: 'domain.update', value: 'domain.update' },
|
||||
{ name: 'domain.remove', value: 'domain.remove' },
|
||||
{ name: 'externalldap.configure', value: 'externalldap.configure' },
|
||||
{ name: 'mail.location', value: 'mail.location' },
|
||||
{ name: 'mail.enabled', value: 'mail.enabled' },
|
||||
{ name: 'mail.box.add', value: 'mail.box.add' },
|
||||
@@ -74,7 +75,6 @@ angular.module('Application').controller('EventLogController', ['$scope', '$loca
|
||||
{ name: 'volume.add', value: 'volume.add' },
|
||||
{ name: 'volume.update', value: 'volume.update' },
|
||||
{ name: 'volume.remove', value: 'volume.update' },
|
||||
{ name: 'System Crash', value: 'system.crash' }
|
||||
];
|
||||
|
||||
$scope.pageItemCount = [
|
||||
|
||||
@@ -65,7 +65,33 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="blocklist.submit()"><i class="fa fa-circle-notch fa-spin" ng-show="blocklist.busy"></i> {{ 'main.dialog.save' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-disabled="blocklist.busy" ng-click="blocklist.submit()"><i class="fa fa-circle-notch fa-spin" ng-show="blocklist.busy"></i> {{ 'main.dialog.save' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Trusted IPs -->
|
||||
<div class="modal fade" id="trustedIpsModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'network.trustedIps.title' | tr }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form name="trustedIpsChangeForm" role="form" novalidate ng-submit="trustedIps.submit()" autocomplete="off">
|
||||
<div class="form-group">
|
||||
<label class="control-label">{{ 'network.trustedIpRanges' | tr }}</label>
|
||||
<p class="small">{{ 'network.trustedIps.description' | tr }}</p>
|
||||
<div class="has-error" ng-show="trustedIps.error.trustedIps">{{ trustedIps.error.trustedIps }}</div>
|
||||
<textarea ng-model="trustedIps.trustedIps" placeholder="{{ 'network.firewall.configure.blocklistPlaceholder' | tr }}" name="trustedIps" class="form-control" ng-class="{ 'has-error': !trustedIpsChangeForm.trustedIps.$dirty && trustedIps.error.trustedIps }" rows="4"></textarea>
|
||||
</div>
|
||||
<input class="ng-hide" type="submit"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-disabled="trustedIps.busy" ng-click="trustedIps.submit()"><i class="fa fa-circle-notch fa-spin" ng-show="trustedIps.busy"></i> {{ 'main.dialog.save' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -173,12 +199,63 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- IPv6 -->
|
||||
<div class="text-left section-header">
|
||||
<h3>{{ 'network.ipv6.title' | tr }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
{{ 'network.ipv6.description' | tr }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
<span class="text-muted">{{ 'network.ip.provider' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-10 text-right">
|
||||
<span>{{ prettyIpProviderName(ipv6Configure.provider) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="ipv6Configure.provider !== 'noop'">
|
||||
<div class="col-xs-2">
|
||||
<span class="text-muted">{{ 'network.ip.address' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-10 text-right">
|
||||
<span ng-show="ipv6Configure.ipv6">{{ ipv6Configure.ipv6 }}</span>
|
||||
<span ng-show="!ipv6Configure.ipv6 && ipv6Configure.serverIPv6">{{ ipv6Configure.serverIPv6 }} ({{ 'network.ip.detected' | tr }})</span>
|
||||
<span ng-show="ipv6Configure.displayError" class="text-danger">{{ ipv6Configure.displayError }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="ipv6Configure.ifname">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'network.ip.interface' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ ipv6Configure.ifname }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-6 text-right">
|
||||
<button class="btn btn-outline btn-primary pull-right" ng-click="ipv6Configure.show()">{{ 'network.ip.configure' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Firewall -->
|
||||
<div class="text-left" ng-show="user.isAtLeastOwner">
|
||||
<div class="text-left section-header">
|
||||
<h3>{{ 'network.firewall.title' | tr }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="card" ng-show="user.isAtLeastOwner">
|
||||
<div class="card">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'network.firewall.blockedIpRanges' | tr }}</span>
|
||||
@@ -187,61 +264,34 @@
|
||||
<span>{{ 'network.firewall.blocklist' | tr:{ blockCount: blocklist.currentBlocklistLength } }} <a href="" ng-click="blocklist.show()"><i class="fa fa-edit text-small"></i></a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- IPv6 -->
|
||||
<div class="text-left">
|
||||
<h3>{{ 'network.ipv6.title' | tr }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
{{ 'network.ipv6.description' | tr }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
<span class="text-muted">{{ 'network.ip.provider' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-10 text-right">
|
||||
<span>{{ prettyIpProviderName(ipv6Configure.provider) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="ipv6Configure.provider !== 'noop'">
|
||||
<div class="col-xs-2">
|
||||
<span class="text-muted">{{ 'network.ip.address' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-10 text-right">
|
||||
<span ng-show="ipv6Configure.ipv6">{{ ipv6Configure.ipv6 }}</span>
|
||||
<span ng-show="!ipv6Configure.ipv6 && ipv6Configure.serverIPv6">{{ ipv6Configure.serverIPv6 }} ({{ 'network.ip.detected' | tr }})</span>
|
||||
<span ng-show="ipv6Configure.displayError" class="text-danger">{{ ipv6Configure.displayError }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="ipv6Configure.ifname">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'network.ip.interface' | tr }}</span>
|
||||
<span class="text-muted">{{ 'network.trustedIpRanges' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ ipv6Configure.ifname }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-6 text-right">
|
||||
<button class="btn btn-outline btn-primary pull-right" ng-click="ipv6Configure.show()">{{ 'network.ip.configure' | tr }}</button>
|
||||
<span>{{ 'network.trustedIps.summary' | tr:{ trustCount: trustedIps.currentTrustedIpsLength } }} <a href="" ng-click="trustedIps.show()"><i class="fa fa-edit text-small"></i></a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left">
|
||||
<h3>{{ 'network.dyndns.title' | tr }}</h3>
|
||||
<!-- Dynamic DNS -->
|
||||
<div class="text-left section-header">
|
||||
<h3>
|
||||
{{ 'network.dyndns.title' | tr }}
|
||||
<div class="btn-group btn-group-sm pull-right">
|
||||
<button type="button" class="btn btn-small btn-default dropdown-toggle" ng-show="dyndnsConfigure.tasks.length" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" uib-tooltip="{{ 'network.dyndns.showLogsAction' | tr }}">
|
||||
<i class="fas fa-align-left"></i> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li ng-repeat="task in dyndnsConfigure.tasks">
|
||||
<a ng-href="/frontend/logs.html?taskId={{task.id}}" target="_blank" class="text-right">
|
||||
{{ task.ts | prettyLongDate }} <i class="fa" style="margin-left: 20px" ng-class="{ 'status-active fa-check-circle': !task.active && task.success, 'fa-circle-notch fa-spin': task.active, 'status-error fa-times-circle': !task.active && !task.success }"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
/* global angular */
|
||||
/* global $ */
|
||||
/* global $, TASK_TYPES */
|
||||
|
||||
angular.module('Application').controller('NetworkController', ['$scope', '$location', 'Client', function ($scope, $location, Client) {
|
||||
angular.module('Application').controller('NetworkController', ['$scope', '$location', '$timeout', 'Client', function ($scope, $location, $timeout, Client) {
|
||||
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastAdmin) $location.path('/'); });
|
||||
|
||||
$scope.user = Client.getUserInfo();
|
||||
@@ -37,12 +37,25 @@ angular.module('Application').controller('NetworkController', ['$scope', '$locat
|
||||
busy: false,
|
||||
error: '',
|
||||
isEnabled: false,
|
||||
tasks: [],
|
||||
|
||||
refreshTasks: function () {
|
||||
Client.getTasksByType(TASK_TYPES.TASK_SYNC_DYNDNS, function (error, tasks) {
|
||||
if (error) return console.error(error);
|
||||
$scope.dyndnsConfigure.tasks = tasks.slice(0, 10);
|
||||
if ($scope.dyndnsConfigure.tasks.length && $scope.dyndnsConfigure.tasks[0].active) {
|
||||
$timeout($scope.renewCerts.refreshTasks, 5000);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
refresh: function () {
|
||||
Client.getDynamicDnsConfig(function (error, enabled) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.dyndnsConfigure.isEnabled = enabled;
|
||||
|
||||
$scope.dyndnsConfigure.refreshTasks();
|
||||
});
|
||||
},
|
||||
|
||||
@@ -83,7 +96,7 @@ angular.module('Application').controller('NetworkController', ['$scope', '$locat
|
||||
}
|
||||
|
||||
$scope.ipv6Configure.provider = result.provider;
|
||||
$scope.ipv6Configure.ipv6 = result.ipv6 || '';
|
||||
$scope.ipv6Configure.ipv6 = result.ip || '';
|
||||
$scope.ipv6Configure.ifname = result.ifname || '';
|
||||
if (result.provider === 'noop') return;
|
||||
|
||||
@@ -93,7 +106,7 @@ angular.module('Application').controller('NetworkController', ['$scope', '$locat
|
||||
return console.error(error);
|
||||
}
|
||||
|
||||
$scope.ipv6Configure.serverIPv6 = result.ipv6;
|
||||
$scope.ipv6Configure.serverIPv6 = result.ip;
|
||||
});
|
||||
});
|
||||
},
|
||||
@@ -116,7 +129,7 @@ angular.module('Application').controller('NetworkController', ['$scope', '$locat
|
||||
};
|
||||
|
||||
if (config.provider === 'fixed') {
|
||||
config.ipv6 = $scope.ipv6Configure.newIPv6;
|
||||
config.ip = $scope.ipv6Configure.newIPv6;
|
||||
} else if (config.provider === 'network-interface') {
|
||||
config.ifname = $scope.ipv6Configure.newIfname;
|
||||
}
|
||||
@@ -192,6 +205,50 @@ angular.module('Application').controller('NetworkController', ['$scope', '$locat
|
||||
}
|
||||
};
|
||||
|
||||
$scope.trustedIps = {
|
||||
busy: false,
|
||||
error: {},
|
||||
trustedIps: '',
|
||||
currentTrustedIps: '',
|
||||
currentTrustedIpsLength: 0,
|
||||
|
||||
refresh: function () {
|
||||
Client.getTrustedIps(function (error, result) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.trustedIps.currentTrustedIps = result;
|
||||
$scope.trustedIps.currentTrustedIpsLength = result.split('\n').filter(function (l) { return l.length !== 0 && l[0] !== '#'; }).length;
|
||||
});
|
||||
},
|
||||
|
||||
show: function () {
|
||||
$scope.trustedIps.error = {};
|
||||
$scope.trustedIps.trustedIps = $scope.trustedIps.currentTrustedIps;
|
||||
|
||||
$('#trustedIpsModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.trustedIps.error = {};
|
||||
$scope.trustedIps.busy = true;
|
||||
|
||||
Client.setTrustedIps($scope.trustedIps.trustedIps, function (error) {
|
||||
$scope.trustedIps.busy = false;
|
||||
if (error) {
|
||||
$scope.trustedIps.error.trustedIps = error.message;
|
||||
$scope.trustedIps.error.ip = error.message;
|
||||
$scope.trustedIpsChangeForm.$setPristine();
|
||||
$scope.trustedIpsChangeForm.$setUntouched();
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.trustedIps.refresh();
|
||||
|
||||
$('#trustedIpsModal').modal('hide');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.sysinfo = {
|
||||
busy: false,
|
||||
error: {},
|
||||
@@ -208,17 +265,17 @@ angular.module('Application').controller('NetworkController', ['$scope', '$locat
|
||||
newIfname: '',
|
||||
|
||||
refresh: function () {
|
||||
Client.getSysinfoConfig(function (error, result) {
|
||||
Client.getIPv4Config(function (error, result) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.sysinfo.provider = result.provider;
|
||||
$scope.sysinfo.ipv4 = result.ipv4 || '';
|
||||
$scope.sysinfo.ipv4 = result.ip || '';
|
||||
$scope.sysinfo.ifname = result.ifname || '';
|
||||
|
||||
Client.getServerIpv4(function (error, result) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.sysinfo.serverIPv4 = result.ipv4;
|
||||
$scope.sysinfo.serverIPv4 = result.ip;
|
||||
});
|
||||
});
|
||||
},
|
||||
@@ -241,12 +298,12 @@ angular.module('Application').controller('NetworkController', ['$scope', '$locat
|
||||
};
|
||||
|
||||
if (config.provider === 'fixed') {
|
||||
config.ipv4 = $scope.sysinfo.newIPv4;
|
||||
config.ip = $scope.sysinfo.newIPv4;
|
||||
} else if (config.provider === 'network-interface') {
|
||||
config.ifname = $scope.sysinfo.newIfname;
|
||||
}
|
||||
|
||||
Client.setSysinfoConfig(config, function (error) {
|
||||
Client.setIPv4Config(config, function (error) {
|
||||
$scope.sysinfo.busy = false;
|
||||
if (error && error.message.indexOf('ipv') !== -1) {
|
||||
$scope.sysinfo.error.ipv4 = error.message;
|
||||
@@ -276,6 +333,7 @@ angular.module('Application').controller('NetworkController', ['$scope', '$locat
|
||||
|
||||
$scope.dyndnsConfigure.refresh();
|
||||
$scope.ipv6Configure.refresh();
|
||||
$scope.trustedIps.refresh();
|
||||
if ($scope.user.isAtLeastOwner) $scope.blocklist.refresh();
|
||||
});
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card notification-item" ng-repeat="notification in notifications" ng-class="{'notification-unread': !notification.acknowledged }" ng-click="notification.isCollapsed = !notification.isCollapsed">
|
||||
<div class="card notification-item" ng-repeat="notification in notifications" ng-class="{'notification-unread': !notification.acknowledged }" ng-click="notification.isCollapsed = !notification.isCollapsed" ng-style="{ borderLeftColor: (notification | notificationTypeToColor) }">
|
||||
<div class="row">
|
||||
<div class="col-xs-12" ng-class="{ 'notification-details': notification.detailsShown }">
|
||||
<span class="notification-title">{{ notification.title }}</span> <small class="text-muted" uib-tooltip="{{ notification.creationTime | prettyLongDate }}">{{ notification.creationTime | prettyDate }}</small>
|
||||
|
||||
@@ -1,191 +0,0 @@
|
||||
|
||||
<!-- Modal client add -->
|
||||
<div class="modal fade" id="clientAddModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Add client</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Add new OpenID connect client settings.
|
||||
<br/>
|
||||
<br/>
|
||||
<form name="clientAddForm" role="form" novalidate ng-submit="clientAdd.submit()" autocomplete="off">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="clientName">Name</label>
|
||||
<input type="text" id="clientName" class="form-control" name="clientName" ng-model="clientAdd.name" autofocus required/>
|
||||
</div>
|
||||
<div class="form-group" ng-class="{ 'has-error': clientAdd.error.id }">
|
||||
<label class="control-label" for="clientId">Client ID</label>
|
||||
<input type="text" id="clientId" class="form-control" name="clientId" ng-model="clientAdd.id" required/>
|
||||
<div class="control-label" ng-show="clientAdd.error.id">
|
||||
<small>{{ clientAdd.error.id }}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="clientSecret">Client Secret</label>
|
||||
<input type="text" id="clientSecret" class="form-control" name="clientSecret" ng-model="clientAdd.secret" required/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="loginRedirectUri">Login callback Url</label>
|
||||
<input type="url" id="loginRedirectUri" class="form-control" name="loginRedirectUri" ng-model="clientAdd.loginRedirectUri" required/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="logoutRedirectUri">Logout callback Url (optional)</label>
|
||||
<input type="url" id="logoutRedirectUri" class="form-control" name="logoutRedirectUri" ng-model="clientAdd.logoutRedirectUri"/>
|
||||
</div>
|
||||
<input class="ng-hide" type="submit" ng-disabled="clientAddForm.$invalid"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.close' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="clientAdd.submit()" ng-disabled="clientAddForm.$invalid || clientAdd.busy">
|
||||
<i class="fa fa-circle-notch fa-spin" ng-show="clientAdd.busy"></i> Create
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal client edit -->
|
||||
<div class="modal fade" id="clientEditModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Edit client {{ clientEdit.id }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form name="clientEditForm" role="form" novalidate ng-submit="clientEdit.submit()" autocomplete="off">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="inputEditClientName">Name</label>
|
||||
<input type="text" id="inputEditClientName" class="form-control" name="clientName" ng-model="clientEdit.name" autofocus required/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="inputEditClientSecret">Client Secret</label>
|
||||
<input type="text" id="inputEditClientSecret" class="form-control" name="clientSecret" ng-model="clientEdit.secret" required/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="inputEditLoginRedirectUri">Login callback Url</label>
|
||||
<input type="url" id="inputEditLoginRedirectUri" class="form-control" name="loginRedirectUri" ng-model="clientEdit.loginRedirectUri" required/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="inputEditLogoutRedirectUri">Logout callback Url (optional)</label>
|
||||
<input type="url" id="inputEditLogoutRedirectUri" class="form-control" name="logoutRedirectUri" ng-model="clientEdit.logoutRedirectUri"/>
|
||||
</div>
|
||||
<input class="ng-hide" type="submit" ng-disabled="clientEditForm.$invalid"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.close' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="clientEdit.submit()" ng-disabled="clientEditForm.$invalid || clientEdit.busy">
|
||||
<i class="fa fa-circle-notch fa-spin" ng-show="clientEdit.busy"></i> {{ 'main.dialog.save' | tr }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal client delete -->
|
||||
<div class="modal fade" id="clientDeleteModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Really delete client {{ deleteClient.id }}?</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>This will disconnect all external OpenID apps from this Cloudron using this client ID.</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-danger" ng-click="deleteClient.submit()" ng-disabled="deleteClient.busy"><i class="fa fa-circle-notch fa-spin" ng-show="deleteClient.busy"></i> Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<div class="text-left">
|
||||
<h1>OpenID Connect Provider (beta)</h1>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="grid-item-top">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td class="text-muted" style="vertical-align: top;">Discovery URL</td>
|
||||
<td class="text-right" style="vertical-align: top;">https://{{ config.adminDomain }}/.well-known/openid-configuration</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-muted" style="vertical-align: top;">Auth Endpoint</td>
|
||||
<td class="text-right" style="vertical-align: top;">https://{{ config.adminFqdn }}/openid/auth</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-muted" style="vertical-align: top;">Token Endpoint</td>
|
||||
<td class="text-right" style="vertical-align: top;">https://{{ config.adminFqdn }}/openid/token</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-muted" style="vertical-align: top;">Keys Endpoint</td>
|
||||
<td class="text-right" style="vertical-align: top;">https://{{ config.adminFqdn }}/openid/jwks</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-muted" style="vertical-align: top;">Profile Endpoint</td>
|
||||
<td class="text-right" style="vertical-align: top;">https://{{ config.adminFqdn }}/openid/me</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-muted" style="vertical-align: top;">Logout URL</td>
|
||||
<td class="text-right" style="vertical-align: top;">https://{{ config.adminFqdn }}/openid/session/end</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="text-left">
|
||||
<h3>Clients <button class="btn btn-primary btn-sm pull-right" ng-click="clientAdd.show()"><i class="fa fa-plus"></i> New client</button></h3>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="grid-item-top">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 33%">Name</th>
|
||||
<th style="width: 33%">Client ID</th>
|
||||
<th style="width: 33%">Client Secret</th>
|
||||
<th style="width: 10%" class="text-right">{{ 'main.actions' | tr }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-show="clients.length === 0">
|
||||
<td colspan="3" class="text-center">No clients yet</td>
|
||||
</tr>
|
||||
<tr ng-repeat="client in clients">
|
||||
<td class="text-left elide-table-cell hand" ng-click="clientEdit.show(client)">
|
||||
{{ client.name }}
|
||||
</td>
|
||||
<td class="text-left elide-table-cell hand" ng-click="clientEdit.show(client)">
|
||||
{{ client.id }}
|
||||
</td>
|
||||
<td class="text-left elide-table-cell hand" ng-click="clientEdit.show(client)">
|
||||
{{ client.secret }}
|
||||
</td>
|
||||
<td class="text-right no-wrap" style="vertical-align: bottom">
|
||||
<button class="btn btn-xs btn-danger" ng-click="deleteClient.show(client)" uib-tooltip="Delete"><i class="far fa-trash-alt"></i></button>
|
||||
<button class="btn btn-xs btn-default" ng-click="clientEdit.show(client)" uib-tooltip="Edit"><i class="far fa fa-pencil-alt"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,149 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/* global angular */
|
||||
/* global $ */
|
||||
|
||||
angular.module('Application').controller('OidcController', ['$scope', '$location', 'Client', function ($scope, $location, Client) {
|
||||
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastAdmin) $location.path('/'); });
|
||||
|
||||
$scope.user = Client.getUserInfo();
|
||||
$scope.config = Client.getConfig();
|
||||
$scope.clients = [];
|
||||
|
||||
$scope.refreshClients = function () {
|
||||
Client.getOidcClients(function (error, result) {
|
||||
if (error) return console.error('Failed to load oidc clients', error);
|
||||
|
||||
$scope.clients = result;
|
||||
});
|
||||
};
|
||||
|
||||
$scope.clientAdd = {
|
||||
busy: false,
|
||||
error: {},
|
||||
id: '',
|
||||
name: '',
|
||||
secret: '',
|
||||
loginRedirectUri: '',
|
||||
logoutRedirectUri: '',
|
||||
|
||||
show: function () {
|
||||
$scope.clientAdd.id = '';
|
||||
$scope.clientAdd.secret = '';
|
||||
$scope.clientAdd.name = '';
|
||||
$scope.clientAdd.loginRedirectUri = '';
|
||||
$scope.clientAdd.logoutRedirectUri = '';
|
||||
$scope.clientAdd.busy = false;
|
||||
$scope.clientAdd.error = null;
|
||||
$scope.clientAddForm.$setPristine();
|
||||
|
||||
$('#clientAddModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.clientAdd.busy = true;
|
||||
$scope.clientAdd.error = {};
|
||||
|
||||
Client.addOidcClient($scope.clientAdd.id, $scope.clientAdd.name, $scope.clientAdd.secret, $scope.clientAdd.loginRedirectUri, $scope.clientAdd.logoutRedirectUri, function (error) {
|
||||
if (error) {
|
||||
if (error.statusCode === 409) {
|
||||
$scope.clientAdd.error.id = 'Client ID already exists';
|
||||
$('#clientId').focus();
|
||||
} else {
|
||||
console.error('Unable to add openid client.', error);
|
||||
}
|
||||
|
||||
$scope.clientAdd.busy = false;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.refreshClients();
|
||||
$scope.clientAdd.busy = false;
|
||||
|
||||
$('#clientAddModal').modal('hide');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.clientEdit = {
|
||||
busy: false,
|
||||
error: {},
|
||||
id: '',
|
||||
name: '',
|
||||
secret: '',
|
||||
loginRedirectUri: '',
|
||||
logoutRedirectUri: '',
|
||||
|
||||
show: function (client) {
|
||||
$scope.clientEdit.id = client.id;
|
||||
$scope.clientEdit.name = client.name;
|
||||
$scope.clientEdit.secret = client.secret;
|
||||
$scope.clientEdit.loginRedirectUri = client.loginRedirectUri;
|
||||
$scope.clientEdit.logoutRedirectUri = client.logoutRedirectUri;
|
||||
$scope.clientEdit.busy = false;
|
||||
$scope.clientEdit.error = null;
|
||||
$scope.clientEditForm.$setPristine();
|
||||
|
||||
$('#clientEditModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.clientEdit.busy = true;
|
||||
$scope.clientEdit.error = {};
|
||||
|
||||
Client.updateOidcClient($scope.clientEdit.id, $scope.clientEdit.name, $scope.clientEdit.secret, $scope.clientEdit.loginRedirectUri, $scope.clientEdit.logoutRedirectUri, function (error) {
|
||||
if (error) {
|
||||
console.error('Unable to edit openid client.', error);
|
||||
|
||||
$scope.clientEdit.busy = false;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.refreshClients();
|
||||
$scope.clientEdit.busy = false;
|
||||
|
||||
$('#clientEditModal').modal('hide');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.deleteClient = {
|
||||
busy: false,
|
||||
error: {},
|
||||
id: '',
|
||||
|
||||
show: function (client) {
|
||||
$scope.deleteClient.busy = false;
|
||||
$scope.deleteClient.id = client.id;
|
||||
|
||||
$('#clientDeleteModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
Client.delOidcClient($scope.deleteClient.id, function (error) {
|
||||
$scope.deleteClient.busy = false;
|
||||
|
||||
if (error) return console.error('Failed to delete openid client', error);
|
||||
|
||||
$scope.refreshClients();
|
||||
|
||||
$('#clientDeleteModal').modal('hide');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Client.onReady(function () {
|
||||
$scope.refreshClients();
|
||||
});
|
||||
|
||||
// setup all the dialog focus handling
|
||||
['clientAddModal', 'clientEditmodal'].forEach(function (id) {
|
||||
$('#' + id).on('shown.bs.modal', function () {
|
||||
$(this).find('[autofocus]:first').focus();
|
||||
});
|
||||
});
|
||||
|
||||
$('.modal-backdrop').remove();
|
||||
}]);
|
||||
@@ -115,13 +115,21 @@
|
||||
<h4 class="modal-title">{{ 'profile.changeEmail.title' | tr }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form name="emailChangeForm" role="form" novalidate ng-submit="emailchange.submit()" autocomplete="off">
|
||||
<div class="form-group" ng-class="{ 'has-error': (emailChangeForm.email.$dirty && emailChangeForm.email.$invalid) || (!emailChangeForm.email.$dirty && emailchange.error.email)}">
|
||||
<input type="email" class="form-control" ng-model="emailchange.email" id="inputEmailChangeEmail" name="email" required autofocus>
|
||||
<div class="control-label" ng-show="(!emailChangeForm.email.$dirty && emailchange.error.email) || (emailChangeForm.email.$dirty && emailChangeForm.email.$invalid)">
|
||||
<form name="emailChangeForm" role="form" novalidate ng-submit="emailChange.submit()" autocomplete="off">
|
||||
<div class="form-group" ng-class="{ 'has-error': (emailChangeForm.email.$dirty && emailChangeForm.email.$invalid) || (!emailChangeForm.email.$dirty && emailChange.error.email)}">
|
||||
<label class="control-label" for="inputEmailChangeEmail">{{ 'profile.changeEmail.email' | tr }}</label>
|
||||
<input type="email" class="form-control" ng-model="emailChange.email" id="inputEmailChangeEmail" name="email" required autofocus>
|
||||
<div class="control-label" ng-show="(!emailChangeForm.email.$dirty && emailChange.error.email) || (emailChangeForm.email.$dirty && emailChangeForm.email.$invalid)">
|
||||
<small ng-show="emailChangeForm.email.$error.required">{{ 'profile.changeEmail.errorEmailRequired' | tr }}</small>
|
||||
<small ng-show="(emailChangeForm.email.$dirty && emailChangeForm.email.$invalid) && !emailChangeForm.email.$error.required">{{ 'profile.changeEmail.errorEmailInvalid' | tr }}</small>
|
||||
<small ng-show="!emailChangeForm.email.$dirty && emailchange.error.email">{{ emailchange.error.email }}</small>
|
||||
<small ng-show="!emailChangeForm.email.$dirty && emailChange.error.email">{{ emailChange.error.email }}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" ng-class="{ 'has-error': (emailChange.error.password && !emailChangeForm.password.$dirty) }">
|
||||
<label class="control-label" for="inputEmailChangePassword">{{ 'profile.changeEmail.password' | tr }}</label>
|
||||
<input type="password" class="form-control" ng-model="emailChange.password" id="inputEmailChangePassword" name="password" required autofocus password-reveal>
|
||||
<div class="control-label" ng-show="emailChange.error.password && !emailChangeForm.password.$dirty">
|
||||
<small ng-show="emailChange.error.password">{{ 'profile.changeEmail.errorWrongPassword' | tr }}</small>
|
||||
</div>
|
||||
</div>
|
||||
<input class="ng-hide" type="submit" ng-disabled="emailChangeForm.$invalid"/>
|
||||
@@ -129,7 +137,7 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="emailchange.submit()" ng-disabled="emailChangeForm.$invalid || emailchange.busy"><i class="fa fa-circle-notch fa-spin" ng-show="emailchange.busy"></i> {{ 'main.dialog.save' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="emailChange.submit()" ng-disabled="emailChangeForm.$invalid || emailChange.busy"><i class="fa fa-circle-notch fa-spin" ng-show="emailChange.busy"></i> {{ 'main.dialog.save' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -408,7 +416,7 @@
|
||||
<tr>
|
||||
<td class="text-muted" style="vertical-align: top;">{{ 'profile.primaryEmail' | tr }}</td>
|
||||
<td class="text-right" style="vertical-align: top; white-space: nowrap;">
|
||||
{{ user.email }} <a href="" ng-click="emailchange.show()" ng-hide="user.source || config.profileLocked"><i class="fa fa-edit text-small"></i></a>
|
||||
{{ user.email }} <a href="" ng-click="emailChange.show()" ng-hide="user.source || config.profileLocked"><i class="fa fa-edit text-small"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -417,7 +425,7 @@
|
||||
{{ user.fallbackEmail }} <a href="" ng-click="fallbackEmailChange.show()" ng-hide="user.source || config.profileLocked"><i class="fa fa-edit text-small"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr ng-hide="user.source">
|
||||
<td colspan="2" class="text-right">
|
||||
<a href="" ng-click="sendPasswordReset()">{{ 'profile.passwordResetAction' | tr }}</a>
|
||||
</td>
|
||||
@@ -437,8 +445,7 @@
|
||||
<br/>
|
||||
<button class="btn btn-default" ng-click="backgroundImageChange.show()">Set Background Image</button>
|
||||
<button class="btn btn-primary pull-right" ng-click="passwordchange.show()" ng-hide="user.source">{{ 'profile.changePasswordAction' | tr }}</button>
|
||||
<button class="btn pull-right" ng-class="user.twoFactorAuthenticationEnabled ? 'btn-danger' : 'btn-success'" ng-click="twoFactorAuthentication.show()">{{ user.twoFactorAuthenticationEnabled ? 'profile.disable2FAAction' : 'profile.enable2FAAction' | tr }}</button>
|
||||
</div>
|
||||
<button class="btn pull-right" uib-tooltip="{{ (user.source && config.external2FA) ? ('profile.enable2FANotAvailable' | tr) : '' }}" ng-disabled="user.source && config.external2FA" ng-class="user.twoFactorAuthenticationEnabled ? 'btn-danger' : 'btn-success'" ng-click="twoFactorAuthentication.show()">{{ user.twoFactorAuthenticationEnabled ? 'profile.disable2FAAction' : 'profile.enable2FAAction' | tr }}</button> </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -541,8 +548,8 @@
|
||||
<div class="grid-item-top">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<p>{{ 'profile.loginTokens.description' | tr:{ webadminTokenCount: tokens.webadminTokens.length, cliTokenCount: cliTokens.length } }}</p>
|
||||
<button class="btn btn-outline btn-danger pull-right" ng-click="logoutFromAll()" ng-disabled="tokens.busy"><i class="fa fa-circle-notch fa-spin" ng-show="tokens.busy"></i> {{ 'profile.loginTokens.logoutAll' | tr }}</button>
|
||||
<p>{{ 'profile.loginTokens.description' | tr:{ webadminTokenCount: tokens.webadminTokens.length, cliTokenCount: tokens.cliTokens.length } }}</p>
|
||||
<button class="btn btn-outline btn-danger pull-right" ng-click="tokens.revokeAllWebAndCliTokens()" ng-disabled="tokens.busy"><i class="fa fa-circle-notch fa-spin" ng-show="tokens.busy"></i> {{ 'profile.loginTokens.logoutAll' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
/* global async, Clipboard */
|
||||
/* global angular */
|
||||
/* global $ */
|
||||
/* global TOKEN_TYPES */
|
||||
|
||||
angular.module('Application').controller('ProfileController', ['$scope', '$translate', '$location', 'Client', '$timeout', function ($scope, $translate, $location, Client, $timeout) {
|
||||
$scope.user = Client.getUserInfo();
|
||||
@@ -14,7 +15,12 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
|
||||
|
||||
$scope.$watch('language', function (newVal, oldVal) {
|
||||
if (newVal === oldVal) return;
|
||||
$translate.use(newVal.id);
|
||||
|
||||
Client.setProfileLanguage(newVal.id, function (error) {
|
||||
if (error) return console.error('Failed to reset password:', error);
|
||||
});
|
||||
|
||||
$translate.use(newVal.id); // this switches the language and saves locally in localStorage['NG_TRANSLATE_LANG_KEY']
|
||||
});
|
||||
|
||||
$scope.sendPasswordReset = function () {
|
||||
@@ -100,7 +106,7 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
|
||||
return;
|
||||
}
|
||||
|
||||
Client.refreshUserInfo();
|
||||
Client.refreshProfile();
|
||||
|
||||
$('#twoFactorAuthenticationEnableModal').modal('hide');
|
||||
});
|
||||
@@ -122,7 +128,7 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
|
||||
return;
|
||||
}
|
||||
|
||||
Client.refreshUserInfo();
|
||||
Client.refreshProfile();
|
||||
|
||||
$('#twoFactorAuthenticationDisableModal').modal('hide');
|
||||
});
|
||||
@@ -179,7 +185,7 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
|
||||
function done(error) {
|
||||
if (error) return console.error('Unable to change avatar.', error);
|
||||
|
||||
Client.refreshUserInfo(function (error) {
|
||||
Client.refreshProfile(function (error) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
$('#avatarChangeModal').modal('hide');
|
||||
@@ -206,15 +212,10 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
|
||||
avatarChangeReset: function () {
|
||||
$scope.avatarChange.error.avatar = null;
|
||||
|
||||
if ($scope.user.avatarUrl.indexOf('/api/v1/profile/avatar') !== -1) {
|
||||
$scope.avatarChange.type = 'custom';
|
||||
} else if ($scope.user.avatarUrl.indexOf('https://www.gravatar.com') === 0) {
|
||||
$scope.avatarChange.type = 'gravatar';
|
||||
} else {
|
||||
$scope.avatarChange.type = '';
|
||||
}
|
||||
|
||||
console.log($scope.user)
|
||||
$scope.avatarChange.type = $scope.user.avatarType;
|
||||
$scope.avatarChange.typeOrig = $scope.avatarChange.type;
|
||||
|
||||
document.getElementById('previewAvatar').src = $scope.avatarChange.type === 'custom' ? $scope.user.avatarUrl : '';
|
||||
$scope.avatarChange.pictureChanged = false;
|
||||
$scope.avatarChange.avatar = null;
|
||||
@@ -353,42 +354,44 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
|
||||
}
|
||||
};
|
||||
|
||||
$scope.emailchange = {
|
||||
$scope.emailChange = {
|
||||
busy: false,
|
||||
error: {},
|
||||
email: '',
|
||||
password: '',
|
||||
|
||||
reset: function () {
|
||||
$scope.emailchange.busy = false;
|
||||
$scope.emailchange.error.email = null;
|
||||
$scope.emailchange.email = '';
|
||||
$scope.emailChange.busy = false;
|
||||
$scope.emailChange.error = {};
|
||||
$scope.emailChange.email = '';
|
||||
$scope.emailChange.password = '';
|
||||
|
||||
$scope.emailChangeForm.$setUntouched();
|
||||
$scope.emailChangeForm.$setPristine();
|
||||
},
|
||||
|
||||
show: function () {
|
||||
$scope.emailchange.reset();
|
||||
$scope.emailChange.reset();
|
||||
$('#emailChangeModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.emailchange.error.email = null;
|
||||
$scope.emailchange.busy = true;
|
||||
$scope.emailChange.error.email = null;
|
||||
$scope.emailChange.busy = true;
|
||||
|
||||
var data = {
|
||||
email: $scope.emailchange.email
|
||||
};
|
||||
|
||||
Client.updateProfile(data, function (error) {
|
||||
$scope.emailchange.busy = false;
|
||||
Client.setProfileEmail($scope.emailChange.email, $scope.emailChange.password, function (error) {
|
||||
$scope.emailChange.busy = false;
|
||||
|
||||
if (error) {
|
||||
if (error.statusCode === 409) $scope.emailchange.error.email = 'Email already taken';
|
||||
else if (error.statusCode === 400) $scope.emailchange.error.email = error.message;
|
||||
else console.error('Unable to change email.', error);
|
||||
|
||||
$('#inputEmailChangeEmail').focus();
|
||||
if (error.statusCode === 412) {
|
||||
$scope.emailChange.error.password = true;
|
||||
$scope.emailChange.password = '';
|
||||
$scope.emailChangeForm.password.$setPristine();
|
||||
$('#inputFallbackEmailChangePassword').focus();
|
||||
} else {
|
||||
$scope.emailChange.error.email = error.message;
|
||||
$('#inputEmailChangeEmail').focus();
|
||||
}
|
||||
|
||||
$scope.emailChangeForm.$setUntouched();
|
||||
$scope.emailChangeForm.$setPristine();
|
||||
@@ -396,9 +399,9 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
|
||||
return;
|
||||
}
|
||||
|
||||
Client.refreshUserInfo();
|
||||
Client.refreshProfile();
|
||||
|
||||
$scope.emailchange.reset();
|
||||
$scope.emailChange.reset();
|
||||
$('#emailChangeModal').modal('hide');
|
||||
});
|
||||
}
|
||||
@@ -435,12 +438,7 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
|
||||
$scope.fallbackEmailChange.error.generic = null;
|
||||
$scope.fallbackEmailChange.busy = true;
|
||||
|
||||
var data = {
|
||||
fallbackEmail: $scope.fallbackEmailChange.email,
|
||||
password: $scope.fallbackEmailChange.password
|
||||
};
|
||||
|
||||
Client.updateProfile(data, function (error) {
|
||||
Client.setProfileFallbackEmail($scope.fallbackEmailChange.email, $scope.fallbackEmailChange.password, function (error) {
|
||||
$scope.fallbackEmailChange.busy = false;
|
||||
|
||||
if (error) {
|
||||
@@ -459,7 +457,7 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
|
||||
}
|
||||
|
||||
// update user info in the background
|
||||
Client.refreshUserInfo();
|
||||
Client.refreshProfile();
|
||||
|
||||
$scope.fallbackEmailChange.reset();
|
||||
$('#fallbackEmailChangeModal').modal('hide');
|
||||
@@ -591,11 +589,7 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
|
||||
$scope.displayNameChange.error.displayName = null;
|
||||
$scope.displayNameChange.busy = true;
|
||||
|
||||
var user = {
|
||||
displayName: $scope.displayNameChange.displayName
|
||||
};
|
||||
|
||||
Client.updateProfile(user, function (error) {
|
||||
Client.setProfileDisplayName($scope.displayNameChange.displayName, function (error) {
|
||||
$scope.displayNameChange.busy = false;
|
||||
|
||||
if (error) {
|
||||
@@ -611,7 +605,7 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
|
||||
}
|
||||
|
||||
// update user info in the background
|
||||
Client.refreshUserInfo();
|
||||
Client.refreshProfile();
|
||||
|
||||
$scope.displayNameChange.reset();
|
||||
$('#displayNameChangeModal').modal('hide');
|
||||
@@ -636,9 +630,10 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
|
||||
$scope.tokens.busy = false;
|
||||
$scope.tokens.allTokens = result;
|
||||
|
||||
$scope.tokens.webadminTokens = result.filter(function (c) { return c.clientId === 'cid-webadmin'; });
|
||||
$scope.tokens.cliTokens = result.filter(function (c) { return c.clientId === 'cid-cli'; });
|
||||
$scope.tokens.apiTokens = result.filter(function (c) { return c.clientId === 'cid-sdk'; });
|
||||
// dashboard and development clientIds were issued with 7.5.0
|
||||
$scope.tokens.webadminTokens = result.filter(function (c) { return c.clientId === TOKEN_TYPES.ID_WEBADMIN || c.clientId === TOKEN_TYPES.ID_DEVELOPMENT || c.clientId === 'dashboard' || c.clientId === 'development'; });
|
||||
$scope.tokens.cliTokens = result.filter(function (c) { return c.clientId === TOKEN_TYPES.ID_CLI; });
|
||||
$scope.tokens.apiTokens = result.filter(function (c) { return c.clientId === TOKEN_TYPES.ID_SDK; });
|
||||
});
|
||||
},
|
||||
|
||||
@@ -709,18 +704,10 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
|
||||
}
|
||||
};
|
||||
|
||||
$scope.logoutFromAll = function () {
|
||||
Client.destroyOidcSession(function (error) {
|
||||
if (error) console.error('Failed to destroy oidc session', error);
|
||||
|
||||
$scope.tokens.revokeAllWebAndCliTokens();
|
||||
});
|
||||
};
|
||||
|
||||
Client.onReady(function () {
|
||||
$scope.appPassword.refresh();
|
||||
$scope.tokens.refresh();
|
||||
Client.refreshUserInfo(); // 2fa status might have changed by admin
|
||||
Client.refreshProfile(); // 2fa status might have changed by admin
|
||||
|
||||
$translate.onReady(function () {
|
||||
var usedLang = $translate.use() || $translate.fallbackLanguage();
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
<td class="elide-table-cell"></td>
|
||||
<td class="elide-table-cell text-center"></td>
|
||||
<td class="text-right no-wrap" style="vertical-align: bottom">
|
||||
<a class="btn btn-xs btn-default" href="/logs.html?id=box" target="_blank" uib-tooltip="{{ 'logs.title' | tr }}"><i class="fa fa-file-alt"></i></a>
|
||||
<a class="btn btn-xs btn-default" href="/frontend/logs.html?id=box" target="_blank" uib-tooltip="{{ 'logs.title' | tr }}"><i class="fa fa-file-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr ng-repeat="service in services | filter:{ isRedis: false } | orderBy:'name'">
|
||||
@@ -105,7 +105,7 @@
|
||||
</td>
|
||||
<td class="elide-table-cell">
|
||||
<div class="progress progress-striped" ng-show="service.config.memoryLimit">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" style="width: {{ service.memoryPercent }}%"></div>
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" style="width: {{ service.memoryPercent }}%">{{ service.memoryPercent }}%</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="elide-table-cell text-center">
|
||||
@@ -114,7 +114,7 @@
|
||||
<td class="text-right no-wrap" style="vertical-align: bottom">
|
||||
<button class="btn btn-xs btn-default" ng-click="serviceConfigure.show(service)" uib-tooltip="{{ 'services.configureActionTooltip' | tr }}" ng-disabled="!service.config.memoryLimit"><i class="fa fa-pencil-alt"></i></button>
|
||||
<button class="btn btn-xs btn-default" ng-click="restartService(service.name)" uib-tooltip="{{ 'services.restartActionTooltip' | tr }}"><i class="fa fa-sync-alt" ng-class="{ 'fa-spin': service.status === 'starting' && !service.config.recoveryMode }"></i></button>
|
||||
<a class="btn btn-xs btn-default" ng-href="{{ '/logs.html?id=' + service.name }}" target="_blank" uib-tooltip="{{ 'logs.title' | tr }}"><i class="fa fa-file-alt"></i></a>
|
||||
<a class="btn btn-xs btn-default" ng-href="{{ '/frontend/logs.html?id=' + service.name }}" target="_blank" uib-tooltip="{{ 'logs.title' | tr }}"><i class="fa fa-file-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr ng-show="hasRedisServices" ng-click="redisServicesExpanded = !redisServicesExpanded" class="hand">
|
||||
@@ -142,7 +142,7 @@
|
||||
<td class="text-right no-wrap" style="vertical-align: bottom">
|
||||
<button class="btn btn-xs btn-default" ng-click="serviceConfigure.show(service)" uib-tooltip="{{ 'services.configureActionTooltip' | tr }}" ng-show="service.config.memoryLimit"><i class="fa fa-pencil-alt"></i></button>
|
||||
<button class="btn btn-xs btn-default" ng-click="restartService(service.name)" uib-tooltip="{{ 'services.restartActionTooltip' | tr }}"><i class="fa fa-sync-alt" ng-class="{ 'fa-spin': service.status === 'starting' && !service.config.recoveryMode }"></i></button>
|
||||
<a class="btn btn-xs btn-default" ng-href="{{ '/logs.html?id=' + service.name }}" target="_blank" uib-tooltip="{{ 'logs.title' | tr }}"><i class="fa fa-file-alt"></i></a>
|
||||
<a class="btn btn-xs btn-default" ng-href="{{ '/frontend/logs.html?id=' + service.name }}" target="_blank" uib-tooltip="{{ 'logs.title' | tr }}"><i class="fa fa-file-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -119,7 +119,7 @@ angular.module('Application').controller('ServicesController', ['$scope', '$loca
|
||||
},
|
||||
|
||||
resetToDefaults: function () {
|
||||
$scope.serviceConfigure.memoryLimit = 536870912; // 512MB default
|
||||
$scope.serviceConfigure.memoryLimit = 256 * 1024 * 1024; // 256MB default
|
||||
},
|
||||
|
||||
reset: function () {
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left">
|
||||
<div class="text-left section-header">
|
||||
<h3>{{ 'settings.timezone.title' | tr }}</h3>
|
||||
</div>
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left">
|
||||
<div class="text-left section-header">
|
||||
<h3>{{ 'settings.language.title' | tr }}</h3>
|
||||
</div>
|
||||
|
||||
@@ -251,8 +251,22 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left">
|
||||
<h3>{{ 'settings.updates.title' | tr }}</h3>
|
||||
<div class="text-left section-header">
|
||||
<h3>
|
||||
{{ 'settings.updates.title' | tr }}
|
||||
<div class="btn-group btn-group-sm pull-right">
|
||||
<button type="button" class="btn btn-small btn-default dropdown-toggle" ng-show="update.tasks.length" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" uib-tooltip="{{ 'settings.updates.showLogsAction' | tr }}">
|
||||
<i class="fas fa-align-left"></i> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li ng-repeat="task in update.tasks">
|
||||
<a ng-href="/frontend/logs.html?taskId={{task.id}}" target="_blank" class="text-right">
|
||||
{{ task.ts | prettyLongDate }} <i class="fa" style="margin-left: 20px" ng-class="{ 'status-active fa-check-circle': !task.active && task.success, 'fa-circle-notch fa-spin': task.active, 'status-error fa-times-circle': !task.active && !task.success }"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="card" style="margin-bottom: 15px;">
|
||||
@@ -286,7 +300,6 @@
|
||||
<div class="row" ng-show="update.busy">
|
||||
<div class="col-md-12">
|
||||
<p >{{ update.message }}</p>
|
||||
<p class="has-error" ng-show="update.errorMessage">{{ update.errorMessage }}. <a ng-class="warning" ng-href="/logs.html?taskId={{update.taskId}}" target="_blank">{{ 'settings.updates.showLogsAction' | tr }}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -300,7 +313,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left">
|
||||
<div class="text-left section-header">
|
||||
<h3>{{ 'settings.privateDockerRegistry.title' | tr }}</h3>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
/* global angular:false */
|
||||
/* global $:false */
|
||||
/* global $:false, TASK_TYPES */
|
||||
|
||||
angular.module('Application').controller('SettingsController', ['$scope', '$location', '$translate', '$rootScope', '$timeout', 'Client', function ($scope, $location, $translate, $rootScope, $timeout, Client) {
|
||||
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastAdmin) $location.path('/'); });
|
||||
@@ -87,8 +87,16 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
percent: 0,
|
||||
message: 'Downloading',
|
||||
errorMessage: '', // this shows inline
|
||||
taskId: '',
|
||||
skipBackup: false,
|
||||
tasks: [],
|
||||
|
||||
refreshTasks: function () {
|
||||
Client.getTasksByType(TASK_TYPES.TASK_UPDATE, function (error, tasks) {
|
||||
if (error) return console.error(error);
|
||||
$scope.update.tasks = tasks.slice(0, 10);
|
||||
if ($scope.update.tasks.length && $scope.update.tasks[0].active) $scope.update.updateStatus();
|
||||
});
|
||||
},
|
||||
|
||||
checkNow: function () {
|
||||
$scope.update.checking = true;
|
||||
@@ -108,7 +116,9 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
},
|
||||
|
||||
stopUpdate: function () {
|
||||
Client.stopTask($scope.update.taskId, function (error) {
|
||||
var taskId = $scope.update.tasks[0].id;
|
||||
|
||||
Client.stopTask(taskId, function (error) {
|
||||
if (error) {
|
||||
if (error.statusCode === 409) {
|
||||
$scope.update.errorMessage = 'No update is currently in progress';
|
||||
@@ -124,18 +134,8 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
});
|
||||
},
|
||||
|
||||
checkStatus: function () {
|
||||
Client.getLatestTaskByType('update', function (error, task) {
|
||||
if (error) return console.error(error);
|
||||
if (!task) return;
|
||||
|
||||
$scope.update.taskId = task.id;
|
||||
$scope.update.updateStatus();
|
||||
});
|
||||
},
|
||||
|
||||
reloadIfNeeded: function () {
|
||||
Client.getStatus(function (error, status) {
|
||||
Client.getProvisionStatus(function (error, status) {
|
||||
if (error) return $scope.error(error);
|
||||
|
||||
if (window.localStorage.version !== status.version) window.location.reload(true);
|
||||
@@ -143,7 +143,9 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
},
|
||||
|
||||
updateStatus: function () {
|
||||
Client.getTask($scope.update.taskId, function (error, data) {
|
||||
var taskId = $scope.update.tasks[0].id;
|
||||
|
||||
Client.getTask(taskId, function (error, data) {
|
||||
if (error) return window.setTimeout($scope.update.updateStatus, 5000);
|
||||
|
||||
if (!data.active) {
|
||||
@@ -154,6 +156,8 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
|
||||
if (!data.errorMessage) $scope.update.reloadIfNeeded(); // assume success
|
||||
|
||||
$scope.update.refreshTasks(); // redundant... update the tasks list dropdown
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -172,7 +176,7 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
$scope.update.message = '';
|
||||
$scope.update.errorMessage = '';
|
||||
|
||||
Client.update({ skipBackup: $scope.update.skipBackup }, function (error, taskId) {
|
||||
Client.update({ skipBackup: $scope.update.skipBackup }, function (error /*, taskId */) {
|
||||
if (error) {
|
||||
$scope.update.error.generic = error.message;
|
||||
$scope.update.busy = false;
|
||||
@@ -181,8 +185,7 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
|
||||
$('#updateModal').modal('hide');
|
||||
|
||||
$scope.update.taskId = taskId;
|
||||
$scope.update.updateStatus();
|
||||
$scope.update.refreshTasks();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -430,7 +433,7 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
});
|
||||
});
|
||||
|
||||
$scope.update.checkStatus();
|
||||
$scope.update.refreshTasks();
|
||||
|
||||
if ($scope.user.isAtLeastOwner) getSubscription();
|
||||
});
|
||||
|
||||
@@ -5,6 +5,20 @@
|
||||
</div>
|
||||
|
||||
<div class="text-left">
|
||||
<h3>{{ 'support.help.title' | tr }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="grid-item-top">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div ng-bind-html="'support.help.description' | tr:{ docsLink: 'https://docs.cloudron.io/?support_view', packagingLink: 'https://docs.cloudron.io/custom-apps/tutorial/?support_view', forumLink: 'https://forum.cloudron.io/' } | markdown2html"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="text-left">
|
||||
<h3>{{ 'support.ticket.title' | tr }}</h3>
|
||||
</div>
|
||||
|
||||
@@ -25,14 +39,20 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div ng-bind-html="supportConfig.ticketFormBody | markdown2html"></div>
|
||||
<p>Use this form to open support tickets. You can also write directly to <a href="mailto:support@cloudron.io">support@cloudron.io.</p>
|
||||
<ul>
|
||||
<li><a href="https://docs.cloudron.io/apps/?support_view" target="_blank">Knowledge Base & App Docs</a></li>
|
||||
<li><a href="https://docs.cloudron.io/custom-apps/tutorial/?support_view" target="_blank">Custom App Packaging & API</li>
|
||||
<li><a href="https://forum.cloudron.io/" target="_blank">Forum</a></li>
|
||||
</ul>
|
||||
|
||||
<form ng-show="supportConfig.submitTickets" name="feedbackForm" ng-submit="submitFeedback()">
|
||||
<form name="feedbackForm" ng-submit="submitFeedback()">
|
||||
<div class="form-group">
|
||||
<label>{{ 'support.ticket.type' | tr }}</label>
|
||||
<select class="form-control" name="type" style="width: 50%;" ng-model="feedback.type" required ng-disabled="!subscription.emailVerified">
|
||||
<option value="app_error">{{ 'support.ticket.typeApp' | tr }}</option>
|
||||
<option value="ticket">{{ 'support.ticket.typeBug' | tr }}</option>
|
||||
<option value="billing">{{ 'support.ticket.typeBilling' | tr }}</option>
|
||||
<option value="email_error">{{ 'support.ticket.typeEmail' | tr }}</option>
|
||||
</select>
|
||||
</div>
|
||||
@@ -43,8 +63,6 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<p class="text-danger" ng-show="feedback.type === 'app_error' && appsById[feedback.appId] && appsById[feedback.appId].repository !== 'core'">{{ 'support.ticket.communityAppDisclaimer' | tr }}</p>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': (feedbackForm.subject.$dirty && feedbackForm.subject.$invalid) }">
|
||||
<label>{{ 'support.ticket.topic' | tr }}</label>
|
||||
<input type="text" class="form-control" name="subject" ng-model="feedback.subject" ng-maxlength="512" ng-minlength="1" required ng-disabled="!subscription.emailVerified">
|
||||
@@ -62,16 +80,16 @@
|
||||
<input type="checkbox" ng-model="feedback.enableSshSupport" ng-disabled="!subscription.emailVerified"> {{ 'support.ticket.sshCheckbox' | tr }}
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary pull-right" ng-disabled="!subscription.emailVerified || feedbackForm.$invalid || feedback.busy || (feedback.type === 'app_error' && appsById[feedback.appId] && appsById[feedback.appId].repository !== 'core')"><i class="fa fa-circle-notch fa-spin" ng-show="feedback.busy"></i> {{ 'support.ticket.submitAction' | tr }}</button>
|
||||
<button type="submit" class="btn btn-primary pull-right" ng-disabled="!subscription.emailVerified || feedbackForm.$invalid || feedback.busy"><i class="fa fa-circle-notch fa-spin" ng-show="feedback.busy"></i> {{ 'support.ticket.submitAction' | tr }}</button>
|
||||
<span ng-show="feedback.error" class="text-danger text-bold">{{feedback.error}}</span>
|
||||
<span ng-show="feedback.result" class="text-success text-bold">{{feedback.result.message}}</span>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="text-left">
|
||||
<div class="text-left section-header">
|
||||
<h3>{{ 'support.remoteSupport.title' | tr }}</h3>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -9,70 +9,69 @@ angular.module('Application').controller('SupportController', ['$scope', '$locat
|
||||
$scope.ready = false;
|
||||
$scope.config = Client.getConfig();
|
||||
$scope.user = Client.getUserInfo();
|
||||
$scope.apps = Client.getInstalledApps();
|
||||
$scope.appsById = {};
|
||||
$scope.supportConfig = null;
|
||||
// $scope.apps = Client.getInstalledApps();
|
||||
// $scope.appsById = {};
|
||||
|
||||
$scope.feedback = {
|
||||
error: null,
|
||||
result: null,
|
||||
busy: false,
|
||||
enableSshSupport: false,
|
||||
subject: '',
|
||||
type: 'app_error',
|
||||
description: '',
|
||||
appId: '',
|
||||
altEmail: ''
|
||||
};
|
||||
// $scope.feedback = {
|
||||
// error: null,
|
||||
// result: null,
|
||||
// busy: false,
|
||||
// enableSshSupport: false,
|
||||
// subject: '',
|
||||
// type: 'app_error',
|
||||
// description: '',
|
||||
// appId: '',
|
||||
// altEmail: ''
|
||||
// };
|
||||
|
||||
$scope.toggleSshSupportError = '';
|
||||
$scope.sshSupportEnabled = false;
|
||||
$scope.subscription = null;
|
||||
// $scope.subscription = null;
|
||||
|
||||
function resetFeedback() {
|
||||
$scope.feedback.enableSshSupport = false;
|
||||
$scope.feedback.subject = '';
|
||||
$scope.feedback.description = '';
|
||||
$scope.feedback.type = 'app_error';
|
||||
$scope.feedback.appId = '';
|
||||
$scope.feedback.altEmail = '';
|
||||
// function resetFeedback() {
|
||||
// $scope.feedback.enableSshSupport = false;
|
||||
// $scope.feedback.subject = '';
|
||||
// $scope.feedback.description = '';
|
||||
// $scope.feedback.type = 'app_error';
|
||||
// $scope.feedback.appId = '';
|
||||
// $scope.feedback.altEmail = '';
|
||||
|
||||
$scope.feedbackForm.$setUntouched();
|
||||
$scope.feedbackForm.$setPristine();
|
||||
}
|
||||
// $scope.feedbackForm.$setUntouched();
|
||||
// $scope.feedbackForm.$setPristine();
|
||||
// }
|
||||
|
||||
$scope.submitFeedback = function () {
|
||||
$scope.feedback.busy = true;
|
||||
$scope.feedback.result = null;
|
||||
$scope.feedback.error = null;
|
||||
// $scope.submitFeedback = function () {
|
||||
// $scope.feedback.busy = true;
|
||||
// $scope.feedback.result = null;
|
||||
// $scope.feedback.error = null;
|
||||
|
||||
var data = {
|
||||
enableSshSupport: $scope.feedback.enableSshSupport,
|
||||
subject: $scope.feedback.subject,
|
||||
description: $scope.feedback.description,
|
||||
type: $scope.feedback.type,
|
||||
appId: $scope.feedback.appId,
|
||||
altEmail: $scope.feedback.altEmail
|
||||
};
|
||||
// var data = {
|
||||
// enableSshSupport: $scope.feedback.enableSshSupport,
|
||||
// subject: $scope.feedback.subject,
|
||||
// description: $scope.feedback.description,
|
||||
// type: $scope.feedback.type,
|
||||
// appId: $scope.feedback.appId,
|
||||
// altEmail: $scope.feedback.altEmail
|
||||
// };
|
||||
|
||||
Client.createTicket(data, function (error, result) {
|
||||
if (error) {
|
||||
$scope.feedback.error = error.message;
|
||||
} else {
|
||||
$scope.feedback.result = result;
|
||||
resetFeedback();
|
||||
}
|
||||
// Client.createTicket(data, function (error, result) {
|
||||
// if (error) {
|
||||
// $scope.feedback.error = error.message;
|
||||
// } else {
|
||||
// $scope.feedback.result = result;
|
||||
// resetFeedback();
|
||||
// }
|
||||
|
||||
$scope.feedback.busy = false;
|
||||
// $scope.feedback.busy = false;
|
||||
|
||||
// refresh state
|
||||
Client.getRemoteSupport(function (error, enabled) {
|
||||
if (error) return console.error(error);
|
||||
// // refresh state
|
||||
// Client.getRemoteSupport(function (error, enabled) {
|
||||
// if (error) return console.error(error);
|
||||
|
||||
$scope.sshSupportEnabled = enabled;
|
||||
});
|
||||
});
|
||||
};
|
||||
// $scope.sshSupportEnabled = enabled;
|
||||
// });
|
||||
// });
|
||||
// };
|
||||
|
||||
$scope.toggleSshSupport = function () {
|
||||
$scope.toggleSshSupportError = '';
|
||||
@@ -89,27 +88,22 @@ angular.module('Application').controller('SupportController', ['$scope', '$locat
|
||||
};
|
||||
|
||||
Client.onReady(function () {
|
||||
Client.getSubscription(function (error, result) {
|
||||
if (error && error.statusCode === 402) return $scope.ready = true; // not yet registered
|
||||
if (error && error.statusCode === 412) return $scope.ready = true; // invalid appstore token
|
||||
Client.getRemoteSupport(function (error, enabled) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.subscription = result;
|
||||
$scope.sshSupportEnabled = enabled;
|
||||
|
||||
Client.getSupportConfig(function (error, supportConfig) {
|
||||
if (error) return console.error(error);
|
||||
// Client.getSubscription(function (error, result) {
|
||||
// if (error && error.statusCode === 402) return $scope.ready = true; // not yet registered
|
||||
// if (error && error.statusCode === 412) return $scope.ready = true; // invalid appstore token
|
||||
// if (error) return console.error(error);
|
||||
|
||||
$scope.supportConfig = supportConfig;
|
||||
// $scope.subscription = result;
|
||||
|
||||
Client.getRemoteSupport(function (error, enabled) {
|
||||
if (error) return console.error(error);
|
||||
// Client.getInstalledApps().forEach(function (app) { $scope.appsById[app.id] = app; });
|
||||
|
||||
Client.getInstalledApps().forEach(function (app) { $scope.appsById[app.id] = app; });
|
||||
|
||||
$scope.sshSupportEnabled = enabled;
|
||||
$scope.ready = true;
|
||||
});
|
||||
});
|
||||
$scope.ready = true;
|
||||
// });
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -4,17 +4,54 @@
|
||||
<div class="col-md-12">
|
||||
<h1>
|
||||
{{ 'system.title' | tr }}
|
||||
<a class="btn btn-default pull-right" href="/logs.html?id=box" target="_blank">{{ 'main.action.logs' | tr }}</a>
|
||||
<a class="btn btn-default pull-right" href="/frontend/logs.html?id=box" target="_blank">{{ 'main.action.logs' | tr }}</a>
|
||||
<button class="btn btn-default pull-right" ng-click="$parent.reboot.show()">{{ 'main.action.reboot' | tr }}</button>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-12">
|
||||
|
||||
<h3 class="graphs-toolbar">
|
||||
Graphs
|
||||
{{ 'system.info.title' | tr }}
|
||||
</h3>
|
||||
|
||||
<div class="card card-expand">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 text-muted">{{ 'system.info.platformVersion' | tr }}</div>
|
||||
<div class="col-xs-8 text-right">v{{ config.version }} ({{ config.ubuntuVersion }})</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-4 text-muted">{{ 'system.info.vendor' | tr }}</div>
|
||||
<div class="col-xs-8 text-right">{{ info.sysVendor }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-4 text-muted">{{ 'system.info.product' | tr }}</div>
|
||||
<div class="col-xs-8 text-right">{{ info.productName }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-4 text-muted">CPU</div>
|
||||
<div class="col-xs-8 text-right">{{ cpus.length + ' Core "' + cpus[0].model + '"' }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-4 text-muted">{{ 'system.info.memory' | tr }}</div>
|
||||
<div class="col-xs-8 text-right">{{ memory.memory | prettyDiskSize }} RAM <span ng-show="memory.swap">& {{ memory.swap | prettyDiskSize }} Swap</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-4 text-muted">{{ 'system.info.uptime' | tr }}</div>
|
||||
<div class="col-xs-8 text-right">{{ info.uptimeSecs }}</div>
|
||||
</div>
|
||||
<div class="row" ng-show="info.activationTime">
|
||||
<div class="col-xs-4 text-muted">{{ 'system.info.activationTime' | tr }}</div>
|
||||
<div class="col-xs-8 text-right">{{ info.activationTime | prettyDate }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h3 class="graphs-toolbar">
|
||||
{{ 'system.graphs.title' | tr }}
|
||||
<div class="graphs-toolbar-actions">
|
||||
<button class="btn btn-sm btn-default" style="margin-right: 5px;" ng-click="graphs.refresh()" ng-disabled="graphs.busy"><i class="fas fa-sync-alt" ng-class="{ 'fa-spin': graphs.busy }"></i></button>
|
||||
<div class="dropdown">
|
||||
@@ -68,6 +105,7 @@
|
||||
</div>
|
||||
<div ng-hide="disks.busy" class="ng-hide">
|
||||
<div class="row" ng-repeat="disk in disks.disks" style="margin-bottom: 20px;">
|
||||
<hr style="margin: 5px 0px;" ng-show="$index !== 0"/>
|
||||
<div class="col-md-12">
|
||||
<div style="display: flex; align-items: baseline; justify-content: space-between;">
|
||||
<h3 class="no-wrap" style="font-size: 20px;" ng-bind-html="'system.diskUsage.mountedAt' | tr:{ filesystem: disk.filesystem, mountpoint: disk.mountpoint }"></h3>
|
||||
@@ -78,18 +116,19 @@
|
||||
<div class="progress-bar" ng-repeat="content in disk.contents" style="width: {{ content.usage / disk.size * 100 }}%; background-color: {{ content.color }};" uib-tooltip="{{ content.label + ' ' + (content.usage | prettyDiskSize) }}"></div>
|
||||
<div class="text-center text-muted" style="font-size: 12px; line-height: 20px;">{{ disk.available | prettyDiskSize }}</div>
|
||||
</div>
|
||||
<div class="text-right text-muted" style="margin-top: 10px;">{{ 'system.diskUsage.diskSpeed' | tr:{ speed: disk.speed } }}</div>
|
||||
<div class="text-right text-muted" style="margin-top: 10px;" ng-show="disk.speed !== -1">{{ 'system.diskUsage.diskSpeed' | tr:{ speed: disk.speed } }}</div>
|
||||
<p ng-hide="disk.volume">{{ 'system.diskUsage.diskContent' | tr }}:</p>
|
||||
<p ng-show="disk.volume" ng-bind-html="'system.diskUsage.volumeContent' | tr:{ name: disk.volume.name }"></p>
|
||||
<div ng-repeat="content in disk.contents" class="disk-content">
|
||||
<span class="color-indicator" style="background-color: {{ content.color }};"> </span>
|
||||
<span ng-show="content.type === 'standard'">{{ content.label || content.id }}</span>
|
||||
<span ng-show="content.type === 'swap'">{{ content.id }}</span>
|
||||
<span ng-show="content.type === 'cloudron-backup-default'">{{ content.path }} (Old Backups)</span>
|
||||
<span ng-show="content.type === 'standard'">{{ content.label }}</span>
|
||||
<span ng-show="content.type === 'swap'">{{ content.label }}</span>
|
||||
<span ng-show="content.type === 'app'">
|
||||
<a href="https://{{ content.app.fqdn }}" target="_blank" ng-hide="content.uninstalled">{{ content.app.label || content.app.fqdn }}</a>
|
||||
<a href="/#/app/{{ content.app.id }}/storage" ng-hide="content.uninstalled">{{ content.label }}</a>
|
||||
<span ng-show="content.uninstalled">{{ 'system.diskUsage.uninstalledApp' | tr }}</span>
|
||||
</span>
|
||||
<span ng-show="content.type === 'volume'"><a href="/#/volumes">{{ content.volume.name }}</a></span>
|
||||
<span ng-show="content.type === 'volume'"><a href="/#/volumes">{{ content.label }}</a></span>
|
||||
<small class="text-muted">{{ content.usage | prettyDiskSize }}</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
/* global angular */
|
||||
/* global $ */
|
||||
/* global TASK_TYPES */
|
||||
/* global Chart */
|
||||
|
||||
angular.module('Application').controller('SystemController', ['$scope', '$location', '$timeout', 'Client', function ($scope, $location, $timeout, Client) {
|
||||
@@ -9,6 +10,8 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati
|
||||
|
||||
$scope.config = Client.getConfig();
|
||||
$scope.memory = null;
|
||||
$scope.cpus = null;
|
||||
$scope.info = null;
|
||||
$scope.volumesById = {};
|
||||
|
||||
// https://stackoverflow.com/questions/1484506/random-color-generator
|
||||
@@ -85,14 +88,23 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati
|
||||
disk.contents.forEach(function (content) { if (content.path === disk.mountpoint) disk.volume = $scope.volumesById[content.id]; });
|
||||
disk.contents = disk.contents.filter(function (content) { return content.path !== disk.mountpoint; });
|
||||
|
||||
// only show old backups if the size is significant
|
||||
disk.contents = disk.contents.filter(function (content) { return content.id !== 'cloudron-backup-default' || content.usage > 1024*1024*1024; });
|
||||
|
||||
disk.contents.forEach(function (content) {
|
||||
content.color = getNextColor();
|
||||
|
||||
if (content.type === 'app') {
|
||||
content.app = Client.getInstalledAppsByAppId()[content.id];
|
||||
if (!content.app) content.uninstalled = true;
|
||||
else content.label = content.app.label || content.app.fqdn;
|
||||
} else if (content.type === 'volume') {
|
||||
content.volume = $scope.volumesById[content.id];
|
||||
content.label = content.volume.name;
|
||||
}
|
||||
if (content.type === 'volume') content.volume = $scope.volumesById[content.id];
|
||||
|
||||
// ensure a label for ui
|
||||
content.label = content.label || content.id;
|
||||
|
||||
usageOther -= content.usage;
|
||||
});
|
||||
@@ -317,6 +329,20 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati
|
||||
};
|
||||
|
||||
Client.onReady(function () {
|
||||
Client.cpus(function (error, cpus) {
|
||||
if (error) console.error(error);
|
||||
$scope.cpus = cpus;
|
||||
});
|
||||
|
||||
Client.systemInfo(function (error, info) {
|
||||
if (error) console.error(error);
|
||||
|
||||
// prettify for UI
|
||||
info.uptimeSecs = moment.duration(info.uptimeSecs, 'seconds').locale(navigator.language).humanize();
|
||||
|
||||
$scope.info = info;
|
||||
});
|
||||
|
||||
Client.memory(function (error, memory) {
|
||||
if (error) console.error(error);
|
||||
|
||||
|
||||
@@ -0,0 +1,539 @@
|
||||
<!-- Modal external ldap -->
|
||||
<div class="modal fade" id="externalLdapModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'users.externalLdapDialog.title' | tr }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p class="has-error text-center" ng-show="externalLdap.error.generic">{{ externalLdap.error.generic }}</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="ldapProvider">{{ 'users.externalLdap.provider' | tr }} <sup><a ng-href="https://docs.cloudron.io/user-directory/#external-directory" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></label>
|
||||
<select class="form-control" id="ldapProvider" ng-model="externalLdap.provider" ng-options="a.value as a.name for a in ldapProvider"></select>
|
||||
</div>
|
||||
|
||||
<p class="text-small text-warning" ng-show="externalLdap.provider === 'noop' && externalLdap.currentConfig.provider !== 'noop'">
|
||||
{{ 'users.externalLdap.disableWarning' | tr }}
|
||||
</p>
|
||||
|
||||
<div uib-collapse="externalLdap.provider === 'noop'">
|
||||
<form name="externalLdapConfigForm" role="form" novalidate ng-submit="externalLdap.submit()" autocomplete="off">
|
||||
<fieldset>
|
||||
<div class="form-group" ng-class="{ 'has-error': externalLdap.error.url }">
|
||||
<label class="control-label" for="inputExternalLdapConfigUrl">{{ 'users.externalLdap.server' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="externalLdap.url" id="inputExternalLdapConfigUrl" name="url" ng-disabled="externalLdap.busy" placeholder="ldaps://example.com:636" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="externalLdap.acceptSelfSignedCerts"> {{ 'users.externalLdap.acceptSelfSignedCert' | tr }}
|
||||
</label>
|
||||
</div>
|
||||
<p class="has-error" ng-show="externalLdap.error.acceptSelfSignedCerts">{{ 'users.externalLdap.errorSelfSignedCert' | tr }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': externalLdap.error.baseDn }" ng-show="externalLdap.provider !== 'cloudron'">
|
||||
<label class="control-label" for="inputExternalLdapConfigBaseDn">{{ 'users.externalLdap.baseDn' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="externalLdap.baseDn" id="inputExternalLdapConfigBaseDn" name="baseDn" ng-disabled="externalLdap.busy" placeholder="ou=users,dc=example,dc=com" ng-required="externalLdap.provider !== 'cloudron'">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': externalLdap.error.filter }" ng-show="externalLdap.provider !== 'cloudron'">
|
||||
<label class="control-label" for="inputExternalLdapConfigFilter">{{ 'users.externalLdap.filter' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="externalLdap.filter" id="inputExternalLdapConfigFilter" name="filter" ng-disabled="externalLdap.busy" placeholder="(objectClass=inetOrgPerson)" ng-required="externalLdap.provider !== 'cloudron'">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': externalLdap.error.usernameField }" ng-show="externalLdap.provider !== 'cloudron'">
|
||||
<label class="control-label" for="inputExternalLdapConfigUsernameField">{{ 'users.externalLdap.usernameField' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="externalLdap.usernameField" id="inputExternalLdapConfigUsernameField" name="usernameField" ng-disabled="externalLdap.busy" placeholder="uid or sAMAcountName">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="externalLdap.syncGroups"> {{ 'users.externalLdap.syncGroups' | tr }}</sup>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': externalLdap.error.groupBaseDn }" ng-show="externalLdap.syncGroups && externalLdap.provider !== 'cloudron'">
|
||||
<label class="control-label" for="inputExternalLdapConfigGroupBaseDn">{{ 'users.externalLdap.groupBaseDn' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="externalLdap.groupBaseDn" id="inputExternalLdapConfigGroupBaseDn" name="groupBaseDn" ng-disabled="externalLdap.busy" placeholder="ou=groups,dc=example,dc=com" ng-required="externalLdap.syncGroups && externalLdap.provider !== 'cloudron'">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': externalLdap.error.groupFilter }" ng-show="externalLdap.syncGroups && externalLdap.provider !== 'cloudron'">
|
||||
<label class="control-label" for="inputExternalLdapConfigGroupFilter">{{ 'users.externalLdap.groupFilter' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="externalLdap.groupFilter" id="inputExternalLdapConfigGroupFilter" name="groupFilter" ng-disabled="externalLdap.busy" placeholder="(objectClass=groupOfNames)" ng-required="externalLdap.syncGroups && externalLdap.provider !== 'cloudron'">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': externalLdap.error.groupnameField }" ng-show="externalLdap.syncGroups && externalLdap.provider !== 'cloudron'">
|
||||
<label class="control-label" for="inputExternalLdapConfigGroupnameField">{{ 'users.externalLdap.groupnameField' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="externalLdap.groupnameField" id="inputExternalLdapConfigGroupnameField" name="groupnameField" ng-disabled="externalLdap.busy" placeholder="cn" ng-required="externalLdap.syncGroups && externalLdap.provider !== 'cloudron'">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': externalLdap.error.credentials }" ng-show="externalLdap.provider !== 'cloudron'">
|
||||
<label class="control-label" for="inputExternalLdapConfigBindDn">{{ 'users.externalLdap.bindUsername' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="externalLdap.bindDn" id="inputExternalLdapConfigBindDn" name="bindDn" ng-disabled="externalLdap.busy" placeholder="uid=admin,ou=Users,dc=example,dc=com">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': externalLdap.error.credentials }">
|
||||
<label class="control-label" for="inputExternalLdapConfigBindPassword">{{ 'users.externalLdap.bindPassword' | tr }}</label>
|
||||
<input type="password" class="form-control" ng-model="externalLdap.bindPassword" id="inputExternalLdapConfigBindPassword" name="bindPassword" ng-disabled="externalLdap.busy" placeholder="" password-reveal>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="externalLdap.autoCreate"> {{ 'users.externalLdap.autocreateUsersOnLogin' | tr }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input class="ng-hide" type="submit" ng-disabled="externalLdapConfigForm.$invalid"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-primary" ng-click="externalLdap.submit()" ng-disabled="externalLdapConfigForm.$invalid || externalLdap.saveBusy"><i class="fa fa-circle-notch fa-spin" ng-show="externalLdap.saveBusy"></i> {{ 'main.dialog.save' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Modal client add -->
|
||||
<div class="modal fade" id="oidcClientAddModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'oidc.newClientDialog.title' | tr }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ 'oidc.newClientDialog.description' | tr }}
|
||||
<br/>
|
||||
<br/>
|
||||
<form name="clientAddForm" role="form" novalidate ng-submit="clientAdd.submit()" autocomplete="off">
|
||||
<p class="text-danger" ng-show="clientAdd.error">{{ clientAdd.error }}</p>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="clientName">{{ 'oidc.client.name' | tr }}</label>
|
||||
<input type="text" id="clientName" class="form-control" name="clientName" ng-model="clientAdd.name" autofocus required/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="loginRedirectUri">{{ 'oidc.client.loginRedirectUri' | tr }}</label>
|
||||
<input type="text" id="loginRedirectUri" class="form-control" name="loginRedirectUri" ng-model="clientAdd.loginRedirectUri" required/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">{{ 'oidc.client.signingAlgorithm' | tr }}</label>
|
||||
<div class="control-label">
|
||||
<select class="form-control" ng-model="clientAdd.tokenSignatureAlgorithm">
|
||||
<option value="RS256">RS256</option>
|
||||
<option value="EdDSA">EdDSA</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<input class="ng-hide" type="submit" ng-disabled="clientAddForm.$invalid"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.close' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="clientAdd.submit()" ng-disabled="clientAddForm.$invalid || clientAdd.busy">
|
||||
<i class="fa fa-circle-notch fa-spin" ng-show="clientAdd.busy"></i> {{ 'oidc.newClientDialog.createAction' | tr }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal client edit -->
|
||||
<div class="modal fade" id="oidcClientEditModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'oidc.editClientDialog.title' | tr:{ client: clientEdit.name } }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form name="clientEditForm" role="form" novalidate ng-submit="clientEdit.submit()" autocomplete="off">
|
||||
<p class="text-danger" ng-show="clientEdit.error">{{ clientEdit.error }}</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">{{ 'oidc.client.id' | tr }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" id="clientIdInput" class="form-control" ng-value="clientEdit.id" readonly/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" id="clientIdInputClipboardButton" type="button" data-clipboard-target="#clientIdInput"><i class="fa fa-clipboard"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">{{ 'oidc.client.secret' | tr }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" id="clientSecretInput" class="form-control" ng-value="clientEdit.secret" readonly/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" id="clientSecretInputClipboardButton" type="button" data-clipboard-target="#clientSecretInput"><i class="fa fa-clipboard"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="inputEditClientName">{{ 'oidc.client.name' | tr }}</label>
|
||||
<input type="text" id="inputEditClientName" class="form-control" name="clientName" ng-model="clientEdit.name" autofocus required/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="inputEditLoginRedirectUri">{{ 'oidc.client.loginRedirectUri' | tr }}</label>
|
||||
<input type="text" id="inputEditLoginRedirectUri" class="form-control" name="loginRedirectUri" ng-model="clientEdit.loginRedirectUri" required/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">{{ 'oidc.client.signingAlgorithm' | tr }}</label>
|
||||
<div class="control-label">
|
||||
<select class="form-control" ng-model="clientEdit.tokenSignatureAlgorithm">
|
||||
<option value="RS256">RS256</option>
|
||||
<option value="EdDSA">EdDSA</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<input class="ng-hide" type="submit" ng-disabled="clientEditForm.$invalid"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.close' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="clientEdit.submit()" ng-disabled="clientEditForm.$invalid || clientEdit.busy">
|
||||
<i class="fa fa-circle-notch fa-spin" ng-show="clientEdit.busy"></i> {{ 'main.dialog.save' | tr }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal client delete -->
|
||||
<div class="modal fade" id="oidcClientDeleteModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'oidc.deleteClientDialog.title' | tr:{ client: deleteClient.id } }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{{ 'oidc.deleteClientDialog.description' | tr }}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-danger" ng-click="deleteClient.submit()" ng-disabled="deleteClient.busy"><i class="fa fa-circle-notch fa-spin" ng-show="deleteClient.busy"></i> {{ 'main.dialog.delete' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content content-large">
|
||||
|
||||
<div class="text-left">
|
||||
<h1>
|
||||
{{ 'users.title' | tr }}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div class="card card-large">
|
||||
<form name="profileConfigForm" role="form" novalidate ng-submit="profileConfig.submit()" autocomplete="off">
|
||||
<fieldset ng-disabled="profileConfig.busy">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="profileConfig.editableUserProfiles"> {{ 'users.settings.allowProfileEditCheckbox' | tr }} <sup><a ng-href="https://docs.cloudron.io/user-directory/#lock-profile" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup>
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="profileConfig.mandatory2FA"> {{ 'users.settings.require2FACheckbox' | tr }}
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<br/>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<span class="has-error" ng-show="profileConfig.errorMessage">{{ profileConfig.errorMessage }}</span>
|
||||
|
||||
<button class="btn btn-outline btn-primary pull-right" ng-click="profileConfig.submit()" ng-disabled="!profileConfigForm.$dirty || profileConfig.busy">
|
||||
<i class="fa fa-circle-notch fa-spin" ng-show="profileConfig.busy"></i> {{ 'users.settings.saveAction' | tr }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="text-left section-header">
|
||||
<h3>
|
||||
{{ 'users.externalLdap.title' | tr }}
|
||||
<div class="btn-group btn-group-sm pull-right">
|
||||
<button type="button" class="btn btn-small btn-default dropdown-toggle" ng-show="externalLdap.tasks.length" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" uib-tooltip="{{ 'domains.renewCerts.showLogsAction' | tr }}">
|
||||
<i class="fas fa-align-left"></i> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li ng-repeat="task in externalLdap.tasks">
|
||||
<a ng-href="/frontend/logs.html?taskId={{task.id}}" target="_blank" class="text-right">
|
||||
{{ task.ts | prettyLongDate }} <i class="fa" style="margin-left: 20px" ng-class="{ 'status-active fa-check-circle': !task.active && task.success, 'fa-circle-notch fa-spin': task.active, 'status-error fa-times-circle': !task.active && !task.success }"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="card card-large">
|
||||
<div class="row">
|
||||
<div class="col-md-12">{{ 'users.externalLdap.description' | tr }}</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider === 'noop'">
|
||||
<div class="col-xs-12">
|
||||
<span class="text-muted">{{ 'users.externalLdap.noopInfo' | tr }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop'">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.provider' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.provider }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop'">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.server' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.url }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop'">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.acceptSelfSignedCert' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.acceptSelfSignedCerts ? 'Yes' : 'No' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop' && externalLdap.currentConfig.provider !== 'cloudron'">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.baseDn' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.baseDn }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop' && externalLdap.currentConfig.provider !== 'cloudron'">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.filter' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.filter }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop' && externalLdap.currentConfig.provider !== 'cloudron'">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.usernameField' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.usernameField || 'uid' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop'">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.syncGroups' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.syncGroups ? 'Yes' : 'No' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop' && externalLdap.currentConfig.provider !== 'cloudron' && externalLdap.currentConfig.syncGroups">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.groupBaseDn' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.groupBaseDn }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop' && externalLdap.currentConfig.provider !== 'cloudron' && externalLdap.currentConfig.syncGroups">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.groupFilter' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.groupFilter }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop' && externalLdap.currentConfig.provider !== 'cloudron' && externalLdap.currentConfig.syncGroups">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.groupnameField' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.groupnameField }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop' && externalLdap.currentConfig.provider !== 'cloudron'">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.auth' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.bindDn ? 'Yes' : 'No' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop'">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.autocreateUsersOnLogin' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.autoCreate ? 'Yes' : 'No' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<br/>
|
||||
<div class="col-md-12" style="margin-bottom: 10px;">
|
||||
<div ng-show="externalLdap.busy" class="progress progress-striped active animateMe">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" style="width: {{ externalLdap.percent }}%"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<p ng-show="externalLdap.busy">{{ externalLdap.message }}</p>
|
||||
<p ng-hide="externalLdap.busy">
|
||||
<div class="has-error" ng-show="!externalLdap.active">{{ externalLdap.errorMessage }}</div>
|
||||
</p>
|
||||
<button class="btn btn-primary pull-right" ng-click="externalLdap.show()">{{ 'users.externalLdap.configureAction' | tr }}</button>
|
||||
<button class="btn btn-success pull-right" ng-disabled="externalLdap.currentConfig.provider === 'noop'" ng-click="externalLdap.sync()"><i class="fa fa-circle-notch fa-spin" ng-show="externalLdap.syncBusy"></i> {{ 'users.externalLdap.syncAction' | tr }}</button>
|
||||
<a class="btn btn-primary pull-right" ng-show="externalLdap.taskId" ng-href="/frontend/logs.html?taskId={{ externalLdap.taskId }}" target="_blank">{{ 'users.externalLdap.showLogsAction' | tr }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left section-header">
|
||||
<h3>{{ 'users.exposedLdap.title' | tr }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="card card-large">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div>{{ 'users.exposedLdap.description' | tr }}</div>
|
||||
|
||||
<br/>
|
||||
|
||||
<form name="userDirectoryConfigForm" role="form" novalidate ng-submit="userDirectoryConfig.submit()" autocomplete="off">
|
||||
<fieldset>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="userDirectoryConfig.enabled" ng-disabled="userDirectoryConfig.busy"> {{ 'users.exposedLdap.enabled' | tr }} <sup><a ng-href="https://docs.cloudron.io/user-directory/#directory-server" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">{{ 'users.exposedLdap.secret.url' | tr }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" id="userDirectoryUrlInput" ng-value="'ldaps://' + config.adminFqdn + ':636'" readonly name="userDirectoryUrl" class="form-control"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button" id="userDirectoryUrlClipboardButton" data-clipboard-target="#userDirectoryUrlInput"><i class="fa fa-clipboard"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<p class="text-small text-warning text-bold" ng-show="adminDomain.provider === 'cloudflare'">{{ 'users.exposedLdap.cloudflarePortWarning' | tr }} </p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">{{ 'users.exposedLdap.secret.label' | tr }}</label>
|
||||
<p class="small" ng-bind-html=" 'users.exposedLdap.secret.description' | tr:{ userDN: 'cn=admin,ou=system,dc=cloudron' }"></p>
|
||||
<input type="password" ng-model="userDirectoryConfig.secret" ng-disabled="!userDirectoryConfig.enabled || userDirectoryConfig.busy" name="userDirectorySecret" class="form-control" ng-class="{ 'has-error': !userDirectoryConfigForm.secret.$dirty && userDirectoryConfig.error.secret }" password-reveal/>
|
||||
<div class="has-error" ng-show="userDirectoryConfig.error.secret">{{ userDirectoryConfig.error.secret }}</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">{{ 'users.exposedLdap.ipRestriction.label' | tr }}</label>
|
||||
<p class="small" ng-bind-html=" 'users.exposedLdap.ipRestriction.description' | tr "></p>
|
||||
<textarea ng-model="userDirectoryConfig.allowlist" ng-disabled="!userDirectoryConfig.enabled || userDirectoryConfig.busy" placeholder="{{ 'users.exposedLdap.ipRestriction.placeholder' | tr }}" name="allowlist" class="form-control" ng-class="{ 'has-error': !userDirectoryConfigForm.allowlist.$dirty && userDirectoryConfig.error.allowlist }" rows="4"></textarea>
|
||||
<div class="has-error" ng-show="userDirectoryConfig.error.allowlist">{{ userDirectoryConfig.error.allowlist }}</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<br/>
|
||||
|
||||
<div>
|
||||
<span class="has-error" ng-show="userDirectoryConfig.error.generic">{{ userDirectoryConfig.error.generic }}</span>
|
||||
|
||||
<button class="btn btn-outline btn-primary pull-right" ng-click="userDirectoryConfig.submit()" ng-disabled="!userDirectoryConfigForm.$dirty || userDirectoryConfig.busy">
|
||||
<i class="fa fa-circle-notch fa-spin" ng-show="userDirectoryConfig.busy"></i> {{ 'users.settings.saveAction' | tr }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left section-header">
|
||||
<h3>{{ 'oidc.title' | tr }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="card card-large">
|
||||
<div class="grid-item-top">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td class="text-muted" style="vertical-align: top;">{{ 'oidc.env.discoveryUrl' | tr }}</td>
|
||||
<td class="text-right" style="vertical-align: top;" ng-click-select>https://{{ config.adminFqdn }}/.well-known/openid-configuration</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div>
|
||||
<h4>{{ 'oidc.clients.title' | tr }} <button class="btn btn-primary btn-sm pull-right" ng-click="clientAdd.show()"><i class="fa fa-plus"></i> {{ 'oidc.clients.newClient' | tr }}</button></h4>
|
||||
<div class="grid-item-top">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 80%">{{ 'oidc.client.name' | tr }}</th>
|
||||
<th style="width: 20%" class="text-right">{{ 'main.actions' | tr }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-show="oidcClients.length === 0">
|
||||
<td colspan="3" class="text-center">{{ 'oidc.clients.empty' | tr }}</td>
|
||||
</tr>
|
||||
<tr ng-repeat="client in oidcClients">
|
||||
<td class="text-left elide-table-cell hand" ng-click="clientEdit.show(client)">
|
||||
{{ client.name }}
|
||||
</td>
|
||||
<td class="text-right no-wrap" style="vertical-align: bottom">
|
||||
<button class="btn btn-xs btn-danger" ng-click="deleteClient.show(client)" uib-tooltip="Delete"><i class="far fa-trash-alt"></i></button>
|
||||
<button class="btn btn-xs btn-default" ng-click="clientEdit.show(client)" uib-tooltip="Edit"><i class="fa fa-pencil-alt"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,483 @@
|
||||
'use strict';
|
||||
|
||||
/* global angular */
|
||||
/* global Clipboard */
|
||||
/* global $, TASK_TYPES */
|
||||
|
||||
angular.module('Application').controller('UserSettingsController', ['$scope', '$location', '$translate', '$timeout', 'Client', function ($scope, $location, $translate, $timeout, Client) {
|
||||
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastAdmin) $location.path('/'); });
|
||||
|
||||
$scope.ldapProvider = [
|
||||
{ name: 'Active Directory', value: 'ad' },
|
||||
{ name: 'Cloudron', value: 'cloudron' },
|
||||
{ name: 'Jumpcloud', value: 'jumpcloud' },
|
||||
{ name: 'Okta', value: 'okta' },
|
||||
{ name: 'Univention Corporate Server (UCS)', value: 'univention' },
|
||||
{ name: 'Other', value: 'other' },
|
||||
{ name: 'Disabled', value: 'noop' }
|
||||
];
|
||||
|
||||
$translate(['users.externalLdap.providerOther', 'users.externalLdap.providerDisabled']).then(function (tr) {
|
||||
if (tr['users.externalLdap.providerOther']) $scope.ldapProvider.find(function (p) { return p.value === 'other'; }).name = tr['users.externalLdap.providerOther'];
|
||||
if (tr['users.externalLdap.providerDisabled']) $scope.ldapProvider.find(function (p) { return p.value === 'noop'; }).name = tr['users.externalLdap.providerDisabled'];
|
||||
});
|
||||
|
||||
$scope.ready = false;
|
||||
$scope.config = Client.getConfig();
|
||||
$scope.userInfo = Client.getUserInfo();
|
||||
$scope.adminDomain = null;
|
||||
$scope.oidcClients = [];
|
||||
|
||||
$scope.profileConfig = {
|
||||
editableUserProfiles: true,
|
||||
mandatory2FA: false,
|
||||
errorMessage: '',
|
||||
|
||||
refresh: function () {
|
||||
Client.getProfileConfig(function (error, result) {
|
||||
if (error) return console.error('Unable to get directory config.', error);
|
||||
|
||||
$scope.profileConfig.editableUserProfiles = !result.lockUserProfiles;
|
||||
$scope.profileConfig.mandatory2FA = !!result.mandatory2FA;
|
||||
});
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
// prevent the current user from getting locked out
|
||||
if ($scope.profileConfig.mandatory2FA && !$scope.userInfo.twoFactorAuthenticationEnabled) return Client.notify('', $translate.instant('users.settings.require2FAWarning'), true, 'error', '#/profile');
|
||||
|
||||
$scope.profileConfig.error = '';
|
||||
$scope.profileConfig.busy = true;
|
||||
$scope.profileConfig.success = false;
|
||||
|
||||
var data = {
|
||||
lockUserProfiles: !$scope.profileConfig.editableUserProfiles,
|
||||
mandatory2FA: $scope.profileConfig.mandatory2FA
|
||||
};
|
||||
|
||||
Client.setProfileConfig(data, function (error) {
|
||||
if (error) $scope.profileConfig.errorMessage = error.message;
|
||||
|
||||
$scope.profileConfig.success = true;
|
||||
|
||||
$scope.profileConfigForm.$setUntouched();
|
||||
$scope.profileConfigForm.$setPristine();
|
||||
|
||||
Client.refreshConfig(); // refresh the $scope.config
|
||||
|
||||
$timeout(function () {
|
||||
$scope.profileConfig.busy = false;
|
||||
}, 500);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.userDirectoryConfig = {
|
||||
enabled: false,
|
||||
secret: '',
|
||||
allowlist: '',
|
||||
error: null,
|
||||
|
||||
refresh: function () {
|
||||
Client.getUserDirectoryConfig(function (error, result) {
|
||||
if (error) return console.error('Unable to get exposed ldap config.', error);
|
||||
|
||||
$scope.userDirectoryConfig.enabled = !!result.enabled;
|
||||
$scope.userDirectoryConfig.allowlist = result.allowlist;
|
||||
$scope.userDirectoryConfig.secret = result.secret;
|
||||
});
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.userDirectoryConfig.error = null;
|
||||
$scope.userDirectoryConfig.busy = true;
|
||||
$scope.userDirectoryConfig.success = false;
|
||||
|
||||
var data = {
|
||||
enabled: $scope.userDirectoryConfig.enabled,
|
||||
secret: $scope.userDirectoryConfig.secret,
|
||||
allowlist: $scope.userDirectoryConfig.allowlist
|
||||
};
|
||||
|
||||
Client.setUserDirectoryConfig(data, function (error) {
|
||||
$scope.userDirectoryConfig.busy = false;
|
||||
|
||||
if (error && error.statusCode === 400) {
|
||||
if (error.message.indexOf('secret') !== -1) return $scope.userDirectoryConfig.error = { secret: error.message };
|
||||
else return $scope.userDirectoryConfig.error = { allowlist: error.message };
|
||||
}
|
||||
if (error) return $scope.userDirectoryConfig.error = { generic: error.message };
|
||||
|
||||
$scope.userDirectoryConfigForm.$setUntouched();
|
||||
$scope.userDirectoryConfigForm.$setPristine();
|
||||
|
||||
$scope.userDirectoryConfig.success = true;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.externalLdap = {
|
||||
busy: false,
|
||||
percent: 0,
|
||||
message: '',
|
||||
errorMessage: '', // last task error
|
||||
tasks: [],
|
||||
|
||||
error: {}, // save error
|
||||
saveBusy: false,
|
||||
|
||||
// fields
|
||||
provider: 'noop',
|
||||
autoCreate: false,
|
||||
url: '',
|
||||
acceptSelfSignedCerts: false,
|
||||
baseDn: '',
|
||||
filter: '',
|
||||
groupBaseDn: '',
|
||||
bindDn: '',
|
||||
bindPassword: '',
|
||||
usernameField: '',
|
||||
|
||||
currentConfig: {},
|
||||
|
||||
init: function () {
|
||||
Client.getExternalLdapConfig(function (error, result) {
|
||||
if (error) return console.error('Unable to get external ldap config.', error);
|
||||
$scope.externalLdap.currentConfig = result;
|
||||
$scope.externalLdap.refreshTasks();
|
||||
});
|
||||
},
|
||||
|
||||
refreshTasks: function () {
|
||||
Client.getTasksByType(TASK_TYPES.TASK_SYNC_EXTERNAL_LDAP, function (error, tasks) {
|
||||
if (error) return console.error(error);
|
||||
$scope.externalLdap.tasks = tasks.slice(0, 10);
|
||||
if ($scope.externalLdap.tasks.length && $scope.externalLdap.tasks[0].active) $scope.externalLdap.updateStatus();
|
||||
});
|
||||
},
|
||||
|
||||
updateStatus: function () {
|
||||
var taskId = $scope.externalLdap.tasks[0].id;
|
||||
|
||||
Client.getTask(taskId, function (error, data) {
|
||||
if (error) return window.setTimeout($scope.externalLdap.updateStatus, 5000);
|
||||
|
||||
if (!data.active) {
|
||||
$scope.externalLdap.busy = false;
|
||||
$scope.externalLdap.message = '';
|
||||
$scope.externalLdap.percent = 100; // indicates that 'result' is valid
|
||||
$scope.externalLdap.errorMessage = data.success ? '' : data.error.message;
|
||||
|
||||
$scope.externalLdap.refreshTasks(); // update the tasks list dropdown
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.externalLdap.busy = true;
|
||||
$scope.externalLdap.percent = data.percent;
|
||||
$scope.externalLdap.message = data.message;
|
||||
window.setTimeout($scope.externalLdap.updateStatus, 500);
|
||||
});
|
||||
},
|
||||
|
||||
show: function () {
|
||||
$scope.externalLdap.busy = false;
|
||||
$scope.externalLdap.error = {};
|
||||
|
||||
$scope.externalLdap.provider = $scope.externalLdap.currentConfig.provider;
|
||||
$scope.externalLdap.url = $scope.externalLdap.currentConfig.url;
|
||||
$scope.externalLdap.acceptSelfSignedCerts = $scope.externalLdap.currentConfig.acceptSelfSignedCerts;
|
||||
$scope.externalLdap.baseDn = $scope.externalLdap.currentConfig.baseDn;
|
||||
$scope.externalLdap.filter = $scope.externalLdap.currentConfig.filter;
|
||||
$scope.externalLdap.syncGroups = $scope.externalLdap.currentConfig.syncGroups;
|
||||
$scope.externalLdap.groupBaseDn = $scope.externalLdap.currentConfig.groupBaseDn;
|
||||
$scope.externalLdap.groupFilter = $scope.externalLdap.currentConfig.groupFilter;
|
||||
$scope.externalLdap.groupnameField = $scope.externalLdap.currentConfig.groupnameField;
|
||||
$scope.externalLdap.bindDn = $scope.externalLdap.currentConfig.bindDn;
|
||||
$scope.externalLdap.bindPassword = $scope.externalLdap.currentConfig.bindPassword;
|
||||
$scope.externalLdap.usernameField = $scope.externalLdap.currentConfig.usernameField;
|
||||
$scope.externalLdap.autoCreate = $scope.externalLdap.currentConfig.autoCreate;
|
||||
|
||||
$('#externalLdapModal').modal('show');
|
||||
},
|
||||
|
||||
sync: function () {
|
||||
$scope.externalLdap.busy = true;
|
||||
$scope.externalLdap.percent = 0;
|
||||
$scope.externalLdap.message = '';
|
||||
$scope.externalLdap.errorMessage = '';
|
||||
|
||||
Client.startExternalLdapSync(function (error) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
$scope.externalLdap.errorMessage = error.message;
|
||||
$scope.externalLdap.busy = false;
|
||||
} else {
|
||||
$scope.externalLdap.refreshTasks();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.externalLdap.saveBusy = true;
|
||||
$scope.externalLdap.error = {};
|
||||
|
||||
var config = {
|
||||
provider: $scope.externalLdap.provider
|
||||
};
|
||||
|
||||
if ($scope.externalLdap.provider === 'cloudron') {
|
||||
config.url = $scope.externalLdap.url;
|
||||
config.acceptSelfSignedCerts = $scope.externalLdap.acceptSelfSignedCerts;
|
||||
config.autoCreate = $scope.externalLdap.autoCreate;
|
||||
config.syncGroups = $scope.externalLdap.syncGroups;
|
||||
config.bindPassword = $scope.externalLdap.bindPassword;
|
||||
|
||||
// those values are known and thus overwritten
|
||||
config.baseDn = 'ou=users,dc=cloudron';
|
||||
config.filter = '(objectClass=inetOrgPerson)';
|
||||
config.usernameField = 'username';
|
||||
config.groupBaseDn = 'ou=groups,dc=cloudron';
|
||||
config.groupFilter = '(objectClass=group)';
|
||||
config.groupnameField = 'cn';
|
||||
config.bindDn = 'cn=admin,ou=system,dc=cloudron';
|
||||
} else if ($scope.externalLdap.provider !== 'noop') {
|
||||
config.url = $scope.externalLdap.url;
|
||||
config.acceptSelfSignedCerts = $scope.externalLdap.acceptSelfSignedCerts;
|
||||
config.baseDn = $scope.externalLdap.baseDn;
|
||||
config.filter = $scope.externalLdap.filter;
|
||||
config.usernameField = $scope.externalLdap.usernameField;
|
||||
config.syncGroups = $scope.externalLdap.syncGroups;
|
||||
config.groupBaseDn = $scope.externalLdap.groupBaseDn;
|
||||
config.groupFilter = $scope.externalLdap.groupFilter;
|
||||
config.groupnameField = $scope.externalLdap.groupnameField;
|
||||
config.autoCreate = $scope.externalLdap.autoCreate;
|
||||
|
||||
if ($scope.externalLdap.bindDn) {
|
||||
config.bindDn = $scope.externalLdap.bindDn;
|
||||
config.bindPassword = $scope.externalLdap.bindPassword;
|
||||
}
|
||||
}
|
||||
|
||||
Client.setExternalLdapConfig(config, function (error) {
|
||||
$scope.externalLdap.saveBusy = false;
|
||||
|
||||
if (error) {
|
||||
if (error.statusCode === 424) {
|
||||
if (error.code === 'SELF_SIGNED_CERT_IN_CHAIN') $scope.externalLdap.error.acceptSelfSignedCerts = true;
|
||||
else $scope.externalLdap.error.url = true;
|
||||
$scope.externalLdap.error.generic = error.message;
|
||||
} else if (error.statusCode === 400 && error.message === 'invalid baseDn') {
|
||||
$scope.externalLdap.error.baseDn = true;
|
||||
} else if (error.statusCode === 400 && error.message === 'invalid filter') {
|
||||
$scope.externalLdap.error.filter = true;
|
||||
} else if (error.statusCode === 400 && error.message === 'invalid groupBaseDn') {
|
||||
$scope.externalLdap.error.groupBaseDn = true;
|
||||
} else if (error.statusCode === 400 && error.message === 'invalid groupFilter') {
|
||||
$scope.externalLdap.error.groupFilter = true;
|
||||
} else if (error.statusCode === 400 && error.message === 'invalid groupnameField') {
|
||||
$scope.externalLdap.error.groupnameField = true;
|
||||
} else if (error.statusCode === 400 && error.message === 'invalid bind credentials') {
|
||||
$scope.externalLdap.error.credentials = true;
|
||||
} else if (error.statusCode === 400 && error.message === 'invalid usernameField') {
|
||||
$scope.externalLdap.error.usernameField = true;
|
||||
} else {
|
||||
console.error('Failed to set external LDAP config:', error);
|
||||
$scope.externalLdap.error.generic = error.message;
|
||||
}
|
||||
} else {
|
||||
$('#externalLdapModal').modal('hide');
|
||||
$scope.externalLdap.init();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.refreshOIDCClients = function () {
|
||||
Client.getOidcClients(function (error, result) {
|
||||
if (error) return console.error('Failed to load oidc clients', error);
|
||||
|
||||
$scope.oidcClients = result;
|
||||
});
|
||||
};
|
||||
|
||||
$scope.clientAdd = {
|
||||
busy: false,
|
||||
error: null,
|
||||
name: '',
|
||||
loginRedirectUri: '',
|
||||
tokenSignatureAlgorithm: '',
|
||||
|
||||
show: function () {
|
||||
$scope.clientAdd.name = '';
|
||||
$scope.clientAdd.loginRedirectUri = '';
|
||||
$scope.clientAdd.tokenSignatureAlgorithm = 'RS256';
|
||||
$scope.clientAdd.busy = false;
|
||||
$scope.clientAdd.error = null;
|
||||
$scope.clientAddForm.$setPristine();
|
||||
|
||||
$('#oidcClientAddModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.clientAdd.busy = true;
|
||||
$scope.clientAdd.error = null;
|
||||
|
||||
Client.addOidcClient($scope.clientAdd.name, $scope.clientAdd.loginRedirectUri, $scope.clientAdd.tokenSignatureAlgorithm, function (error) {
|
||||
if (error) {
|
||||
$scope.clientAdd.error = error.message;
|
||||
console.error('Unable to add openid client.', error);
|
||||
$scope.clientAdd.busy = false;
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.refreshOIDCClients();
|
||||
$scope.clientAdd.busy = false;
|
||||
|
||||
$('#oidcClientAddModal').modal('hide');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.clientEdit = {
|
||||
busy: false,
|
||||
error: null,
|
||||
id: '',
|
||||
secret: '',
|
||||
name: '',
|
||||
loginRedirectUri: '',
|
||||
tokenSignatureAlgorithm: '',
|
||||
|
||||
show: function (client) {
|
||||
$scope.clientEdit.id = client.id;
|
||||
$scope.clientEdit.secret = client.secret;
|
||||
$scope.clientEdit.name = client.name;
|
||||
$scope.clientEdit.loginRedirectUri = client.loginRedirectUri;
|
||||
$scope.clientEdit.tokenSignatureAlgorithm = client.tokenSignatureAlgorithm;
|
||||
$scope.clientEdit.busy = false;
|
||||
$scope.clientEdit.error = null;
|
||||
$scope.clientEditForm.$setPristine();
|
||||
|
||||
$('#oidcClientEditModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.clientEdit.busy = true;
|
||||
$scope.clientEdit.error = null;
|
||||
|
||||
Client.updateOidcClient($scope.clientEdit.id, $scope.clientEdit.name, $scope.clientEdit.loginRedirectUri, $scope.clientEdit.tokenSignatureAlgorithm, function (error) {
|
||||
if (error) {
|
||||
$scope.clientEdit.error = error.message;
|
||||
console.error('Unable to edit openid client.', error);
|
||||
$scope.clientEdit.busy = false;
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.refreshOIDCClients();
|
||||
$scope.clientEdit.busy = false;
|
||||
|
||||
$('#oidcClientEditModal').modal('hide');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.deleteClient = {
|
||||
busy: false,
|
||||
error: {},
|
||||
id: '',
|
||||
|
||||
show: function (client) {
|
||||
$scope.deleteClient.busy = false;
|
||||
$scope.deleteClient.id = client.id;
|
||||
|
||||
$('#oidcClientDeleteModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
Client.delOidcClient($scope.deleteClient.id, function (error) {
|
||||
$scope.deleteClient.busy = false;
|
||||
|
||||
if (error) return console.error('Failed to delete openid client', error);
|
||||
|
||||
$scope.refreshOIDCClients();
|
||||
|
||||
$('#oidcClientDeleteModal').modal('hide');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Client.onReady(function () {
|
||||
$scope.externalLdap.init();
|
||||
$scope.profileConfig.refresh();
|
||||
$scope.userDirectoryConfig.refresh();
|
||||
$scope.refreshOIDCClients();
|
||||
|
||||
Client.getDomains(function (error, result) {
|
||||
if (error) return console.error('Unable to list domains.', error);
|
||||
$scope.adminDomain = result.filter(function (d) { return d.domain === $scope.config.adminDomain; })[0];
|
||||
});
|
||||
});
|
||||
|
||||
// setup all the dialog focus handling
|
||||
['oidcClientAddModal', 'oidcClientEditModal'].forEach(function (id) {
|
||||
$('#' + id).on('shown.bs.modal', function () {
|
||||
$(this).find('[autofocus]:first').focus();
|
||||
});
|
||||
});
|
||||
|
||||
new Clipboard('#userDirectoryUrlClipboardButton').on('success', function(e) {
|
||||
$('#userDirectoryUrlClipboardButton').tooltip({
|
||||
title: 'Copied!',
|
||||
trigger: 'manual'
|
||||
}).tooltip('show');
|
||||
|
||||
$timeout(function () { $('#userDirectoryUrlClipboardButton').tooltip('hide'); }, 2000);
|
||||
|
||||
e.clearSelection();
|
||||
}).on('error', function(/*e*/) {
|
||||
$('#userDirectoryUrlClipboardButton').tooltip({
|
||||
title: 'Press Ctrl+C to copy',
|
||||
trigger: 'manual'
|
||||
}).tooltip('show');
|
||||
|
||||
$timeout(function () { $('#userDirectoryUrlClipboardButton').tooltip('hide'); }, 2000);
|
||||
});
|
||||
|
||||
new Clipboard('#clientIdInputClipboardButton').on('success', function(e) {
|
||||
$('#clientIdInputClipboardButton').tooltip({
|
||||
title: 'Copied!',
|
||||
trigger: 'manual'
|
||||
}).tooltip('show');
|
||||
|
||||
$timeout(function () { $('#clientIdInputClipboardButton').tooltip('hide'); }, 2000);
|
||||
|
||||
e.clearSelection();
|
||||
}).on('error', function(/*e*/) {
|
||||
$('#clientIdInputClipboardButton').tooltip({
|
||||
title: 'Press Ctrl+C to copy',
|
||||
trigger: 'manual'
|
||||
}).tooltip('show');
|
||||
|
||||
$timeout(function () { $('#clientIdInputClipboardButton').tooltip('hide'); }, 2000);
|
||||
});
|
||||
|
||||
new Clipboard('#clientSecretInputClipboardButton').on('success', function(e) {
|
||||
$('#clientSecretInputClipboardButton').tooltip({
|
||||
title: 'Copied!',
|
||||
trigger: 'manual'
|
||||
}).tooltip('show');
|
||||
|
||||
$timeout(function () { $('#clientSecretInputClipboardButton').tooltip('hide'); }, 2000);
|
||||
|
||||
e.clearSelection();
|
||||
}).on('error', function(/*e*/) {
|
||||
$('#clientSecretInputClipboardButton').tooltip({
|
||||
title: 'Press Ctrl+C to copy',
|
||||
trigger: 'manual'
|
||||
}).tooltip('show');
|
||||
|
||||
$timeout(function () { $('#clientSecretInputClipboardButton').tooltip('hide'); }, 2000);
|
||||
});
|
||||
|
||||
$('.modal-backdrop').remove();
|
||||
}]);
|
||||
+85
-488
@@ -1,58 +1,3 @@
|
||||
<!-- Modal subscription -->
|
||||
<div class="modal fade" id="subscriptionRequiredModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'users.subscriptionDialog.title' | tr }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>To add more users, please setup a paid plain.</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="openSubscriptionSetup()">{{ 'users.subscriptionDialog.setupAction' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal subscription group -->
|
||||
<div class="modal fade" id="subscriptionRequiredGroupModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'users.subscriptionDialog.title' | tr }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>User groups are part of the business plan.</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="openSubscriptionSetup()">{{ 'users.subscriptionDialog.setupAction' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal make user local -->
|
||||
<div class="modal fade" id="makeLocalModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'users.makeLocalDialog.title' | tr }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{{ 'users.makeLocalDialog.description' | tr }}</p>
|
||||
<p class="text-warning">{{ 'users.makeLocalDialog.warning' | tr }}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="makeLocal.submit()" ng-disabled="makeLocal.busy"><i class="fa fa-circle-notch fa-spin" ng-show="makeLocal.busy"></i> {{ 'users.makeLocalDialog.submitAction' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal add user -->
|
||||
<div class="modal fade" id="userAddModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
@@ -61,49 +6,49 @@
|
||||
<h4 class="modal-title">{{ 'users.addUserDialog.title' | tr }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form name="useraddForm" role="form" ng-submit="useradd.submit()" autocomplete="off">
|
||||
<div class="form-group" ng-class="{ 'has-error': (useraddForm.displayName.$dirty && useraddForm.displayName.$invalid) || (!useraddForm.displayName.$dirty && useradd.error.displayName) }">
|
||||
<form name="useraddForm" role="form" ng-submit="userAdd.submit()" autocomplete="off">
|
||||
<div class="form-group" ng-class="{ 'has-error': (useraddForm.displayName.$dirty && useraddForm.displayName.$invalid) || (!useraddForm.displayName.$dirty && userAdd.error.displayName) }">
|
||||
<label class="control-label">{{ 'users.user.fullName' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="useradd.displayName" name="displayName" id="inputUserAddDisplayName" autofocus autocomplete="off" placeholder="{{ 'users.user.displayNamePlaceholder' | tr }}">
|
||||
<div class="control-label" ng-show="(!useraddForm.displayName.$dirty && useradd.error.displayName) || (useraddForm.displayName.$dirty && useraddForm.displayName.$invalid) || (!useraddForm.displayName.$dirty && useradd.error.displayName)">
|
||||
<input type="text" class="form-control" ng-model="userAdd.displayName" name="displayName" id="inputUserAddDisplayName" autofocus autocomplete="off" placeholder="{{ 'users.user.displayNamePlaceholder' | tr }}">
|
||||
<div class="control-label" ng-show="(!useraddForm.displayName.$dirty && userAdd.error.displayName) || (useraddForm.displayName.$dirty && useraddForm.displayName.$invalid) || (!useraddForm.displayName.$dirty && userAdd.error.displayName)">
|
||||
<small ng-show="useraddForm.displayName.$error.displayName">{{ 'users.user.errorNotValidFullName' | tr }}</small>
|
||||
<small ng-show="!useraddForm.displayName.$dirty && useradd.error.displayName">{{ useradd.error.displayName }}</small>
|
||||
<small ng-show="!useraddForm.displayName.$dirty && userAdd.error.displayName">{{ userAdd.error.displayName }}</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': (useraddForm.email.$dirty && useraddForm.email.$invalid) || (!useraddForm.email.$dirty && useradd.error.email) }">
|
||||
<div class="form-group" ng-class="{ 'has-error': (useraddForm.email.$dirty && useraddForm.email.$invalid) || (!useraddForm.email.$dirty && userAdd.error.email) }">
|
||||
<label class="control-label">{{ 'users.user.primaryEmail' | tr }} <sup><a ng-href="https://docs.cloudron.io/profile/#primary-email" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></label>
|
||||
<input type="email" class="form-control" ng-model="useradd.email" name="email" id="inputUserAddEmail" required>
|
||||
<div class="control-label" ng-show="(!useraddForm.email.$dirty && useradd.error.email) || (useraddForm.email.$dirty && useraddForm.email.$invalid) || (!useraddForm.email.$dirty && useradd.error.email)">
|
||||
<input type="email" class="form-control" ng-model="userAdd.email" name="email" id="inputUserAddEmail" required>
|
||||
<div class="control-label" ng-show="(!useraddForm.email.$dirty && userAdd.error.email) || (useraddForm.email.$dirty && useraddForm.email.$invalid) || (!useraddForm.email.$dirty && userAdd.error.email)">
|
||||
<small ng-show="useraddForm.email.$error.required">{{ 'users.user.errorEmailRequired' | tr }}</small>
|
||||
<small ng-show="useraddForm.email.$error.email">{{ 'users.user.errorInvalidEmail' | tr }}</small>
|
||||
<small ng-show="!useraddForm.email.$dirty && useradd.error.email">{{ useradd.error.email }}</small>
|
||||
<small ng-show="!useraddForm.email.$dirty && userAdd.error.email">{{ userAdd.error.email }}</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': (useraddForm.fallbackEmail.$dirty && useraddForm.fallbackEmail.$invalid) || (!useraddForm.fallbackEmail.$dirty && useradd.error.fallbackEmail) }">
|
||||
<div class="form-group" ng-class="{ 'has-error': (useraddForm.fallbackEmail.$dirty && useraddForm.fallbackEmail.$invalid) || (!useraddForm.fallbackEmail.$dirty && userAdd.error.fallbackEmail) }">
|
||||
<label class="control-label">{{ 'users.user.recoveryEmail' | tr }} <sup><a ng-href="https://docs.cloudron.io/profile/#password-recovery-email" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></label>
|
||||
<input type="email" class="form-control" ng-model="useradd.fallbackEmail" name="fallbackEmail" id="inputUserAddFallbackEmail" placeholder="{{ 'users.user.fallbackEmailPlaceholder' | tr }}">
|
||||
<div class="control-label" ng-show="(!useraddForm.fallbackEmail.$dirty && useradd.error.fallbackEmail) || (useraddForm.fallbackEmail.$dirty && useraddForm.fallbackEmail.$invalid) || (!useraddForm.fallbackEmail.$dirty && useradd.error.fallbackEmail)">
|
||||
<input type="email" class="form-control" ng-model="userAdd.fallbackEmail" name="fallbackEmail" id="inputUserAddFallbackEmail" placeholder="{{ 'users.user.fallbackEmailPlaceholder' | tr }}">
|
||||
<div class="control-label" ng-show="(!useraddForm.fallbackEmail.$dirty && userAdd.error.fallbackEmail) || (useraddForm.fallbackEmail.$dirty && useraddForm.fallbackEmail.$invalid) || (!useraddForm.fallbackEmail.$dirty && userAdd.error.fallbackEmail)">
|
||||
<small ng-show="useraddForm.fallbackEmail.$error.required">{{ 'users.user.errorEmailRequired' | tr }}</small>
|
||||
<small ng-show="useraddForm.fallbackEmail.$error.fallbackEmail">{{ 'users.user.errorInvalidEmail' | tr }}</small>
|
||||
<small ng-show="!useraddForm.fallbackEmail.$dirty && useradd.error.fallbackEmail">{{ useradd.error.fallbackEmail }}</small>
|
||||
<small ng-show="!useraddForm.fallbackEmail.$dirty && userAdd.error.fallbackEmail">{{ userAdd.error.fallbackEmail }}</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': (useraddForm.username.$dirty && useraddForm.username.$invalid) || (!useraddForm.username.$dirty && useradd.error.username) }">
|
||||
<div class="form-group" ng-class="{ 'has-error': (useraddForm.username.$dirty && useraddForm.username.$invalid) || (!useraddForm.username.$dirty && userAdd.error.username) }">
|
||||
<label class="control-label">{{ 'users.user.username' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="useradd.username" name="username" id="inputUserAddUsername" ng-required="config.profileLocked" placeholder="{{ config.profileLocked ? '' : ('users.user.usernamePlaceholder' | tr) }}">
|
||||
<div class="control-label" ng-show="(!useraddForm.username.$dirty && useradd.error.username) || (useraddForm.username.$dirty && useraddForm.username.$invalid) || (!useraddForm.username.$dirty && useradd.error.username)">
|
||||
<input type="text" class="form-control" ng-model="userAdd.username" name="username" id="inputUserAddUsername" ng-required="config.profileLocked" placeholder="{{ config.profileLocked ? '' : ('users.user.usernamePlaceholder' | tr) }}">
|
||||
<div class="control-label" ng-show="(!useraddForm.username.$dirty && userAdd.error.username) || (useraddForm.username.$dirty && useraddForm.username.$invalid) || (!useraddForm.username.$dirty && userAdd.error.username)">
|
||||
<small ng-show="useraddForm.username.$error.username">{{ 'users.user.errorInvalidUsername' | tr }}</small>
|
||||
<small ng-show="!useraddForm.username.$dirty && useradd.error.username">{{ useradd.error.username }}</small>
|
||||
<small ng-show="!useraddForm.username.$dirty && userAdd.error.username">{{ userAdd.error.username }}</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="userInfo.isAtLeastAdmin">
|
||||
<label class="control-label">{{ 'users.user.role' | tr }} <sup><a ng-href="https://docs.cloudron.io/user-management/#roles" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></label>
|
||||
<div class="control-label">
|
||||
<select class="form-control" ng-model="useradd.role" ng-options="role.id as role.name disable when role.disabled for role in roles"></select>
|
||||
<select class="form-control" ng-model="userAdd.role" ng-options="role.id as role.name disable when role.disabled for role in roles"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -111,22 +56,23 @@
|
||||
<label class="control-label">{{ 'users.user.groups' | tr }}</label>
|
||||
<div class="control-label">
|
||||
<div ng-show="groups.length === 0">{{ 'users.user.noGroups' | tr }}</div>
|
||||
<multiselect ng-show="groups.length !== 0" ng-model="useradd.selectedGroups" options="group.name for group in groups" data-compare-by="name" data-multiple="true" filter-after-rows="5" scroll-after-rows="10"></multiselect>
|
||||
<!-- local groups. they can have local and external users . angular cannot filter empty strings - https://github.com/angular/angular.js/issues/7890 -->
|
||||
<multiselect ng-show="groups.length !== 0" ng-model="userAdd.selectedLocalGroups" options="group.name for group in groups | filter:{ source: '!ldap' }" data-compare-by="name" data-multiple="true" filter-after-rows="5" scroll-after-rows="10"></multiselect>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="useradd.sendInvite" id="inputUserAddSendInvite"> {{ 'users.addUserDialog.sendInviteCheckbox' | tr }}
|
||||
<input type="checkbox" ng-model="userAdd.sendInvite" id="inputUserAddSendInvite"> {{ 'users.addUserDialog.sendInviteCheckbox' | tr }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<input class="ng-hide" type="submit" ng-disabled="useraddForm.$invalid || useradd.busy"/>
|
||||
<input class="ng-hide" type="submit" ng-disabled="useraddForm.$invalid || userAdd.busy"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="useradd.submit()" ng-disabled="useraddForm.$invalid || useradd.busy"><i class="fa fa-circle-notch fa-spin" ng-show="useradd.busy"></i> {{ 'users.addUserDialog.addUserAction' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="userAdd.submit()" ng-disabled="useraddForm.$invalid || userAdd.busy"><i class="fa fa-circle-notch fa-spin" ng-show="userAdd.busy"></i> {{ 'users.addUserDialog.addUserAction' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -137,15 +83,15 @@
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'users.deleteUserDialog.title' | tr:{ username: (userremove.userInfo.username || userremove.userInfo.email) } }}</h4>
|
||||
<h4 class="modal-title">{{ 'users.deleteUserDialog.title' | tr:{ username: (userRemove.userInfo.username || userRemove.userInfo.email) } }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p class="text-bold text-danger" ng-show="userremove.error">{{ userremove.error }}</p>
|
||||
<p ng-hide="userremove.error">{{ 'users.deleteUserDialog.description' | tr }}</p>
|
||||
<p class="text-bold text-danger" ng-show="userRemove.error">{{ userRemove.error }}</p>
|
||||
<p ng-hide="userRemove.error">{{ 'users.deleteUserDialog.description' | tr }}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-danger" ng-click="userremove.submit()" ng-hide="userremove.error" ng-disabled="userremove.busy"><i class="fa fa-circle-notch fa-spin" ng-show="userremove.busy"></i> {{ 'users.deleteUserDialog.deleteAction' | tr }}</button>
|
||||
<button type="button" class="btn btn-danger" ng-click="userRemove.submit()" ng-hide="userRemove.error" ng-disabled="userRemove.busy"><i class="fa fa-circle-notch fa-spin" ng-show="userRemove.busy"></i> {{ 'users.deleteUserDialog.deleteAction' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -156,83 +102,94 @@
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'users.editUserDialog.title' | tr:{ username: (useredit.userInfo.username || useredit.userInfo.email) } }}</h4>
|
||||
<h4 class="modal-title">{{ 'users.editUserDialog.title' | tr:{ username: (userEdit.userInfo.username || userEdit.userInfo.email) } }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div ng-show="useredit.source">
|
||||
<div ng-show="userEdit.source">
|
||||
<p class="text-warning">{{ 'users.editUserDialog.externalLdapWarning' | tr }}</p>
|
||||
<p><label>{{ 'users.user.displayName' | tr }}</label><br/><input type="text" class="form-control" ng-disabled="true" ng-model="useredit.displayName">
|
||||
<p><label>{{ 'users.user.email' | tr }}</label><br/><input type="text" class="form-control" ng-disabled="true" ng-model="useredit.email"></p>
|
||||
<p><label>{{ 'users.user.displayName' | tr }}</label><br/><input type="text" class="form-control" ng-disabled="true" ng-model="userEdit.displayName">
|
||||
<p><label>{{ 'users.user.email' | tr }}</label><br/><input type="text" class="form-control" ng-disabled="true" ng-model="userEdit.email"></p>
|
||||
</div>
|
||||
|
||||
<form name="useredit_form" role="form" ng-submit="useredit.submit()" autocomplete="off">
|
||||
<p class="has-error text-center" ng-show="useredit.error.generic">{{ useredit.error.generic }}</p>
|
||||
<form name="useredit_form" role="form" ng-submit="userEdit.submit()" autocomplete="off">
|
||||
<p class="has-error text-center" ng-show="userEdit.error.generic">{{ userEdit.error.generic }}</p>
|
||||
|
||||
<!-- when user profiles are locked, this provides a way for the admin to set the username -->
|
||||
<div class="form-group" ng-hide="useredit.source || useredit.userInfo.username" ng-class="{ 'has-error': (useredit_form.username.$dirty && useredit_form.username.$invalid) || (!useredit_form.username.$dirty && useredit.error.username) }">
|
||||
<div class="form-group" ng-hide="userEdit.source || userEdit.userInfo.username" ng-class="{ 'has-error': (useredit_form.username.$dirty && useredit_form.username.$invalid) || (!useredit_form.username.$dirty && userEdit.error.username) }">
|
||||
<label class="control-label">{{ 'users.user.username' | tr }}</label>
|
||||
<div class="control-label" ng-show="(!useredit_form.username.$dirty && useredit.error.username) || (useredit_form.username.$dirty && useredit_form.username.$invalid) || (!useredit_form.username.$dirty && useredit.error.username)">
|
||||
<small ng-show="!useredit_form.username.$dirty && useredit.error.username">{{ useredit.error.username }}</small>
|
||||
<div class="control-label" ng-show="(!useredit_form.username.$dirty && userEdit.error.username) || (useredit_form.username.$dirty && useredit_form.username.$invalid) || (!useredit_form.username.$dirty && userEdit.error.username)">
|
||||
<small ng-show="!useredit_form.username.$dirty && userEdit.error.username">{{ userEdit.error.username }}</small>
|
||||
</div>
|
||||
<input type="text" class="form-control" ng-model="useredit.username" name="username" autocomplete="off">
|
||||
<input type="text" class="form-control" ng-model="userEdit.username" name="username" autocomplete="off">
|
||||
</div>
|
||||
<div class="form-group" ng-hide="useredit.source" ng-class="{ 'has-error': (useredit_form.displayName.$dirty && useredit_form.displayName.$invalid) || (!useredit_form.displayName.$dirty && useredit.error.displayName) }">
|
||||
<div class="form-group" ng-hide="userEdit.source" ng-class="{ 'has-error': (useredit_form.displayName.$dirty && useredit_form.displayName.$invalid) || (!useredit_form.displayName.$dirty && userEdit.error.displayName) }">
|
||||
<label class="control-label">{{ 'users.user.displayName' | tr }}</label>
|
||||
<div class="control-label" ng-show="(!useredit_form.displayName.$dirty && useredit.error.displayName) || (useredit_form.displayName.$dirty && useredit_form.displayName.$invalid) || (!useredit_form.displayName.$dirty && useredit.error.displayName)">
|
||||
<div class="control-label" ng-show="(!useredit_form.displayName.$dirty && userEdit.error.displayName) || (useredit_form.displayName.$dirty && useredit_form.displayName.$invalid) || (!useredit_form.displayName.$dirty && userEdit.error.displayName)">
|
||||
<small ng-show="useredit_form.displayName.$error.required">{{ 'users.user.errorDisplayNameRequired' | tr }}</small>
|
||||
<small ng-show="!useredit_form.displayName.$dirty && useredit.error.displayName">{{ useredit.error.displayName }}</small>
|
||||
<small ng-show="!useredit_form.displayName.$dirty && userEdit.error.displayName">{{ userEdit.error.displayName }}</small>
|
||||
</div>
|
||||
<input type="text" class="form-control" ng-model="useredit.displayName" name="displayName" required autofocus autocomplete="off">
|
||||
<input type="text" class="form-control" ng-model="userEdit.displayName" name="displayName" required autofocus autocomplete="off">
|
||||
</div>
|
||||
<div class="form-group" ng-hide="useredit.source" ng-class="{ 'has-error': (useredit_form.email.$dirty && useredit_form.email.$invalid) || (!useredit_form.email.$dirty && useredit.error.email) }">
|
||||
<div class="form-group" ng-hide="userEdit.source" ng-class="{ 'has-error': (useredit_form.email.$dirty && useredit_form.email.$invalid) || (!useredit_form.email.$dirty && userEdit.error.email) }">
|
||||
<label class="control-label">{{ 'users.user.primaryEmail' | tr }} <sup><a ng-href="https://docs.cloudron.io/profile/#primary-email" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></label>
|
||||
<div class="control-label" ng-show="(!useredit_form.email.$dirty && useredit.error.email) || (useredit_form.email.$dirty && useredit_form.email.$invalid) || (!useredit_form.email.$dirty && useredit.error.email)">
|
||||
<div class="control-label" ng-show="(!useredit_form.email.$dirty && userEdit.error.email) || (useredit_form.email.$dirty && useredit_form.email.$invalid) || (!useredit_form.email.$dirty && userEdit.error.email)">
|
||||
<small ng-show="useredit_form.email.$error.required">{{ 'users.user.errorEmailRequired' | tr }}</small>
|
||||
<small ng-show="useredit_form.email.$error.email">{{ 'users.user.errorInvalidEmail' | tr }}</small>
|
||||
<small ng-show="!useredit_form.email.$dirty && useredit.error.email">{{ useredit.error.email }}</small>
|
||||
<small ng-show="!useredit_form.email.$dirty && userEdit.error.email">{{ userEdit.error.email }}</small>
|
||||
</div>
|
||||
<input type="email" class="form-control" ng-model="useredit.email" name="email" required>
|
||||
<input type="email" class="form-control" ng-model="userEdit.email" name="email" required>
|
||||
</div>
|
||||
<div class="form-group" ng-hide="useredit.source" ng-class="{ 'has-error': (useredit_form.fallbackEmail.$dirty && useredit_form.fallbackEmail.$invalid) || (!useredit_form.fallbackEmail.$dirty && useredit.error.fallbackEmail) }">
|
||||
<div class="form-group" ng-hide="userEdit.source" ng-class="{ 'has-error': (useredit_form.fallbackEmail.$dirty && useredit_form.fallbackEmail.$invalid) || (!useredit_form.fallbackEmail.$dirty && userEdit.error.fallbackEmail) }">
|
||||
<label class="control-label">{{ 'users.user.recoveryEmail' | tr }} <sup><a ng-href="https://docs.cloudron.io/profile/#password-recovery-email" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></label>
|
||||
<div class="control-label" ng-show="(!useredit_form.fallbackEmail.$dirty && useredit.error.fallbackEmail) || (useredit_form.fallbackEmail.$dirty && useredit_form.fallbackEmail.$invalid) || (!useredit_form.fallbackEmail.$dirty && useredit.error.fallbackEmail)">
|
||||
<div class="control-label" ng-show="(!useredit_form.fallbackEmail.$dirty && userEdit.error.fallbackEmail) || (useredit_form.fallbackEmail.$dirty && useredit_form.fallbackEmail.$invalid) || (!useredit_form.fallbackEmail.$dirty && userEdit.error.fallbackEmail)">
|
||||
<small ng-show="useredit_form.fallbackEmail.$error.fallbackEmail">{{ 'users.user.errorInvalidEmail' | tr }}</small>
|
||||
<small ng-show="!useredit_form.fallbackEmail.$dirty && useredit.error.fallbackEmail">{{ useredit.error.fallbackEmail }}</small>
|
||||
<small ng-show="!useredit_form.fallbackEmail.$dirty && userEdit.error.fallbackEmail">{{ userEdit.error.fallbackEmail }}</small>
|
||||
</div>
|
||||
<input type="fallbackEmail" class="form-control" ng-model="useredit.fallbackEmail" name="fallbackEmail">
|
||||
<input type="fallbackEmail" class="form-control" ng-model="userEdit.fallbackEmail" name="fallbackEmail">
|
||||
</div>
|
||||
<div class="form-group" ng-show="!isMe(useredit.userInfo) && userInfo.isAtLeastAdmin">
|
||||
<div class="form-group" ng-show="!isMe(userEdit.userInfo) && userInfo.isAtLeastAdmin">
|
||||
<label class="control-label">{{ 'users.user.role' | tr }} <sup><a ng-href="https://docs.cloudron.io/user-management/#roles" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></label>
|
||||
<div class="control-label">
|
||||
<select class="form-control" ng-model="useredit.role" ng-options="role.id as role.name disable when role.disabled for role in roles"></select>
|
||||
<select class="form-control" ng-model="userEdit.role" ng-options="role.id as role.name disable when role.disabled for role in roles"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">{{ 'users.user.groups' | tr }}</label>
|
||||
<div class="control-label">
|
||||
<div ng-show="groups.length === 0">{{ 'users.user.noGroups' | tr }}</div>
|
||||
<multiselect ng-show="groups.length !== 0" ng-model="useredit.selectedGroups" options="group.name for group in groups" data-compare-by="id" data-multiple="true" filter-after-rows="5" scroll-after-rows="10"></multiselect>
|
||||
<div ng-switch on="groups.length">
|
||||
<div ng-switch-when="0">{{ 'users.user.noGroups' | tr }}</div>
|
||||
<div ng-switch-default>
|
||||
<!-- local groups. they can have local and external users . angular cannot filter empty strings - https://github.com/angular/angular.js/issues/7890 -->
|
||||
<multiselect ng-show="hasLocalGroups" ng-model="userEdit.selectedLocalGroups" options="group.name for group in groups | filter:{ source: '!ldap' }" data-compare-by="id" data-multiple="true" filter-after-rows="5" scroll-after-rows="10"></multiselect>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" ng-hide="isMe(useredit.userInfo)">
|
||||
<div class="form-group" ng-show="userEdit.externalGroups.length">
|
||||
<!-- remote groups. cannot be edited -->
|
||||
<label class="control-label">{{ 'users.user.ldapGroups' | tr }}</label>
|
||||
<div><span ng-repeat="group in userEdit.externalGroups">{{ group.name }}</span></div>
|
||||
</div>
|
||||
<div class="form-group" ng-hide="isMe(userEdit.userInfo)">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="useredit.active"> {{ 'users.user.activeCheckbox' | tr }} <sup><a ng-href="https://docs.cloudron.io/user-management/#disable-user" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup>
|
||||
<input type="checkbox" ng-model="userEdit.active"> {{ 'users.user.activeCheckbox' | tr }} <sup><a ng-href="https://docs.cloudron.io/user-management/#disable-user" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<input class="hide" type="submit" ng-disabled="useredit_form.$invalid || useredit.busy"/>
|
||||
<input class="hide" type="submit" ng-disabled="useredit_form.$invalid || userEdit.busy"/>
|
||||
</form>
|
||||
<hr/>
|
||||
<div>
|
||||
<p ng-hide="useredit.userInfo.twoFactorAuthenticationEnabled">{{ 'users.passwordResetDialog.no2FASetup' | tr }}</p>
|
||||
<p ng-show="useredit.userInfo.twoFactorAuthenticationEnabled">{{ 'users.passwordResetDialog.2FAIsSetup' | tr }}</p>
|
||||
<button type="button" class="btn btn-danger" ng-click="useredit.reset2FA()" ng-disabled="!useredit.userInfo.twoFactorAuthenticationEnabled || useredit.reset2FABusy"><i class="fa fa-circle-notch fa-spin" ng-show="useredit.reset2FABusy"></i> {{ 'users.passwordResetDialog.reset2FAAction' | tr }}</button>
|
||||
<div ng-hide="userEdit.source && config.external2FA">
|
||||
<p ng-hide="userEdit.userInfo.twoFactorAuthenticationEnabled">{{ 'users.passwordResetDialog.no2FASetup' | tr }}</p>
|
||||
<p ng-show="userEdit.userInfo.twoFactorAuthenticationEnabled">{{ 'users.passwordResetDialog.2FAIsSetup' | tr }}</p>
|
||||
<button type="button" class="btn btn-danger" ng-click="userEdit.reset2FA()" ng-disabled="!userEdit.userInfo.twoFactorAuthenticationEnabled || userEdit.reset2FABusy"><i class="fa fa-circle-notch fa-spin" ng-show="userEdit.reset2FABusy"></i> {{ 'users.passwordResetDialog.reset2FAAction' | tr }}</button>
|
||||
</div>
|
||||
<div ng-show="userEdit.source && config.external2FA"> {{ 'users.user.external2FA' | tr }}</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="useredit.submit()" ng-disabled="useredit_form.$invalid || useredit.busy"><i class="fa fa-circle-notch fa-spin" ng-show="useredit.busy"></i> {{ 'main.dialog.save' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="userEdit.submit()" ng-disabled="useredit_form.$invalid || userEdit.busy"><i class="fa fa-circle-notch fa-spin" ng-show="userEdit.busy"></i> {{ 'main.dialog.save' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -292,7 +249,8 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label">{{ 'users.group.users' | tr }}</label>
|
||||
<div class="control-label">
|
||||
<multiselect ng-model="groupEdit.selectedUsers" options="(user.username || user.email) for user in allUsers" data-compare-by="email" data-multiple="true" filter-after-rows="5" scroll-after-rows="10"></multiselect>
|
||||
<multiselect ng-hide="groupEdit.source" ng-model="groupEdit.selectedUsers" ng-disabled="groupEdit.busy" options="(user.username || user.email) for user in allUsers" data-compare-by="email" data-multiple="true" filter-after-rows="5" scroll-after-rows="10"></multiselect>
|
||||
<div ng-show="groupEdit.source"><span ng-repeat="user in groupEdit.selectedUsers"> {{ (user.username || user.email) }}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -301,7 +259,7 @@
|
||||
<multiselect ng-model="groupEdit.selectedApps" options="(app.label || app.fqdn) for app in groupEdit.apps" data-compare-by="fqdn" data-multiple="true" filter-after-rows="5" scroll-after-rows="10"></multiselect>
|
||||
</div>
|
||||
</div>
|
||||
<input class="hide" type="submit" ng-disabled="groupEdit_form.$invalid || useredit.busy"/>
|
||||
<input class="hide" type="submit" ng-disabled="groupEdit_form.$invalid || groupEdit.busy"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@@ -483,112 +441,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal external ldap -->
|
||||
<div class="modal fade" id="externalLdapModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'users.externalLdapDialog.title' | tr }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p class="has-error text-center" ng-show="externalLdap.error.generic">{{ externalLdap.error.generic }}</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="ldapProvider">{{ 'users.externalLdap.provider' | tr }} <sup><a ng-href="https://docs.cloudron.io/user-management/#external-directory" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></label>
|
||||
<select class="form-control" id="ldapProvider" ng-model="externalLdap.provider" ng-options="a.value as a.name for a in ldapProvider"></select>
|
||||
</div>
|
||||
|
||||
<div uib-collapse="externalLdap.provider === 'noop'">
|
||||
<form name="externalLdapConfigForm" role="form" novalidate ng-submit="externalLdap.submit()" autocomplete="off">
|
||||
<fieldset>
|
||||
<div class="form-group" ng-class="{ 'has-error': externalLdap.error.url }">
|
||||
<label class="control-label" for="inputExternalLdapConfigUrl">{{ 'users.externalLdap.server' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="externalLdap.url" id="inputExternalLdapConfigUrl" name="url" ng-disabled="externalLdap.busy" placeholder="ldaps://example.com:636" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="externalLdap.acceptSelfSignedCerts"> {{ 'users.externalLdap.acceptSelfSignedCert' | tr }}
|
||||
</label>
|
||||
</div>
|
||||
<p class="has-error" ng-show="externalLdap.error.acceptSelfSignedCerts">{{ 'users.externalLdap.errorSelfSignedCert' | tr }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': externalLdap.error.baseDn }" ng-show="externalLdap.provider !== 'cloudron'">
|
||||
<label class="control-label" for="inputExternalLdapConfigBaseDn">{{ 'users.externalLdap.baseDn' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="externalLdap.baseDn" id="inputExternalLdapConfigBaseDn" name="baseDn" ng-disabled="externalLdap.busy" placeholder="ou=users,dc=example,dc=com" ng-required="externalLdap.provider !== 'cloudron'">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': externalLdap.error.filter }" ng-show="externalLdap.provider !== 'cloudron'">
|
||||
<label class="control-label" for="inputExternalLdapConfigFilter">{{ 'users.externalLdap.filter' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="externalLdap.filter" id="inputExternalLdapConfigFilter" name="filter" ng-disabled="externalLdap.busy" placeholder="(objectClass=inetOrgPerson)" ng-required="externalLdap.provider !== 'cloudron'">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': externalLdap.error.usernameField }" ng-show="externalLdap.provider !== 'cloudron'">
|
||||
<label class="control-label" for="inputExternalLdapConfigUsernameField">{{ 'users.externalLdap.usernameField' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="externalLdap.usernameField" id="inputExternalLdapConfigUsernameField" name="usernameField" ng-disabled="externalLdap.busy" placeholder="uid or sAMAcountName">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="externalLdap.syncGroups"> {{ 'users.externalLdap.syncGroups' | tr }}</sup>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': externalLdap.error.groupBaseDn }" ng-show="externalLdap.syncGroups && externalLdap.provider !== 'cloudron'">
|
||||
<label class="control-label" for="inputExternalLdapConfigGroupBaseDn">{{ 'users.externalLdap.groupBaseDn' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="externalLdap.groupBaseDn" id="inputExternalLdapConfigGroupBaseDn" name="groupBaseDn" ng-disabled="externalLdap.busy" placeholder="ou=groups,dc=example,dc=com" ng-required="externalLdap.syncGroups && externalLdap.provider !== 'cloudron'">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': externalLdap.error.groupFilter }" ng-show="externalLdap.syncGroups && externalLdap.provider !== 'cloudron'">
|
||||
<label class="control-label" for="inputExternalLdapConfigGroupFilter">{{ 'users.externalLdap.groupFilter' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="externalLdap.groupFilter" id="inputExternalLdapConfigGroupFilter" name="groupFilter" ng-disabled="externalLdap.busy" placeholder="(objectClass=groupOfNames)" ng-required="externalLdap.syncGroups && externalLdap.provider !== 'cloudron'">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': externalLdap.error.groupnameField }" ng-show="externalLdap.syncGroups && externalLdap.provider !== 'cloudron'">
|
||||
<label class="control-label" for="inputExternalLdapConfigGroupnameField">{{ 'users.externalLdap.groupnameField' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="externalLdap.groupnameField" id="inputExternalLdapConfigGroupnameField" name="groupnameField" ng-disabled="externalLdap.busy" placeholder="cn" ng-required="externalLdap.syncGroups && externalLdap.provider !== 'cloudron'">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': externalLdap.error.credentials }" ng-show="externalLdap.provider !== 'cloudron'">
|
||||
<label class="control-label" for="inputExternalLdapConfigBindDn">{{ 'users.externalLdap.bindUsername' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="externalLdap.bindDn" id="inputExternalLdapConfigBindDn" name="bindDn" ng-disabled="externalLdap.busy" placeholder="uid=admin,ou=Users,dc=example,dc=com">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': externalLdap.error.credentials }">
|
||||
<label class="control-label" for="inputExternalLdapConfigBindPassword">{{ 'users.externalLdap.bindPassword' | tr }}</label>
|
||||
<input type="password" class="form-control" ng-model="externalLdap.bindPassword" id="inputExternalLdapConfigBindPassword" name="bindPassword" ng-disabled="externalLdap.busy" placeholder="" password-reveal>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="externalLdap.autoCreate"> {{ 'users.externalLdap.autocreateUsersOnLogin' | tr }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input class="ng-hide" type="submit" ng-disabled="externalLdapConfigForm.$invalid"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-primary" ng-click="externalLdap.submit()" ng-disabled="externalLdapConfigForm.$invalid || externalLdap.busy"><i class="fa fa-circle-notch fa-spin" ng-show="externalLdap.busy"></i> {{ 'main.dialog.save' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content content-large">
|
||||
|
||||
<div class="text-left">
|
||||
<h1>
|
||||
{{ 'users.title' | tr }}
|
||||
{{ 'main.navbar.users' | tr }}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@@ -597,7 +454,8 @@
|
||||
<input type="text" id="userSearchInput" class="form-control" style="max-width: 350px;" ng-model="userSearchString" ng-model-options="{ debounce: 1000 }" ng-change="updateFilter()" placeholder="{{ 'main.searchPlaceholder' | tr }}"/>
|
||||
<multiselect ng-model="userStateFilter" ms-header="{{ 'apps.stateFilterHeader' | tr }}" ms-selected="{{ userStateFilter }}" options="state.label for state in userStates" data-multiple="false"></multiselect>
|
||||
<div style="flex-grow: 1;"></div>
|
||||
<div class="btn-group">
|
||||
<!-- import/export buttons are hidden until we figure what the exact use case is -->
|
||||
<div class="btn-group" ng-hide="true">
|
||||
<button class="btn btn-default" ng-click="userImport.show()" uib-tooltip="{{ 'users.userImport.tooltip' | tr }}" tooltip-append-to-body="true"><i class="fas fa-download"></i></button>
|
||||
<div class="btn-group" role="group">
|
||||
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" uib-tooltip="{{ 'users.userExport.tooltip' | tr }}" tooltip-append-to-body="true">
|
||||
@@ -609,7 +467,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-primary btn-outline" ng-click="useradd.show()">
|
||||
<button class="btn btn-primary btn-outline" ng-click="userAdd.show()">
|
||||
<i class="fa fa-user-plus"></i> {{ 'users.newUserAction' | tr }}
|
||||
</button>
|
||||
</div>
|
||||
@@ -643,13 +501,13 @@
|
||||
<i class="fas fa-mail-bulk arrow" ng-show="user.active && user.role === 'mailmanager'" uib-tooltip="{{ 'users.users.mailmanagerTooltip' | tr }}"></i>
|
||||
<i class="fa fa-ban" ng-show="!user.active" uib-tooltip="{{ 'users.users.inactiveTooltip' | tr }}"></i>
|
||||
</td>
|
||||
<td class="hand elide-table-cell" ng-click="canEdit(user) && useredit.show(user)" ng-show="user.username">
|
||||
<td class="hand elide-table-cell" ng-click="canEdit(user) && userEdit.show(user)" ng-show="user.username">
|
||||
{{ user.displayName }} <span class="text-muted">{{ user.username }}</span> <i ng-show="user.source" class="far fa-address-book" uib-tooltip="{{ 'users.users.externalLdapTooltip' | tr }}"></i>
|
||||
</td>
|
||||
<td class="hand elide-table-cell" ng-click="canEdit(user) && useredit.show(user)" ng-hide="user.username">
|
||||
<td class="hand elide-table-cell" ng-click="canEdit(user) && userEdit.show(user)" ng-hide="user.username">
|
||||
<span class="text-muted" uib-tooltip="{{ 'users.users.notActivatedYetTooltip' | tr }}">{{ user.email }}</span>
|
||||
</td>
|
||||
<td class="text-left hand elide-table-cell hidden-xs hidden-sm" ng-click="canEdit(user) && useredit.show(user)">
|
||||
<td class="text-left hand elide-table-cell hidden-xs hidden-sm" ng-click="canEdit(user) && userEdit.show(user)">
|
||||
<span class="group-badge" ng-repeat="groupId in user.groupIds">
|
||||
{{ groupsById[groupId].name }}
|
||||
</span>
|
||||
@@ -657,11 +515,10 @@
|
||||
|
||||
<td class="text-right no-wrap" style="vertical-align: bottom">
|
||||
<button ng-disabled="!canEdit(user)" ng-show="!user.inviteAccepted && !isMe(user) && !user.source" class="btn btn-xs btn-default" ng-click="invitation.show(user)" uib-tooltip="{{ 'users.users.invitationTooltip' | tr }}"><i class="fas fa-paper-plane"></i></button>
|
||||
<button ng-show="user.source" class="btn btn-xs btn-default" ng-click="makeLocal.show(user)" uib-tooltip="{{ 'users.users.makeLocalTooltip' | tr }}"><i class="fas fa-thumbtack" style="width: 10.5px;"></i></button>
|
||||
<button ng-disabled="!canEdit(user)" ng-show="user.inviteAccepted && !user.source" class="btn btn-xs btn-default" ng-click="passwordReset.show(user)" uib-tooltip="{{ 'users.users.resetPasswordTooltip' | tr }}"><i class="fas fa-key"></i></button>
|
||||
<button ng-disabled="!canImpersonate(user)" class="btn btn-xs btn-default" ng-click="setGhost.show(user)" uib-tooltip="{{ 'users.users.setGhostTooltip' | tr }}"><i class="fas fa-user-secret"></i></button>
|
||||
<button ng-disabled="!canEdit(user)" class="btn btn-xs btn-default" ng-click="useredit.show(user)" uib-tooltip="{{ 'users.users.editUserTooltip' | tr }}"><i class="fa fa-pencil-alt"></i></button>
|
||||
<button ng-disabled="!canEdit(user) || isMe(user)" class="btn btn-xs btn-danger" ng-click="userremove.show(user)" uib-tooltip="{{ 'users.users.removeUserTooltip' | tr }}"><i class="far fa-trash-alt"></i></button>
|
||||
<button ng-disabled="!canEdit(user)" class="btn btn-xs btn-default" ng-click="userEdit.show(user)" uib-tooltip="{{ 'users.users.editUserTooltip' | tr }}"><i class="fa fa-pencil-alt"></i></button>
|
||||
<button ng-disabled="!canEdit(user) || isMe(user)" class="btn btn-xs btn-danger" ng-click="userRemove.show(user)" uib-tooltip="{{ 'users.users.removeUserTooltip' | tr }}"><i class="far fa-trash-alt"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -672,6 +529,7 @@
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<button class="btn btn-default btn-outline btn-xs" ng-click="showPrevPage()" ng-class="{ 'btn-primary': currentPage > 1 }" ng-disabled="userRefreshBusy || currentPage <= 1"><i class="fa fa-angle-double-left"></i> {{ 'main.pagination.prev' | tr }}</button>
|
||||
<span style="margin: 0 5px; line-height: 1.5; font-size: 12px;">{{ currentPage }}</span>
|
||||
<button class="btn btn-default btn-outline btn-xs" ng-click="showNextPage()" ng-class="{ 'btn-primary': users.length > pageItems }" ng-disabled="userRefreshBusy || users.length < pageItems">{{ 'main.pagination.next' | tr }} <i class="fa fa-angle-double-right"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -727,265 +585,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left" style="margin-top: 50px;" ng-show="user.isAtLeastAdmin">
|
||||
<h3>{{ 'users.settings.title' | tr }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="card card-large" ng-show="user.isAtLeastAdmin">
|
||||
<form name="profileConfigForm" role="form" novalidate ng-submit="profileConfig.submit()" autocomplete="off">
|
||||
<fieldset ng-disabled="profileConfig.busy">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="profileConfig.editableUserProfiles"> {{ 'users.settings.allowProfileEditCheckbox' | tr }} <sup><a ng-href="https://docs.cloudron.io/user-management/#lock-profile" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup>
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="profileConfig.mandatory2FA"> {{ 'users.settings.require2FACheckbox' | tr }}
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<br/>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<span class="has-error" ng-show="profileConfig.errorMessage">{{ profileConfig.errorMessage }}</span>
|
||||
|
||||
<button class="btn btn-outline btn-primary pull-right" ng-click="profileConfig.submit()" ng-disabled="!profileConfigForm.$dirty || profileConfig.busy">
|
||||
<i class="fa fa-circle-notch fa-spin" ng-show="profileConfig.busy"></i> {{ 'users.settings.saveAction' | tr }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="text-left" style="margin-top: 50px;" ng-show="user.isAtLeastAdmin">
|
||||
<h3>{{ 'users.externalLdap.title' | tr }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="card card-large" ng-show="user.isAtLeastAdmin">
|
||||
<div class="row">
|
||||
<div class="col-md-12">{{ 'users.externalLdap.description' | tr }}</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
<div class="row" ng-hide="config.features.externalLdap">
|
||||
<div class="col-md-12">
|
||||
{{ 'users.externalLdap.subscriptionRequired' | tr }} <a href="" class="pull-right" ng-click="openSubscriptionSetup()">{{ 'users.externalLdap.subscriptionRequiredAction' | tr }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="config.features.externalLdap">
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider === 'noop'">
|
||||
<div class="col-xs-12">
|
||||
<span class="text-muted">{{ 'users.externalLdap.noopInfo' | tr }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop'">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.provider' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.provider }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop'">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.server' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.url }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop'">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.acceptSelfSignedCert' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.acceptSelfSignedCerts ? 'Yes' : 'No' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop' && externalLdap.currentConfig.provider !== 'cloudron'">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.baseDn' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.baseDn }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop' && externalLdap.currentConfig.provider !== 'cloudron'">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.filter' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.filter }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop' && externalLdap.currentConfig.provider !== 'cloudron'">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.usernameField' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.usernameField || 'uid' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop'">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.syncGroups' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.syncGroups ? 'Yes' : 'No' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop' && externalLdap.currentConfig.provider !== 'cloudron' && externalLdap.currentConfig.syncGroups">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.groupBaseDn' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.groupBaseDn }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop' && externalLdap.currentConfig.provider !== 'cloudron' && externalLdap.currentConfig.syncGroups">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.groupFilter' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.groupFilter }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop' && externalLdap.currentConfig.provider !== 'cloudron' && externalLdap.currentConfig.syncGroups">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.groupnameField' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.groupnameField }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop' && externalLdap.currentConfig.provider !== 'cloudron'">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.auth' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.bindDn ? 'Yes' : 'No' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="externalLdap.currentConfig.provider !== 'noop'">
|
||||
<div class="col-xs-6">
|
||||
<span class="text-muted">{{ 'users.externalLdap.autocreateUsersOnLogin' | tr }}</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ externalLdap.currentConfig.autoCreate ? 'Yes' : 'No' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<br/>
|
||||
<div class="col-md-12" style="margin-bottom: 10px;">
|
||||
<div ng-show="externalLdap.syncBusy" class="progress progress-striped active animateMe">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" style="width: {{ externalLdap.percent }}%"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<p ng-show="externalLdap.syncBusy">{{ externalLdap.message }}</p>
|
||||
<p ng-hide="externalLdap.syncBusy">
|
||||
<div class="has-error" ng-show="!externalLdap.active">{{ externalLdap.errorMessage }}</div>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 text-right">
|
||||
<button class="btn btn-primary pull-right" ng-click="externalLdap.show()">{{ 'users.externalLdap.configureAction' | tr }}</button>
|
||||
<button class="btn btn-success pull-right" ng-disabled="externalLdap.currentConfig.provider === 'noop'" ng-click="externalLdap.sync()"><i class="fa fa-circle-notch fa-spin" ng-show="externalLdap.syncBusy"></i> {{ 'users.externalLdap.syncAction' | tr }}</button>
|
||||
<a class="btn btn-primary pull-right" ng-show="externalLdap.taskId" ng-href="/logs.html?taskId={{ externalLdap.taskId }}" target="_blank">{{ 'users.externalLdap.showLogsAction' | tr }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left" style="margin-top: 50px;" ng-show="user.isAtLeastAdmin">
|
||||
<h3>{{ 'users.exposedLdap.title' | tr }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="card card-large" ng-show="user.isAtLeastAdmin">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div>{{ 'users.exposedLdap.description' | tr }}</div>
|
||||
|
||||
<br/>
|
||||
|
||||
<form name="userDirectoryConfigForm" role="form" novalidate ng-submit="userDirectoryConfig.submit()" autocomplete="off">
|
||||
<fieldset>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="userDirectoryConfig.enabled" ng-disabled="userDirectoryConfig.busy"> {{ 'users.exposedLdap.enabled' | tr }} <sup><a ng-href="https://docs.cloudron.io/user-management/#directory-server" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">{{ 'users.exposedLdap.secret.url' | tr }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" id="userDirectoryUrlInput" ng-value="'ldaps://' + config.adminFqdn + ':636'" readonly name="userDirectoryUrl" class="form-control"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button" id="userDirectoryUrlClipboardButton" data-clipboard-target="#userDirectoryUrlInput"><i class="fa fa-clipboard"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">{{ 'users.exposedLdap.secret.label' | tr }}</label>
|
||||
<p class="small" ng-bind-html=" 'users.exposedLdap.secret.description' | tr:{ userDN: 'cn=admin,ou=system,dc=cloudron' }"></p>
|
||||
<input type="password" ng-model="userDirectoryConfig.secret" ng-disabled="!userDirectoryConfig.enabled || userDirectoryConfig.busy" name="userDirectorySecret" class="form-control" ng-class="{ 'has-error': !userDirectoryConfigForm.secret.$dirty && userDirectoryConfig.error.secret }" password-reveal/>
|
||||
<div class="has-error" ng-show="userDirectoryConfig.error.secret">{{ userDirectoryConfig.error.secret }}</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">{{ 'users.exposedLdap.ipRestriction.label' | tr }}</label>
|
||||
<p class="small">{{ 'users.exposedLdap.ipRestriction.description' | tr }}</p>
|
||||
<textarea ng-model="userDirectoryConfig.allowlist" ng-disabled="!userDirectoryConfig.enabled || userDirectoryConfig.busy" placeholder="{{ 'users.exposedLdap.ipRestriction.placeholder' | tr }}" name="allowlist" class="form-control" ng-class="{ 'has-error': !userDirectoryConfigForm.allowlist.$dirty && userDirectoryConfig.error.allowlist }" rows="4"></textarea>
|
||||
<div class="has-error" ng-show="userDirectoryConfig.error.allowlist">{{ userDirectoryConfig.error.allowlist }}</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<br/>
|
||||
|
||||
<div>
|
||||
<span class="has-error" ng-show="userDirectoryConfig.error.generic">{{ userDirectoryConfig.error.generic }}</span>
|
||||
|
||||
<button class="btn btn-outline btn-primary pull-right" ng-click="userDirectoryConfig.submit()" ng-disabled="!userDirectoryConfigForm.$dirty || userDirectoryConfig.busy">
|
||||
<i class="fa fa-circle-notch fa-spin" ng-show="userDirectoryConfig.busy"></i> {{ 'users.settings.saveAction' | tr }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left" style="margin-top: 50px;" ng-show="user.isAtLeastAdmin">
|
||||
<h3>OpenID Connect Provider (beta)</h3>
|
||||
</div>
|
||||
|
||||
<div class="card card-large" ng-show="user.isAtLeastAdmin">
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="line-height: 34px;">
|
||||
Cloudron can act as an OpenID Connect provider for internal apps and external services.
|
||||
<a href="/#/oidc" class="btn btn-outline btn-primary pull-right">Settings</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+162
-496
@@ -9,40 +9,21 @@
|
||||
angular.module('Application').controller('UsersController', ['$scope', '$location', '$translate', '$timeout', 'Client', function ($scope, $location, $translate, $timeout, Client) {
|
||||
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastUserManager) $location.path('/'); });
|
||||
|
||||
$scope.ldapProvider = [
|
||||
{ name: 'Active Directory', value: 'ad' },
|
||||
{ name: 'Cloudron', value: 'cloudron' },
|
||||
{ name: 'Jumpcloud', value: 'jumpcloud' },
|
||||
{ name: 'Okta', value: 'okta' },
|
||||
{ name: 'Univention Corporate Server (UCS)', value: 'univention' },
|
||||
{ name: 'Other', value: 'other' },
|
||||
{ name: 'Disabled', value: 'noop' }
|
||||
];
|
||||
|
||||
$translate(['users.externalLdap.providerOther', 'users.externalLdap.providerDisabled']).then(function (tr) {
|
||||
if (tr['users.externalLdap.providerOther']) $scope.ldapProvider.find(function (p) { return p.value === 'other'; }).name = tr['users.externalLdap.providerOther'];
|
||||
if (tr['users.externalLdap.providerDisabled']) $scope.ldapProvider.find(function (p) { return p.value === 'noop'; }).name = tr['users.externalLdap.providerDisabled'];
|
||||
});
|
||||
|
||||
$scope.ready = false;
|
||||
$scope.users = []; // users of current page
|
||||
$scope.allUsersById = [];
|
||||
$scope.groups = [];
|
||||
$scope.hasLocalGroups = false;
|
||||
$scope.groupsById = { };
|
||||
$scope.config = Client.getConfig();
|
||||
$scope.userInfo = Client.getUserInfo();
|
||||
$scope.domains = [];
|
||||
|
||||
$scope.openSubscriptionSetup = function () {
|
||||
Client.openSubscriptionSetup($scope.$parent.subscription);
|
||||
};
|
||||
|
||||
$scope.roles = [];
|
||||
$scope.allUsers = []; // all the users and not just current page, have to load this for group assignment
|
||||
|
||||
$scope.userSearchString = '';
|
||||
$scope.currentPage = 1;
|
||||
$scope.pageItems = 15;
|
||||
$scope.pageItems = localStorage.cloudronPageSize || 15;
|
||||
$scope.userRefreshBusy = true;
|
||||
|
||||
$scope.userStates = [
|
||||
@@ -206,7 +187,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
$scope.userImport.busy = false;
|
||||
$scope.userImport.done = true;
|
||||
if ($scope.userImport.success) {
|
||||
refresh();
|
||||
refreshCurrentPage();
|
||||
refreshAllUsers();
|
||||
}
|
||||
});
|
||||
@@ -251,30 +232,30 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
});
|
||||
};
|
||||
|
||||
$scope.userremove = {
|
||||
$scope.userRemove = {
|
||||
busy: false,
|
||||
error: null,
|
||||
userInfo: {},
|
||||
|
||||
show: function (userInfo) {
|
||||
$scope.userremove.error = null;
|
||||
$scope.userremove.userInfo = userInfo;
|
||||
$scope.userRemove.error = null;
|
||||
$scope.userRemove.userInfo = userInfo;
|
||||
|
||||
$('#userRemoveModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.userremove.busy = true;
|
||||
$scope.userRemove.busy = true;
|
||||
|
||||
Client.removeUser($scope.userremove.userInfo.id, function (error) {
|
||||
$scope.userremove.busy = false;
|
||||
Client.removeUser($scope.userRemove.userInfo.id, function (error) {
|
||||
$scope.userRemove.busy = false;
|
||||
|
||||
if (error && error.statusCode === 403) return $scope.userremove.error = error.message;
|
||||
if (error && error.statusCode === 403) return $scope.userRemove.error = error.message;
|
||||
else if (error) return console.error('Unable to delete user.', error);
|
||||
|
||||
$scope.userremove.userInfo = {};
|
||||
$scope.userRemove.userInfo = {};
|
||||
|
||||
refresh();
|
||||
refreshCurrentPage();
|
||||
refreshAllUsers();
|
||||
|
||||
$('#userRemoveModal').modal('hide');
|
||||
@@ -282,7 +263,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
}
|
||||
};
|
||||
|
||||
$scope.useradd = {
|
||||
$scope.userAdd = {
|
||||
busy: false,
|
||||
alreadyTaken: false,
|
||||
error: {},
|
||||
@@ -290,19 +271,19 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
fallbackEmail: '',
|
||||
username: '',
|
||||
displayName: '',
|
||||
selectedGroups: [],
|
||||
selectedLocalGroups: [],
|
||||
role: 'user',
|
||||
sendInvite: false,
|
||||
|
||||
show: function () {
|
||||
$scope.useradd.error = {};
|
||||
$scope.useradd.email = '';
|
||||
$scope.useradd.fallbackEmail = '';
|
||||
$scope.useradd.username = '';
|
||||
$scope.useradd.displayName = '';
|
||||
$scope.useradd.selectedGroups = [];
|
||||
$scope.useradd.role = 'user';
|
||||
$scope.useradd.sendInvite = false;
|
||||
$scope.userAdd.error = {};
|
||||
$scope.userAdd.email = '';
|
||||
$scope.userAdd.fallbackEmail = '';
|
||||
$scope.userAdd.username = '';
|
||||
$scope.userAdd.displayName = '';
|
||||
$scope.userAdd.selectedLocalGroups = [];
|
||||
$scope.userAdd.role = 'user';
|
||||
$scope.userAdd.sendInvite = false;
|
||||
|
||||
$scope.useraddForm.$setUntouched();
|
||||
$scope.useraddForm.$setPristine();
|
||||
@@ -311,33 +292,33 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.useradd.busy = true;
|
||||
$scope.userAdd.busy = true;
|
||||
|
||||
$scope.useradd.alreadyTaken = false;
|
||||
$scope.useradd.error.email = null;
|
||||
$scope.useradd.error.fallbackEmail = null;
|
||||
$scope.useradd.error.username = null;
|
||||
$scope.useradd.error.displayName = null;
|
||||
$scope.userAdd.alreadyTaken = false;
|
||||
$scope.userAdd.error.email = null;
|
||||
$scope.userAdd.error.fallbackEmail = null;
|
||||
$scope.userAdd.error.username = null;
|
||||
$scope.userAdd.error.displayName = null;
|
||||
|
||||
var user = {
|
||||
username: $scope.useradd.username || null,
|
||||
email: $scope.useradd.email,
|
||||
fallbackEmail: $scope.useradd.fallbackEmail,
|
||||
displayName: $scope.useradd.displayName,
|
||||
role: $scope.useradd.role
|
||||
username: $scope.userAdd.username || null,
|
||||
email: $scope.userAdd.email,
|
||||
fallbackEmail: $scope.userAdd.fallbackEmail,
|
||||
displayName: $scope.userAdd.displayName,
|
||||
role: $scope.userAdd.role
|
||||
};
|
||||
|
||||
Client.addUser(user, function (error, userId) {
|
||||
if (error) {
|
||||
$scope.useradd.busy = false;
|
||||
$scope.userAdd.busy = false;
|
||||
|
||||
if (error.statusCode === 409) {
|
||||
if (error.message.toLowerCase().indexOf('email') !== -1) {
|
||||
$scope.useradd.error.email = 'Email already taken';
|
||||
$scope.userAdd.error.email = 'Email already taken';
|
||||
$scope.useraddForm.email.$setPristine();
|
||||
$('#inputUserAddEmail').focus();
|
||||
} else if (error.message.toLowerCase().indexOf('username') !== -1 || error.message.toLowerCase().indexOf('mailbox') !== -1) {
|
||||
$scope.useradd.error.username = 'Username already taken';
|
||||
$scope.userAdd.error.username = 'Username already taken';
|
||||
$scope.useraddForm.username.$setPristine();
|
||||
$('#inputUserAddUsername').focus();
|
||||
} else {
|
||||
@@ -347,12 +328,12 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
return;
|
||||
} else if (error.statusCode === 400) {
|
||||
if (error.message.toLowerCase().indexOf('email') !== -1) {
|
||||
$scope.useradd.error.email = 'Invalid Email';
|
||||
$scope.useradd.error.emailAttempted = $scope.useradd.email;
|
||||
$scope.userAdd.error.email = 'Invalid Email';
|
||||
$scope.userAdd.error.emailAttempted = $scope.userAdd.email;
|
||||
$scope.useraddForm.email.$setPristine();
|
||||
$('#inputUserAddEmail').focus();
|
||||
} else if (error.message.toLowerCase().indexOf('username') !== -1) {
|
||||
$scope.useradd.error.username = error.message;
|
||||
$scope.userAdd.error.username = error.message;
|
||||
$scope.useraddForm.username.$setPristine();
|
||||
$('#inputUserAddUsername').focus();
|
||||
} else {
|
||||
@@ -364,16 +345,16 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
}
|
||||
}
|
||||
|
||||
var groupIds = $scope.useradd.selectedGroups.map(function (g) { return g.id; });
|
||||
var localGroupIds = $scope.userAdd.selectedLocalGroups.map(function (g) { return g.id; });
|
||||
|
||||
Client.setGroups(userId, groupIds, function (error) {
|
||||
$scope.useradd.busy = false;
|
||||
Client.setLocalGroups(userId, localGroupIds, function (error) {
|
||||
$scope.userAdd.busy = false;
|
||||
|
||||
if (error) return console.error(error);
|
||||
|
||||
if ($scope.useradd.sendInvite) Client.sendInviteEmail(userId, user.email, function (error) { if (error) console.error('Failed to send invite.', error); });
|
||||
if ($scope.userAdd.sendInvite) Client.sendInviteEmail(userId, user.email, function (error) { if (error) console.error('Failed to send invite.', error); });
|
||||
|
||||
refresh();
|
||||
refreshCurrentPage();
|
||||
refreshAllUsers();
|
||||
|
||||
$('#userAddModal').modal('hide');
|
||||
@@ -382,7 +363,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
}
|
||||
};
|
||||
|
||||
$scope.useredit = {
|
||||
$scope.userEdit = {
|
||||
busy: false,
|
||||
reset2FABusy: false,
|
||||
error: {},
|
||||
@@ -396,20 +377,22 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
displayName: '',
|
||||
active: false,
|
||||
source: '',
|
||||
selectedGroups: [],
|
||||
selectedLocalGroups: [],
|
||||
externalGroups: [],
|
||||
role: '',
|
||||
|
||||
show: function (userInfo) {
|
||||
$scope.useredit.error = {};
|
||||
$scope.useredit.username = userInfo.username;
|
||||
$scope.useredit.email = userInfo.email;
|
||||
$scope.useredit.displayName = userInfo.displayName;
|
||||
$scope.useredit.fallbackEmail = userInfo.fallbackEmail;
|
||||
$scope.useredit.userInfo = userInfo;
|
||||
$scope.useredit.selectedGroups = userInfo.groupIds.map(function (gid) { return $scope.groupsById[gid]; });
|
||||
$scope.useredit.active = userInfo.active;
|
||||
$scope.useredit.source = userInfo.source;
|
||||
$scope.useredit.role = userInfo.role;
|
||||
$scope.userEdit.error = {};
|
||||
$scope.userEdit.username = userInfo.username;
|
||||
$scope.userEdit.email = userInfo.email;
|
||||
$scope.userEdit.displayName = userInfo.displayName;
|
||||
$scope.userEdit.fallbackEmail = userInfo.fallbackEmail;
|
||||
$scope.userEdit.userInfo = userInfo;
|
||||
$scope.userEdit.selectedLocalGroups = userInfo.groupIds.map(function (gid) { return $scope.groupsById[gid]; }).filter(function (g) { return g.source === ''; });
|
||||
$scope.userEdit.externalGroups = userInfo.groupIds.map(function (gid) { return $scope.groupsById[gid]; }).filter(function (g) { return g.source !== ''; });
|
||||
$scope.userEdit.active = userInfo.active;
|
||||
$scope.userEdit.source = userInfo.source;
|
||||
$scope.userEdit.role = userInfo.role;
|
||||
|
||||
$scope.useredit_form.$setPristine();
|
||||
$scope.useredit_form.$setUntouched();
|
||||
@@ -418,72 +401,69 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.useredit.error = {};
|
||||
$scope.useredit.busy = true;
|
||||
$scope.userEdit.error = {};
|
||||
$scope.userEdit.busy = true;
|
||||
|
||||
var userId = $scope.useredit.userInfo.id;
|
||||
var data = {
|
||||
id: userId
|
||||
};
|
||||
var userId = $scope.userEdit.userInfo.id;
|
||||
|
||||
// only send if not the current active user
|
||||
if (userId !== $scope.userInfo.id) {
|
||||
data.active = $scope.useredit.active;
|
||||
data.role = $scope.useredit.role;
|
||||
}
|
||||
async.series([
|
||||
function setRole(next) {
|
||||
if (userId === $scope.userInfo.id) return next(); // cannot set role on self
|
||||
Client.setRole(userId, $scope.userEdit.role, next);
|
||||
},
|
||||
function setActive(next) {
|
||||
if (userId === $scope.userInfo.id) return next(); // cannot set role on self
|
||||
Client.setActive(userId, $scope.userEdit.active, next);
|
||||
},
|
||||
function updateUserProfile(next) {
|
||||
if ($scope.userEdit.source) return next(); // cannot update profile of external user
|
||||
// username is settable only if it was empty previously. it's editable for the "lock" profiles feature
|
||||
var data = {};
|
||||
if (!$scope.userEdit.userInfo.username) data.username = $scope.userEdit.username;
|
||||
data.email = $scope.userEdit.email;
|
||||
data.displayName = $scope.userEdit.displayName;
|
||||
data.fallbackEmail = $scope.userEdit.fallbackEmail;
|
||||
Client.updateUserProfile(userId, data, next);
|
||||
},
|
||||
function setLocalGroups(next) {
|
||||
var localGroupIds = $scope.userEdit.selectedLocalGroups.map(function (g) { return g.id; });
|
||||
Client.setLocalGroups(userId, localGroupIds, next);
|
||||
}
|
||||
], function (error) {
|
||||
$scope.userEdit.busy = false;
|
||||
|
||||
// only change those if it is a local user
|
||||
if (!$scope.useredit.source) {
|
||||
// username is settable only if it was empty previously. it's editable for the "lock" profiles feature
|
||||
if (!$scope.useredit.userInfo.username) data.username = $scope.useredit.username;
|
||||
data.email = $scope.useredit.email;
|
||||
data.displayName = $scope.useredit.displayName;
|
||||
data.fallbackEmail = $scope.useredit.fallbackEmail;
|
||||
}
|
||||
|
||||
Client.updateUser(data, function (error) {
|
||||
if (error) {
|
||||
$scope.useredit.busy = false;
|
||||
|
||||
if (error.statusCode === 409) {
|
||||
if (error.message.toLowerCase().indexOf('email') !== -1) {
|
||||
$scope.useredit.error.email = 'Email already taken';
|
||||
$scope.userEdit.error.email = 'Email already taken';
|
||||
} else if (error.message.toLowerCase().indexOf('username') !== -1) {
|
||||
$scope.useredit.error.username = 'Username already taken';
|
||||
$scope.userEdit.error.username = 'Username already taken';
|
||||
}
|
||||
$scope.useredit_form.email.$setPristine();
|
||||
$('#inputUserEditEmail').focus();
|
||||
} else {
|
||||
$scope.useredit.error.generic = error.message;
|
||||
$scope.userEdit.error.generic = error.message;
|
||||
console.error('Unable to update user:', error);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var groupIds = $scope.useredit.selectedGroups.map(function (g) { return g.id; });
|
||||
|
||||
Client.setGroups(data.id, groupIds, function (error) {
|
||||
$scope.useredit.busy = false;
|
||||
|
||||
if (error) return console.error('Unable to update groups for user:', error);
|
||||
|
||||
refreshUsers(false);
|
||||
|
||||
$('#userEditModal').modal('hide');
|
||||
});
|
||||
refreshUsersCurrentPage(false /* busy indicator */);
|
||||
refreshGroups();
|
||||
$('#userEditModal').modal('hide');
|
||||
});
|
||||
},
|
||||
|
||||
reset2FA: function () {
|
||||
$scope.useredit.reset2FABusy = true;
|
||||
$scope.userEdit.reset2FABusy = true;
|
||||
|
||||
Client.disableTwoFactorAuthenticationByUserId($scope.useredit.userInfo.id, function (error) {
|
||||
Client.disableTwoFactorAuthenticationByUserId($scope.userEdit.userInfo.id, function (error) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
$timeout(function () {
|
||||
$scope.useredit.userInfo.twoFactorAuthenticationEnabled = false;
|
||||
$scope.useredit.reset2FABusy = false;
|
||||
$scope.userEdit.userInfo.twoFactorAuthenticationEnabled = false;
|
||||
$scope.userEdit.reset2FABusy = false;
|
||||
}, 3000);
|
||||
});
|
||||
}
|
||||
@@ -537,7 +517,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
|
||||
if (error) return console.error('Unable to add memebers.', error.statusCode, error.message);
|
||||
|
||||
refresh();
|
||||
refreshCurrentPage();
|
||||
|
||||
$('#groupAddModal').modal('hide');
|
||||
});
|
||||
@@ -576,11 +556,61 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
$('#groupEditModal').modal('show');
|
||||
},
|
||||
|
||||
updateAccessRestriction: function () {
|
||||
// find apps where ACL has changed
|
||||
var addedApps = $scope.groupEdit.selectedApps.filter(function (a) {
|
||||
return !$scope.groupEdit.selectedAppsOriginal.find(function (b) { return b.id === a.id; });
|
||||
});
|
||||
var removedApps = $scope.groupEdit.selectedAppsOriginal.filter(function (a) {
|
||||
return !$scope.groupEdit.selectedApps.find(function (b) { return b.id === a.id; });
|
||||
});
|
||||
|
||||
async.eachSeries(addedApps, function (app, callback) {
|
||||
var accessRestriction = app.accessRestriction;
|
||||
if (!accessRestriction) accessRestriction = { users: [], groups: [] };
|
||||
if (!Array.isArray(accessRestriction.groups)) accessRestriction.groups = [];
|
||||
|
||||
accessRestriction.groups.push($scope.groupEdit.groupInfo.id);
|
||||
|
||||
Client.configureApp(app.id, 'access_restriction', { accessRestriction: accessRestriction }, callback);
|
||||
}, function (error) {
|
||||
if (error) {
|
||||
$scope.groupEdit.busy = false;
|
||||
return console.error('Unable to set added app access.', error.statusCode, error.message);
|
||||
}
|
||||
|
||||
async.eachSeries(removedApps, function (app, callback) {
|
||||
var accessRestriction = app.accessRestriction;
|
||||
if (!accessRestriction) accessRestriction = { users: [], groups: [] };
|
||||
if (!Array.isArray(accessRestriction.groups)) accessRestriction.groups = [];
|
||||
|
||||
var deleted = accessRestriction.groups.splice(accessRestriction.groups.indexOf($scope.groupEdit.groupInfo.id), 1);
|
||||
|
||||
// if not found return early
|
||||
if (deleted.length === 0) return callback();
|
||||
|
||||
Client.configureApp(app.id, 'access_restriction', { accessRestriction: accessRestriction }, callback);
|
||||
}, function (error) {
|
||||
$scope.groupEdit.busy = false;
|
||||
if (error) return console.error('Unable to set removed app access.', error.statusCode, error.message);
|
||||
|
||||
refreshCurrentPage();
|
||||
|
||||
// refresh apps to reflect change
|
||||
Client.refreshInstalledApps();
|
||||
|
||||
$('#groupEditModal').modal('hide');
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.groupEdit.busy = true;
|
||||
$scope.groupEdit.error = {};
|
||||
|
||||
Client.updateGroup($scope.groupEdit.groupInfo.id, $scope.groupEdit.name, function (error) {
|
||||
if ($scope.groupEdit.source) return $scope.groupEdit.updateAccessRestriction(); // cannot update name or members of external groups
|
||||
|
||||
Client.setGroupName($scope.groupEdit.groupInfo.id, $scope.groupEdit.name, function (error) {
|
||||
if (error) {
|
||||
$scope.groupEdit.busy = false;
|
||||
|
||||
@@ -607,51 +637,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
return console.error('Unable to set group members.', error.statusCode, error.message);
|
||||
}
|
||||
|
||||
// find apps where ACL has changed
|
||||
var addedApps = $scope.groupEdit.selectedApps.filter(function (a) {
|
||||
return !$scope.groupEdit.selectedAppsOriginal.find(function (b) { return b.id === a.id; });
|
||||
});
|
||||
var removedApps = $scope.groupEdit.selectedAppsOriginal.filter(function (a) {
|
||||
return !$scope.groupEdit.selectedApps.find(function (b) { return b.id === a.id; });
|
||||
});
|
||||
|
||||
async.eachSeries(addedApps, function (app, callback) {
|
||||
var accessRestriction = app.accessRestriction;
|
||||
if (!accessRestriction) accessRestriction = { users: [], groups: [] };
|
||||
if (!Array.isArray(accessRestriction.groups)) accessRestriction.groups = [];
|
||||
|
||||
accessRestriction.groups.push($scope.groupEdit.groupInfo.id);
|
||||
|
||||
Client.configureApp(app.id, 'access_restriction', { accessRestriction: accessRestriction }, callback);
|
||||
}, function (error) {
|
||||
if (error) {
|
||||
$scope.groupEdit.busy = false;
|
||||
return console.error('Unable to set added app access.', error.statusCode, error.message);
|
||||
}
|
||||
|
||||
async.eachSeries(removedApps, function (app, callback) {
|
||||
var accessRestriction = app.accessRestriction;
|
||||
if (!accessRestriction) accessRestriction = { users: [], groups: [] };
|
||||
if (!Array.isArray(accessRestriction.groups)) accessRestriction.groups = [];
|
||||
|
||||
var deleted = accessRestriction.groups.splice(accessRestriction.groups.indexOf($scope.groupEdit.groupInfo.id), 1);
|
||||
|
||||
// if not found return early
|
||||
if (deleted.length === 0) return callback();
|
||||
|
||||
Client.configureApp(app.id, 'access_restriction', { accessRestriction: accessRestriction }, callback);
|
||||
}, function (error) {
|
||||
$scope.groupEdit.busy = false;
|
||||
if (error) return console.error('Unable to set removed app access.', error.statusCode, error.message);
|
||||
|
||||
refresh();
|
||||
|
||||
// refresh apps to reflect change
|
||||
Client.refreshInstalledApps();
|
||||
|
||||
$('#groupEditModal').modal('hide');
|
||||
});
|
||||
});
|
||||
$scope.groupEdit.updateAccessRestriction();
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -688,7 +674,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
|
||||
if (error) return console.error('Unable to remove group.', error.statusCode, error.message);
|
||||
|
||||
refresh();
|
||||
refreshCurrentPage();
|
||||
$('#groupRemoveModal').modal('hide');
|
||||
});
|
||||
}
|
||||
@@ -737,32 +723,6 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
}
|
||||
};
|
||||
|
||||
$scope.makeLocal = {
|
||||
busy: false,
|
||||
user: null,
|
||||
|
||||
show: function (user) {
|
||||
$scope.makeLocal.busy = false;
|
||||
$scope.makeLocal.user = user;
|
||||
|
||||
$('#makeLocalModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.makeLocal.busy = false;
|
||||
|
||||
Client.makeUserLocal($scope.makeLocal.user.id, function (error) {
|
||||
if (error) return console.error('Failed to make user local.', error);
|
||||
|
||||
$scope.makeLocal.busy = false;
|
||||
|
||||
refreshUsers();
|
||||
|
||||
$('#makeLocalModal').modal('hide');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.invitation = {
|
||||
busy: false,
|
||||
inviteLink: '',
|
||||
@@ -845,264 +805,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
}
|
||||
};
|
||||
|
||||
$scope.profileConfig = {
|
||||
editableUserProfiles: true,
|
||||
mandatory2FA: false,
|
||||
errorMessage: '',
|
||||
|
||||
refresh: function () {
|
||||
Client.getProfileConfig(function (error, result) {
|
||||
if (error) return console.error('Unable to get directory config.', error);
|
||||
|
||||
$scope.profileConfig.editableUserProfiles = !result.lockUserProfiles;
|
||||
$scope.profileConfig.mandatory2FA = !!result.mandatory2FA;
|
||||
});
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
// prevent the current user from getting locked out
|
||||
if ($scope.profileConfig.mandatory2FA && !$scope.userInfo.twoFactorAuthenticationEnabled) return Client.notify('', $translate.instant('users.settings.require2FAWarning'), true, 'error', '#/profile');
|
||||
|
||||
$scope.profileConfig.error = '';
|
||||
$scope.profileConfig.busy = true;
|
||||
$scope.profileConfig.success = false;
|
||||
|
||||
var data = {
|
||||
lockUserProfiles: !$scope.profileConfig.editableUserProfiles,
|
||||
mandatory2FA: $scope.profileConfig.mandatory2FA
|
||||
};
|
||||
|
||||
Client.setProfileConfig(data, function (error) {
|
||||
if (error) $scope.profileConfig.errorMessage = error.message;
|
||||
|
||||
$scope.profileConfig.success = true;
|
||||
|
||||
$scope.profileConfigForm.$setUntouched();
|
||||
$scope.profileConfigForm.$setPristine();
|
||||
|
||||
Client.refreshConfig(); // refresh the $scope.config
|
||||
|
||||
$timeout(function () {
|
||||
$scope.profileConfig.busy = false;
|
||||
}, 500);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.userDirectoryConfig = {
|
||||
enabled: false,
|
||||
secret: '',
|
||||
allowlist: '',
|
||||
error: null,
|
||||
|
||||
refresh: function () {
|
||||
Client.getUserDirectoryConfig(function (error, result) {
|
||||
if (error) return console.error('Unable to get exposed ldap config.', error);
|
||||
|
||||
$scope.userDirectoryConfig.enabled = !!result.enabled;
|
||||
$scope.userDirectoryConfig.allowlist = result.allowlist;
|
||||
$scope.userDirectoryConfig.secret = result.secret;
|
||||
});
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.userDirectoryConfig.error = null;
|
||||
$scope.userDirectoryConfig.busy = true;
|
||||
$scope.userDirectoryConfig.success = false;
|
||||
|
||||
var data = {
|
||||
enabled: $scope.userDirectoryConfig.enabled,
|
||||
secret: $scope.userDirectoryConfig.secret,
|
||||
allowlist: $scope.userDirectoryConfig.allowlist
|
||||
};
|
||||
|
||||
Client.setUserDirectoryConfig(data, function (error) {
|
||||
$scope.userDirectoryConfig.busy = false;
|
||||
|
||||
if (error && error.statusCode === 400) {
|
||||
if (error.message.indexOf('secret') !== -1) return $scope.userDirectoryConfig.error = { secret: error.message };
|
||||
else return $scope.userDirectoryConfig.error = { allowlist: error.message };
|
||||
}
|
||||
if (error) return $scope.userDirectoryConfig.error = { generic: error.message };
|
||||
|
||||
$scope.userDirectoryConfigForm.$setUntouched();
|
||||
$scope.userDirectoryConfigForm.$setPristine();
|
||||
|
||||
$scope.userDirectoryConfig.success = true;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.externalLdap = {
|
||||
busy: false,
|
||||
percent: 0,
|
||||
message: '',
|
||||
errorMessage: '',
|
||||
error: {},
|
||||
taskId: 0,
|
||||
|
||||
syncBusy: false,
|
||||
|
||||
// fields
|
||||
provider: 'noop',
|
||||
autoCreate: false,
|
||||
url: '',
|
||||
acceptSelfSignedCerts: false,
|
||||
baseDn: '',
|
||||
filter: '',
|
||||
groupBaseDn: '',
|
||||
bindDn: '',
|
||||
bindPassword: '',
|
||||
usernameField: '',
|
||||
|
||||
currentConfig: {},
|
||||
|
||||
checkStatus: function () {
|
||||
Client.getLatestTaskByType('syncExternalLdap', function (error, task) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
if (!task) return;
|
||||
|
||||
$scope.externalLdap.taskId = task.id;
|
||||
$scope.externalLdap.updateStatus();
|
||||
});
|
||||
},
|
||||
|
||||
sync: function () {
|
||||
$scope.externalLdap.syncBusy = true;
|
||||
|
||||
Client.startExternalLdapSync(function (error, taskId) {
|
||||
if (error) {
|
||||
$scope.externalLdap.syncBusy = false;
|
||||
console.error('Unable to start ldap syncer task.', error);
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.externalLdap.taskId = taskId;
|
||||
$scope.externalLdap.updateStatus();
|
||||
});
|
||||
},
|
||||
|
||||
updateStatus: function () {
|
||||
Client.getTask($scope.externalLdap.taskId, function (error, data) {
|
||||
if (error) return window.setTimeout($scope.externalLdap.updateStatus, 5000);
|
||||
|
||||
if (!data.active) {
|
||||
$scope.externalLdap.syncBusy = false;
|
||||
$scope.externalLdap.message = '';
|
||||
$scope.externalLdap.percent = 100; // indicates that 'result' is valid
|
||||
$scope.externalLdap.errorMessage = data.success ? '' : data.error.message;
|
||||
|
||||
refreshGroups();
|
||||
refreshUsers();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.externalLdap.syncBusy = true;
|
||||
$scope.externalLdap.percent = data.percent;
|
||||
$scope.externalLdap.message = data.message;
|
||||
window.setTimeout($scope.externalLdap.updateStatus, 3000);
|
||||
});
|
||||
},
|
||||
|
||||
show: function () {
|
||||
$scope.externalLdap.busy = false;
|
||||
$scope.externalLdap.error = {};
|
||||
|
||||
$scope.externalLdap.provider = $scope.externalLdap.currentConfig.provider;
|
||||
$scope.externalLdap.url = $scope.externalLdap.currentConfig.url;
|
||||
$scope.externalLdap.acceptSelfSignedCerts = $scope.externalLdap.currentConfig.acceptSelfSignedCerts;
|
||||
$scope.externalLdap.baseDn = $scope.externalLdap.currentConfig.baseDn;
|
||||
$scope.externalLdap.filter = $scope.externalLdap.currentConfig.filter;
|
||||
$scope.externalLdap.syncGroups = $scope.externalLdap.currentConfig.syncGroups;
|
||||
$scope.externalLdap.groupBaseDn = $scope.externalLdap.currentConfig.groupBaseDn;
|
||||
$scope.externalLdap.groupFilter = $scope.externalLdap.currentConfig.groupFilter;
|
||||
$scope.externalLdap.groupnameField = $scope.externalLdap.currentConfig.groupnameField;
|
||||
$scope.externalLdap.bindDn = $scope.externalLdap.currentConfig.bindDn;
|
||||
$scope.externalLdap.bindPassword = $scope.externalLdap.currentConfig.bindPassword;
|
||||
$scope.externalLdap.usernameField = $scope.externalLdap.currentConfig.usernameField;
|
||||
$scope.externalLdap.autoCreate = $scope.externalLdap.currentConfig.autoCreate;
|
||||
|
||||
$('#externalLdapModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.externalLdap.busy = true;
|
||||
$scope.externalLdap.error = {};
|
||||
|
||||
var config = {
|
||||
provider: $scope.externalLdap.provider
|
||||
};
|
||||
|
||||
if ($scope.externalLdap.provider === 'cloudron') {
|
||||
config.url = $scope.externalLdap.url;
|
||||
config.acceptSelfSignedCerts = $scope.externalLdap.acceptSelfSignedCerts;
|
||||
config.autoCreate = $scope.externalLdap.autoCreate;
|
||||
config.syncGroups = $scope.externalLdap.syncGroups;
|
||||
config.bindPassword = $scope.externalLdap.bindPassword;
|
||||
|
||||
// those values are known and thus overwritten
|
||||
config.baseDn = 'ou=users,dc=cloudron';
|
||||
config.filter = '(objectClass=inetOrgPerson)';
|
||||
config.usernameField = 'username';
|
||||
config.groupBaseDn = 'ou=groups,dc=cloudron';
|
||||
config.groupFilter = '(objectClass=group)';
|
||||
config.groupnameField = 'cn';
|
||||
config.bindDn = 'cn=admin,ou=system,dc=cloudron';
|
||||
} else if ($scope.externalLdap.provider !== 'noop') {
|
||||
config.url = $scope.externalLdap.url;
|
||||
config.acceptSelfSignedCerts = $scope.externalLdap.acceptSelfSignedCerts;
|
||||
config.baseDn = $scope.externalLdap.baseDn;
|
||||
config.filter = $scope.externalLdap.filter;
|
||||
config.usernameField = $scope.externalLdap.usernameField;
|
||||
config.syncGroups = $scope.externalLdap.syncGroups;
|
||||
config.groupBaseDn = $scope.externalLdap.groupBaseDn;
|
||||
config.groupFilter = $scope.externalLdap.groupFilter;
|
||||
config.groupnameField = $scope.externalLdap.groupnameField;
|
||||
config.autoCreate = $scope.externalLdap.autoCreate;
|
||||
|
||||
if ($scope.externalLdap.bindDn) {
|
||||
config.bindDn = $scope.externalLdap.bindDn;
|
||||
config.bindPassword = $scope.externalLdap.bindPassword;
|
||||
}
|
||||
}
|
||||
|
||||
Client.setExternalLdapConfig(config, function (error) {
|
||||
$scope.externalLdap.busy = false;
|
||||
|
||||
if (error) {
|
||||
if (error.statusCode === 424) {
|
||||
if (error.code === 'SELF_SIGNED_CERT_IN_CHAIN') $scope.externalLdap.error.acceptSelfSignedCerts = true;
|
||||
else $scope.externalLdap.error.url = true;
|
||||
} else if (error.statusCode === 400 && error.message === 'invalid baseDn') {
|
||||
$scope.externalLdap.error.baseDn = true;
|
||||
} else if (error.statusCode === 400 && error.message === 'invalid filter') {
|
||||
$scope.externalLdap.error.filter = true;
|
||||
} else if (error.statusCode === 400 && error.message === 'invalid groupBaseDn') {
|
||||
$scope.externalLdap.error.groupBaseDn = true;
|
||||
} else if (error.statusCode === 400 && error.message === 'invalid groupFilter') {
|
||||
$scope.externalLdap.error.groupFilter = true;
|
||||
} else if (error.statusCode === 400 && error.message === 'invalid groupnameField') {
|
||||
$scope.externalLdap.error.groupnameField = true;
|
||||
} else if (error.statusCode === 400 && error.message === 'invalid bind credentials') {
|
||||
$scope.externalLdap.error.credentials = true;
|
||||
} else if (error.statusCode === 400 && error.message === 'invalid usernameField') {
|
||||
$scope.externalLdap.error.usernameField = true;
|
||||
} else {
|
||||
console.error('Failed to set external LDAP config:', error);
|
||||
$scope.externalLdap.error.generic = error.message;
|
||||
}
|
||||
} else {
|
||||
$('#externalLdapModal').modal('hide');
|
||||
|
||||
loadExternalLdapConfig();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function getUsers(callback) {
|
||||
function getUsersCurrentPage(callback) {
|
||||
var users = [];
|
||||
|
||||
Client.getUsers($scope.userSearchString, $scope.userStateFilter.value, $scope.currentPage, $scope.pageItems, function (error, results) {
|
||||
@@ -1122,10 +825,10 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
});
|
||||
}
|
||||
|
||||
function refreshUsers(showBusy) { // loads users on current page only
|
||||
function refreshUsersCurrentPage(showBusy) { // loads users on current page only
|
||||
if (showBusy) $scope.userRefreshBusy = true;
|
||||
|
||||
getUsers(function (error, result) {
|
||||
getUsersCurrentPage(function (error, result) {
|
||||
if (error) return console.error('Unable to get user listing.', error);
|
||||
|
||||
angular.copy(result, $scope.users);
|
||||
@@ -1144,43 +847,36 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
|
||||
angular.copy(result, $scope.groups);
|
||||
$scope.groupsById = { };
|
||||
$scope.hasLocalGroups = false;
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
$scope.groupsById[result[i].id] = result[i];
|
||||
if (result[i].source === '') $scope.hasLocalGroups = true;
|
||||
}
|
||||
|
||||
if (callback) callback();
|
||||
});
|
||||
}
|
||||
|
||||
function refresh() {
|
||||
function refreshCurrentPage() {
|
||||
refreshGroups(function (error) {
|
||||
if (error) return console.error('Unable to get group listing.', error);
|
||||
refreshUsers(true);
|
||||
});
|
||||
}
|
||||
|
||||
function loadExternalLdapConfig() {
|
||||
Client.getExternalLdapConfig(function (error, result) {
|
||||
if (error) return console.error('Unable to get external ldap config.', error);
|
||||
|
||||
$scope.externalLdap.currentConfig = result;
|
||||
$scope.externalLdap.checkStatus();
|
||||
refreshUsersCurrentPage(true /* busy indicator */);
|
||||
});
|
||||
}
|
||||
|
||||
$scope.showNextPage = function () {
|
||||
$scope.currentPage++;
|
||||
refreshUsers();
|
||||
refreshUsersCurrentPage(false /* no busy indicator */);
|
||||
};
|
||||
|
||||
$scope.showPrevPage = function () {
|
||||
if ($scope.currentPage > 1) $scope.currentPage--;
|
||||
else $scope.currentPage = 1;
|
||||
refreshUsers();
|
||||
refreshUsersCurrentPage(false /* no busy indicator */);
|
||||
};
|
||||
|
||||
$scope.updateFilter = function () {
|
||||
refreshUsers();
|
||||
refreshUsersCurrentPage(false /* no busy indicator */);
|
||||
};
|
||||
|
||||
function refreshAllUsers() { // this loads all users on Cloudron, not just current page
|
||||
@@ -1196,20 +892,8 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
});
|
||||
}
|
||||
|
||||
function getAllDomains() {
|
||||
Client.getDomains(function (error, domains) {
|
||||
if (error) return console.error('Unable to get domains:', error);
|
||||
|
||||
$scope.domains = domains;
|
||||
});
|
||||
}
|
||||
|
||||
Client.onReady(function () {
|
||||
refresh();
|
||||
if ($scope.user.isAtLeastAdmin) loadExternalLdapConfig();
|
||||
if ($scope.user.isAtLeastAdmin) $scope.profileConfig.refresh();
|
||||
if ($scope.user.isAtLeastAdmin) $scope.userDirectoryConfig.refresh();
|
||||
if ($scope.user.isAtLeastAdmin) getAllDomains();
|
||||
refreshCurrentPage();
|
||||
refreshAllUsers();
|
||||
|
||||
// Order matters for permissions used in canEdit
|
||||
@@ -1228,7 +912,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
// setup all the dialog focus handling
|
||||
['userAddModal', 'userRemoveModal', 'userEditModal', 'groupAddModal', 'groupEditModal', 'groupRemoveModal'].forEach(function (id) {
|
||||
$('#' + id).on('shown.bs.modal', function () {
|
||||
$(this).find("[autofocus]:first").focus();
|
||||
$(this).find('[autofocus]:first').focus();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1286,23 +970,5 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
$timeout(function () { $('#setGhostClipboardButton').tooltip('hide'); }, 2000);
|
||||
});
|
||||
|
||||
new Clipboard('#userDirectoryUrlClipboardButton').on('success', function(e) {
|
||||
$('#userDirectoryUrlClipboardButton').tooltip({
|
||||
title: 'Copied!',
|
||||
trigger: 'manual'
|
||||
}).tooltip('show');
|
||||
|
||||
$timeout(function () { $('#userDirectoryUrlClipboardButton').tooltip('hide'); }, 2000);
|
||||
|
||||
e.clearSelection();
|
||||
}).on('error', function(/*e*/) {
|
||||
$('#userDirectoryUrlClipboardButton').tooltip({
|
||||
title: 'Press Ctrl+C to copy',
|
||||
trigger: 'manual'
|
||||
}).tooltip('show');
|
||||
|
||||
$timeout(function () { $('#userDirectoryUrlClipboardButton').tooltip('hide'); }, 2000);
|
||||
});
|
||||
|
||||
$('.modal-backdrop').remove();
|
||||
}]);
|
||||
|
||||
@@ -34,10 +34,14 @@
|
||||
<input type="text" class="form-control" ng-model="volumeAdd.hostPath" name="hostPath" ng-disabled="volumeAdd.busy" placeholder="/mnt/data" ng-required="volumeAdd.mountType === 'mountpoint'" autofocus>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="volumeAdd.mountType === 'ext4' || volumeAdd.mountType === 'xfs'">
|
||||
<div class="form-group" ng-show="volumeAdd.mountType === 'ext4'">
|
||||
<label class="control-label">{{ 'volumes.addVolumeDialog.diskPath' | tr }}</label>
|
||||
<select class="form-control" ng-model="volumeAdd.diskPath" ng-options="item.path as item.label for item in blockDevices track by item.path"></select>
|
||||
<input type="text" class="form-control" style="margin-top: 5px;" ng-show="volumeAdd.diskPath.path === 'custom'" ng-model="volumeAdd.customDiskPath" ng-disabled="volumeAdd.busy" placeholder="/dev/disk/by-uuid/uuid" ng-required="volumeAdd.diskPath.path === 'custom'">
|
||||
<select class="form-control" ng-model="volumeAdd.ext4Disk" ng-options="item as item.label for item in ext4BlockDevices track by item.path" ng-required="volumeAdd.mountType === 'ext4'"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="volumeAdd.mountType === 'xfs'">
|
||||
<label class="control-label">{{ 'volumes.addVolumeDialog.diskPath' | tr }}</label>
|
||||
<select class="form-control" ng-model="volumeAdd.xfsDisk" ng-options="item as item.label for item in xfsBlockDevices track by item.path" ng-required="volumeAdd.mountType === 'xfs'"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="volumeAdd.mountType === 'cifs' || volumeAdd.mountType === 'nfs' || volumeAdd.mountType === 'sshfs'">
|
||||
@@ -93,6 +97,74 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- modal volume edit -->
|
||||
<div class="modal fade" id="volumeEditModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'volumes.editVolumeDialog.title' | tr:{ name: volumeEdit.name } }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form name="volumeEditForm" role="form" novalidate ng-submit="volumeEdit.submit()" autocomplete="off">
|
||||
<fieldset>
|
||||
<p class="has-error text-center" ng-show="volumeEdit.error">{{ volumeEdit.error }}</p>
|
||||
|
||||
<div><b>{{ 'volumes.mountType' | tr }}:</b> {{ volumeEdit.mountType }}</div>
|
||||
<br/>
|
||||
|
||||
<div class="form-group" ng-show="volumeEdit.mountType === 'cifs' || volumeEdit.mountType === 'nfs' || volumeEdit.mountType === 'sshfs'">
|
||||
<label class="control-label" for="volumeAddHost">{{ 'volumes.addVolumeDialog.server' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="volumeEdit.host" id="volumeEditHost" name="host" ng-disabled="volumeEdit.busy" placeholder="Server IP or hostname" ng-required="volumeEdit.mountType === 'cifs' || volumeEdit.mountType === 'nfs' || volumeEdit.mountType === 'sshfs'">
|
||||
</div>
|
||||
|
||||
<div class="checkbox" ng-show="volumeEdit.mountType === 'cifs'">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="volumeEdit.seal">{{ 'backups.configureBackupStorage.cifsSealSupport' | tr }}</input>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="volumeEdit.mountType === 'sshfs'">
|
||||
<label class="control-label" for="volumeEditPort">{{ 'volumes.addVolumeDialog.port' | tr }}</label>
|
||||
<input type="number" class="form-control" ng-model="volumeEdit.port" id="volumeEditPort" name="port" ng-disabled="volumeEdit.busy" ng-required="volumeEdit.mountType === 'sshfs'">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="volumeEdit.mountType === 'cifs' || volumeEdit.mountType === 'nfs' || volumeEdit.mountType === 'sshfs'">
|
||||
<label class="control-label" for="volumeEditRemoteDir">{{ 'volumes.addVolumeDialog.remoteDirectory' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="volumeEdit.remoteDir" id="volumeAddRemoteDir" name="remoteDir" ng-disabled="volumeEdit.busy" placeholder="/share" ng-required="volumeEdit.mountType === 'cifs' || volumeAdd.mountType === 'nfs' || volumeAdd.mountType === 'sshfs'">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="volumeEdit.mountType === 'cifs'">
|
||||
<label class="control-label" for="volumeEditUsername">{{ 'volumes.addVolumeDialog.username' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="volumeEdit.username" id="volumeEditUsername" name="cifsUsername" ng-disabled="volumeEdit.busy" ng-required="volumeEdit.mountType === 'cifs'">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="volumeEdit.mountType === 'cifs'">
|
||||
<label class="control-label" for="volumeEditPassword">{{ 'volumes.addVolumeDialog.password' | tr }}</label>
|
||||
<input type="password" class="form-control" ng-model="volumeEdit.password" id="volumeEditPassword" name="cifsPassword" ng-disabled="volumeEdit.busy" password-reveal ng-required="volumeEdit.mountType === 'cifs'">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="volumeEdit.mountType === 'sshfs'">
|
||||
<label class="control-label" for="volumeEditUser">{{ 'volumes.addVolumeDialog.user' | tr }}</label>
|
||||
<input type="text" class="form-control" ng-model="volumeEdit.user" id="volumeEditAddUser" name="user" ng-disabled="volumeEdit.busy" ng-required="volumeEdit.mountType === 'sshfs'">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="volumeEdit.mountType === 'sshfs'">
|
||||
<label class="control-label" for="volumeEditPrivateKey">{{ 'volumes.addVolumeDialog.privateKey' | tr }}</label>
|
||||
<textarea class="form-control" ng-model="volumeEdit.privateKey" id="volumeEditPrivateKey" name="privateKey" ng-disabled="volumeEdit.busy" ng-required="volumeEdit.mountType === 'sshfs'"></textarea>
|
||||
</div>
|
||||
|
||||
<input class="ng-hide" type="submit" ng-disabled="volumeEditForm.$invalid || volumeEdit.busy"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer ">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="submit" class="btn btn-outline btn-success pull-right" ng-click="volumeEdit.submit()" ng-disabled="volumeEditForm.$invalid || volumeEdit.busy"><i class="fa fa-circle-notch fa-spin" ng-show="volumeEdit.busy"></i> {{ 'main.dialog.save' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal volume remove -->
|
||||
<div class="modal fade" id="volumeRemoveModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
@@ -134,7 +206,7 @@
|
||||
<th style="width: 20%" class="text-left">{{ 'volumes.name' | tr }}</th>
|
||||
<th style="width: 15%" class="text-left">{{ 'volumes.type' | tr }}</th>
|
||||
<th style="width: 45%" class="text-left">{{ 'volumes.hostPath' | tr }}</th>
|
||||
<th style="width: 15%" class="text-right">{{ 'main.actions' | tr }}</th>
|
||||
<th style="width: 122px" class="text-right">{{ 'main.actions' | tr }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -153,7 +225,8 @@
|
||||
<td class="text-left wrap-table-cell hidden-xs hidden-sm" ng-show="volume.mountType === 'mountpoint' || volume.mountType === 'filesystem'">{{ volume.hostPath }}</td>
|
||||
<td class="text-right no-wrap" style="vertical-align: bottom">
|
||||
<button class="btn btn-xs btn-default" ng-click="remount(volume)" ng-show="isMountProvider(volume.mountType)" ng-disabled="volume.remounting" uib-tooltip="{{ 'volumes.remountActionTooltip' | tr }}"><i class="fa fa-sync-alt" ng-class="{ 'fa-spin': volume.remounting }"></i></button>
|
||||
<a class="btn btn-xs btn-default" ng-href="{{ '/filemanager.html?type=volume&id=' + volume.id }}" target="_blank" uib-tooltip="{{ 'volumes.openFileManagerActionTooltip' | tr }}"><i class="fas fa-folder"></i></a>
|
||||
<button class="btn btn-xs btn-default" ng-click="volumeEdit.show(volume)" ng-show="isNetworkProvider(volume.mountType)" ng-disabled="volume.remounting" uib-tooltip="{{ 'volumes.editActionTooltip' | tr }}"><i class="fa fa-pencil-alt"></i></button>
|
||||
<a class="btn btn-xs btn-default" ng-href="{{ '/frontend/filemanager.html#/home/volume/' + volume.id }}" target="_blank" uib-tooltip="{{ 'volumes.openFileManagerActionTooltip' | tr }}"><i class="fas fa-folder"></i></a>
|
||||
<button class="btn btn-xs btn-danger" ng-click="volumeRemove.show(volume)" uib-tooltip="{{ 'volumes.removeVolumeActionTooltip' | tr }}"><i class="far fa-trash-alt"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
+130
-13
@@ -5,7 +5,7 @@
|
||||
/* global async */
|
||||
|
||||
angular.module('Application').controller('VolumesController', ['$scope', '$location', '$timeout', 'Client', function ($scope, $location, $timeout, Client) {
|
||||
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastUserManager) $location.path('/'); });
|
||||
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastAdmin) $location.path('/'); });
|
||||
|
||||
var refreshVolumesTimerId = null;
|
||||
|
||||
@@ -62,6 +62,10 @@ angular.module('Application').controller('VolumesController', ['$scope', '$locat
|
||||
return provider === 'sshfs' || provider === 'cifs' || provider === 'nfs' || provider === 'ext4' || provider === 'xfs';
|
||||
};
|
||||
|
||||
$scope.isNetworkProvider = function (provider) {
|
||||
return provider === 'sshfs' || provider === 'cifs' || provider === 'nfs';
|
||||
};
|
||||
|
||||
$scope.remount = function (volume) {
|
||||
volume.remounting = true;
|
||||
|
||||
@@ -88,8 +92,8 @@ angular.module('Application').controller('VolumesController', ['$scope', '$locat
|
||||
remoteDir: '',
|
||||
username: '',
|
||||
password: '',
|
||||
diskPath: {}, // { path, type }
|
||||
customDiskPath: '',
|
||||
ext4Disk: null, // { path, type }
|
||||
xfsDisk: null, // { path, type }
|
||||
user: '',
|
||||
seal: false,
|
||||
port: 22,
|
||||
@@ -105,8 +109,8 @@ angular.module('Application').controller('VolumesController', ['$scope', '$locat
|
||||
$scope.volumeAdd.remoteDir = '';
|
||||
$scope.volumeAdd.username = '';
|
||||
$scope.volumeAdd.password = '';
|
||||
$scope.volumeAdd.diskPath = {};
|
||||
$scope.volumeAdd.customDiskPath = '';
|
||||
$scope.volumeAdd.ext4Disk = null;
|
||||
$scope.volumeAdd.xfsDisk = null;
|
||||
$scope.volumeAdd.user = '';
|
||||
$scope.volumeAdd.seal = false;
|
||||
$scope.volumeAdd.port = 22;
|
||||
@@ -119,7 +123,8 @@ angular.module('Application').controller('VolumesController', ['$scope', '$locat
|
||||
show: function () {
|
||||
$scope.volumeAdd.reset();
|
||||
|
||||
$scope.blockDevices = [];
|
||||
$scope.ext4BlockDevices = [];
|
||||
$scope.xfsBlockDevices = [];
|
||||
|
||||
Client.getBlockDevices(function (error, result) {
|
||||
if (error) console.error('Failed to list blockdevices:', error);
|
||||
@@ -130,11 +135,8 @@ angular.module('Application').controller('VolumesController', ['$scope', '$locat
|
||||
// amend label for UI
|
||||
result.forEach(function (d) { d.label = d.path; });
|
||||
|
||||
// add custom fake option
|
||||
result.push({ path: 'custom', label: 'Custom Path' });
|
||||
|
||||
$scope.blockDevices = result;
|
||||
$scope.volumeAdd.diskPath = $scope.blockDevices[0];
|
||||
$scope.ext4BlockDevices = result.filter(function (d) { return d.type === 'ext4'; });
|
||||
$scope.xfsBlockDevices = result.filter(function (d) { return d.type === 'xfs'; });
|
||||
|
||||
$('#volumeAddModal').modal('show');
|
||||
});
|
||||
@@ -167,9 +169,13 @@ angular.module('Application').controller('VolumesController', ['$scope', '$locat
|
||||
user: $scope.volumeAdd.user,
|
||||
privateKey: $scope.volumeAdd.privateKey,
|
||||
};
|
||||
} else if ($scope.volumeAdd.mountType === 'ext4' || $scope.volumeAdd.mountType === 'xfs') {
|
||||
} else if ($scope.volumeAdd.mountType === 'ext4') {
|
||||
mountOptions = {
|
||||
diskPath: $scope.volumeAdd.diskPath === 'custom' ? $scope.volumeAdd.customDiskPath : $scope.volumeAdd.diskPath
|
||||
diskPath: $scope.volumeAdd.ext4Disk.path
|
||||
};
|
||||
} else if ($scope.volumeAdd.mountType === 'xfs') {
|
||||
mountOptions = {
|
||||
diskPath: $scope.volumeAdd.xfsDisk.path
|
||||
};
|
||||
} else if ($scope.volumeAdd.mountType === 'mountpoint' || $scope.volumeAdd.mountType === 'filesystem') {
|
||||
mountOptions = {
|
||||
@@ -192,6 +198,117 @@ angular.module('Application').controller('VolumesController', ['$scope', '$locat
|
||||
}
|
||||
};
|
||||
|
||||
$scope.volumeEdit = {
|
||||
error: null,
|
||||
busy: false,
|
||||
|
||||
// cannot be changed
|
||||
volume: '',
|
||||
name: '',
|
||||
mountType: 'mountpoint',
|
||||
|
||||
// can be changed
|
||||
host: '',
|
||||
remoteDir: '',
|
||||
username: '',
|
||||
password: '',
|
||||
user: '',
|
||||
seal: false,
|
||||
port: 22,
|
||||
privateKey: '',
|
||||
|
||||
reset: function () {
|
||||
$scope.volumeEdit.error = null;
|
||||
$scope.volumeEdit.busy = false;
|
||||
$scope.volumeEdit.volume = null;
|
||||
$scope.volumeEdit.name = '';
|
||||
$scope.volumeEdit.mountType = '';
|
||||
$scope.volumeEdit.host = '';
|
||||
$scope.volumeEdit.seal = '';
|
||||
$scope.volumeEdit.port = '';
|
||||
$scope.volumeEdit.remoteDir = '';
|
||||
$scope.volumeEdit.username = '';
|
||||
$scope.volumeEdit.password = '';
|
||||
$scope.volumeEdit.user = '';
|
||||
$scope.volumeEdit.privateKey = '';
|
||||
|
||||
$scope.volumeEditForm.$setPristine();
|
||||
$scope.volumeEditForm.$setUntouched();
|
||||
},
|
||||
|
||||
show: function (volume) {
|
||||
$scope.volumeEdit.reset();
|
||||
|
||||
Client.getVolume(volume.id, function (error, result) {
|
||||
if (error) console.error('Failed to get volume:', error);
|
||||
|
||||
$scope.volumeEdit.volume = volume;
|
||||
$scope.volumeEdit.mountType = result.mountType;
|
||||
$scope.volumeEdit.name = result.name;
|
||||
$scope.volumeEdit.host = result.mountOptions.host;
|
||||
$scope.volumeEdit.seal = result.mountOptions.seal;
|
||||
$scope.volumeEdit.port = result.mountOptions.port;
|
||||
$scope.volumeEdit.remoteDir = result.mountOptions.remoteDir;
|
||||
$scope.volumeEdit.username = result.mountOptions.username;
|
||||
$scope.volumeEdit.password = result.mountOptions.password;
|
||||
$scope.volumeEdit.user = result.mountOptions.user;
|
||||
$scope.volumeEdit.privateKey = result.mountOptions.privateKey;
|
||||
|
||||
$('#volumeEditModal').modal('show');
|
||||
});
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.volumeEdit.busy = true;
|
||||
$scope.volumeEdit.error = null;
|
||||
|
||||
var mountOptions = null;
|
||||
|
||||
if ($scope.volumeEdit.mountType === 'cifs') {
|
||||
mountOptions = {
|
||||
host: $scope.volumeEdit.host,
|
||||
remoteDir: $scope.volumeEdit.remoteDir,
|
||||
username: $scope.volumeEdit.username,
|
||||
password: $scope.volumeEdit.password,
|
||||
seal: $scope.volumeEdit.seal
|
||||
};
|
||||
} else if ($scope.volumeEdit.mountType === 'nfs') {
|
||||
mountOptions = {
|
||||
host: $scope.volumeEdit.host,
|
||||
remoteDir: $scope.volumeEdit.remoteDir,
|
||||
};
|
||||
} else if ($scope.volumeEdit.mountType === 'sshfs') {
|
||||
mountOptions = {
|
||||
host: $scope.volumeEdit.host,
|
||||
port: $scope.volumeEdit.port,
|
||||
remoteDir: $scope.volumeEdit.remoteDir,
|
||||
user: $scope.volumeEdit.user,
|
||||
privateKey: $scope.volumeEdit.privateKey,
|
||||
};
|
||||
} else {
|
||||
console.error('Should not come here. Only network volumes can be edited');
|
||||
|
||||
$('#volumeEditModal').modal('hide');
|
||||
$scope.volumeEdit.reset();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Client.updateVolume($scope.volumeEdit.volume.id, mountOptions, function (error) {
|
||||
$scope.volumeEdit.busy = false;
|
||||
if (error) {
|
||||
$scope.volumeEdit.error = error.message;
|
||||
return;
|
||||
}
|
||||
|
||||
$('#volumeEditModal').modal('hide');
|
||||
$scope.volumeEdit.reset();
|
||||
|
||||
refreshVolumes();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.volumeRemove = {
|
||||
busy: false,
|
||||
error: null,
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
# Dashboard Filemanager
|
||||
|
||||
Local development via:
|
||||
|
||||
```
|
||||
VITE_API_ORIGIN=my.example.com npm run dev
|
||||
```
|
||||
|
||||
It requires an access token in `localStorage.token`.
|
||||
|
||||
The default local urls look like:
|
||||
|
||||
FileManager: `http://localhost:5173/filemanager.html#/home/app/<appId>`
|
||||
Terminal: `http://localhost:5173/terminal.html?id=<appId>`
|
||||
LogViewer: `http://localhost:5173/logs.html?appId=<appId>`
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
./node_modules/.bin/vite build --base=/frontend/
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
echo "=> Set API origin"
|
||||
export VITE_API_ORIGIN="my.nebulon.space"
|
||||
|
||||
echo "=> Run vite locally"
|
||||
npm run dev
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user