graphdb-workbench 2.7.0 → 2.7.1-RC1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{0.ce392e04e45ca4fad0ce.bundle.js → 0.77349cff52402428d9b2.bundle.js} +1 -1
- package/dist/{10.57edfec05379d783ffaa.bundle.js → 10.b578a931354c66da5421.bundle.js} +1 -1
- package/dist/{100.468b84c65c7b8c06657d.bundle.js → 100.791e6c1dd4d34f785fa1.bundle.js} +1 -1
- package/dist/{102.73ff72236ce70b195ca5.bundle.js → 102.6f9cbff52ee6b40bd8ed.bundle.js} +1 -1
- package/dist/{107.9501561f24a33fd8ac99.bundle.js → 107.7002925ebe3a8f9dc69a.bundle.js} +1 -1
- package/dist/{109.e153a8c496a21a2fd6c1.bundle.js → 109.118654b6355bb0e9daae.bundle.js} +1 -1
- package/dist/{12.34fc1969079cc9595592.bundle.js → 11.786cb1f629c5c7a70043.bundle.js} +1 -1
- package/dist/112.1c5db75d50250a44853e.bundle.js +1 -0
- package/dist/{113.632f84d1dfd1d4a6c1bc.bundle.js → 113.eb9d1c1c2f0dc26a03d2.bundle.js} +1 -1
- package/dist/{115.74fc384b158fa53b2789.bundle.js → 115.4105806b5f46baf5afb3.bundle.js} +1 -1
- package/dist/{116.44bbe19c8267478cfe47.bundle.js → 116.4bdd621e8f4121c1fb9b.bundle.js} +1 -1
- package/dist/{118.90d7cffadf0edb7dab22.bundle.js → 118.35617d9571fdd1e04280.bundle.js} +1 -1
- package/dist/12.d6c4500594aa36f119f4.bundle.js +1 -0
- package/dist/{120.3d0da2f33c1998e15059.bundle.js → 120.f8d9da3ff5443d64b7c9.bundle.js} +1 -1
- package/dist/123.5587ea39af3023b5bb34.bundle.js +1 -0
- package/dist/{128.31535237e77713023ab3.bundle.js → 128.cf87f851d1ba35fe7100.bundle.js} +1 -1
- package/dist/{13.e207ca4692eb5eafdb34.bundle.js → 13.fb659cef28f20887f1bf.bundle.js} +1 -1
- package/dist/{131.f6aec556f49c78da8665.bundle.js → 131.3c2f24f2e6abff9140c5.bundle.js} +1 -1
- package/dist/{132.bda2e1408a049ad349b2.bundle.js → 132.99311ccc8a21d3448cc2.bundle.js} +1 -1
- package/dist/{133.f9aae73e47de861bb86e.bundle.js → 133.c42e903423b4dff7fd3c.bundle.js} +1 -1
- package/dist/{134.a5c33a40d2b84ab5b624.bundle.js → 134.cb7f54514484f90eb02f.bundle.js} +1 -1
- package/dist/{135.e3e8ff0d0cce2e980f9b.bundle.js → 135.bd00a551693084ff39e6.bundle.js} +1 -1
- package/dist/{136.49d2a1a7cfb9325f793a.bundle.js → 136.b053fc49873b7ca8438a.bundle.js} +1 -1
- package/dist/{137.c66ea292a9fd631984e5.bundle.js → 137.bcc736c3b60fde444204.bundle.js} +1 -1
- package/dist/{138.cb759fc495f9ce8e21ce.bundle.js → 138.4b51b9fdc0a16e6051a5.bundle.js} +1 -1
- package/dist/{139.7537655f500bab3e9c21.bundle.js → 139.24c33f149a0bf46e5d55.bundle.js} +1 -1
- package/dist/{14.43acd2f156a53df80ef3.bundle.js → 14.e34dcd427582926b289d.bundle.js} +1 -1
- package/dist/{140.74aba9df15b050c129d9.bundle.js → 140.a13e04b4090a07f4e59b.bundle.js} +1 -1
- package/dist/{141.60071851020a1bc11595.bundle.js → 141.6bf44fe90aca025f268f.bundle.js} +1 -1
- package/dist/{142.8906dd00536438b339df.bundle.js → 142.afa43cdf98db52b553cc.bundle.js} +1 -1
- package/dist/{143.b1a2222304f8efe71776.bundle.js → 143.5f179c457fc4e9102dac.bundle.js} +1 -1
- package/dist/148.28bebc68de5695208221.bundle.js +1 -1
- package/dist/{151.ebeb15de6f8b7ab9ea57.bundle.js → 151.209c122817bdae72ca11.bundle.js} +1 -1
- package/dist/{152.fd9cb512ba8bedc15507.bundle.js → 152.20c3f763a395b9058895.bundle.js} +1 -1
- package/dist/{153.96a6ea77a2b80d4457ac.bundle.js → 153.01af8362898ed0ff4f07.bundle.js} +1 -1
- package/dist/{155.1d702ddf0b6e459a8d0a.bundle.js → 155.9b4a15ea77ec62764a32.bundle.js} +1 -1
- package/dist/{16.7ce65b3a395658afe6da.bundle.js → 16.5696bf90cca7837fd958.bundle.js} +1 -1
- package/dist/{162.f24d44c303f25e191500.bundle.js → 162.faf20ecd7edbfeb433f7.bundle.js} +1 -1
- package/dist/{165.7e2b9d659a5e3a1f6e6a.bundle.js → 165.78f7fab494d1436d90e0.bundle.js} +1 -1
- package/dist/{167.825b323360a554299ecb.bundle.js → 167.efcd257081f26115b782.bundle.js} +1 -1
- package/dist/17.6b19268cbe8c346e7bf5.bundle.js +3 -0
- package/dist/{171.9bb9c8707c4f56ff8b11.bundle.js → 171.81243c7d1f615f7c84be.bundle.js} +1 -1
- package/dist/{172.877f615f36bb4cbdf9ef.bundle.js → 172.19467709a3cfb3940ba5.bundle.js} +1 -1
- package/dist/{173.e955161ae3543b9fedb4.bundle.js → 173.c5229151bdf08623a7de.bundle.js} +1 -1
- package/dist/{174.d76a1974f66b65860804.bundle.js → 174.a2c9a9b979d7c7793177.bundle.js} +1 -1
- package/dist/{18.07f22adcb2f148d03e26.bundle.js → 18.8a4cdfd22f89998035c6.bundle.js} +1 -1
- package/dist/{182.70fe30f8b3b30e4de6ea.bundle.js → 182.5ebf0088e618b051c3ca.bundle.js} +1 -1
- package/dist/{188.be467d36c313f5bb1562.bundle.js → 188.f3e6b7eeb6822cfdc63d.bundle.js} +1 -1
- package/dist/{189.521a403e52bcfc6b77f5.bundle.js → 189.890ee3dde9a48048c9cc.bundle.js} +1 -1
- package/dist/{197.2d51b488838078a46077.bundle.js → 197.ec9eab135af5dccf29c1.bundle.js} +1 -1
- package/dist/{2.7b0a5d2579b6b7257131.bundle.js → 2.230e40a8d6a53a0ee9d9.bundle.js} +2 -2
- package/dist/{20.daa5d35c7d1831cc5cf0.bundle.js → 20.2d0e2bc48bb3add4c410.bundle.js} +1 -1
- package/dist/{200.09eb722348388d27715c.bundle.js → 200.02004bd0480acf25b3a6.bundle.js} +1 -1
- package/dist/{21.5ed4dffd658de4717f41.bundle.js → 21.4021b4280d12f1035088.bundle.js} +1 -1
- package/dist/214.a1fa76d230f52433bb66.bundle.js +1 -0
- package/dist/{22.525edb90a7db895da8ac.bundle.js → 22.0962174b028cbb81e430.bundle.js} +1 -1
- package/dist/{220.935b07a3f246cb920c84.bundle.js → 220.72e8a728288f5e31c517.bundle.js} +1 -1
- package/dist/223.1ce96be3b072429a8c61.bundle.js +1 -0
- package/dist/{229.16935cb612d5df1844d8.bundle.js → 229.c9c2706fb27ba8996a18.bundle.js} +1 -1
- package/dist/{23.b50b4669edd5ad306f22.bundle.js → 23.37f61551920695a9df19.bundle.js} +1 -1
- package/dist/{230.49345c93dcd203399ccb.bundle.js → 230.547dca73ab65c62e0b2a.bundle.js} +1 -1
- package/dist/{234.c787798f5ebdf4c7a6ed.bundle.js → 234.d0049a53f16bbeffe7dd.bundle.js} +1 -1
- package/dist/{236.2b2a65dd9bc54a0d62e8.bundle.js → 236.86c994131100615bfc35.bundle.js} +1 -1
- package/dist/{239.3ee164ccaf7181916563.bundle.js → 239.d127ee50248b2e121d8a.bundle.js} +1 -1
- package/dist/{24.6e16dea04e8eb4615f6b.bundle.js → 24.a91ab44f223c1b6b1070.bundle.js} +1 -1
- package/dist/{242.283e5444cfa5e973f6b5.bundle.js → 242.2c8176c8ae8001076202.bundle.js} +1 -1
- package/dist/243.b7071f131ee27952ff5e.bundle.js +1 -0
- package/dist/{25.1c22f6ab0f20810f178d.bundle.js → 25.d61ef2611d221a63b93f.bundle.js} +1 -1
- package/dist/{254.fa34994c9c60169d7382.bundle.js → 254.d420ab9f094a0c4f0812.bundle.js} +1 -1
- package/dist/{256.8c938ce0def6439e3170.bundle.js → 256.c51cdf38904e54c493f6.bundle.js} +1 -1
- package/dist/{257.4119b121317e06d1736e.bundle.js → 257.745d505c44cac9ecbdcb.bundle.js} +1 -1
- package/dist/{26.8ad4918de5482a06b67c.bundle.js → 26.e89a3edf1799aec575ad.bundle.js} +1 -1
- package/dist/{260.0982397378caa5bedec3.bundle.js → 260.f63804cd9bd0ea074168.bundle.js} +1 -1
- package/dist/{263.918171936df6aae41cdd.bundle.js → 263.194c2168467b206f3365.bundle.js} +1 -1
- package/dist/27.2c3c2cf50952851ca7ff.bundle.js +1 -0
- package/dist/{275.f6045911522b9f4e92c1.bundle.js → 275.f1211f3e4ef13669b6d3.bundle.js} +1 -1
- package/dist/28.9085645e020f2ffa41ae.bundle.js +1 -0
- package/dist/282.2050919043366f7a299a.bundle.js +1 -0
- package/dist/{283.5746fc7ea5590204dbe5.bundle.js → 283.26d8957e2ad89aa165fa.bundle.js} +1 -1
- package/dist/{284.b9048481713e69ecab9d.bundle.js → 284.279980fb5c23a345de84.bundle.js} +1 -1
- package/dist/{285.30720353e6e956a8d6e1.bundle.js → 285.2f72f19009b7ecc33401.bundle.js} +1 -1
- package/dist/{286.27f1819fdbfb1c92bd56.bundle.js → 286.45e80221620c4e9c22b6.bundle.js} +1 -1
- package/dist/29.15213e151364f5ecfcd5.bundle.js +1 -1
- package/dist/300.cef8eccb11324bcfdb36.bundle.js +1 -1
- package/dist/302.7a5d2ba28bd6479a77be.bundle.js +1 -1
- package/dist/303.e817b957f010153de97a.bundle.js +1 -1
- package/dist/304.fd2e766c67cd966f6751.bundle.js +1 -1
- package/dist/32.018fbf8e5cf019b9ca99.bundle.js +1 -0
- package/dist/328.e26d548d2b145033b068.bundle.js +1 -0
- package/dist/{33.dc1b84f1e1837ee64a62.bundle.js → 33.1e6ea88364cfa8fc05ba.bundle.js} +1 -1
- package/dist/333.9f051c77b4c6747b320c.bundle.js +1 -1
- package/dist/{34.c5d4046c4a906590b979.bundle.js → 34.7da8829290e069aff037.bundle.js} +1 -1
- package/dist/{346.6e70020ca7edeea727be.bundle.js → 346.db062a6ace83b3b3f638.bundle.js} +1 -1
- package/dist/{347.16efd9ee41abd6f9f1e5.bundle.js → 347.1a90e8991a8b6795cd3e.bundle.js} +1 -1
- package/dist/{348.430c33b3feafbe6f4d0c.bundle.js → 348.34ef7da31e5d065e776a.bundle.js} +1 -1
- package/dist/{349.0171f3012a3a81bb4aec.bundle.js → 349.273da95e61ccec1fe506.bundle.js} +1 -1
- package/dist/{35.be4bf3d4b15b52e27211.bundle.js → 35.5b97af00fcdeaf41ef2d.bundle.js} +1 -1
- package/dist/{36.78b8f848caf7bdc9198a.bundle.js → 36.f2916aa7e189af87eb98.bundle.js} +1 -1
- package/dist/37.bc9a367f1e8abe224f75.bundle.js +2 -0
- package/dist/{38.d2aa54f612cc98de1873.bundle.js → 38.08c4827025253b675149.bundle.js} +1 -1
- package/dist/{39.11231e3f962a5f7829d3.bundle.js → 39.dffeef1d0efdff3888b1.bundle.js} +1 -1
- package/dist/{4.e5fe4357b7f37e9116d5.bundle.js → 4.18e40a8064dc2848c5cf.bundle.js} +1 -1
- package/dist/{40.ac59185f49718c365e62.bundle.js → 40.9df624642eaddfc28d27.bundle.js} +1 -1
- package/dist/42.52befbab22e69bb433f4.bundle.js +1 -1
- package/dist/{43.233285dfc7aef5be7dcd.bundle.js → 43.972408cc953fde122a4e.bundle.js} +1 -1
- package/dist/{44.9b4db47f9b4eacae74c8.bundle.js → 44.b5e94a5cd39e9f568868.bundle.js} +1 -1
- package/dist/{48.ef7c3726e21a241b4a74.bundle.js → 48.c190963649677f14948f.bundle.js} +1 -1
- package/dist/{49.9c98607bda2dc4067139.bundle.js → 49.12f733ac94997b7a6587.bundle.js} +1 -1
- package/dist/{50.c6d501eacad89e9e3c07.bundle.js → 50.ed1e3b0ecae76b0ab157.bundle.js} +1 -1
- package/dist/51.9f47ca86da95b07bc239.bundle.js +1 -0
- package/dist/{56.2e7cf8fffc6a1c47313a.bundle.js → 56.597362dd8e4081fba52d.bundle.js} +1 -1
- package/dist/{57.349e7326d2230d67b60e.bundle.js → 57.21a042b29a36836b6228.bundle.js} +1 -1
- package/dist/{58.9f4b098efc1fa6145087.bundle.js → 58.e23c2e17e61a04fdfda3.bundle.js} +1 -1
- package/dist/{59.53531269a8e4d1db4a18.bundle.js → 59.a7318e05c6563a821478.bundle.js} +1 -1
- package/dist/{6.235db10971e1a372c502.bundle.js → 6.3cf6c5925ee8369df63d.bundle.js} +1 -1
- package/dist/{60.af48672c6f42704f3299.bundle.js → 60.78d043009a5172d0a640.bundle.js} +1 -1
- package/dist/{61.a617b16ec93bbe525f65.bundle.js → 61.fff95e1f2048dae2a2e0.bundle.js} +1 -1
- package/dist/{62.42c03cc9243d6571127e.bundle.js → 62.e31d150a37b1a5512859.bundle.js} +1 -1
- package/dist/{63.64ce2b98622dbe24c7bc.bundle.js → 63.13b28570a2f93a801b50.bundle.js} +1 -1
- package/dist/{67.b59ad8f26d05ba647b4e.bundle.js → 67.17f7adfaefac8cdff3f0.bundle.js} +1 -1
- package/dist/{68.e35370ccce13710c3acb.bundle.js → 68.0026d091b11af569c3f5.bundle.js} +1 -1
- package/dist/69.0c4685cce4a07d119427.bundle.js +1 -0
- package/dist/{70.c5931f01c244a495732b.bundle.js → 70.63abbfa8ca74c2863f71.bundle.js} +1 -1
- package/dist/{72.d6e49ef2c8e28417a526.bundle.js → 72.1330d8ae6fdd10a20396.bundle.js} +1 -1
- package/dist/{73.7f80da13b41078a74843.bundle.js → 73.f109f3577c6474e0c9fb.bundle.js} +1 -1
- package/dist/{74.f4f4c73f00bb1ae4ab90.bundle.js → 74.b21ca5f5ef0407d7e1c2.bundle.js} +1 -1
- package/dist/{77.c62d489ec10cf04974d1.bundle.js → 77.244a02903dee73260510.bundle.js} +1 -1
- package/dist/8.ad0955f6558601fb56b5.bundle.js +1 -0
- package/dist/{81.e15366bb81da124add5a.bundle.js → 81.884f598d1b995fa0ed96.bundle.js} +1 -1
- package/dist/{82.0ad959010d4c00aec31a.bundle.js → 82.39fbe5a05657a14a7263.bundle.js} +1 -1
- package/dist/83.306e0c2b20b3d0da3b39.bundle.js +1 -0
- package/dist/{84.967decab8154c2144d4e.bundle.js → 84.46b05025b3f4739139b0.bundle.js} +1 -1
- package/dist/{85.4fb67b667b3cf484a9a8.bundle.js → 85.ec7aa4be6a8e01457621.bundle.js} +1 -1
- package/dist/{86.b2b35213d0ccaca8e725.bundle.js → 86.e05f38c7e151fff0c020.bundle.js} +1 -1
- package/dist/{87.61f0a5f274d87859acb0.bundle.js → 87.d63dad9244b738d59e07.bundle.js} +1 -1
- package/dist/{88.d490ef07d9ba9996c455.bundle.js → 88.0c72409e91172e285bcf.bundle.js} +1 -1
- package/dist/{89.ac54378a96143c74cd1c.bundle.js → 89.0b04f312a873a2e189ae.bundle.js} +1 -1
- package/dist/{9.dcf78d743d24c5a1dd30.bundle.js → 9.6e07267fe82ceac615ba.bundle.js} +1 -1
- package/dist/{90.5556ac56573bea09a7ff.bundle.js → 90.1e43395de7efcaead64d.bundle.js} +1 -1
- package/dist/{91.6e6421ce74a5dab21342.bundle.js → 91.f1b001eab83f572e6d8f.bundle.js} +1 -1
- package/dist/{92.2099f8e6c8bda81df23e.bundle.js → 92.f088b23db69edc7353fe.bundle.js} +1 -1
- package/dist/{93.91bcf6af4f2cb865f971.bundle.js → 93.2a3cdaac2838164951a8.bundle.js} +1 -1
- package/dist/{96.babb34b1317abe847f48.bundle.js → 96.db918dbecbef9396b01d.bundle.js} +1 -1
- package/dist/{97.885a73aa0360fd138b06.bundle.js → 97.6853aeafb525f21053b5.bundle.js} +1 -1
- package/dist/{98.4682c01b8beedb7ee99f.bundle.js → 98.a05f20feb5e16050ac66.bundle.js} +1 -1
- package/dist/{bundle.c670cd85dc33e3a033be.bundle.js → bundle.81a26d659553c00bb930.bundle.js} +20 -20
- package/dist/i18n/locale-en.json +16 -0
- package/dist/i18n/locale-fr.json +17 -1
- package/dist/index.html +4 -4
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
- package/dist/js/angular/rdfrank/templates/filter-list.html +2 -2
- package/dist/js/angular/security/templates/user.html +1 -1
- package/dist/license-checker.json +4 -4
- package/dist/pages/aclmanagement.html +2 -2
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/create-index.html +1 -1
- package/dist/pages/createConnector.html +1 -1
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +1 -1
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +8 -8
- package/dist/pages/graphs-visualizations.html +7 -7
- package/dist/pages/guides.html +1 -1
- package/dist/pages/import.html +2 -2
- package/dist/pages/info.html +4 -4
- package/dist/pages/jdbc-create.html +1 -1
- package/dist/pages/monitor/backup-and-restore.html +1 -1
- package/dist/pages/monitor/queries.html +2 -2
- package/dist/pages/monitor/resources.html +1 -1
- package/dist/pages/namespaces.html +4 -3
- package/dist/pages/plugins.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +1 -1
- package/dist/pages/repository.html +1 -1
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-editor.html +1 -1
- package/dist/pages/sparql-template-create.html +1 -1
- package/dist/pages/ux-test1.html +2 -2
- package/dist/pages/webapi.html +2 -2
- package/dist/res/swagger5/index.html +12 -12
- package/dist/{vendor.4158e85ef261380e9ea5.bundle.js → vendor.f6d3e64e5b5efe1e1f48.bundle.js} +2 -2
- package/package.json +2 -2
- package/dist/11.c2f7d275494c60861a05.bundle.js +0 -1
- package/dist/112.304a72db9cb77abefe78.bundle.js +0 -1
- package/dist/123.58e05dcc2a75e24f84ff.bundle.js +0 -1
- package/dist/17.d345f7a57e026f463d39.bundle.js +0 -3
- package/dist/214.580e11deed22042e1369.bundle.js +0 -1
- package/dist/223.d88fa4c9769b7b5d339b.bundle.js +0 -1
- package/dist/243.b952971d26ea4c4ccce0.bundle.js +0 -1
- package/dist/27.df53c5d5f2930ef08e4c.bundle.js +0 -1
- package/dist/28.0102a82041b6de2bd7eb.bundle.js +0 -1
- package/dist/282.9bda539a1ef1de2dab5d.bundle.js +0 -1
- package/dist/32.1950981de301d2897f55.bundle.js +0 -1
- package/dist/328.b5ee29711483c6cb3648.bundle.js +0 -1
- package/dist/37.d2ae2e371207ad86bec9.bundle.js +0 -2
- package/dist/51.eedd6b5923ea71c40843.bundle.js +0 -1
- package/dist/69.3bfdada10a3dacf44239.bundle.js +0 -1
- package/dist/8.ec6881a9e10b7d4c503a.bundle.js +0 -1
- package/dist/83.f404b787e86f1508f5f4.bundle.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[74,152],{191:function(e,i,t){"use strict";t.r(i);var s=t(73);function n(e,i,t){let n;e.isHelpVisible=!1,e.fileSizeLimitInfoTemplateUrl="js/angular/import/templates/fileSizeLimitInfo.html";const r=()=>{if(n.isPristine(e.activeTabId)){let i=t.getResources();e.isHelpVisible=!i||0===i.length}else e.isHelpVisible=n.isHelpVisible(e.activeTabId)};e.openTab=e=>{t.updateActiveTabId(e)},e.toggleHelp=()=>{n.setIsHelpVisible(e.activeTabId,!e.isHelpVisible),r()};const l=[];l.push(t.onActiveTabIdUpdated(t=>{e.activeTabId=t,i.hash(e.activeTabId),r()})),l.push(t.onResourcesUpdated(r));e.$on("$destroy",()=>l.forEach(e=>e())),(()=>{n=new o;const t=i.hash()||s.TABS.USER;e.openTab(t),r()})()}angular.module("graphdb.framework.impex.import.controllers.tab",[]).controller("TabController",n),n.$inject=["$scope","$location","ImportContextService"];class o{constructor(){this._helpVisibility={[s.TABS.USER]:{isHelpVisible:void 0},[s.TABS.SERVER]:{isHelpVisible:void 0}}}isPristine(e){return void 0===this._helpVisibility[e].isHelpVisible}setIsHelpVisible(e,i){this._helpVisibility[e].isHelpVisible=i}isHelpVisible(e){return this._helpVisibility[e]&&this._helpVisibility[e].isHelpVisible}}},73:function(e,i,t){"use strict";t.r(i),t.d(i,"TABS",(function(){return n}));var s=t(
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[74,152],{191:function(e,i,t){"use strict";t.r(i);var s=t(73);function n(e,i,t){let n;e.isHelpVisible=!1,e.fileSizeLimitInfoTemplateUrl="js/angular/import/templates/fileSizeLimitInfo.html";const r=()=>{if(n.isPristine(e.activeTabId)){let i=t.getResources();e.isHelpVisible=!i||0===i.length}else e.isHelpVisible=n.isHelpVisible(e.activeTabId)};e.openTab=e=>{t.updateActiveTabId(e)},e.toggleHelp=()=>{n.setIsHelpVisible(e.activeTabId,!e.isHelpVisible),r()};const l=[];l.push(t.onActiveTabIdUpdated(t=>{e.activeTabId=t,i.hash(e.activeTabId),r()})),l.push(t.onResourcesUpdated(r));e.$on("$destroy",()=>l.forEach(e=>e())),(()=>{n=new o;const t=i.hash()||s.TABS.USER;e.openTab(t),r()})()}angular.module("graphdb.framework.impex.import.controllers.tab",[]).controller("TabController",n),n.$inject=["$scope","$location","ImportContextService"];class o{constructor(){this._helpVisibility={[s.TABS.USER]:{isHelpVisible:void 0},[s.TABS.SERVER]:{isHelpVisible:void 0}}}isPristine(e){return void 0===this._helpVisibility[e].isHelpVisible}setIsHelpVisible(e,i){this._helpVisibility[e].isHelpVisible=i}isHelpVisible(e){return this._helpVisibility[e]&&this._helpVisibility[e].isHelpVisible}}},73:function(e,i,t){"use strict";t.r(i),t.d(i,"TABS",(function(){return n}));var s=t(25);const n={USER:"user",SERVER:"server"};function o(e){let i=n.USER,t=void 0,o=[],r=!0,l=[];return{updateActiveTabId:function(t){i=t,e.emit("activeTabIdUpdated",d())},getActiveTabId:d,onActiveTabIdUpdated:function(i){return e.subscribe("activeTabIdUpdated",()=>i(d()))},getFiles:p,addFile:function(i){o.push(i),e.emit("fileAdded",Object(s.cloneDeep)(i))},updateFiles:function(i){o=i,e.emit("filesUpdated",p())},onFilesUpdated:function(i){return e.subscribe("filesUpdated",()=>i(p()))},updateResources:function(i){t=i,e.emit("resourcesUpdated",u())},getResources:u,onResourcesUpdated:function(i){return e.subscribe("resourcesUpdated",()=>i(u()))},updateShowLoader:function(i){r=i,e.emit("showLoaderUpdated",a())},getShowLoader:a,onShowLoaderUpdated:function(i){return e.subscribe("showLoaderUpdated",()=>i(a()))},updateSelectedFilesNames:function(i){l=i,e.emit("selectedFilesNamesUpdated",c())},getSelectedFilesNames:c,onSelectedFilesNamesUpdated:function(i){return e.subscribe("selectedFilesNamesUpdated",()=>i(a()))}};function c(){return l}function a(){return r}function d(){return i}function p(){return Object(s.cloneDeep)(o)}function u(){return Object(s.cloneDeep)(t)}}angular.module("graphdb.framework.import.services.importcontext",[]).factory("ImportContextService",o),o.$inject=["EventEmitterService"]}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[77,163],{102:function(e,t,s){"use strict";s.r(t),s.d(t,"ImportResourceTreeElement",(function(){return o}));var i=s(66),r=s(
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[77,163],{102:function(e,t,s){"use strict";s.r(t),s.d(t,"ImportResourceTreeElement",(function(){return o}));var i=s(66),r=s(25);class o{constructor(){this.importResource=void 0,this.parent=void 0,this.partialSelected=!1,this.indent=0,this.isImportable=!1,this.hasOngoingImport=!1,this.hasStatusInfo=!1,this.canResetStatus=!1,this.name="",this.shortenedName="",this.path="",this.shortenedContext="",this.selected=!1,this.directories=[],this.files=[],this.isImportedBiggerThanModified=!1,this.isModifiedBiggerThanImported=!1,this.isEditable=!1,this.iconClass="",this.shortenedMessage=""}addResource(e){if(e.isFile())this.files.push(e);else{if(!e.isDirectory())throw new Error("Unsupported resource type!");this.directories.push(e)}}removeResource(e){e.isFile()?this.files=this.files.filter(t=>e.importResource.name!==t.importResource.name):this.directories=this.directories.filter(t=>e.importResource.name!==t.importResource.name)}remove(){this.isRoot()||this.parent.removeResource(this)}getOrCreateDirectory(e){let t=this.directories.find(t=>t.name===e);return t||(t=new o,t.name=e,this.directories.push(t)),t}getRoot(){return this.isRoot()?this:this.parent.getRoot()}isRoot(){return void 0===this.parent}isDirectory(){return this.importResource.isDirectory()}isFile(){return!this.isRoot()&&this.importResource.isFile()}isEmpty(){return 0===this.directories.length&&0===this.files.length}toList(){const e=[];return this.parent&&e.push(this),this.directories.forEach(t=>{e.push(...t.toList())}),e.push(...this.files),e}setSelection(e,t=!0){this.selected=e,this.files.forEach(t=>t.setSelection(e,!1)),this.directories.forEach(t=>t.setSelection(e,!1)),t&&this.getRoot().updateSelectionState()}updateSelectionState(){if(this.directories.forEach(e=>e.updateSelectionState()),this.parent&&this.isDirectory()){const e=this.hasUnselectedChildren(),t=this.hasSelectedChildren();this.selected=t&&!e,this.partialSelected=t&&e}}hasUnselectedChildren(){return this.files.some(e=>!e.selected)||this.directories.some(e=>!e.selected||e.hasUnselectedChildren())}hasSelectedChildren(){return this.files.some(e=>e.selected)||this.directories.some(e=>e.selected||e.hasSelectedChildren())}selectAllWithStatus(e){this.importResource&&e.indexOf(this.importResource.status)>-1&&(this.selected=!0),this.files.forEach(t=>t.selectAllWithStatus(e)),this.directories.forEach(t=>t.selectAllWithStatus(e))}getAllSelectedForImport(){const e=[],t=this.isRoot();return!t&&this.selected&&e.push(this),(t||this.isDirectory()&&!this.selected)&&(this.files.forEach(t=>e.push(...t.getAllSelectedForImport())),this.directories.forEach(t=>e.push(...t.getAllSelectedForImport()))),Object(r.cloneDeep)(e)}getAllSelected(){const e=[];return!this.isRoot()&&this.selected&&e.push(this),this.files.forEach(t=>e.push(...t.getAllSelected())),this.directories.forEach(t=>e.push(...t.getAllSelected())),Object(r.cloneDeep)(e)}getSelectedImportedResources(){return this.getAllSelected().some(e=>e.importResource.status===i.ImportResourceStatus.DONE)}deselectAll(){this.files.forEach(e=>e.deselectAll()),this.directories.forEach(e=>e.deselectAll()),this.selected=!1,this.partialSelected=!1}getAllSelectedFiles(){const e=[];return!this.isRoot()&&this.selected&&e.push(this.importResource),this.files.forEach(t=>e.push(...t.getAllSelectedFiles())),this.directories.forEach(t=>e.push(...t.getAllSelectedFiles())),e}getAllSelectedFilesNames(){return this.getAllSelectedFiles().map(e=>e.name)}getResourceByName(e){if(this.importResource&&this.importResource.name===e)return this;const t=this.files.find(t=>t.importResource.name===e);if(t)return t;for(const t of this.directories){const s=t.getResourceByName(e);if(s)return s}return null}hasTextInResourcesName(e){return!!this.importResource.name.toLowerCase().includes(e.toLowerCase())||(!!this.files.some(t=>t.importResource.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInDirectoriesName(e)))}hasTextInDirectoriesName(e){return!(!this.isDirectory()||!this.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInDirectoriesName(e))}hasTextInFilesName(e){return!(!this.isFile()||!this.name.toLowerCase().includes(e.toLowerCase()))||(!!this.files.some(t=>t.importResource.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInFilesName(e)))}sort(e){this.directories.sort(e),this.files.sort(e),this.directories.forEach(t=>t.sort(e))}getSize(){return this.toList().length}}},66:function(e,t,s){"use strict";s.r(t),s.d(t,"ImportResourceStatus",(function(){return i}));const i={NONE:"NONE",UPLOADING:"UPLOADING",PENDING:"PENDING",IMPORTING:"IMPORTING",DONE:"DONE",ERROR:"ERROR",INTERRUPTING:"INTERRUPTING"}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[8,30,36,45,73,74,75,144,146,147,152,160,161,163,164,166,251,258,269,271,272,275],{101:function(t,e,r){"use strict";r.r(e),r.d(e,"FileUtils",(function(){return i}));class i{static convertBytesToMegabytes(t){return Math.floor(t/1048576)}static getFilenameAndExtension(t){const e=t.lastIndexOf(".");return{filename:t.substring(0,e),extension:t.substring(e+1)}}}},123:function(t,e,r){"use strict";r.r(e),r.d(e,"ImportResource",(function(){return n}));var i=r(66),o=r(98),s=r(76);class n{constructor(t,e){this.hash=e(JSON.stringify(t)),this.name=t?t.name:void 0,this.status=t?t.status:i.ImportResourceStatus.NONE,this.message=t&&t.message?t.message:"",this.context=t&&t.context?t.context:"",this.replaceGraphs=t?t.replaceGraphs:[],this.baseURI=t?t.baseURI:void 0,this.forceSerial=!!t&&t.forceSerial,this.type=t?t.type:void 0,this.format=t?t.format:void 0,this.data=t?t.data:void 0,this.modifiedOn=t?t.lastModified:void 0,this.importedOn=t?t.imported:void 0,this.size=t?t.size:"",this.addedStatements=t?t.addedStatements:0,this.removedStatements=t?t.removedStatements:0,this.numReplacedGraphs=t?t.numReplacedGraphs:0,this.parserSettings=t?t.parserSettings:new o.ImportParsingSettings,this.requestIdHeadersToForward=t?t.requestIdHeadersToForward:void 0}isDirectory(){return s.ImportResourceType.DIRECTORY===this.type}isFile(){return s.ImportResourceType.FILE===this.type||s.ImportResourceType.URL===this.type||s.ImportResourceType.TEXT===this.type}isURL(){return s.ImportResourceType.URL===this.type}isText(){return s.ImportResourceType.TEXT===this.type}}},124:function(t,e,r){"use strict";r.r(e),r.d(e,"md5HashGenerator",(function(){return o}));var i=r(6);const o=()=>{const t=new i.KJUR.crypto.MessageDigest({alg:"md5",prov:"cryptojs"});return e=>t.digestString(e)}},125:function(t,e,r){"use strict";r.r(e),r.d(e,"SortingType",(function(){return i}));const i={NAME:"NAME",SIZE:"SIZE",MODIFIED:"MODIFIED",IMPORTED:"IMPORTED",CONTEXT:"CONTEXT"}},189:function(t,e){angular.module("graphdb.framework.rest.import.service",[]).factory("ImportRestService",i),i.$inject=["$http"];const r="rest/repositories";function i(t){return{getDefaultSettings:function(e){return t.get(`${r}/${e}/import/settings/default`)},getUploadedFiles:function(e){return t.get(`${r}/${e}/import/upload`)},getServerFiles:function(e){return t.get(`${r}/${e}/import/server`)},importServerFiles:function(e,i){return t.post(`${r}/${e}/import/server`,i)},importTextSnippet:function(e,i){return t.post(`${r}/${e}/import/upload/text`,i)},updateTextSnippet:function(e,i){return t.post(`${r}/${e}/import/upload/update/text`,i)},importFromUrl:function(e,i){return t.post(`${r}/${e}/import/upload/url`,i)},updateFromUrl:function(e,i){return t.post(`${r}/${e}/import/upload/update/url`,i)},stopImport:function(e,i){return t.delete(`${r}/${e}/import/upload`,{params:i})},resetServerFileStatus:function(e,i,o=!0){return t({method:"DELETE",url:`${r}/${e}/import/server/status`,params:{remove:o},data:i,headers:{"Content-type":"application/json;charset=utf-8"}})},resetUserDataStatus:function(e,i,o=!0){return t({method:"DELETE",url:`${r}/${e}/import/upload/status`,params:{remove:o},data:i,headers:{"Content-type":"application/json;charset=utf-8"}})}}}},190:function(t,e){angular.module("graphdb.framework.rest.upload.service",[]).factory("UploadRestService",r),r.$inject=["$http","Upload","$translate"];function r(t,e,r){return{createUploadPayload:function(t,r){let i;i=t.file?{file:t.file,importSettings:e.jsonBlob(r)}:{importSettings:e.jsonBlob(r)};return i},uploadUserDataFile:function(t,r,i){return e.upload({url:`rest/repositories/${t}/import/upload/file`,data:i})},updateUserDataFile:function(t,r,i){return e.upload({url:`rest/repositories/${t}/import/upload/update/file`,data:i})}}}},191:function(t,e,r){"use strict";r.r(e);var i=r(73);function o(t,e,r){let o;t.isHelpVisible=!1,t.fileSizeLimitInfoTemplateUrl="js/angular/import/templates/fileSizeLimitInfo.html";const n=()=>{if(o.isPristine(t.activeTabId)){let e=r.getResources();t.isHelpVisible=!e||0===e.length}else t.isHelpVisible=o.isHelpVisible(t.activeTabId)};t.openTab=t=>{r.updateActiveTabId(t)},t.toggleHelp=()=>{o.setIsHelpVisible(t.activeTabId,!t.isHelpVisible),n()};const a=[];a.push(r.onActiveTabIdUpdated(r=>{t.activeTabId=r,e.hash(t.activeTabId),n()})),a.push(r.onResourcesUpdated(n));t.$on("$destroy",()=>a.forEach(t=>t())),(()=>{o=new s;const r=e.hash()||i.TABS.USER;t.openTab(r),n()})()}angular.module("graphdb.framework.impex.import.controllers.tab",[]).controller("TabController",o),o.$inject=["$scope","$location","ImportContextService"];class s{constructor(){this._helpVisibility={[i.TABS.USER]:{isHelpVisible:void 0},[i.TABS.SERVER]:{isHelpVisible:void 0}}}isPristine(t){return void 0===this._helpVisibility[t].isHelpVisible}setIsHelpVisible(t,e){this._helpVisibility[t].isHelpVisible=e}isHelpVisible(t){return this._helpVisibility[t]&&this._helpVisibility[t].isHelpVisible}}},192:function(t,e,r){"use strict";r.r(e);var i=r(73);function o(t,e,r,o,s,n,a,l,p,c){t.settings=s,t.hasParserSettings=n,t.isMultiple=l,t.enableReplace=!(!t.settings.replaceGraphs||!t.settings.replaceGraphs.length),t.showAdvancedSettings=!1,t.activeTab=p,t.userTabId=i.TABS.USER,t.hasError=function(t,e){return _.find(t,(function(t){return e===t.$name}))},t.ok=function(){t.settingsForm.replaceGraph.$setValidity("replaceGraph",!0),t.settingsForm.$valid&&(u(),e.close(t.settings))},t.cancel=function(){u(),e.dismiss(t.settings)},t.reset=function(){t.settings=_.cloneDeep(a),t.target="data"},t.addReplaceGraph=function(e){let i=!0;"default"!==e&&(i=o.isValidIri(e,e.toString())),t.settingsForm.replaceGraph.$setTouched(),t.settingsForm.replaceGraph.$setValidity("replaceGraph",i),t.settingsForm.replaceGraph.$valid&&(t.settings.replaceGraphs=t.settings.replaceGraphs||[],-1===_.indexOf(t.settings.replaceGraphs,e)?(t.replaceGraph="",t.settings.replaceGraphs.push(e)):r.warning(c.instant("import.graph.already.in.list")))},t.checkEnterReplaceGraph=function(e,r){13===e.keyCode&&(e.preventDefault(),t.addReplaceGraph(r))},t.switchParserSettings=function(){t.showAdvancedSettings=!t.showAdvancedSettings};const u=function(){"default"===t.target?t.settings.context="default":"data"===t.target&&(t.settings.context=""),t.enableReplace?"default"!==t.target&&"named"!==t.target||(t.settings.replaceGraphs=[t.settings.context]):t.settings.replaceGraphs=[]};t.settings.context?"default"===t.settings.context?(t.target="default",t.settings.context=""):t.target="named":t.target="data"}angular.module("graphdb.framework.impex.import.controllers.settings-modal",[]).controller("SettingsModalController",o),o.$inject=["$scope","$uibModalInstance","toastr","UriUtils","settings","hasParserSettings","defaultSettings","isMultiple","activeTab","$translate"]},193:function(t,e){function r(t,e){t.importFormat={name:"Auto",type:""},t.startImport=!0,t.cancel=function(){e.dismiss()},t.ok=function(){e.close({url:t.dataUrl,format:t.importFormat.type,startImport:t.startImport})}}angular.module("graphdb.framework.impex.import.controllers.import-url",[]).controller("ImportUrlController",r),r.$inject=["$scope","$uibModalInstance","toastr"]},194:function(t,e){function r(t,e,r,i){t.importFormats=[{name:"RDF/JSON",type:"application/rdf+json"},{name:"JSON-LD",type:"application/ld+json"},{name:"NDJSON-LD",type:"application/x-ld+ndjson"},{name:"RDF/XML",type:"application/rdf+xml"},{name:"N3",type:"text/rdf+n3"},{name:"N-Triples",type:"text/plain"},{name:"N-Quads",type:"text/x-nquads"},{name:"Turtle",type:"text/turtle"},{name:"Turtle*",type:"application/x-turtlestar"},{name:"TriX",type:"application/trix"},{name:"TriG",type:"application/x-trig"},{name:"TriG*",type:"application/x-trigstar"}],t.rdfText=r,t.importFormat=t.importFormats.find(t=>t.type===i),t.startImport=!0,t.sizeLimit=1e5,t.setFormat=e=>{t.importFormat=e},t.cancel=()=>{e.dismiss()},t.ok=()=>{e.close({text:t.rdfText,format:t.importFormat.type,startImport:t.startImport})}}angular.module("graphdb.framework.impex.import.controllers.import-text-snippet",[]).controller("ImportTextSnippetController",r),r.$inject=["$scope","$uibModalInstance","text","format"]},195:function(t,e,r){"use strict";r.r(e);var i=r(0);function o(t,e,r,o,s){t.message=o.trustAsHtml(Object(i.decodeHTML)(r.instant("import.user_data.duplicates_confirmation.message",{duplicatedFiles:s}))),t.cancel=()=>{e.dismiss()},t.keepBoth=()=>{e.close({overwrite:!1})},t.overwrite=()=>{e.close({overwrite:!0})}}angular.module("graphdb.framework.impex.import.controllers.file-override-confirmation",[]).controller("FileOverrideConfirmationController",o),o.$inject=["$scope","$uibModalInstance","$translate","$sce","duplicatedFiles"]},196:function(t,e,r){"use strict";r.r(e),r.d(e,"FILE_FORMATS",(function(){return i})),r.d(e,"FileFormats",(function(){return o}));const i=["ttl","ttls","rdf","rj","n3","nt","nq","trig","trigs","trix","brf","owl","jsonld","xml","rdfs","ndjsonld","ndjson","jsonl"];class o{static getGZS(){return i.map(t=>`.${t}.gz`)}static getBasics(){return i.map(t=>"."+t)}static getFileFormatsExtended(){return[...this.getGZS(),...this.getBasics(),".zip"].join(", ")}static getFileFormatsHuman(){return[...this.getBasics()].join(" ")}static getTextFileFormatsHuman(){return this.getBasics().filter(t=>".brf"!==t).join(" ")}}},197:function(t,e,r){"use strict";r.r(e),r.d(e,"DateUtils",(function(){return i}));class i{static formatCurrentDateTime(){const t=new Date;return t.getFullYear()+"-"+_.padStart(t.getMonth()+1,2,"0")+"-"+_.padStart(t.getDate(),2,"0")+" "+_.padStart(t.getHours(),2,"0")+":"+_.padStart(t.getMinutes(),2,"0")+":"+_.padStart(t.getSeconds(),2,"0")+"."+_.padStart(t.getMilliseconds(),3,"0")}}},198:function(t,e,r){"use strict";r.r(e),r.d(e,"toImportResource",(function(){return s}));var i=r(123),o=r(124);const s=t=>{const e=Object(o.md5HashGenerator)();return t.map(t=>new i.ImportResource(t,e))}},199:function(t,e,r){"use strict";r.r(e),r.d(e,"FilePrefixRegistry",(function(){return o}));var i=r(101);class o{constructor(){this.filesPrefixRegistry={}}buildPrefixesRegistry(t){t.filter(t=>"file"===t.type).forEach(t=>{const e=i.FileUtils.getFilenameAndExtension(t.name).filename,r=e.lastIndexOf("-");let o=r<0?0:e.substring(r+1),s=e.substring(0,r);if(r<0?(o=0,s=e):(o=e.substring(r+1),s=e.substring(0,r)),o){o=parseInt(o);const t=this.filesPrefixRegistry[s]||0;this.filesPrefixRegistry[s]=t<o?o:t}else this.filesPrefixRegistry[s]=0})}prefixDuplicates(t){return t.map(t=>{const{filename:e,extension:r}=i.FileUtils.getFilenameAndExtension(t.name),o=`${e}-${this.getIndexForFile(e)}.${r}`;return new File([t],o,{type:t.type,lastModified:t.lastModified})})}getIndexForFile(t){let e=this.filesPrefixRegistry[t];return void 0!==e?e++:e=0,this.filesPrefixRegistry[t]=e,e}}},241:function(t,e,r){"use strict";r.r(e);r(7),r(30),r(189),r(190);var i=r(73),o=(r(191),r(192),r(193),r(194),r(195),r(196)),s=r(71),n=r(101),a=r(197),l=r(198),p=r(0),c=r(199),u=r(125),d=r(66);const m=angular.module("graphdb.framework.impex.import.controllers",["ui.bootstrap","toastr","graphdb.framework.core.services.repositories","graphdb.framework.utils.localstorageadapter","graphdb.framework.utils.uriutils","graphdb.framework.guides.services","graphdb.framework.rest.import.service","graphdb.framework.rest.upload.service","graphdb.framework.import.services.importcontext","graphdb.framework.impex.import.controllers.tab","graphdb.framework.impex.import.controllers.settings-modal","graphdb.framework.impex.import.controllers.import-url","graphdb.framework.impex.import.controllers.import-text-snippet","graphdb.framework.impex.import.controllers.file-override-confirmation"]),f="file",g="text",h="url";m.controller("ImportViewCtrl",["$scope","toastr","$interval","$repositories","$uibModal","$filter","$jwtAuth","$location","$translate","LicenseRestService","GuidesService","ModalService","ImportRestService","ImportContextService",function(t,e,r,a,c,d,m,f,g,h,v,S,I,y){const F=[];let b=null;let R=void 0;t.files=[],t.fileChecked={},t.activeTabId=y.getActiveTabId(),t.popoverTemplateUrl="settingsPopoverTemplate.html",t.fileFormatsExtended=o.FileFormats.getFileFormatsExtended(),t.fileFormatsHuman=o.FileFormats.getFileFormatsHuman()+g.instant("import.gz.zip"),t.textFileFormatsHuman=o.FileFormats.getTextFileFormatsHuman(),t.maxUploadFileSizeMB=0,t.SORTING_TYPES=u.SortingType,t.TAB_IDS=i.TABS,t.toTitleCase=t=>s.toTitleCase(t),t.setSettingsFor=(e,r,i,o=(()=>{}))=>{U(e,r).then(r=>{t.settingsFor=e,t.settings=r,""===e||"application/ld+json"===i||"application/x-ld+ndjson"===i||e.endsWith("jsonld")||e.endsWith("zip")||e.endsWith("gz")||"directory"===t.settings.type?t.settings.hasContextLink=!0:t.settings.hasContextLink=!1;const s=_.cloneDeep(t.settings),n={templateUrl:"js/angular/import/templates/settingsModal.html",controller:"SettingsModalController",resolve:{settings:function(){return _.cloneDeep(t.settings)},hasParserSettings:t.isLocalLocation,defaultSettings:function(){return s},isMultiple:function(){return!e},activeTab:function(){return t.activeTabId}},size:"lg"};v.isActive()&&(n.backdrop="static",n.keyboard=!1),c.open(n).result.then(e=>{t.settings=e,""===t.settingsFor?t.importSelected():t.importFile(t.settingsFor,!0)},e=>{t.settings=e,o&&o()})})},t.updateImport=(e,r,i)=>{U(e,r).then(r=>{t.settingsFor=e,t.settings=r,t.importFile(e,i)})},t.importSelected=e=>{const r=new Set([...E(),...x()]),i=Array.from(r),o=()=>{const r=i.shift();r&&U(r).then(i=>{e&&(t.settings=i),t.importFile(r,!0,o)})};o()},t.isLocalLocation=()=>{const t=a.getActiveLocation();return t&&t.local},t.updateList=e=>{t.canWriteActiveRepo()&&t.updateListHttp(e)},t.onRepositoryChange=()=>{t.setRestricted(),t.isRestricted||(t.updateList(!0),T())},t.onImport=e=>{t.setSettingsFor(e.importResource.name,!1,e.importResource.format)},t.onStopImport=r=>{const i=r.importResource;I.stopImport(a.getActiveRepository(),{name:i.name,type:i.type}).success((function(){t.updateList()})).error((function(t){e.warning(g.instant("import.error.could.not.stop",{data:getError(t)}))}))},t.onRemove=t=>{const e=t.map(t=>t.name);$(e)},t.onReset=t=>{w(t,!1)},t.importAll=(e,r)=>{if(r)t.importSelected(e,r);else{let i="";1===e.length&&(i=e[0].importResource.name),t.setSettingsFor(i,r,void 0)}},t.onEditResource=e=>{e.importResource.isText()&&t.openTextSnippetDialog(e.importResource)};const T=()=>(R=void 0,t.canWriteActiveRepo()?I.getDefaultSettings(a.getActiveRepository()).success((function(t){return R=t,R})).error((function(t){e.warning(g.instant("import.error.default.settings",{data:getError(t)}))})):Promise.resolve(R)),x=()=>y.getSelectedFilesNames(),E=()=>t.currentFiles.filter(t=>t.name).map(t=>t.name),$=(t=[])=>{const e="<br/>"+t.join("<br/>"),r=Object(p.decodeHTML)(g.instant("import.remove.confirm.msg",{name:e}));S.openConfirmation(g.instant("common.confirm"),r,()=>{w(t,!0)})},U=(e,r)=>r||_.isEmpty(e)||_.isEmpty(t.savedSettings[e])?(R?Promise.resolve(angular.copy(R)):T().then(()=>angular.copy(R))).then(t=>t):Promise.resolve(t.savedSettings[e]);t.updateListHttp=r=>{if(!a.getActiveRepository())return Promise.resolve();const o=t.activeTabId===i.TABS.USER?I.getUploadedFiles:I.getServerFiles,s=t.activeTabId;return o(a.getActiveRepository()).success((function(e){s===y.getActiveTabId()&&((i.TABS.SERVER===t.activeTabId||i.TABS.USER===t.activeTabId)&&y.updateResources(Object(l.toImportResource)(e)),0===t.files.length||r?(t.files=e,y.updateFiles(t.files),t.files.forEach((function(e){e.type||(e.type=t.defaultType)}))):t.files.forEach((function(r){const i=_.find(e,_.matches({name:r.name}));r.status&&i&&_.assign(r,i),r.type||(r.type=t.defaultType)})),r&&i.TABS.USER===t.activeTabId&&(t.files=_.filter(t.files,(function(t){return void 0!==t.status})),y.updateFiles(t.files)),t.savedSettings=_.mapKeys(_.filter(t.files,"parserSettings"),"name"))})).error((function(t){e.warning(g.instant("import.error.could.not.get.files",{data:getError(t)}))}))};const w=(r,o)=>{if(!r||r.length<1)return;(t.activeTabId===i.TABS.USER?I.resetUserDataStatus:I.resetServerFileStatus)(a.getActiveRepository(),r,o).success((function(){t.updateList(!0)})).error((function(t){e.warning(g.instant("import.error.could.not.clear",{data:getError(t)}))}))},D=()=>{F.forEach(t=>t())},A=e=>{t.activeTabId=e,y.updateResources([]),y.updateShowLoader(!0),t.updateListHttp(!0).finally(()=>y.updateShowLoader(!1))};t.importViewControllerInit=()=>{F.push(t.$on("repositoryIsSet",t.onRepositoryChange)),F.push(t.$on("$destroy",()=>r.cancel(b))),F.push(y.onActiveTabIdUpdated(t=>A(t))),t.$on("$destroy",D),h.getInfo().success((function(e){t.appData={},t.appData.properties={};for(let r=0;r<e.length;r++)t.appData.properties[e[r].key]={source:e[r].source,value:e[r].value};t.maxUploadFileSizeMB=n.FileUtils.convertBytesToMegabytes(t.appData.properties["graphdb.workbench.maxUploadSize"].value)})).error((function(t){const r=getError(t);e.error(r,g.instant("common.error"))})),T(),b=r(()=>{t.updating||t.updateList(!1)},4e3),A(y.getActiveTabId())}}]),m.controller("ImportCtrl",["$scope","toastr","$controller","$translate","$repositories","ImportRestService","ImportContextService",function(t,e,r,o,s,n,a){t.columnKeys={name:"import.import_resource_tree.header.name",size:"import.import_resource_tree.header.size",modified:"import.import_resource_tree.header.modified",imported:"import.import_resource_tree.header.imported",context:"import.import_resource_tree.header.context"},angular.extend(this,r("ImportViewCtrl",{$scope:t})),t.defaultType="server",t.tabId="#import-server",t.importSelected=t=>{l(a.getSelectedFilesNames(),t)},t.importFile=function(t){l([t])};const l=function(r,i){t.canWriteActiveRepo()&&n.importServerFiles(s.getActiveRepository(),{importSettings:i?null:t.settings,fileNames:r}).success((function(){t.updateList(),t.fileChecked={}})).error((function(t){e.error(o.instant("import.could.not.send.file",{data:getError(t)}))}))};i.TABS.SERVER===a.getActiveTabId()&&t.importViewControllerInit()}]),m.controller("UploadCtrl",["$scope","toastr","$controller","$uibModal","$translate","$repositories","ImportRestService","UploadRestService","ModalService","ImportContextService","EventEmitterService",function(t,e,r,o,s,l,p,u,m,v,S){const I=new c.FilePrefixRegistry,y=[];t.columnKeys={name:"import.import_resource_tree.header.name",size:"import.import_resource_tree.header.size",modified:"import.import_resource_tree.header.uploaded",imported:"import.import_resource_tree.header.imported",context:"import.import_resource_tree.header.context"},angular.extend(this,r("ImportViewCtrl",{$scope:t})),t.defaultType=f,t.tabId="#import-user",t.currentFiles=[];let F=!1;t.pastedDataIdx=1,t.fileSelected=function(e,r,i,o,s){const n={files:i,cancel:!1};S.emit("filesForUploadSelected",n,e=>{if(!e.cancel){b(s);const e=i||[];$(e);const r=[],o=[];e.forEach(e=>{t.files.some(t=>t.name===e.name)?r.push(e):o.push(e)}),r.length>0?U(r,o):(t.currentFiles=[...e],F=!0)}})},t.importFile=(r,i,o)=>{const n=t.files.find(t=>t.name===r);n?n.type===g?R(n,i,o):n.type===h?x(n,i,o):E(n,i,o):e.warning(s.instant("import.no.such.file",{name:r}))},t.openTextSnippetDialog=e=>{e&&e.data;o.open({templateUrl:"js/angular/import/templates/textSnippet.html",controller:"ImportTextSnippetController",resolve:{text:function(){return e?e.data:""},format:function(){return e?e.format:"text/turtle"}}}).result.then(r=>{e?(e.data===r.text&&e.format===r.format||e.status===d.ImportResourceStatus.NONE||(e.status=d.ImportResourceStatus.NONE,e.message=s.instant("import.text.snippet.not.imported")),e.data=r.text,e.format=r.format,T(e)):(e={type:"text",name:"Text snippet "+a.DateUtils.formatCurrentDateTime(),format:r.format,data:r.text},t.files.unshift(e),t.updateImport(e.name,!1,!1)),r.startImport&&t.setSettingsFor(e.name,!1,e.format)})},t.rdfDataFromURL=()=>{o.open({templateUrl:"js/angular/import/templates/urlImport.html",controller:"ImportUrlController",scope:t}).result.then((function(e){const r=_.find(t.files,{type:"url",name:e.url});r?r.format=e.format:t.files.unshift({type:"url",name:e.url,format:e.format,data:e.url}),t.updateImport(e.url,!0,!1),e.startImport&&t.setSettingsFor(e.url,!0,e.format)}))};const b=t=>{t.length>0&&t.forEach((function(t){e.warning(s.instant("import.large.file",{name:t.name,size:n.FileUtils.convertBytesToMegabytes(t.size)}))}))},R=(r,i,o)=>{t.settings.name=r.name,t.settings.type=r.type,t.settings.data=r.data,t.settings.format=r.format,r.status=d.ImportResourceStatus.PENDING;(i?p.importTextSnippet:p.updateTextSnippet)(l.getActiveRepository(),t.settings).success((function(){t.updateList()})).error((function(t){e.error(s.instant("import.could.not.send.data",{data:getError(t)})),r.status=d.ImportResourceStatus.ERROR,r.message=getError(t)})).finally(o||function(){})},T=r=>{t.updating=!0,p.updateTextSnippet(l.getActiveRepository(),r).success((function(t){})).error((function(t){e.error(s.instant("import.could.not.update.text",{data:getError(t)}))})).finally((function(){t.updating=!1}))},x=(r,i,o)=>{t.settings.name=r.name,t.settings.type=r.type,t.settings.data=r.data,t.settings.format=r.format,r.status=d.ImportResourceStatus.PENDING;(i?p.importFromUrl:p.updateFromUrl)(l.getActiveRepository(),t.settings).success((function(){t.updateList()})).error((function(t){e.error(s.instant("import.could.not.send.url",{data:getError(t)}))})).finally(o||function(){})},E=(r,i,o)=>{t.settings.name=r.name;const n=u.createUploadPayload(r,t.settings);(i?u.uploadUserDataFile:u.updateUserDataFile)(l.getActiveRepository(),r,n).then(e=>{t.progressPercentage=null,t.uploadProgressMessage="",t.updateList()},()=>{},e=>{t.progressPercentage=parseInt(100*e.loaded/e.total),t.uploadProgressMessage=s.instant("import.file.upload.progress",{progress:t.progressPercentage})}).catch(t=>{e.error(s.instant("import.could.not.upload.file",{data:getError(t)})),r.status=d.ImportResourceStatus.ERROR,r.message=getError(t)}).finally(o||function(){})},$=t=>{t.forEach((function(r){if("bz2"===r.name.substr(r.name.lastIndexOf(".")+1)){const i=t.indexOf(r);i>-1&&t.splice(i,1),e.error(s.instant("import.could.not.upload",{name:r.name}))}}))},U=(e,r)=>{const i=e.map(t=>t.name).join("<br/>");o.open({templateUrl:"js/angular/import/templates/file-override-confirmation.html",controller:"FileOverrideConfirmationController",windowClass:"confirm-duplicate-files-dialog",resolve:{duplicatedFiles:()=>i}}).result.then(i=>{if(i.overwrite)t.currentFiles.length?t.currentFiles=[...e,...r]:t.currentFiles.push(...e,...r),F=!0;else{const i=I.prefixDuplicates(e);t.currentFiles=[...t.currentFiles,...i,...r],F=!0}})},w=()=>{Object.keys(t.fileChecked).forEach(e=>{t.fileChecked[e]=!1})};y.push(t.$watchCollection("currentFiles",()=>{if(t.files=_.uniqBy(_.union(_.map(t.currentFiles,(function(t){return{name:t.name,type:"file",file:t}})),t.files),(function(t){return t.name})),t.savedSettings=_.mapKeys(_.filter(t.files,"parserSettings"),"name"),F&&t.currentFiles.length>0){w(),t.currentFiles.forEach(e=>{t.fileChecked[e.name]=!0});let e="";1===t.currentFiles.length&&(e=t.currentFiles[0].name),t.setSettingsFor(e,!1,void 0,()=>{t.currentFiles.forEach(e=>{t.updateImport(e.name,!1,!1)})})}})),t.$on("$destroy",()=>{y.forEach(t=>t())});i.TABS.USER===v.getActiveTabId()&&(t.importViewControllerInit(),y.push(v.onFilesUpdated(t=>{I.buildPrefixesRegistry(t)})))}])},66:function(t,e,r){"use strict";r.r(e),r.d(e,"ImportResourceStatus",(function(){return i}));const i={NONE:"NONE",UPLOADING:"UPLOADING",PENDING:"PENDING",IMPORTING:"IMPORTING",DONE:"DONE",ERROR:"ERROR",INTERRUPTING:"INTERRUPTING"}},71:function(t,e,r){"use strict";r.r(e),r.d(e,"removeSpecialChars",(function(){return o})),r.d(e,"toBoolean",(function(){return s})),r.d(e,"toTitleCase",(function(){return n}));var i=r(25);const o=t=>t.replace(/[()']/g,""),s=t=>"string"==typeof t?"true"===t:Boolean(t),n=t=>t?Object(i.upperFirst)(t.toLowerCase()):t},73:function(t,e,r){"use strict";r.r(e),r.d(e,"TABS",(function(){return o}));var i=r(25);const o={USER:"user",SERVER:"server"};function s(t){let e=o.USER,r=void 0,s=[],n=!0,a=[];return{updateActiveTabId:function(r){e=r,t.emit("activeTabIdUpdated",c())},getActiveTabId:c,onActiveTabIdUpdated:function(e){return t.subscribe("activeTabIdUpdated",()=>e(c()))},getFiles:u,addFile:function(e){s.push(e),t.emit("fileAdded",Object(i.cloneDeep)(e))},updateFiles:function(e){s=e,t.emit("filesUpdated",u())},onFilesUpdated:function(e){return t.subscribe("filesUpdated",()=>e(u()))},updateResources:function(e){r=e,t.emit("resourcesUpdated",d())},getResources:d,onResourcesUpdated:function(e){return t.subscribe("resourcesUpdated",()=>e(d()))},updateShowLoader:function(e){n=e,t.emit("showLoaderUpdated",p())},getShowLoader:p,onShowLoaderUpdated:function(e){return t.subscribe("showLoaderUpdated",()=>e(p()))},updateSelectedFilesNames:function(e){a=e,t.emit("selectedFilesNamesUpdated",l())},getSelectedFilesNames:l,onSelectedFilesNamesUpdated:function(e){return t.subscribe("selectedFilesNamesUpdated",()=>e(p()))}};function l(){return a}function p(){return n}function c(){return e}function u(){return Object(i.cloneDeep)(s)}function d(){return Object(i.cloneDeep)(r)}}angular.module("graphdb.framework.import.services.importcontext",[]).factory("ImportContextService",s),s.$inject=["EventEmitterService"]},76:function(t,e,r){"use strict";r.r(e),r.d(e,"ImportResourceType",(function(){return i}));const i={DIRECTORY:"directory",FILE:"file",URL:"url",TEXT:"text"}},98:function(t,e,r){"use strict";r.r(e),r.d(e,"ImportParsingSettings",(function(){return i}));class i{constructor(){this.contextLink=void 0,this.preserveBNodeIds=!1,this.failOnUnknownDataTypes=!1,this.verifyDataTypeValues=!1,this.normalizeDataTypeValues=!1,this.failOnUnknownLanguageTags=!1,this.verifyLanguageTags=!1,this.normalizeLanguageTags=!1,this.stopOnError=!0}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[81,234],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[81,234],{226:function(n,e,i){"use strict";i.r(e);i(35);function t(n,e,i,t,r,o,s,l){let u;const a=function(){n.clear(),r.isLicenseValid()&&t.getActiveRepository()&&!t.isActiveRepoOntopType()&&!t.isActiveRepoFedXType()&&c()};n.clear=function(){n.searchPluginsTerm="",n.plugins=[],n.displayedPlugins=[]};const c=function(){g(),u=e((function(){g()}),5e3)},g=function(){s.getPlugins(n.getActiveRepository()).success((function(e){n.plugins=n.buildPluginsArray(e.results.bindings)})).error((function(n){i.error(getError(n))})).finally((function(){n.filterResults(),n.setLoader(!1)}))};n.buildPluginsArray=function(n){return n.map(n=>({name:n.s.value,enabled:"true"===n.o.value})).filter((function(n){return"plugincontrol"!==n.name&&"literals-index"!==n.name})).sort((function(n,e){const i=n.name.toLowerCase(),t=e.name.toLowerCase();return i<t?-1:i>t?1:0}))},n.filterResults=function(){const e=n.plugins.filter(e=>-1!==e.name.indexOf(n.searchPluginsTerm));f(e)&&n.updateDisplayedPlugins(e)};const f=function(e){if(!n.displayedPlugins||n.displayedPlugins.length!==e.length)return!0;for(const i in e)if(!n.displayedPlugins.find(n=>angular.equals(n,e[i])))return!0;return!1};function d(){u&&e.cancel(u)}n.updateDisplayedPlugins=function(e){n.displayedPlugins=e,setTimeout((function(){n.applyRowStyles()}),0)},n.setLoader=function(e,i){o.cancel(n.loaderTimeout),e?n.loaderTimeout=o((function(){n.loader=e,n.loaderMessage=i}),300):n.loader=!1},n.$on("repositoryIsSet",(function(){d(),a()})),n.$on("$destroy",(function(){d(),$(window).off("resize.plugin")})),$(window).on("resize.plugin",(function(){n.applyRowStyles()})),n.applyRowStyles=function(){const e=$("#wb-plugins-pluginInPlugins").width(),i=$("tr").width(),t=Math.floor(e/i);$(".wb-plugins-row").toArray().forEach((e,i)=>{n.isGreyBackground(t,i)?$(e).addClass("grey-row"):$(e).removeClass("grey-row")})},n.isGreyBackground=function(n,e){const i=(Math.floor(e/n)+1)%2!=1,t=e%2!=0;if(n%2!=0){if(i&&!t||!i&&!t)return!0;if(i&&t||!i&&t)return!1}else{if(i&&!t||!i&&t)return!1;if(i&&t||!i&&!t)return!0}},n.togglePlugin=function(e,t){const r=n.getActiveRepository(),o=t?l.instant("deactivating.plugin",{pluginName:e}):l.instant("activating.plugin",{pluginName:e});n.setLoader(!0,o),s.togglePlugin(r,t,e).error((function(n){i.error(getError(n))})).finally((function(){g(),n.setLoader(!1)}))},n.getLoaderMessage=function(){return n.loaderMessage||l.instant("common.loading")},n.onSearchTermChanged=function(){n.filterResults()},a()}angular.module("graphdb.framework.plugins.controllers",["graphdb.framework.rest.plugins.service"]).controller("PluginsCtrl",t),t.$inject=["$scope","$interval","toastr","$repositories","$licenseService","$timeout","PluginsRestService","$translate"]},311:function(n,e,i){"use strict";i.r(e);i(226);angular.module("graphdb.framework.plugins",["ngRoute","graphdb.framework.plugins.controllers"])}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[82,236],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[82,236],{227:function(e,t,o){"use strict";o.r(t);o(7),o(29);const n=angular.module("graphdb.framework.jmx.queries.controllers",["ui.bootstrap","toastr","graphdb.framework.rest.monitoring.service"]);n.controller("QueriesCtrl",["$scope","$uibModal","toastr","$interval","$repositories","$jwtAuth","ModalService","MonitoringRestService","$translate","AuthTokenService",function(e,t,o,n,r,i,s,u,a,c){e.loader=!0,e.stringLimit=500,e.expanded={},e.error="",e.paused=!1;const l=document.createElement("a");e.parseNode=function(e){if(null==e)return null;let t="local";if(e.indexOf("://localhost:")<0&&e.indexOf("://localhost/")<0){l.href=e;let o=l.hostname;(function(e){const t=e.split(".");for(let e=0,o=0;e<t.length;e++)if(parseInt(t[e],10)>=0&&parseInt(t[e],10)<=255?o++:o=0,4===o)return!0;return!1})(l.hostname)||(o=l.hostname.split(".")[0]),t=o+":"+l.port}const o=e.match(/\/repositories\/([^\/]+)#(\d+)/);return[o[2],t,o[1]]},e.togglePause=function(){e.paused=!e.paused},e.getQueries=function(){e.getQueriesRunning||e.paused||e.error||!r.getActiveRepository()||(e.getQueriesRunning=!0,u.monitorQuery(r.getActiveRepository()).success((function(t){const o=t;e.noQueries=0===o.length,e.queries={};for(let t=0;t<o.length;t++)o[t].parsedNode=e.parseNode(o[t].node),e.queries[o[t].trackId]=o[t];e.noActiveRepository=!1,e.loader=!1,e.getQueriesRunning=!1})).error((function(t){e.error=getError(t),e.loader=!1,e.getQueriesRunning=!1})))};const d=n((function(){r.isActiveRepoOntopType()||e.getQueries()}),1e3);e.$on("$destroy",(function(){n.cancel(d)})),e.deleteQueryHttp=function(t){e.loader=!0,u.deleteQuery(t,r.getActiveRepository()).success((function(){o.success(a.instant("abort.request.sent.msg")),e.loader=!1})).error((function(t){const n=getError(t);o.error(n,a.instant("common.error")),e.loader=!1}))},e.abortQuery=function(t){s.openSimpleModal({title:a.instant("confirm.abort"),message:a.instant("confirm.abort.warning.msg"),warning:!0}).result.then((function(){e.deleteQueryHttp(t)}))},e.downloadQuery=function(e){const t="query_"+e+".rq";let o="/rest/monitor/repository/"+r.getActiveRepository()+"/query/download?query="+encodeURIComponent(e)+"&filename="+encodeURIComponent(t);i.isAuthenticated()&&(o=o+"&authToken="+encodeURIComponent(c.getAuthToken())),window.open(o,"_blank")},e.toggleQueryExpanded=function(t){e.expanded[t]=!e.expanded[t]}}]),n.controller("DeleteQueryCtrl",["$scope","$uibModalInstance",function(e,t){e.ok=function(){t.close()},e.cancel=function(){t.dismiss("cancel")}}])},313:function(e,t,o){"use strict";o.r(t);o(7),o(26),o(227);angular.module("graphdb.framework.jmx.queries",["toastr","ui.bootstrap","graphdb.framework.jmx.queries.controllers","graphdb.framework.core.directives"])}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[83,243],{232:function(e,r,t){"use strict";t.r(r);var n=t(445);angular.module("graphdb.framework.resources.directives",[]).directive("chart",["$rootScope",function(e){return{restrict:"AE",scope:{chart:"="},link:function(r,t){let s;const a=e.$on("$translateChangeSuccess",()=>{r.chart.translateLabels(),s.setOption(r.chart.chartOptions)});function o(){s.setOption(r.chart.chartOptions),r.chart.updateRange(r.chart.dataHolder),s.hideLoading()}function c(e){r.chart.setSelectedSeries(e.selected)}function i(){s.resize()}r.$watch("chart",(function(){s=n.a(t[0],null,{renderer:"svg"}),s.setOption(r.chart.chartOptions),s.showLoading(),s.on("legendselectchanged",c),r.chart.registerRefreshHandler(o),r.chart.translateLabels(),window.addEventListener("resize",i)})),r.$on("$destroy",(function(){s.on("legendselectchanged"),s.dispose(),r.chart.unregisterRefreshHandler(o),a(),window.removeEventListener("resize",i)}))}}}])},319:function(e,r,t){"use strict";t.r(r);t(7),t(26),t(140),t(27),t(445),t(232);angular.module("graphdb.framework.jmx.resources",["toastr","ui.bootstrap","graphdb.framework.jmx.resources.controllers","graphdb.framework.core.services.repositories","graphdb.framework.core.directives","graphdb.framework.resources.directives"])}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[84,242],{212:function(t,e,a){"use strict";a.r(e),a.d(e,"ClusterHealthChart",(function(){return r}));var s=a(
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[84,242],{212:function(t,e,a){"use strict";a.r(e),a.d(e,"ClusterHealthChart",(function(){return r}));var s=a(64);class r extends s.ChartData{constructor(t){super(t,!0,!1),this.nodesCount=0}createDataHolder(){const[t,e,a,s]=r.COLORS;return[{name:this.translateService.instant("resources.cluster_health.in_sync"),type:"line",stack:"nodes",showSymbol:!1,step:"middle",areaStyle:{},lineStyle:{width:0},color:t,data:[]},{name:this.translateService.instant("resources.cluster_health.syncing"),type:"line",stack:"nodes",showSymbol:!1,step:"middle",areaStyle:{},lineStyle:{width:0},color:a,data:[]},{name:this.translateService.instant("resources.cluster_health.out_sync"),type:"line",stack:"nodes",showSymbol:!1,step:"middle",areaStyle:{},lineStyle:{width:0},color:e,data:[]},{name:this.translateService.instant("resources.cluster_health.disconnected"),type:"line",stack:"nodes",showSymbol:!1,step:"middle",areaStyle:{},lineStyle:{width:0},color:s,data:[]}]}addNewData(t,e,a){const s=a.nodesStats;this.nodesCount=s.nodesInCluster;const[r,i,n,l]=t;this.latestData={nodesInSync:s.nodesInCluster,nodesOutOfSync:s.nodesOutOfSync,nodesDisconnected:s.nodesDisconnected,nodesSyncing:s.nodesSyncing,term:a.term,failureRecoveriesCount:a.failureRecoveriesCount,failedTransactionsCount:a.failedTransactionsCount},r.data.push({value:[e,s.nodesInSync]}),n.data.push({value:[e,s.nodesOutOfSync]}),l.data.push({value:[e,s.nodesDisconnected]}),i.data.push({value:[e,s.nodesSyncing]}),this.configureSubtitle()}translateLabels(){const[t,e,a,s]=this.dataHolder;t.name=this.translateService.instant("resources.cluster_health.in_sync"),e.name=this.translateService.instant("resources.cluster_health.syncing"),a.name=this.translateService.instant("resources.cluster_health.out_sync"),s.name=this.translateService.instant("resources.cluster_health.disconnected"),this.configureSubtitle()}updateRange(t,e){this.chartOptions.yAxis.max=this.nodesCount,this.chartOptions.yAxis.splitNumber=this.nodesCount}configureSubtitle(){const t=[{label:this.translateService.instant("resource.cluster_health.leader_elections"),value:this.latestData.term},{label:this.translateService.instant("resource.cluster_health.recoveries"),value:this.latestData.failureRecoveriesCount},{label:this.translateService.instant("resource.cluster_health.failed_transactions"),value:this.latestData.failedTransactionsCount}];this.setSubTitle(t)}}},64:function(t,e,a){"use strict";a.r(e),a.d(e,"ChartData",(function(){return r}));var s=a(445);class r{static get DEFAULT_MULTIPLIER(){return 1.2}static get MAXIMUM_DIVISIONS(){return 10}static get COLORS(){return[r.cssVar("--secondary-color"),r.cssVar("--primary-color"),r.cssVar("--tertiary-color"),r.cssVar("--gray-color")]}static get AREA_BAR_OPACITY(){return.5}static cssVar(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}constructor(t,e,a,s){this.filter=s,this.disableRangeUpdate=e,this.disableOldDataRemoval=a,this.translateService=t,this.refreshHandlers=[],this.initialChartSetup()}registerRefreshHandler(t){this.refreshHandlers.push(t)}unregisterRefreshHandler(t){const e=this.refreshHandlers.indexOf(t);e>-1&&this.refreshHandlers.splice(e,1)}initialChartSetup(t=!0){this.range=150,this.chartOptions=this.getDefaultChartOptions(this.translateService),t&&(this.dataHolder=this.createDataHolder(),this.chartOptions.series=this.dataHolder,this.firstLoad=!0),this.chartSetup(this.chartOptions)}refresh(t=!1){t||(this.chartSetup(this.chartOptions),this.updateRange(this.dataHolder)),this.refreshHandlers.forEach(t=>t(this.chartOptions))}setSubTitle(t,e=0){this.chartOptions.title.show=!0;let a="";t.forEach((s,r)=>{if(Array.isArray(s.value)&&!s.value.length)return;const i=Array.isArray(s.value)?s.value.join("/"):s.value;a+=`{a|${s.label}}`,void 0!==i&&(a+=`{b|${i}}`),r+1<t.length&&(a+=e>0&&(r+1)%e==0?"\n":"{a| · }")}),this.chartOptions.title.text=a}chartSetup(t){}createDataHolder(){throw new Error("Must implement data holder creation")}addData(t,e){this.removeOldData(this.dataHolder,this.range),this.addNewData(this.dataHolder,t,e,this.isFirstLoad()),this.hasSelectedSeries()&&(this.updateRange(this.dataHolder),this.firstLoad&&(this.firstLoad=!1),this.refresh(!0))}hasSelectedSeries(){return!this.selectedSeries||Object.values(this.selectedSeries).some(t=>!0===t)}removeOldData(t,e){this.disableOldDataRemoval||t[0].data.length>e&&t.forEach(t=>t.data.shift())}addNewData(t,e,a,s){}setSelectedSeries(t){this.selectedSeries=t}updateRange(t,e){if(this.disableRangeUpdate)return;const[a]=r.calculateMaxChartValueAndDivisions(t,e,this.selectedSeries);this.chartOptions.yAxis.max=a}isFirstLoad(){return this.firstLoad}getDefaultChartOptions(){return{title:{show:!1,text:"",left:"center",textStyle:{overflow:"breakAll",rich:{a:{fontWeight:400,fontSize:14},b:{color:r.cssVar("--secondary-color"),fontWeight:400,fontSize:14}}}},animation:!1,color:r.COLORS,legend:{right:"15%",top:"6%",textStyle:{overflow:"truncate"},icon:"circle"},tooltip:{trigger:"axis",axisPointer:{animation:!1,label:{formatter:function(t){return s.b.format(t.value,"{HH}:{mm}:{ss}",!1)}}}},grid:{containLabel:!0,left:40},xAxis:{type:"time",splitLine:{show:!0},axisLabel:{hideOverlap:!0,padding:8,formatter:{hour:"{bold|{HH}:{mm}}",minute:"{bold|{HH}:{mm}}",second:"{HH}:{mm}:{ss}"},color:r.cssVar("--gray-color-dark"),rich:{bold:{fontWeight:500}}}},yAxis:{type:"value",splitLine:{show:!0},axisLabel:{color:r.cssVar("--gray-color-dark")},axisTick:{lineStyle:{type:"solid"}}},textStyle:{fontFamily:r.cssVar("--main-font"),fontWeight:400}}}static getMaxValueFromDataHolder(t,e){const a=t.filter(t=>!e||angular.isUndefined(e[t.name])||!0===e[t.name]).map(t=>r.getMaxValueForDataSeries(t));return Math.max(1,...a)}static getMaxValueForDataSeries(t){return Math.max(...t.data.map(t=>t.value[1]))}static calculateMaxChartValueAndDivisions(t,e,a){let s;s=Array.isArray(t)?r.getMaxValueFromDataHolder(t,a):r.getMaxValueForDataSeries(t);const i=Math.ceil(s*(e||r.DEFAULT_MULTIPLIER))||1;return[i,Math.ceil(i/r.MAXIMUM_DIVISIONS)]}static getIntegerRangeForValues(t,e,a){const[s,i]=r.calculateMaxChartValueAndDivisions(t,e,a);return[s,i]}static formatBytesValue(t,e,a){let s=t;e&&(s=r.getMaxValueFromDataHolder(e,a));const i=Math.floor(Math.log(s)/Math.log(1024));return`${(parseFloat(t)/Math.pow(1024,i)).toFixed(2)} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}`}formatNumber(t){if(!angular.isUndefined(t)&&this.filter)return this.filter("currency")(t,"",0)}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[85,242],{211:function(t,e,a){"use strict";a.r(e),a.d(e,"ConnectionsChart",(function(){return s}));var r=a(
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[85,242],{211:function(t,e,a){"use strict";a.r(e),a.d(e,"ConnectionsChart",(function(){return s}));var r=a(64);class s extends r.ChartData{constructor(t){super(t,!1,!1)}createDataHolder(){return[{name:this.translateService.instant("resource.connections.active"),type:"line",showSymbol:!1,smooth:!0,data:[]},{name:this.translateService.instant("resource.connections.open"),type:"line",showSymbol:!1,smooth:!0,data:[]}]}translateLabels(){const[t,e]=this.dataHolder;t.name=this.translateService.instant("resource.connections.active"),e.name=this.translateService.instant("resource.connections.open")}addNewData(t,e,a){const[r,s]=t,{activeTransactions:i,openConnections:n}=a.performanceData;r.data.push({value:[e,i]}),s.data.push({value:[e,n]})}updateRange(t,e){const[a,s]=r.ChartData.getIntegerRangeForValues(t,this.selectedSeries);this.chartOptions.yAxis.max=a,this.chartOptions.yAxis.minInterval=s}}},64:function(t,e,a){"use strict";a.r(e),a.d(e,"ChartData",(function(){return s}));var r=a(445);class s{static get DEFAULT_MULTIPLIER(){return 1.2}static get MAXIMUM_DIVISIONS(){return 10}static get COLORS(){return[s.cssVar("--secondary-color"),s.cssVar("--primary-color"),s.cssVar("--tertiary-color"),s.cssVar("--gray-color")]}static get AREA_BAR_OPACITY(){return.5}static cssVar(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}constructor(t,e,a,r){this.filter=r,this.disableRangeUpdate=e,this.disableOldDataRemoval=a,this.translateService=t,this.refreshHandlers=[],this.initialChartSetup()}registerRefreshHandler(t){this.refreshHandlers.push(t)}unregisterRefreshHandler(t){const e=this.refreshHandlers.indexOf(t);e>-1&&this.refreshHandlers.splice(e,1)}initialChartSetup(t=!0){this.range=150,this.chartOptions=this.getDefaultChartOptions(this.translateService),t&&(this.dataHolder=this.createDataHolder(),this.chartOptions.series=this.dataHolder,this.firstLoad=!0),this.chartSetup(this.chartOptions)}refresh(t=!1){t||(this.chartSetup(this.chartOptions),this.updateRange(this.dataHolder)),this.refreshHandlers.forEach(t=>t(this.chartOptions))}setSubTitle(t,e=0){this.chartOptions.title.show=!0;let a="";t.forEach((r,s)=>{if(Array.isArray(r.value)&&!r.value.length)return;const i=Array.isArray(r.value)?r.value.join("/"):r.value;a+=`{a|${r.label}}`,void 0!==i&&(a+=`{b|${i}}`),s+1<t.length&&(a+=e>0&&(s+1)%e==0?"\n":"{a| · }")}),this.chartOptions.title.text=a}chartSetup(t){}createDataHolder(){throw new Error("Must implement data holder creation")}addData(t,e){this.removeOldData(this.dataHolder,this.range),this.addNewData(this.dataHolder,t,e,this.isFirstLoad()),this.hasSelectedSeries()&&(this.updateRange(this.dataHolder),this.firstLoad&&(this.firstLoad=!1),this.refresh(!0))}hasSelectedSeries(){return!this.selectedSeries||Object.values(this.selectedSeries).some(t=>!0===t)}removeOldData(t,e){this.disableOldDataRemoval||t[0].data.length>e&&t.forEach(t=>t.data.shift())}addNewData(t,e,a,r){}setSelectedSeries(t){this.selectedSeries=t}updateRange(t,e){if(this.disableRangeUpdate)return;const[a]=s.calculateMaxChartValueAndDivisions(t,e,this.selectedSeries);this.chartOptions.yAxis.max=a}isFirstLoad(){return this.firstLoad}getDefaultChartOptions(){return{title:{show:!1,text:"",left:"center",textStyle:{overflow:"breakAll",rich:{a:{fontWeight:400,fontSize:14},b:{color:s.cssVar("--secondary-color"),fontWeight:400,fontSize:14}}}},animation:!1,color:s.COLORS,legend:{right:"15%",top:"6%",textStyle:{overflow:"truncate"},icon:"circle"},tooltip:{trigger:"axis",axisPointer:{animation:!1,label:{formatter:function(t){return r.b.format(t.value,"{HH}:{mm}:{ss}",!1)}}}},grid:{containLabel:!0,left:40},xAxis:{type:"time",splitLine:{show:!0},axisLabel:{hideOverlap:!0,padding:8,formatter:{hour:"{bold|{HH}:{mm}}",minute:"{bold|{HH}:{mm}}",second:"{HH}:{mm}:{ss}"},color:s.cssVar("--gray-color-dark"),rich:{bold:{fontWeight:500}}}},yAxis:{type:"value",splitLine:{show:!0},axisLabel:{color:s.cssVar("--gray-color-dark")},axisTick:{lineStyle:{type:"solid"}}},textStyle:{fontFamily:s.cssVar("--main-font"),fontWeight:400}}}static getMaxValueFromDataHolder(t,e){const a=t.filter(t=>!e||angular.isUndefined(e[t.name])||!0===e[t.name]).map(t=>s.getMaxValueForDataSeries(t));return Math.max(1,...a)}static getMaxValueForDataSeries(t){return Math.max(...t.data.map(t=>t.value[1]))}static calculateMaxChartValueAndDivisions(t,e,a){let r;r=Array.isArray(t)?s.getMaxValueFromDataHolder(t,a):s.getMaxValueForDataSeries(t);const i=Math.ceil(r*(e||s.DEFAULT_MULTIPLIER))||1;return[i,Math.ceil(i/s.MAXIMUM_DIVISIONS)]}static getIntegerRangeForValues(t,e,a){const[r,i]=s.calculateMaxChartValueAndDivisions(t,e,a);return[r,i]}static formatBytesValue(t,e,a){let r=t;e&&(r=s.getMaxValueFromDataHolder(e,a));const i=Math.floor(Math.log(r)/Math.log(1024));return`${(parseFloat(t)/Math.pow(1024,i)).toFixed(2)} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}`}formatNumber(t){if(!angular.isUndefined(t)&&this.filter)return this.filter("currency")(t,"",0)}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[86,242],{213:function(t,e,a){"use strict";a.r(e),a.d(e,"EpoolChart",(function(){return s}));var r=a(
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[86,242],{213:function(t,e,a){"use strict";a.r(e),a.d(e,"EpoolChart",(function(){return s}));var r=a(64);class s extends r.ChartData{constructor(t){super(t,!1,!1)}chartSetup(t){const e={grid:{containLabel:!0,left:40},yAxis:[{name:this.translateService.instant("resource.epool.reads"),nameLocation:"middle",type:"value",nameGap:40},{name:this.translateService.instant("resource.epool.writes"),nameLocation:"middle",type:"value",nameGap:40}]};_.merge(t,e)}createDataHolder(){return[{name:this.translateService.instant("resource.epool.reads"),type:"line",showSymbol:!1,smooth:!0,yAxisIndex:0,data:[]},{name:this.translateService.instant("resource.epool.writes"),type:"line",showSymbol:!1,smooth:!0,yAxisIndex:1,data:[]}]}translateLabels(){const[t,e]=this.dataHolder;t.name=this.translateService.instant("resource.epool.reads"),e.name=this.translateService.instant("resource.epool.writes"),this.chartSetup(this.chartOptions)}addNewData(t,e,a,r){const s=a.performanceData,[i,o]=t;let n=0,l=0;const h=s.entityPool.epoolReads,c=s.entityPool.epoolWrites;r||(n=h-this.lastestData.reads,l=c-this.lastestData.writes),this.lastestData={reads:h,writes:c},i.data.push({value:[e,n]}),o.data.push({value:[e,l]})}updateRange(t){t.forEach((t,e)=>{const[a,s]=r.ChartData.getIntegerRangeForValues(t,this.selectedSeries);this.chartOptions.yAxis[e].max=a,this.chartOptions.yAxis[e].minInterval=s})}}},64:function(t,e,a){"use strict";a.r(e),a.d(e,"ChartData",(function(){return s}));var r=a(445);class s{static get DEFAULT_MULTIPLIER(){return 1.2}static get MAXIMUM_DIVISIONS(){return 10}static get COLORS(){return[s.cssVar("--secondary-color"),s.cssVar("--primary-color"),s.cssVar("--tertiary-color"),s.cssVar("--gray-color")]}static get AREA_BAR_OPACITY(){return.5}static cssVar(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}constructor(t,e,a,r){this.filter=r,this.disableRangeUpdate=e,this.disableOldDataRemoval=a,this.translateService=t,this.refreshHandlers=[],this.initialChartSetup()}registerRefreshHandler(t){this.refreshHandlers.push(t)}unregisterRefreshHandler(t){const e=this.refreshHandlers.indexOf(t);e>-1&&this.refreshHandlers.splice(e,1)}initialChartSetup(t=!0){this.range=150,this.chartOptions=this.getDefaultChartOptions(this.translateService),t&&(this.dataHolder=this.createDataHolder(),this.chartOptions.series=this.dataHolder,this.firstLoad=!0),this.chartSetup(this.chartOptions)}refresh(t=!1){t||(this.chartSetup(this.chartOptions),this.updateRange(this.dataHolder)),this.refreshHandlers.forEach(t=>t(this.chartOptions))}setSubTitle(t,e=0){this.chartOptions.title.show=!0;let a="";t.forEach((r,s)=>{if(Array.isArray(r.value)&&!r.value.length)return;const i=Array.isArray(r.value)?r.value.join("/"):r.value;a+=`{a|${r.label}}`,void 0!==i&&(a+=`{b|${i}}`),s+1<t.length&&(a+=e>0&&(s+1)%e==0?"\n":"{a| · }")}),this.chartOptions.title.text=a}chartSetup(t){}createDataHolder(){throw new Error("Must implement data holder creation")}addData(t,e){this.removeOldData(this.dataHolder,this.range),this.addNewData(this.dataHolder,t,e,this.isFirstLoad()),this.hasSelectedSeries()&&(this.updateRange(this.dataHolder),this.firstLoad&&(this.firstLoad=!1),this.refresh(!0))}hasSelectedSeries(){return!this.selectedSeries||Object.values(this.selectedSeries).some(t=>!0===t)}removeOldData(t,e){this.disableOldDataRemoval||t[0].data.length>e&&t.forEach(t=>t.data.shift())}addNewData(t,e,a,r){}setSelectedSeries(t){this.selectedSeries=t}updateRange(t,e){if(this.disableRangeUpdate)return;const[a]=s.calculateMaxChartValueAndDivisions(t,e,this.selectedSeries);this.chartOptions.yAxis.max=a}isFirstLoad(){return this.firstLoad}getDefaultChartOptions(){return{title:{show:!1,text:"",left:"center",textStyle:{overflow:"breakAll",rich:{a:{fontWeight:400,fontSize:14},b:{color:s.cssVar("--secondary-color"),fontWeight:400,fontSize:14}}}},animation:!1,color:s.COLORS,legend:{right:"15%",top:"6%",textStyle:{overflow:"truncate"},icon:"circle"},tooltip:{trigger:"axis",axisPointer:{animation:!1,label:{formatter:function(t){return r.b.format(t.value,"{HH}:{mm}:{ss}",!1)}}}},grid:{containLabel:!0,left:40},xAxis:{type:"time",splitLine:{show:!0},axisLabel:{hideOverlap:!0,padding:8,formatter:{hour:"{bold|{HH}:{mm}}",minute:"{bold|{HH}:{mm}}",second:"{HH}:{mm}:{ss}"},color:s.cssVar("--gray-color-dark"),rich:{bold:{fontWeight:500}}}},yAxis:{type:"value",splitLine:{show:!0},axisLabel:{color:s.cssVar("--gray-color-dark")},axisTick:{lineStyle:{type:"solid"}}},textStyle:{fontFamily:s.cssVar("--main-font"),fontWeight:400}}}static getMaxValueFromDataHolder(t,e){const a=t.filter(t=>!e||angular.isUndefined(e[t.name])||!0===e[t.name]).map(t=>s.getMaxValueForDataSeries(t));return Math.max(1,...a)}static getMaxValueForDataSeries(t){return Math.max(...t.data.map(t=>t.value[1]))}static calculateMaxChartValueAndDivisions(t,e,a){let r;r=Array.isArray(t)?s.getMaxValueFromDataHolder(t,a):s.getMaxValueForDataSeries(t);const i=Math.ceil(r*(e||s.DEFAULT_MULTIPLIER))||1;return[i,Math.ceil(i/s.MAXIMUM_DIVISIONS)]}static getIntegerRangeForValues(t,e,a){const[r,i]=s.calculateMaxChartValueAndDivisions(t,e,a);return[r,i]}static formatBytesValue(t,e,a){let r=t;e&&(r=s.getMaxValueFromDataHolder(e,a));const i=Math.floor(Math.log(r)/Math.log(1024));return`${(parseFloat(t)/Math.pow(1024,i)).toFixed(2)} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}`}formatNumber(t){if(!angular.isUndefined(t)&&this.filter)return this.filter("currency")(t,"",0)}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[87,242],{209:function(t,e,a){"use strict";a.r(e),a.d(e,"QueriesChart",(function(){return s}));var r=a(
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[87,242],{209:function(t,e,a){"use strict";a.r(e),a.d(e,"QueriesChart",(function(){return s}));var r=a(64);class s extends r.ChartData{constructor(t){super(t,!1,!1)}createDataHolder(){return[{name:this.translateService.instant("resource.queries.running"),type:"line",showSymbol:!1,smooth:!0,data:[]}]}translateLabels(){const[t]=this.dataHolder;t.name=this.translateService.instant("resource.queries.running"),this.configureSubtitle()}addNewData(t,e,a){const{activeQueryData:r,performanceData:s}=a;this.latestData={slowQueries:s.queries.slow,suboptimal:s.queries.suboptimal,activeQueryData:r,performanceData:s},t[0].data.push({value:[e,r.length]}),this.configureSubtitle()}updateRange(t,e){const[a,s]=r.ChartData.getIntegerRangeForValues(t,this.selectedSeries);this.chartOptions.yAxis.max=a,this.chartOptions.yAxis.minInterval=s}configureSubtitle(){const t=[{label:this.translateService.instant("resource.queries.slow"),value:this.latestData.slowQueries},{label:this.translateService.instant("resource.queries.suboptimal"),value:this.latestData.suboptimal}];this.setSubTitle(t)}}},64:function(t,e,a){"use strict";a.r(e),a.d(e,"ChartData",(function(){return s}));var r=a(445);class s{static get DEFAULT_MULTIPLIER(){return 1.2}static get MAXIMUM_DIVISIONS(){return 10}static get COLORS(){return[s.cssVar("--secondary-color"),s.cssVar("--primary-color"),s.cssVar("--tertiary-color"),s.cssVar("--gray-color")]}static get AREA_BAR_OPACITY(){return.5}static cssVar(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}constructor(t,e,a,r){this.filter=r,this.disableRangeUpdate=e,this.disableOldDataRemoval=a,this.translateService=t,this.refreshHandlers=[],this.initialChartSetup()}registerRefreshHandler(t){this.refreshHandlers.push(t)}unregisterRefreshHandler(t){const e=this.refreshHandlers.indexOf(t);e>-1&&this.refreshHandlers.splice(e,1)}initialChartSetup(t=!0){this.range=150,this.chartOptions=this.getDefaultChartOptions(this.translateService),t&&(this.dataHolder=this.createDataHolder(),this.chartOptions.series=this.dataHolder,this.firstLoad=!0),this.chartSetup(this.chartOptions)}refresh(t=!1){t||(this.chartSetup(this.chartOptions),this.updateRange(this.dataHolder)),this.refreshHandlers.forEach(t=>t(this.chartOptions))}setSubTitle(t,e=0){this.chartOptions.title.show=!0;let a="";t.forEach((r,s)=>{if(Array.isArray(r.value)&&!r.value.length)return;const i=Array.isArray(r.value)?r.value.join("/"):r.value;a+=`{a|${r.label}}`,void 0!==i&&(a+=`{b|${i}}`),s+1<t.length&&(a+=e>0&&(s+1)%e==0?"\n":"{a| · }")}),this.chartOptions.title.text=a}chartSetup(t){}createDataHolder(){throw new Error("Must implement data holder creation")}addData(t,e){this.removeOldData(this.dataHolder,this.range),this.addNewData(this.dataHolder,t,e,this.isFirstLoad()),this.hasSelectedSeries()&&(this.updateRange(this.dataHolder),this.firstLoad&&(this.firstLoad=!1),this.refresh(!0))}hasSelectedSeries(){return!this.selectedSeries||Object.values(this.selectedSeries).some(t=>!0===t)}removeOldData(t,e){this.disableOldDataRemoval||t[0].data.length>e&&t.forEach(t=>t.data.shift())}addNewData(t,e,a,r){}setSelectedSeries(t){this.selectedSeries=t}updateRange(t,e){if(this.disableRangeUpdate)return;const[a]=s.calculateMaxChartValueAndDivisions(t,e,this.selectedSeries);this.chartOptions.yAxis.max=a}isFirstLoad(){return this.firstLoad}getDefaultChartOptions(){return{title:{show:!1,text:"",left:"center",textStyle:{overflow:"breakAll",rich:{a:{fontWeight:400,fontSize:14},b:{color:s.cssVar("--secondary-color"),fontWeight:400,fontSize:14}}}},animation:!1,color:s.COLORS,legend:{right:"15%",top:"6%",textStyle:{overflow:"truncate"},icon:"circle"},tooltip:{trigger:"axis",axisPointer:{animation:!1,label:{formatter:function(t){return r.b.format(t.value,"{HH}:{mm}:{ss}",!1)}}}},grid:{containLabel:!0,left:40},xAxis:{type:"time",splitLine:{show:!0},axisLabel:{hideOverlap:!0,padding:8,formatter:{hour:"{bold|{HH}:{mm}}",minute:"{bold|{HH}:{mm}}",second:"{HH}:{mm}:{ss}"},color:s.cssVar("--gray-color-dark"),rich:{bold:{fontWeight:500}}}},yAxis:{type:"value",splitLine:{show:!0},axisLabel:{color:s.cssVar("--gray-color-dark")},axisTick:{lineStyle:{type:"solid"}}},textStyle:{fontFamily:s.cssVar("--main-font"),fontWeight:400}}}static getMaxValueFromDataHolder(t,e){const a=t.filter(t=>!e||angular.isUndefined(e[t.name])||!0===e[t.name]).map(t=>s.getMaxValueForDataSeries(t));return Math.max(1,...a)}static getMaxValueForDataSeries(t){return Math.max(...t.data.map(t=>t.value[1]))}static calculateMaxChartValueAndDivisions(t,e,a){let r;r=Array.isArray(t)?s.getMaxValueFromDataHolder(t,a):s.getMaxValueForDataSeries(t);const i=Math.ceil(r*(e||s.DEFAULT_MULTIPLIER))||1;return[i,Math.ceil(i/s.MAXIMUM_DIVISIONS)]}static getIntegerRangeForValues(t,e,a){const[r,i]=s.calculateMaxChartValueAndDivisions(t,e,a);return[r,i]}static formatBytesValue(t,e,a){let r=t;e&&(r=s.getMaxValueFromDataHolder(e,a));const i=Math.floor(Math.log(r)/Math.log(1024));return`${(parseFloat(t)/Math.pow(1024,i)).toFixed(2)} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}`}formatNumber(t){if(!angular.isUndefined(t)&&this.filter)return this.filter("currency")(t,"",0)}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[88,242],{207:function(t,e,a){"use strict";a.r(e),a.d(e,"CpuLoadChart",(function(){return s}));var r=a(
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[88,242],{207:function(t,e,a){"use strict";a.r(e),a.d(e,"CpuLoadChart",(function(){return s}));var r=a(64);class s extends r.ChartData{constructor(t){super(t,!1,!1)}chartSetup(t){const e={yAxis:{axisLabel:{formatter:t=>t+"%"},min:0,max:function(t){return Math.round(t.max>50?100:2*t.max)}},tooltip:{valueFormatter:function(t){return t+"%"}}};_.merge(t,e)}createDataHolder(){return[{name:this.translateService.instant("resource.system.cpu_load.label"),type:"line",smoothMonotone:"x",showSymbol:!1,smooth:!0,data:[]}]}translateLabels(){const[t]=this.dataHolder;t.name=this.translateService.instant("resource.system.cpu_load.label")}addNewData(t,e,a){t[0].data.push({value:[e,this.formatValue(a.cpuLoad)]})}formatValue(t){return+parseFloat(t).toFixed(4)}updateRange(t){}}},64:function(t,e,a){"use strict";a.r(e),a.d(e,"ChartData",(function(){return s}));var r=a(445);class s{static get DEFAULT_MULTIPLIER(){return 1.2}static get MAXIMUM_DIVISIONS(){return 10}static get COLORS(){return[s.cssVar("--secondary-color"),s.cssVar("--primary-color"),s.cssVar("--tertiary-color"),s.cssVar("--gray-color")]}static get AREA_BAR_OPACITY(){return.5}static cssVar(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}constructor(t,e,a,r){this.filter=r,this.disableRangeUpdate=e,this.disableOldDataRemoval=a,this.translateService=t,this.refreshHandlers=[],this.initialChartSetup()}registerRefreshHandler(t){this.refreshHandlers.push(t)}unregisterRefreshHandler(t){const e=this.refreshHandlers.indexOf(t);e>-1&&this.refreshHandlers.splice(e,1)}initialChartSetup(t=!0){this.range=150,this.chartOptions=this.getDefaultChartOptions(this.translateService),t&&(this.dataHolder=this.createDataHolder(),this.chartOptions.series=this.dataHolder,this.firstLoad=!0),this.chartSetup(this.chartOptions)}refresh(t=!1){t||(this.chartSetup(this.chartOptions),this.updateRange(this.dataHolder)),this.refreshHandlers.forEach(t=>t(this.chartOptions))}setSubTitle(t,e=0){this.chartOptions.title.show=!0;let a="";t.forEach((r,s)=>{if(Array.isArray(r.value)&&!r.value.length)return;const i=Array.isArray(r.value)?r.value.join("/"):r.value;a+=`{a|${r.label}}`,void 0!==i&&(a+=`{b|${i}}`),s+1<t.length&&(a+=e>0&&(s+1)%e==0?"\n":"{a| · }")}),this.chartOptions.title.text=a}chartSetup(t){}createDataHolder(){throw new Error("Must implement data holder creation")}addData(t,e){this.removeOldData(this.dataHolder,this.range),this.addNewData(this.dataHolder,t,e,this.isFirstLoad()),this.hasSelectedSeries()&&(this.updateRange(this.dataHolder),this.firstLoad&&(this.firstLoad=!1),this.refresh(!0))}hasSelectedSeries(){return!this.selectedSeries||Object.values(this.selectedSeries).some(t=>!0===t)}removeOldData(t,e){this.disableOldDataRemoval||t[0].data.length>e&&t.forEach(t=>t.data.shift())}addNewData(t,e,a,r){}setSelectedSeries(t){this.selectedSeries=t}updateRange(t,e){if(this.disableRangeUpdate)return;const[a]=s.calculateMaxChartValueAndDivisions(t,e,this.selectedSeries);this.chartOptions.yAxis.max=a}isFirstLoad(){return this.firstLoad}getDefaultChartOptions(){return{title:{show:!1,text:"",left:"center",textStyle:{overflow:"breakAll",rich:{a:{fontWeight:400,fontSize:14},b:{color:s.cssVar("--secondary-color"),fontWeight:400,fontSize:14}}}},animation:!1,color:s.COLORS,legend:{right:"15%",top:"6%",textStyle:{overflow:"truncate"},icon:"circle"},tooltip:{trigger:"axis",axisPointer:{animation:!1,label:{formatter:function(t){return r.b.format(t.value,"{HH}:{mm}:{ss}",!1)}}}},grid:{containLabel:!0,left:40},xAxis:{type:"time",splitLine:{show:!0},axisLabel:{hideOverlap:!0,padding:8,formatter:{hour:"{bold|{HH}:{mm}}",minute:"{bold|{HH}:{mm}}",second:"{HH}:{mm}:{ss}"},color:s.cssVar("--gray-color-dark"),rich:{bold:{fontWeight:500}}}},yAxis:{type:"value",splitLine:{show:!0},axisLabel:{color:s.cssVar("--gray-color-dark")},axisTick:{lineStyle:{type:"solid"}}},textStyle:{fontFamily:s.cssVar("--main-font"),fontWeight:400}}}static getMaxValueFromDataHolder(t,e){const a=t.filter(t=>!e||angular.isUndefined(e[t.name])||!0===e[t.name]).map(t=>s.getMaxValueForDataSeries(t));return Math.max(1,...a)}static getMaxValueForDataSeries(t){return Math.max(...t.data.map(t=>t.value[1]))}static calculateMaxChartValueAndDivisions(t,e,a){let r;r=Array.isArray(t)?s.getMaxValueFromDataHolder(t,a):s.getMaxValueForDataSeries(t);const i=Math.ceil(r*(e||s.DEFAULT_MULTIPLIER))||1;return[i,Math.ceil(i/s.MAXIMUM_DIVISIONS)]}static getIntegerRangeForValues(t,e,a){const[r,i]=s.calculateMaxChartValueAndDivisions(t,e,a);return[r,i]}static formatBytesValue(t,e,a){let r=t;e&&(r=s.getMaxValueFromDataHolder(e,a));const i=Math.floor(Math.log(r)/Math.log(1024));return`${(parseFloat(t)/Math.pow(1024,i)).toFixed(2)} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}`}formatNumber(t){if(!angular.isUndefined(t)&&this.filter)return this.filter("currency")(t,"",0)}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[89,242],{208:function(t,e,a){"use strict";a.r(e),a.d(e,"DiskStorageChart",(function(){return s}));var r=a(
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[89,242],{208:function(t,e,a){"use strict";a.r(e),a.d(e,"DiskStorageChart",(function(){return s}));var r=a(64);class s extends r.ChartData{constructor(t){super(t,!0,!0)}chartSetup(t){const e={height:250,tooltip:{trigger:"axis",axisPointer:{type:"shadow",label:null},valueFormatter:function(t){return(100*t).toFixed(2)+"%"}},xAxis:{type:"value",min:0,max:1,splitNumber:2,axisLabel:{formatter:function(t){return(100*t).toFixed(2)+"%"}}},yAxis:{type:"category",data:[this.translateService.instant("resource.storage.logs"),this.translateService.instant("resource.storage.work"),this.translateService.instant("resource.storage.data")]},legend:{itemStyle:{opacity:1}}};_.merge(t,e)}createDataHolder(){return[this.createDataHolderForItem("resource.storage.used",r.ChartData.COLORS[1]),this.createDataHolderForItem("resource.storage.free",r.ChartData.COLORS[0])]}createDataHolderForItem(t,e){return{name:this.translateService.instant(t),type:"bar",stack:!0,showSymbol:!1,smooth:!0,barCategoryGap:"10%",color:e,itemStyle:{opacity:r.ChartData.AREA_BAR_OPACITY},label:{show:!0,color:"black",opacity:1,formatter:function({value:t}){return(100*t).toFixed(2)+"%"}},emphasis:{itemStyle:{color:e,opacity:1},label:{color:"white"}},data:[]}}translateLabels(){const[t,e]=this.dataHolder;t.name=this.translateService.instant("resource.storage.used"),e.name=this.translateService.instant("resource.storage.free"),this.chartSetup(this.chartOptions),this.configureSubtitle()}addNewData(t,e,a,r){const s=a.storageMemory,[i,o]=t;this.latestData={data:{used:s.dataDirUsed,free:s.dataDirFree},work:{used:s.workDirUsed,free:s.workDirFree},logs:{used:s.logsDirUsed,free:s.logsDirFree}},this.configureSubtitle();const l=s.dataDirUsed+s.dataDirFree,n=s.workDirUsed+s.workDirFree,h=s.logsDirUsed+s.logsDirFree,c=s.dataDirUsed/l,d=s.workDirUsed/n,u=s.logsDirUsed/h,g=s.dataDirFree/l,f=s.workDirFree/n,m=s.logsDirFree/h;i.data.push(u,d,c),o.data.push(m,f,g)}configureSubtitle(){const t=[{label:this.translateService.instant("resource.storage.subtitle.data"),value:[s.formatBytesValue(this.latestData.data.used,null,this.selectedSeries),s.formatBytesValue(this.latestData.data.free,null,this.selectedSeries)]},{label:this.translateService.instant("resource.storage.subtitle.work"),value:[s.formatBytesValue(this.latestData.work.used,null,this.selectedSeries),s.formatBytesValue(this.latestData.work.free,null,this.selectedSeries)]},{label:this.translateService.instant("resource.storage.subtitle.logs"),value:[s.formatBytesValue(this.latestData.logs.used,null,this.selectedSeries),s.formatBytesValue(this.latestData.logs.free,null,this.selectedSeries)]}];this.setSubTitle(t)}}},64:function(t,e,a){"use strict";a.r(e),a.d(e,"ChartData",(function(){return s}));var r=a(445);class s{static get DEFAULT_MULTIPLIER(){return 1.2}static get MAXIMUM_DIVISIONS(){return 10}static get COLORS(){return[s.cssVar("--secondary-color"),s.cssVar("--primary-color"),s.cssVar("--tertiary-color"),s.cssVar("--gray-color")]}static get AREA_BAR_OPACITY(){return.5}static cssVar(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}constructor(t,e,a,r){this.filter=r,this.disableRangeUpdate=e,this.disableOldDataRemoval=a,this.translateService=t,this.refreshHandlers=[],this.initialChartSetup()}registerRefreshHandler(t){this.refreshHandlers.push(t)}unregisterRefreshHandler(t){const e=this.refreshHandlers.indexOf(t);e>-1&&this.refreshHandlers.splice(e,1)}initialChartSetup(t=!0){this.range=150,this.chartOptions=this.getDefaultChartOptions(this.translateService),t&&(this.dataHolder=this.createDataHolder(),this.chartOptions.series=this.dataHolder,this.firstLoad=!0),this.chartSetup(this.chartOptions)}refresh(t=!1){t||(this.chartSetup(this.chartOptions),this.updateRange(this.dataHolder)),this.refreshHandlers.forEach(t=>t(this.chartOptions))}setSubTitle(t,e=0){this.chartOptions.title.show=!0;let a="";t.forEach((r,s)=>{if(Array.isArray(r.value)&&!r.value.length)return;const i=Array.isArray(r.value)?r.value.join("/"):r.value;a+=`{a|${r.label}}`,void 0!==i&&(a+=`{b|${i}}`),s+1<t.length&&(a+=e>0&&(s+1)%e==0?"\n":"{a| · }")}),this.chartOptions.title.text=a}chartSetup(t){}createDataHolder(){throw new Error("Must implement data holder creation")}addData(t,e){this.removeOldData(this.dataHolder,this.range),this.addNewData(this.dataHolder,t,e,this.isFirstLoad()),this.hasSelectedSeries()&&(this.updateRange(this.dataHolder),this.firstLoad&&(this.firstLoad=!1),this.refresh(!0))}hasSelectedSeries(){return!this.selectedSeries||Object.values(this.selectedSeries).some(t=>!0===t)}removeOldData(t,e){this.disableOldDataRemoval||t[0].data.length>e&&t.forEach(t=>t.data.shift())}addNewData(t,e,a,r){}setSelectedSeries(t){this.selectedSeries=t}updateRange(t,e){if(this.disableRangeUpdate)return;const[a]=s.calculateMaxChartValueAndDivisions(t,e,this.selectedSeries);this.chartOptions.yAxis.max=a}isFirstLoad(){return this.firstLoad}getDefaultChartOptions(){return{title:{show:!1,text:"",left:"center",textStyle:{overflow:"breakAll",rich:{a:{fontWeight:400,fontSize:14},b:{color:s.cssVar("--secondary-color"),fontWeight:400,fontSize:14}}}},animation:!1,color:s.COLORS,legend:{right:"15%",top:"6%",textStyle:{overflow:"truncate"},icon:"circle"},tooltip:{trigger:"axis",axisPointer:{animation:!1,label:{formatter:function(t){return r.b.format(t.value,"{HH}:{mm}:{ss}",!1)}}}},grid:{containLabel:!0,left:40},xAxis:{type:"time",splitLine:{show:!0},axisLabel:{hideOverlap:!0,padding:8,formatter:{hour:"{bold|{HH}:{mm}}",minute:"{bold|{HH}:{mm}}",second:"{HH}:{mm}:{ss}"},color:s.cssVar("--gray-color-dark"),rich:{bold:{fontWeight:500}}}},yAxis:{type:"value",splitLine:{show:!0},axisLabel:{color:s.cssVar("--gray-color-dark")},axisTick:{lineStyle:{type:"solid"}}},textStyle:{fontFamily:s.cssVar("--main-font"),fontWeight:400}}}static getMaxValueFromDataHolder(t,e){const a=t.filter(t=>!e||angular.isUndefined(e[t.name])||!0===e[t.name]).map(t=>s.getMaxValueForDataSeries(t));return Math.max(1,...a)}static getMaxValueForDataSeries(t){return Math.max(...t.data.map(t=>t.value[1]))}static calculateMaxChartValueAndDivisions(t,e,a){let r;r=Array.isArray(t)?s.getMaxValueFromDataHolder(t,a):s.getMaxValueForDataSeries(t);const i=Math.ceil(r*(e||s.DEFAULT_MULTIPLIER))||1;return[i,Math.ceil(i/s.MAXIMUM_DIVISIONS)]}static getIntegerRangeForValues(t,e,a){const[r,i]=s.calculateMaxChartValueAndDivisions(t,e,a);return[r,i]}static formatBytesValue(t,e,a){let r=t;e&&(r=s.getMaxValueFromDataHolder(e,a));const i=Math.floor(Math.log(r)/Math.log(1024));return`${(parseFloat(t)/Math.pow(1024,i)).toFixed(2)} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}`}formatNumber(t){if(!angular.isUndefined(t)&&this.filter)return this.filter("currency")(t,"",0)}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[9,49,63,64,65,103,104,105,106,108,109,246],{148:function(e,t){function o(e){let t,o=!1;function n(){return o}function r(t){o=t,e.emit("showClusterConfigurationPanel",n())}function s(){return t}return{updateClusterViewD3Container:function(o){t=o,e.emit("clusterViewD3ContainerChanged",s())},getClusterViewD3Container:s,onClusterViewD3ContainerUpdated:function(t){return e.subscribe("clusterViewD3ContainerChanged",()=>t(s()))},getShowClusterConfigurationPanel:n,setShowClusterConfigurationPanel:r,showClusterConfigurationPanel:function(){r(!0)},hideClusterConfigurationPanel:function(){r(!1)},onShowClusterConfigurationPanel:function(t){return e.subscribe("showClusterConfigurationPanel",()=>t(n()))}}}angular.module("graphdb.framework.clustermanagement.services.cluster-view-context-service",[]).factory("ClusterViewContextService",o),o.$inject=["EventEmitterService"]},149:function(e,t){function o(e,t,o){const n=_.cloneDeep(o.clusterModel);e.clusterNodes=n.nodes,e.clusterNodes.forEach(e=>e.shouldRemove=!1),e.nodesToRemoveCount=0,e.leftNodesLessThanTwo=!1,e.toggleNode=(t,o)=>{o.shouldRemove=!o.shouldRemove,o.shouldRemove?e.nodesToRemoveCount++:e.nodesToRemoveCount--,e.leftNodesLessThanTwo=e.clusterNodes.length-e.nodesToRemoveCount<2},e.ok=()=>{const o=e.clusterNodes.filter(e=>e.shouldRemove);t.close(o)},e.cancel=()=>{t.dismiss("cancel")}}angular.module("graphdb.framework.clustermanagement.controllers.remove-nodes",[]).controller("RemoveNodesDialogCtrl",o),o.$inject=["$scope","$uibModalInstance","data"]},150:function(e,t,o){"use strict";o.r(t);o(69);const n=function(){const e=document.getElementById("advancedOptions");if(e){const t=e.getAttribute("aria-expanded");if(t&&"true"===t)return"fa fa-angle-down"}return"fa fa-angle-right"};function r(e,t,o,r,s,a,l,c,i,d){e.pageTitle=a.instant("cluster_management.cluster_page.create_page_title"),e.autofocusId="autofocus",e.errors=[],e.clusterConfiguration={electionMinTimeout:8e3,electionRangeTimeout:6e3,heartbeatInterval:2e3,messageSizeKB:64,verificationTimeout:1500,transactionLogMaximumSizeGB:50,nodes:[]},e.locations=l.clusterModel.locations.filter(e=>!e.isLocal),e.selectedLocations=l.clusterModel.locations.filter(e=>e.isLocal),e.loader=!1,e.deleteLocation=function(t,o){t.preventDefault(),t.stopPropagation(),l.deleteLocation(o).then(()=>e.locations=e.locations.filter(e=>e.endpoint!==o.endpoint))},e.getAdvancedOptionsClass=n,e.createCluster=function(){return e.setLoader(!0,a.instant("cluster_management.cluster_page.creating_cluster_loader")),e.clusterConfiguration.nodes=e.selectedLocations.map(e=>e.rpcAddress),r.createCluster(e.clusterConfiguration).then(()=>{s.success(a.instant("cluster_management.cluster_page.notifications.create_success")),t.close()}).catch((function(e){u(e.data,e.status)})).finally(()=>{e.setLoader(!1),d.$broadcast("reloadLocations")})},e.isClusterConfigurationValid=()=>{const t=!e.clusterConfigurationForm.$invalid,o=e.selectedLocations&&e.selectedLocations.length>=2;return t&&o},e.setLoader=(t,n)=>{o.cancel(e.loaderTimeout),t?e.loaderTimeout=o(()=>{e.loader=t,e.loaderMessage=n},300):e.loader=!1},e.addNodeToList=t=>{t.rpcAddress&&(e.selectedLocations.push(t),e.locations=e.locations.filter(e=>e.endpoint!==t.endpoint))},e.removeNodeFromList=(t,o)=>{o.isLocal||(e.selectedLocations.splice(t,1),e.locations.push(o))},e.addLocation=()=>{i.addLocation().then(t=>{t&&e.locations.push(t)})},e.ok=()=>{e.isClusterConfigurationValid()?e.createCluster():s.warning(a.instant("cluster_management.cluster_page.notifications.form_invalid"))},e.cancel=()=>{t.dismiss("cancel")};const u=(t,o)=>{let n;delete e.preconditionErrors,e.errors.splice(0),412===o?e.preconditionErrors=Object.keys(t).map(e=>`${e} - ${t[e]}`):400===o?e.errors.push(...t):409===o?e.errors.push(t):(t.message||"string"==typeof t)&&(n=t.message||t),s.error(n,a.instant("cluster_management.cluster_page.notifications.create_failed"))}}angular.module("graphdb.framework.clustermanagement.controllers.create-cluster",[]).controller("CreateClusterCtrl",r),r.$inject=["$scope","$uibModalInstance","$timeout","ClusterRestService","toastr","$translate","data","$uibModal","RemoteLocationsService","$rootScope"]},151:function(e,t,o){"use strict";o.r(t);o(69);function n(e,t,o,n,r,s,a){e.pageTitle=s.instant("cluster_management.cluster_page.edit_page_title"),e.errors=[],e.clusterConfiguration=_.cloneDeep(a.clusterConfiguration),e.loader=!1,e.updateCluster=()=>(e.setLoader(!0,s.instant("cluster_management.cluster_page.updating_cluster_loader")),n.updateCluster(e.clusterConfiguration).then(()=>{r.success(s.instant("cluster_management.cluster_page.notifications.update_success")),t.close()}).catch((function(e){l(e.data,e.status)})).finally(()=>e.setLoader(!1))),e.isClusterConfigurationValid=()=>!e.clusterConfigurationForm.$invalid,e.setLoader=(t,n)=>{o.cancel(e.loaderTimeout),t?e.loaderTimeout=o(()=>{e.loader=t,e.loaderMessage=n},300):e.loader=!1},e.ok=()=>{e.isClusterConfigurationValid()?e.updateCluster():r.warning(s.instant("cluster_management.cluster_page.notifications.form_invalid"))},e.cancel=()=>{t.dismiss("cancel")};const l=(t,o)=>{delete e.preconditionErrors,r.error(s.instant("cluster_management.cluster_page.notifications.update_failed")),e.errors.splice(0),409===o||"string"==typeof t?e.errors.push(t):412===o?e.preconditionErrors=Object.keys(t).map(e=>`${e} - ${t[e]}`):400===o&&e.errors.push(...t)}}angular.module("graphdb.framework.clustermanagement.controllers.edit-cluster",[]).controller("EditClusterCtrl",n),n.$inject=["$scope","$uibModalInstance","$timeout","ClusterRestService","toastr","$translate","data"]},152:function(e,t){function o(e,t){e.forceDelete=!1,e.ok=()=>{t.close(e.forceDelete)},e.cancel=()=>{t.dismiss("cancel")}}angular.module("graphdb.framework.clustermanagement.controllers.delete-cluster",[]).controller("DeleteClusterCtrl",o),o.$inject=["$scope","$uibModalInstance"]},153:function(e,t){function o(e,t,o,n,r){e.newLocation={uri:"",authType:"signature",username:"",password:"",active:!1},e.docBase=function(e){return"https://graphdb.ontotext.com/documentation/"+e.productShortVersion}(n),e.isValidLocation=()=>(e.newLocation.uri.length<6||0===e.newLocation.uri.indexOf("http:")||0===e.newLocation.uri.indexOf("https:"))&&e.newLocation.uri.indexOf("/repositories")<=-1,e.ok=()=>{e.newLocation?t.close(e.newLocation):o.error(r.instant("location.cannot.be.empty.error"))},e.cancel=()=>{t.dismiss("cancel")}}angular.module("graphdb.framework.clustermanagement.controllers.add-location",[]).controller("AddLocationFromClusterCtrl",o),o.$inject=["$scope","$uibModalInstance","toastr","productInfo","$translate"]},154:function(e,t,o){"use strict";o.r(t);o(79);function n(e,t,o,n,r){let s,a;e.nodes=[],e.clusterNodes=[],e.locations=[],e.deleteLocation=(t,n)=>{t.preventDefault(),t.stopPropagation(),o.deleteLocation(n).then(()=>e.locations=e.locations.filter(e=>e.endpoint!==n.endpoint))},e.addNodeToList=t=>{t.rpcAddress&&(e.nodes.push(t),e.locations=e.locations.filter(e=>e.endpoint!==t.endpoint))},e.removeNodeFromList=(t,o)=>{e.nodes.splice(t,1),e.locations.push(o)},e.addLocation=()=>{r.addLocation().then(t=>{t&&e.locations.push(t)})},e.ok=()=>{t.close(e.nodes)},e.cancel=()=>{t.dismiss("cancel")};s=_.cloneDeep(o.clusterModel),e.clusterNodes=s.nodes.map(e=>({rpcAddress:e.address,endpoint:e.endpoint})),a=e.clusterNodes.map(e=>e.endpoint),e.locations=s.locations.filter(e=>!a.includes(e.endpoint)),e.locations.forEach(e=>e.isNew=!0)}angular.module("graphdb.framework.clustermanagement.controllers.add-nodes",[]).controller("AddNodesDialogCtrl",n),n.$inject=["$scope","$uibModalInstance","data","$uibModal","RemoteLocationsService"]},155:function(e,t,o){"use strict";o.r(t);o(69),o(79);function n(e,t,o,n,r,s,a,l,c){let i,d;e.replacementNodes=[],e.nodesToReplace=[],e.nodesToReplaceCount=0,e.leftNodesMajority=!1,e.clusterNodes=[],e.locations=[],e.addLocation=()=>{c.addLocation().then(t=>{t&&e.locations.push(t)})},e.toggleNode=(t,o)=>{if(o.shouldReplace=!o.shouldReplace,o.shouldReplace)e.nodesToReplaceCount++,e.nodesToReplace.push(o);else{e.nodesToReplaceCount--;const t=e.nodesToReplace.findIndex(e=>e.rpcAddress===o.rpcAddress);e.nodesToReplace.splice(t,1)}e.leftNodesMajority=u()+e.nodesToReplaceCount>e.clusterNodes.length},e.permitNodesReplace=()=>!e.leftNodesMajority&&(e.nodesToReplace.length>0||e.replacementNodes.length>0),e.addNodeToList=t=>{t.rpcAddress&&(e.replacementNodes.push(t),e.locations=e.locations.filter(e=>e.endpoint!==t.endpoint))},e.deleteLocation=(t,o)=>{t.preventDefault(),t.stopPropagation(),s.deleteLocation(o).then(()=>e.locations=e.locations.filter(e=>e.endpoint!==o.endpoint))},e.removeNodeFromList=(t,o)=>{e.replacementNodes.splice(t,1),e.locations.push(o)},e.ok=()=>{t.close({newNodes:e.replacementNodes,oldNodes:e.nodesToReplace})},e.cancel=()=>{t.dismiss("cancel")};const u=()=>Math.floor(e.clusterNodes.length/2)+1;i=_.cloneDeep(s.clusterModel),e.clusterNodes=i.nodes.map(e=>({rpcAddress:e.address,endpoint:e.endpoint,shouldReplace:!1})),d=e.clusterNodes.map(e=>e.endpoint),e.locations=i.locations.filter(e=>!d.includes(e.endpoint)),e.locations.forEach(e=>e.isNew=!0)}angular.module("graphdb.framework.clustermanagement.controllers.replace-nodes",[]).controller("ReplaceNodesDialogCtrl",n),n.$inject=["$scope","$uibModalInstance","$timeout","toastr","$translate","data","$uibModal","$rootScope","RemoteLocationsService"]},240:function(e,t,o){"use strict";o.r(t);o(69),o(79),o(148),o(149),o(150),o(151),o(152),o(153),o(154),o(155);var n=o(64),r=o(74),s=o(80);function a(e,t,o,a,l,c,i,d,u,g,m,p,f,C,h,_,L,N){let w;const v=[];e.loader=!0,e.isLeader=!1,e.currentNode=null,e.clusterModel={},e.NodeState=r.NodeState,e.leaderChanged=!1,e.currentLeader=null,e.showClusterConfigurationPanel=!1,e.clusterConfigurationPanelSize=void 0,e.onopen=e.onclose=()=>angular.noop(),e.isAdmin=()=>d.isAuthenticated()&&d.isAdmin(),e.openClusterConfigurationPanel=()=>{e.showClusterConfigurationPanel=!0,N.showClusterConfigurationPanel()},e.setLoader=(t,o)=>{p.cancel(e.loaderTimeout),t?(e.loaderMessage=o,e.loaderTimeout=p((function(){e.loader=t}),50)):e.loader=!1},e.getLoaderMessage=()=>e.loaderMessage||h.instant("common.loading"),e.getClusterConfiguration=()=>f.getClusterConfig().then(t=>{if(e.clusterConfiguration=t.data,!e.currentNode)return e.getCurrentNodeStatus()}).catch(()=>{e.clusterConfiguration=null}),e.getClusterStatus=()=>f.getClusterStatus().then(t=>{const o=t.data.slice(),n=o.find(e=>e.nodeState===r.NodeState.LEADER);T(e.currentLeader,n)&&(e.currentLeader=n,e.leaderChanged=!0),e.currentNode=o.find(t=>e.currentNode&&t.address===e.currentNode.address);const s=$(n,o);e.clusterModel.hasCluster=!0,e.clusterModel.nodes=o,e.clusterModel.links=s}).catch(t=>{if(404===t.status)return e.clusterModel.hasCluster=!1,e.clusterModel.nodes=[],e.clusterModel.links=[],e.clusterConfiguration=null,Promise.reject(t)}),e.showCreateClusterDialog=function(){c.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-create-dialog.html",controller:"CreateClusterCtrl",size:"lg",resolve:{data:function(){return{deleteLocation:R,clusterModel:e.clusterModel}}}}).result.finally((function(){E(),b(!0)}))},e.getCurrentNodeStatus=()=>f.getNodeStatus().then(t=>{e.leaderChanged=!1,e.currentNode=t.data}).catch(t=>{e.currentNode=t.data,e.clusterModel.hasCluster=!1}).then(()=>E()),e.showAddNodeToClusterDialog=()=>{c.open({templateUrl:"js/angular/clustermanagement/templates/modal/add-nodes-dialog.html",controller:"AddNodesDialogCtrl",size:"lg",resolve:{data:function(){return{deleteLocation:R,clusterModel:e.clusterModel,clusterConfiguration:e.clusterConfiguration}}}}).result.then(t=>{const o=h.instant("cluster_management.cluster_page.add_nodes_loader");e.setLoader(!0,o);const n=t.map(e=>e.rpcAddress);f.addNodesToCluster(n).then(()=>{const e=h.instant("cluster_management.cluster_page.notifications.add_nodes_success");M(e)}).catch(e=>{const t=h.instant("cluster_management.cluster_page.notifications.add_nodes_fail");k(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),b(!0)})}).finally(()=>E())},e.showReplaceNodesDialog=()=>{c.open({templateUrl:"js/angular/clustermanagement/templates/modal/replace-nodes-dialog.html",controller:"ReplaceNodesDialogCtrl",size:"lg",resolve:{data:function(){return{deleteLocation:R,clusterModel:e.clusterModel,clusterConfiguration:e.clusterConfiguration}}}}).result.then(t=>{const o=h.instant("cluster_management.cluster_page.replace_nodes_loader");e.setLoader(!0,o);const n={addNodes:t.newNodes.map(e=>e.rpcAddress),removeNodes:t.oldNodes.map(e=>e.rpcAddress)};f.replaceNodesInCluster(n).then(()=>{const e=h.instant("cluster_management.cluster_page.notifications.replace_nodes_success");M(e)}).catch(e=>{const t=h.instant("cluster_management.cluster_page.notifications.replace_nodes_fail");k(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),b(!0)})}).finally(()=>E())},e.showRemoveNodesFromClusterDialog=()=>{c.open({templateUrl:"js/angular/clustermanagement/templates/modal/remove-nodes-dialog.html",controller:"RemoveNodesDialogCtrl",size:"lg",resolve:{data:function(){return{clusterModel:e.clusterModel}}}}).result.then((function(t){const o=h.instant("cluster_management.cluster_page.remove_nodes_loader");e.setLoader(!0,o);const n=t.map(e=>e.address);f.removeNodesFromCluster(n).then(()=>{const e=h.instant("cluster_management.cluster_page.notifications.remove_nodes_success");M(e)}).catch(e=>{const t=h.instant("cluster_management.cluster_page.notifications.remove_nodes_fail");k(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),b(!0)})}))};const $=(e,t)=>{const o=[];return e&&Object.keys(e.syncStatus).forEach(n=>{const s=e.syncStatus[n];if(s!==r.LinkState.NO_CONNECTION&&(o.push({id:`${e.address}-${n}`,source:e.address,target:n,status:s}),s===r.LinkState.OUT_OF_SYNC)){const e=t.find(e=>e.address===n);let s;if(e.recoveryStatus.state===r.RecoveryState.RECEIVING_SNAPSHOT&&(s=e.recoveryStatus.affectedNodes[0]),e&&s){const n=t.find(e=>e.endpoint===s);o.push({id:`${e.address}-${n.address}`,source:n.address,target:e.address,status:r.LinkState.RECEIVING_SNAPSHOT})}}}),o},S=t=>{e.selectedNode!==t?e.selectedNode=t:e.selectedNode=null,e.$apply()},b=t=>{w||(w=e.getClusterStatus().then(()=>{if(t||!e.clusterConfiguration)return e.getClusterConfiguration()}).then(()=>{if(!e.currentNode||e.leaderChanged)return e.getCurrentNodeStatus()}).finally(()=>{w=null,e.$broadcast(s.MODEL_UPDATED)}))},T=(e,t)=>!t||(!e||e.address!==t.address),E=()=>_.getLocationsWithRpcAddresses().then(t=>{const o=t.find(e=>e.isLocal);o&&(o.endpoint=e.currentNode.endpoint,o.rpcAddress=e.currentNode.address),e.clusterModel.locations=t}),R=e=>m.openSimpleModal({title:h.instant("location.confirm.detach"),message:h.instant("location.confirm.detach.warning",{uri:e.endpoint}),warning:!0}).result.then(()=>l.deleteLocation(e.endpoint)),M=t=>{a.success(t),e.getClusterConfiguration()},k=(e,t,o)=>{let r=e.message||e;400===t&&Array.isArray(e)?r=e.reduce((e,t)=>e+`<div>${t}</div>`,""):412!==t||Object(n.isString)(e)||(r=Object.keys(e).reduce((t,o)=>t+`<div>${o} - ${e[o]}</div>`,"")),a.error(r,o,{allowHtml:!0})},A=()=>{e.clusterConfigurationPanelSize=.25*window.innerWidth+"px"},D=()=>{v.push(N.onShowClusterConfigurationPanel(t=>{A(),e.showClusterConfigurationPanel=t})),v.push(e.$on(s.UPDATE_CLUSTER,(e,t)=>{b(t.force)})),v.push(e.$on(s.DELETE_CLUSTER,(t,o)=>{(t=>{const o=h.instant("cluster_management.delete_cluster_dialog.loader_message");e.setLoader(!0,o),f.deleteCluster(t).then(t=>{if(Object.values(t.data).every(e=>"Cluster was deleted on this node."===e)){const e=h.instant("cluster_management.delete_cluster_dialog.notifications.success_delete");a.success(e)}else{const e=h.instant("cluster_management.delete_cluster_dialog.notifications.success_delete_partial"),o=Object.keys(t.data).reduce((e,o)=>e+`<div>${o} - ${t.data[o]}</div>`,"");a.warning(o,e,{allowHtml:!0})}e.getClusterConfiguration()}).catch(e=>{const t=h.instant("cluster_management.delete_cluster_dialog.notifications.fail_delete");k(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),b(!0),L.$broadcast("reloadLocations")})})(o.force)})),v.push(e.$on(s.CLICK_IN_VIEW,(t,o)=>{!function(t){const o=document.getElementById("nodeTooltip");e.selectedNode&&o!==t&&!o.contains(t)&&S(null)}(o)})),v.push(e.$on(s.NODE_SELECTED,(e,t)=>{S(t)})),v.push(e.$on(s.CREATE_CLUSTER,()=>{e.showCreateClusterDialog()}))};e.$on("$destroy",(function(){v.forEach(e=>e())}));D(),A(),e.showClusterConfigurationPanel=N.getShowClusterConfigurationPanel(),(e.loader=!0,e.getCurrentNodeStatus().then(()=>e.getClusterConfiguration()).then(()=>e.getClusterStatus()).finally(()=>{e.setLoader(!1)})).finally(()=>{const t=g((function(){b()}),1e3);e.$on("$destroy",(function(){g.cancel(t)}))})}angular.module("graphdb.framework.clustermanagement.controllers.cluster-management",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.rest.repositories.service","graphdb.framework.rest.cluster.service","graphdb.framework.clustermanagement.services.cluster-view-context-service","graphdb.framework.clustermanagement.services.remote-locations","graphdb.framework.clustermanagement.controllers.remove-nodes","graphdb.framework.clustermanagement.controllers.create-cluster","graphdb.framework.clustermanagement.controllers.edit-cluster","graphdb.framework.clustermanagement.controllers.delete-cluster","graphdb.framework.clustermanagement.controllers.add-location","graphdb.framework.clustermanagement.controllers.add-nodes","graphdb.framework.clustermanagement.controllers.replace-nodes","toastr","pageslide-directive"]).controller("ClusterManagementCtrl",a),a.$inject=["$scope","$http","$q","toastr","$repositories","$uibModal","$sce","$jwtAuth","$window","$interval","ModalService","$timeout","ClusterRestService","$location","$translate","RemoteLocationsService","$rootScope","ClusterViewContextService"]},69:function(e,t){angular.module("graphdb.framework.rest.cluster.service",[]).factory("ClusterRestService",o),o.$inject=["$http"];function o(e){return{getClusterConfig:function(){return e.get("rest/cluster/config")},createCluster:function(t){return e.post("rest/cluster/config",t)},updateCluster:function(t){t.nodes&&delete t.nodes;return e.patch("rest/cluster/config",t)},deleteCluster:function(t){const o=$.param({force:t});return e.delete("rest/cluster/config?"+o)},addNodesToCluster:function(t){return e.post("rest/cluster/config/node",{nodes:t})},replaceNodesInCluster:function(t){return e.patch("rest/cluster/config/node",t)},removeNodesFromCluster:function(t){return e.delete("rest/cluster/config/node",{data:{nodes:t},headers:{"Content-Type":"application/json"}})},getClusterStatus:function(){return e.get("rest/cluster/group/status")},getNodeStatus:function(){return e.get("rest/cluster/node/status")}}}},79:function(e,t,o){"use strict";o.r(t);o(33);function n(e,t,o,n,r){return{addLocation:function(){let e;return o.open({templateUrl:"js/angular/templates/modal/add-location.html",windowClass:"addLocationDialog",controller:"AddLocationFromClusterCtrl"}).result.then(o=>(e=o,e.isLocal=!1,e.endpoint=e.uri,function(e){let o;return n.addLocation(e).catch(e=>{const o=getError(e.data,e.status);return t.error(o,r.instant("common.error")),!1}).then(e=>!!e&&s()).then(t=>{if(!1!==t)return o=t.find(t=>t.endpoint===e.uri),o})}(e)))},getLocationsWithRpcAddresses:s};function s(){return n.getLocations().then((function(e){return e.data.map(e=>({isLocal:e.local,endpoint:e.uri,rpcAddress:e.rpcAddress||"",error:e.errorMsg}))})).catch((function(e){const o=getError(e.data,e.status);t.error(o,r.instant("common.error"))})).then(e=>{if(e)return function(e){const t=e.filter(e=>!e.isLocal&&!e.error).map(e=>function(e){return n.getLocationRpcAddress(e.endpoint)}(e).then(t=>(e.rpcAddress=t.data,e.isAvailable=!0,e)).catch(t=>{e.isAvailable=!1,e.error=getError(t.data,t.status)}));return Promise.allSettled(t).then(()=>e)}(e)})}}angular.module("graphdb.framework.clustermanagement.services.remote-locations",[]).factory("RemoteLocationsService",n),n.$inject=["$http","toastr","$uibModal","LocationsRestService","$translate"]},80:function(e,t,o){"use strict";o.r(t),o.d(t,"UPDATE_CLUSTER",(function(){return n})),o.d(t,"DELETE_CLUSTER",(function(){return r})),o.d(t,"CLICK_IN_VIEW",(function(){return s})),o.d(t,"NODE_SELECTED",(function(){return a})),o.d(t,"CREATE_CLUSTER",(function(){return l})),o.d(t,"MODEL_UPDATED",(function(){return c}));const n="updateCluster",r="deleteCluster",s="clickInView",a="nodeSelected",l="createCluster",c="modelUpdated"}}]);
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[9,49,63,64,65,103,104,105,106,108,109,246],{148:function(e,t){function o(e){let t,o=!1;function n(){return o}function r(t){o=t,e.emit("showClusterConfigurationPanel",n())}function s(){return t}return{updateClusterViewD3Container:function(o){t=o,e.emit("clusterViewD3ContainerChanged",s())},getClusterViewD3Container:s,onClusterViewD3ContainerUpdated:function(t){return e.subscribe("clusterViewD3ContainerChanged",()=>t(s()))},getShowClusterConfigurationPanel:n,setShowClusterConfigurationPanel:r,showClusterConfigurationPanel:function(){r(!0)},hideClusterConfigurationPanel:function(){r(!1)},onShowClusterConfigurationPanel:function(t){return e.subscribe("showClusterConfigurationPanel",()=>t(n()))}}}angular.module("graphdb.framework.clustermanagement.services.cluster-view-context-service",[]).factory("ClusterViewContextService",o),o.$inject=["EventEmitterService"]},149:function(e,t){function o(e,t,o){const n=_.cloneDeep(o.clusterModel);e.clusterNodes=n.nodes,e.clusterNodes.forEach(e=>e.shouldRemove=!1),e.nodesToRemoveCount=0,e.leftNodesLessThanTwo=!1,e.toggleNode=(t,o)=>{o.shouldRemove=!o.shouldRemove,o.shouldRemove?e.nodesToRemoveCount++:e.nodesToRemoveCount--,e.leftNodesLessThanTwo=e.clusterNodes.length-e.nodesToRemoveCount<2},e.ok=()=>{const o=e.clusterNodes.filter(e=>e.shouldRemove);t.close(o)},e.cancel=()=>{t.dismiss("cancel")}}angular.module("graphdb.framework.clustermanagement.controllers.remove-nodes",[]).controller("RemoveNodesDialogCtrl",o),o.$inject=["$scope","$uibModalInstance","data"]},150:function(e,t,o){"use strict";o.r(t);o(69);const n=function(){const e=document.getElementById("advancedOptions");if(e){const t=e.getAttribute("aria-expanded");if(t&&"true"===t)return"fa fa-angle-down"}return"fa fa-angle-right"};function r(e,t,o,r,s,a,l,c,i,d){e.pageTitle=a.instant("cluster_management.cluster_page.create_page_title"),e.autofocusId="autofocus",e.errors=[],e.clusterConfiguration={electionMinTimeout:8e3,electionRangeTimeout:6e3,heartbeatInterval:2e3,messageSizeKB:64,verificationTimeout:1500,transactionLogMaximumSizeGB:50,nodes:[]},e.locations=l.clusterModel.locations.filter(e=>!e.isLocal),e.selectedLocations=l.clusterModel.locations.filter(e=>e.isLocal),e.loader=!1,e.deleteLocation=function(t,o){t.preventDefault(),t.stopPropagation(),l.deleteLocation(o).then(()=>e.locations=e.locations.filter(e=>e.endpoint!==o.endpoint))},e.getAdvancedOptionsClass=n,e.createCluster=function(){return e.setLoader(!0,a.instant("cluster_management.cluster_page.creating_cluster_loader")),e.clusterConfiguration.nodes=e.selectedLocations.map(e=>e.rpcAddress),r.createCluster(e.clusterConfiguration).then(()=>{s.success(a.instant("cluster_management.cluster_page.notifications.create_success")),t.close()}).catch((function(e){u(e.data,e.status)})).finally(()=>{e.setLoader(!1),d.$broadcast("reloadLocations")})},e.isClusterConfigurationValid=()=>{const t=!e.clusterConfigurationForm.$invalid,o=e.selectedLocations&&e.selectedLocations.length>=2;return t&&o},e.setLoader=(t,n)=>{o.cancel(e.loaderTimeout),t?e.loaderTimeout=o(()=>{e.loader=t,e.loaderMessage=n},300):e.loader=!1},e.addNodeToList=t=>{t.rpcAddress&&(e.selectedLocations.push(t),e.locations=e.locations.filter(e=>e.endpoint!==t.endpoint))},e.removeNodeFromList=(t,o)=>{o.isLocal||(e.selectedLocations.splice(t,1),e.locations.push(o))},e.addLocation=()=>{i.addLocation().then(t=>{t&&e.locations.push(t)})},e.ok=()=>{e.isClusterConfigurationValid()?e.createCluster():s.warning(a.instant("cluster_management.cluster_page.notifications.form_invalid"))},e.cancel=()=>{t.dismiss("cancel")};const u=(t,o)=>{let n;delete e.preconditionErrors,e.errors.splice(0),412===o?e.preconditionErrors=Object.keys(t).map(e=>`${e} - ${t[e]}`):400===o?e.errors.push(...t):409===o?e.errors.push(t):(t.message||"string"==typeof t)&&(n=t.message||t),s.error(n,a.instant("cluster_management.cluster_page.notifications.create_failed"))}}angular.module("graphdb.framework.clustermanagement.controllers.create-cluster",[]).controller("CreateClusterCtrl",r),r.$inject=["$scope","$uibModalInstance","$timeout","ClusterRestService","toastr","$translate","data","$uibModal","RemoteLocationsService","$rootScope"]},151:function(e,t,o){"use strict";o.r(t);o(69);function n(e,t,o,n,r,s,a){e.pageTitle=s.instant("cluster_management.cluster_page.edit_page_title"),e.errors=[],e.clusterConfiguration=_.cloneDeep(a.clusterConfiguration),e.loader=!1,e.updateCluster=()=>(e.setLoader(!0,s.instant("cluster_management.cluster_page.updating_cluster_loader")),n.updateCluster(e.clusterConfiguration).then(()=>{r.success(s.instant("cluster_management.cluster_page.notifications.update_success")),t.close()}).catch((function(e){l(e.data,e.status)})).finally(()=>e.setLoader(!1))),e.isClusterConfigurationValid=()=>!e.clusterConfigurationForm.$invalid,e.setLoader=(t,n)=>{o.cancel(e.loaderTimeout),t?e.loaderTimeout=o(()=>{e.loader=t,e.loaderMessage=n},300):e.loader=!1},e.ok=()=>{e.isClusterConfigurationValid()?e.updateCluster():r.warning(s.instant("cluster_management.cluster_page.notifications.form_invalid"))},e.cancel=()=>{t.dismiss("cancel")};const l=(t,o)=>{delete e.preconditionErrors,r.error(s.instant("cluster_management.cluster_page.notifications.update_failed")),e.errors.splice(0),409===o||"string"==typeof t?e.errors.push(t):412===o?e.preconditionErrors=Object.keys(t).map(e=>`${e} - ${t[e]}`):400===o&&e.errors.push(...t)}}angular.module("graphdb.framework.clustermanagement.controllers.edit-cluster",[]).controller("EditClusterCtrl",n),n.$inject=["$scope","$uibModalInstance","$timeout","ClusterRestService","toastr","$translate","data"]},152:function(e,t){function o(e,t){e.forceDelete=!1,e.ok=()=>{t.close(e.forceDelete)},e.cancel=()=>{t.dismiss("cancel")}}angular.module("graphdb.framework.clustermanagement.controllers.delete-cluster",[]).controller("DeleteClusterCtrl",o),o.$inject=["$scope","$uibModalInstance"]},153:function(e,t){function o(e,t,o,n,r){e.newLocation={uri:"",authType:"signature",username:"",password:"",active:!1},e.docBase=function(e){return"https://graphdb.ontotext.com/documentation/"+e.productShortVersion}(n),e.isValidLocation=()=>(e.newLocation.uri.length<6||0===e.newLocation.uri.indexOf("http:")||0===e.newLocation.uri.indexOf("https:"))&&e.newLocation.uri.indexOf("/repositories")<=-1,e.ok=()=>{e.newLocation?t.close(e.newLocation):o.error(r.instant("location.cannot.be.empty.error"))},e.cancel=()=>{t.dismiss("cancel")}}angular.module("graphdb.framework.clustermanagement.controllers.add-location",[]).controller("AddLocationFromClusterCtrl",o),o.$inject=["$scope","$uibModalInstance","toastr","productInfo","$translate"]},154:function(e,t,o){"use strict";o.r(t);o(79);function n(e,t,o,n,r){let s,a;e.nodes=[],e.clusterNodes=[],e.locations=[],e.deleteLocation=(t,n)=>{t.preventDefault(),t.stopPropagation(),o.deleteLocation(n).then(()=>e.locations=e.locations.filter(e=>e.endpoint!==n.endpoint))},e.addNodeToList=t=>{t.rpcAddress&&(e.nodes.push(t),e.locations=e.locations.filter(e=>e.endpoint!==t.endpoint))},e.removeNodeFromList=(t,o)=>{e.nodes.splice(t,1),e.locations.push(o)},e.addLocation=()=>{r.addLocation().then(t=>{t&&e.locations.push(t)})},e.ok=()=>{t.close(e.nodes)},e.cancel=()=>{t.dismiss("cancel")};s=_.cloneDeep(o.clusterModel),e.clusterNodes=s.nodes.map(e=>({rpcAddress:e.address,endpoint:e.endpoint})),a=e.clusterNodes.map(e=>e.endpoint),e.locations=s.locations.filter(e=>!a.includes(e.endpoint)),e.locations.forEach(e=>e.isNew=!0)}angular.module("graphdb.framework.clustermanagement.controllers.add-nodes",[]).controller("AddNodesDialogCtrl",n),n.$inject=["$scope","$uibModalInstance","data","$uibModal","RemoteLocationsService"]},155:function(e,t,o){"use strict";o.r(t);o(69),o(79);function n(e,t,o,n,r,s,a,l,c){let i,d;e.replacementNodes=[],e.nodesToReplace=[],e.nodesToReplaceCount=0,e.leftNodesMajority=!1,e.clusterNodes=[],e.locations=[],e.addLocation=()=>{c.addLocation().then(t=>{t&&e.locations.push(t)})},e.toggleNode=(t,o)=>{if(o.shouldReplace=!o.shouldReplace,o.shouldReplace)e.nodesToReplaceCount++,e.nodesToReplace.push(o);else{e.nodesToReplaceCount--;const t=e.nodesToReplace.findIndex(e=>e.rpcAddress===o.rpcAddress);e.nodesToReplace.splice(t,1)}e.leftNodesMajority=u()+e.nodesToReplaceCount>e.clusterNodes.length},e.permitNodesReplace=()=>!e.leftNodesMajority&&(e.nodesToReplace.length>0||e.replacementNodes.length>0),e.addNodeToList=t=>{t.rpcAddress&&(e.replacementNodes.push(t),e.locations=e.locations.filter(e=>e.endpoint!==t.endpoint))},e.deleteLocation=(t,o)=>{t.preventDefault(),t.stopPropagation(),s.deleteLocation(o).then(()=>e.locations=e.locations.filter(e=>e.endpoint!==o.endpoint))},e.removeNodeFromList=(t,o)=>{e.replacementNodes.splice(t,1),e.locations.push(o)},e.ok=()=>{t.close({newNodes:e.replacementNodes,oldNodes:e.nodesToReplace})},e.cancel=()=>{t.dismiss("cancel")};const u=()=>Math.floor(e.clusterNodes.length/2)+1;i=_.cloneDeep(s.clusterModel),e.clusterNodes=i.nodes.map(e=>({rpcAddress:e.address,endpoint:e.endpoint,shouldReplace:!1})),d=e.clusterNodes.map(e=>e.endpoint),e.locations=i.locations.filter(e=>!d.includes(e.endpoint)),e.locations.forEach(e=>e.isNew=!0)}angular.module("graphdb.framework.clustermanagement.controllers.replace-nodes",[]).controller("ReplaceNodesDialogCtrl",n),n.$inject=["$scope","$uibModalInstance","$timeout","toastr","$translate","data","$uibModal","$rootScope","RemoteLocationsService"]},239:function(e,t,o){"use strict";o.r(t);o(69),o(79),o(148),o(149),o(150),o(151),o(152),o(153),o(154),o(155);var n=o(25),r=o(74),s=o(80);function a(e,t,o,a,l,c,i,d,u,g,m,p,f,C,h,_,L,N){let w;const v=[];e.loader=!0,e.isLeader=!1,e.currentNode=null,e.clusterModel={},e.NodeState=r.NodeState,e.leaderChanged=!1,e.currentLeader=null,e.showClusterConfigurationPanel=!1,e.clusterConfigurationPanelSize=void 0,e.onopen=e.onclose=()=>angular.noop(),e.isAdmin=()=>d.isAuthenticated()&&d.isAdmin(),e.openClusterConfigurationPanel=()=>{e.showClusterConfigurationPanel=!0,N.showClusterConfigurationPanel()},e.setLoader=(t,o)=>{p.cancel(e.loaderTimeout),t?(e.loaderMessage=o,e.loaderTimeout=p((function(){e.loader=t}),50)):e.loader=!1},e.getLoaderMessage=()=>e.loaderMessage||h.instant("common.loading"),e.getClusterConfiguration=()=>f.getClusterConfig().then(t=>{if(e.clusterConfiguration=t.data,!e.currentNode)return e.getCurrentNodeStatus()}).catch(()=>{e.clusterConfiguration=null}),e.getClusterStatus=()=>f.getClusterStatus().then(t=>{const o=t.data.slice(),n=o.find(e=>e.nodeState===r.NodeState.LEADER);T(e.currentLeader,n)&&(e.currentLeader=n,e.leaderChanged=!0),e.currentNode=o.find(t=>e.currentNode&&t.address===e.currentNode.address);const s=$(n,o);e.clusterModel.hasCluster=!0,e.clusterModel.nodes=o,e.clusterModel.links=s}).catch(t=>{if(404===t.status)return e.clusterModel.hasCluster=!1,e.clusterModel.nodes=[],e.clusterModel.links=[],e.clusterConfiguration=null,Promise.reject(t)}),e.showCreateClusterDialog=function(){c.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-create-dialog.html",controller:"CreateClusterCtrl",size:"lg",resolve:{data:function(){return{deleteLocation:R,clusterModel:e.clusterModel}}}}).result.finally((function(){E(),b(!0)}))},e.getCurrentNodeStatus=()=>f.getNodeStatus().then(t=>{e.leaderChanged=!1,e.currentNode=t.data}).catch(t=>{e.currentNode=t.data,e.clusterModel.hasCluster=!1}).then(()=>E()),e.showAddNodeToClusterDialog=()=>{c.open({templateUrl:"js/angular/clustermanagement/templates/modal/add-nodes-dialog.html",controller:"AddNodesDialogCtrl",size:"lg",resolve:{data:function(){return{deleteLocation:R,clusterModel:e.clusterModel,clusterConfiguration:e.clusterConfiguration}}}}).result.then(t=>{const o=h.instant("cluster_management.cluster_page.add_nodes_loader");e.setLoader(!0,o);const n=t.map(e=>e.rpcAddress);f.addNodesToCluster(n).then(()=>{const e=h.instant("cluster_management.cluster_page.notifications.add_nodes_success");M(e)}).catch(e=>{const t=h.instant("cluster_management.cluster_page.notifications.add_nodes_fail");k(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),b(!0)})}).finally(()=>E())},e.showReplaceNodesDialog=()=>{c.open({templateUrl:"js/angular/clustermanagement/templates/modal/replace-nodes-dialog.html",controller:"ReplaceNodesDialogCtrl",size:"lg",resolve:{data:function(){return{deleteLocation:R,clusterModel:e.clusterModel,clusterConfiguration:e.clusterConfiguration}}}}).result.then(t=>{const o=h.instant("cluster_management.cluster_page.replace_nodes_loader");e.setLoader(!0,o);const n={addNodes:t.newNodes.map(e=>e.rpcAddress),removeNodes:t.oldNodes.map(e=>e.rpcAddress)};f.replaceNodesInCluster(n).then(()=>{const e=h.instant("cluster_management.cluster_page.notifications.replace_nodes_success");M(e)}).catch(e=>{const t=h.instant("cluster_management.cluster_page.notifications.replace_nodes_fail");k(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),b(!0)})}).finally(()=>E())},e.showRemoveNodesFromClusterDialog=()=>{c.open({templateUrl:"js/angular/clustermanagement/templates/modal/remove-nodes-dialog.html",controller:"RemoveNodesDialogCtrl",size:"lg",resolve:{data:function(){return{clusterModel:e.clusterModel}}}}).result.then((function(t){const o=h.instant("cluster_management.cluster_page.remove_nodes_loader");e.setLoader(!0,o);const n=t.map(e=>e.address);f.removeNodesFromCluster(n).then(()=>{const e=h.instant("cluster_management.cluster_page.notifications.remove_nodes_success");M(e)}).catch(e=>{const t=h.instant("cluster_management.cluster_page.notifications.remove_nodes_fail");k(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),b(!0)})}))};const $=(e,t)=>{const o=[];return e&&Object.keys(e.syncStatus).forEach(n=>{const s=e.syncStatus[n];if(s!==r.LinkState.NO_CONNECTION&&(o.push({id:`${e.address}-${n}`,source:e.address,target:n,status:s}),s===r.LinkState.OUT_OF_SYNC)){const e=t.find(e=>e.address===n);let s;if(e.recoveryStatus.state===r.RecoveryState.RECEIVING_SNAPSHOT&&(s=e.recoveryStatus.affectedNodes[0]),e&&s){const n=t.find(e=>e.endpoint===s);o.push({id:`${e.address}-${n.address}`,source:n.address,target:e.address,status:r.LinkState.RECEIVING_SNAPSHOT})}}}),o},S=t=>{e.selectedNode!==t?e.selectedNode=t:e.selectedNode=null,e.$apply()},b=t=>{w||(w=e.getClusterStatus().then(()=>{if(t||!e.clusterConfiguration)return e.getClusterConfiguration()}).then(()=>{if(!e.currentNode||e.leaderChanged)return e.getCurrentNodeStatus()}).finally(()=>{w=null,e.$broadcast(s.MODEL_UPDATED)}))},T=(e,t)=>!t||(!e||e.address!==t.address),E=()=>_.getLocationsWithRpcAddresses().then(t=>{const o=t.find(e=>e.isLocal);o&&(o.endpoint=e.currentNode.endpoint,o.rpcAddress=e.currentNode.address),e.clusterModel.locations=t}),R=e=>m.openSimpleModal({title:h.instant("location.confirm.detach"),message:h.instant("location.confirm.detach.warning",{uri:e.endpoint}),warning:!0}).result.then(()=>l.deleteLocation(e.endpoint)),M=t=>{a.success(t),e.getClusterConfiguration()},k=(e,t,o)=>{let r=e.message||e;400===t&&Array.isArray(e)?r=e.reduce((e,t)=>e+`<div>${t}</div>`,""):412!==t||Object(n.isString)(e)||(r=Object.keys(e).reduce((t,o)=>t+`<div>${o} - ${e[o]}</div>`,"")),a.error(r,o,{allowHtml:!0})},A=()=>{e.clusterConfigurationPanelSize=.25*window.innerWidth+"px"},D=()=>{v.push(N.onShowClusterConfigurationPanel(t=>{A(),e.showClusterConfigurationPanel=t})),v.push(e.$on(s.UPDATE_CLUSTER,(e,t)=>{b(t.force)})),v.push(e.$on(s.DELETE_CLUSTER,(t,o)=>{(t=>{const o=h.instant("cluster_management.delete_cluster_dialog.loader_message");e.setLoader(!0,o),f.deleteCluster(t).then(t=>{if(Object.values(t.data).every(e=>"Cluster was deleted on this node."===e)){const e=h.instant("cluster_management.delete_cluster_dialog.notifications.success_delete");a.success(e)}else{const e=h.instant("cluster_management.delete_cluster_dialog.notifications.success_delete_partial"),o=Object.keys(t.data).reduce((e,o)=>e+`<div>${o} - ${t.data[o]}</div>`,"");a.warning(o,e,{allowHtml:!0})}e.getClusterConfiguration()}).catch(e=>{const t=h.instant("cluster_management.delete_cluster_dialog.notifications.fail_delete");k(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),b(!0),L.$broadcast("reloadLocations")})})(o.force)})),v.push(e.$on(s.CLICK_IN_VIEW,(t,o)=>{!function(t){const o=document.getElementById("nodeTooltip");e.selectedNode&&o!==t&&!o.contains(t)&&S(null)}(o)})),v.push(e.$on(s.NODE_SELECTED,(e,t)=>{S(t)})),v.push(e.$on(s.CREATE_CLUSTER,()=>{e.showCreateClusterDialog()}))};e.$on("$destroy",(function(){v.forEach(e=>e())}));D(),A(),e.showClusterConfigurationPanel=N.getShowClusterConfigurationPanel(),(e.loader=!0,e.getCurrentNodeStatus().then(()=>e.getClusterConfiguration()).then(()=>e.getClusterStatus()).finally(()=>{e.setLoader(!1)})).finally(()=>{const t=g((function(){b()}),1e3);e.$on("$destroy",(function(){g.cancel(t)}))})}angular.module("graphdb.framework.clustermanagement.controllers.cluster-management",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.rest.repositories.service","graphdb.framework.rest.cluster.service","graphdb.framework.clustermanagement.services.cluster-view-context-service","graphdb.framework.clustermanagement.services.remote-locations","graphdb.framework.clustermanagement.controllers.remove-nodes","graphdb.framework.clustermanagement.controllers.create-cluster","graphdb.framework.clustermanagement.controllers.edit-cluster","graphdb.framework.clustermanagement.controllers.delete-cluster","graphdb.framework.clustermanagement.controllers.add-location","graphdb.framework.clustermanagement.controllers.add-nodes","graphdb.framework.clustermanagement.controllers.replace-nodes","toastr","pageslide-directive"]).controller("ClusterManagementCtrl",a),a.$inject=["$scope","$http","$q","toastr","$repositories","$uibModal","$sce","$jwtAuth","$window","$interval","ModalService","$timeout","ClusterRestService","$location","$translate","RemoteLocationsService","$rootScope","ClusterViewContextService"]},69:function(e,t){angular.module("graphdb.framework.rest.cluster.service",[]).factory("ClusterRestService",o),o.$inject=["$http"];function o(e){return{getClusterConfig:function(){return e.get("rest/cluster/config")},createCluster:function(t){return e.post("rest/cluster/config",t)},updateCluster:function(t){t.nodes&&delete t.nodes;return e.patch("rest/cluster/config",t)},deleteCluster:function(t){const o=$.param({force:t});return e.delete("rest/cluster/config?"+o)},addNodesToCluster:function(t){return e.post("rest/cluster/config/node",{nodes:t})},replaceNodesInCluster:function(t){return e.patch("rest/cluster/config/node",t)},removeNodesFromCluster:function(t){return e.delete("rest/cluster/config/node",{data:{nodes:t},headers:{"Content-Type":"application/json"}})},getClusterStatus:function(){return e.get("rest/cluster/group/status")},getNodeStatus:function(){return e.get("rest/cluster/node/status")}}}},79:function(e,t,o){"use strict";o.r(t);o(34);function n(e,t,o,n,r){return{addLocation:function(){let e;return o.open({templateUrl:"js/angular/templates/modal/add-location.html",windowClass:"addLocationDialog",controller:"AddLocationFromClusterCtrl"}).result.then(o=>(e=o,e.isLocal=!1,e.endpoint=e.uri,function(e){let o;return n.addLocation(e).catch(e=>{const o=getError(e.data,e.status);return t.error(o,r.instant("common.error")),!1}).then(e=>!!e&&s()).then(t=>{if(!1!==t)return o=t.find(t=>t.endpoint===e.uri),o})}(e)))},getLocationsWithRpcAddresses:s};function s(){return n.getLocations().then((function(e){return e.data.map(e=>({isLocal:e.local,endpoint:e.uri,rpcAddress:e.rpcAddress||"",error:e.errorMsg}))})).catch((function(e){const o=getError(e.data,e.status);t.error(o,r.instant("common.error"))})).then(e=>{if(e)return function(e){const t=e.filter(e=>!e.isLocal&&!e.error).map(e=>function(e){return n.getLocationRpcAddress(e.endpoint)}(e).then(t=>(e.rpcAddress=t.data,e.isAvailable=!0,e)).catch(t=>{e.isAvailable=!1,e.error=getError(t.data,t.status)}));return Promise.allSettled(t).then(()=>e)}(e)})}}angular.module("graphdb.framework.clustermanagement.services.remote-locations",[]).factory("RemoteLocationsService",n),n.$inject=["$http","toastr","$uibModal","LocationsRestService","$translate"]},80:function(e,t,o){"use strict";o.r(t),o.d(t,"UPDATE_CLUSTER",(function(){return n})),o.d(t,"DELETE_CLUSTER",(function(){return r})),o.d(t,"CLICK_IN_VIEW",(function(){return s})),o.d(t,"NODE_SELECTED",(function(){return a})),o.d(t,"CREATE_CLUSTER",(function(){return l})),o.d(t,"MODEL_UPDATED",(function(){return c}));const n="updateCluster",r="deleteCluster",s="clickInView",a="nodeSelected",l="createCluster",c="modelUpdated"}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[90,242],{205:function(t,e,a){"use strict";a.r(e),a.d(e,"FileDescriptorsChart",(function(){return s}));var r=a(
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[90,242],{205:function(t,e,a){"use strict";a.r(e),a.d(e,"FileDescriptorsChart",(function(){return s}));var r=a(64);class s extends r.ChartData{constructor(t,e){super(t,!1,!1,e)}chartSetup(t){const e={yAxis:{axisLabel:{formatter:t=>this.formatNumber(t)},min:0},tooltip:{valueFormatter:t=>this.formatNumber(t)}};_.merge(t,e)}createDataHolder(){return[{name:this.translateService.instant("resource.system.file_descriptors.open"),type:"line",areaStyle:{opacity:r.ChartData.AREA_BAR_OPACITY},showSymbol:!1,smooth:!0,color:r.ChartData.COLORS[1],data:[]}]}translateLabels(){const[t]=this.dataHolder;t.name=this.translateService.instant("resource.system.file_descriptors.open"),this.configureSubtitle()}addNewData(t,e,a){this.latestData={maxFileDescriptors:a.maxFileDescriptors,openFileDescriptors:a.openFileDescriptors},this.configureSubtitle(),a.openFileDescriptors&&t[0].data.push({value:[e,a.openFileDescriptors]})}configureSubtitle(){let t;t=this.latestData.openFileDescriptors?[{label:this.translateService.instant("resource.system.file_descriptors.max"),value:this.formatNumber(this.latestData.maxFileDescriptors)}]:[{label:this.translateService.instant("resource.system.file_descriptors.only_unix")}],this.setSubTitle(t)}updateRange(t){super.updateRange(t,2)}}},64:function(t,e,a){"use strict";a.r(e),a.d(e,"ChartData",(function(){return s}));var r=a(445);class s{static get DEFAULT_MULTIPLIER(){return 1.2}static get MAXIMUM_DIVISIONS(){return 10}static get COLORS(){return[s.cssVar("--secondary-color"),s.cssVar("--primary-color"),s.cssVar("--tertiary-color"),s.cssVar("--gray-color")]}static get AREA_BAR_OPACITY(){return.5}static cssVar(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}constructor(t,e,a,r){this.filter=r,this.disableRangeUpdate=e,this.disableOldDataRemoval=a,this.translateService=t,this.refreshHandlers=[],this.initialChartSetup()}registerRefreshHandler(t){this.refreshHandlers.push(t)}unregisterRefreshHandler(t){const e=this.refreshHandlers.indexOf(t);e>-1&&this.refreshHandlers.splice(e,1)}initialChartSetup(t=!0){this.range=150,this.chartOptions=this.getDefaultChartOptions(this.translateService),t&&(this.dataHolder=this.createDataHolder(),this.chartOptions.series=this.dataHolder,this.firstLoad=!0),this.chartSetup(this.chartOptions)}refresh(t=!1){t||(this.chartSetup(this.chartOptions),this.updateRange(this.dataHolder)),this.refreshHandlers.forEach(t=>t(this.chartOptions))}setSubTitle(t,e=0){this.chartOptions.title.show=!0;let a="";t.forEach((r,s)=>{if(Array.isArray(r.value)&&!r.value.length)return;const i=Array.isArray(r.value)?r.value.join("/"):r.value;a+=`{a|${r.label}}`,void 0!==i&&(a+=`{b|${i}}`),s+1<t.length&&(a+=e>0&&(s+1)%e==0?"\n":"{a| · }")}),this.chartOptions.title.text=a}chartSetup(t){}createDataHolder(){throw new Error("Must implement data holder creation")}addData(t,e){this.removeOldData(this.dataHolder,this.range),this.addNewData(this.dataHolder,t,e,this.isFirstLoad()),this.hasSelectedSeries()&&(this.updateRange(this.dataHolder),this.firstLoad&&(this.firstLoad=!1),this.refresh(!0))}hasSelectedSeries(){return!this.selectedSeries||Object.values(this.selectedSeries).some(t=>!0===t)}removeOldData(t,e){this.disableOldDataRemoval||t[0].data.length>e&&t.forEach(t=>t.data.shift())}addNewData(t,e,a,r){}setSelectedSeries(t){this.selectedSeries=t}updateRange(t,e){if(this.disableRangeUpdate)return;const[a]=s.calculateMaxChartValueAndDivisions(t,e,this.selectedSeries);this.chartOptions.yAxis.max=a}isFirstLoad(){return this.firstLoad}getDefaultChartOptions(){return{title:{show:!1,text:"",left:"center",textStyle:{overflow:"breakAll",rich:{a:{fontWeight:400,fontSize:14},b:{color:s.cssVar("--secondary-color"),fontWeight:400,fontSize:14}}}},animation:!1,color:s.COLORS,legend:{right:"15%",top:"6%",textStyle:{overflow:"truncate"},icon:"circle"},tooltip:{trigger:"axis",axisPointer:{animation:!1,label:{formatter:function(t){return r.b.format(t.value,"{HH}:{mm}:{ss}",!1)}}}},grid:{containLabel:!0,left:40},xAxis:{type:"time",splitLine:{show:!0},axisLabel:{hideOverlap:!0,padding:8,formatter:{hour:"{bold|{HH}:{mm}}",minute:"{bold|{HH}:{mm}}",second:"{HH}:{mm}:{ss}"},color:s.cssVar("--gray-color-dark"),rich:{bold:{fontWeight:500}}}},yAxis:{type:"value",splitLine:{show:!0},axisLabel:{color:s.cssVar("--gray-color-dark")},axisTick:{lineStyle:{type:"solid"}}},textStyle:{fontFamily:s.cssVar("--main-font"),fontWeight:400}}}static getMaxValueFromDataHolder(t,e){const a=t.filter(t=>!e||angular.isUndefined(e[t.name])||!0===e[t.name]).map(t=>s.getMaxValueForDataSeries(t));return Math.max(1,...a)}static getMaxValueForDataSeries(t){return Math.max(...t.data.map(t=>t.value[1]))}static calculateMaxChartValueAndDivisions(t,e,a){let r;r=Array.isArray(t)?s.getMaxValueFromDataHolder(t,a):s.getMaxValueForDataSeries(t);const i=Math.ceil(r*(e||s.DEFAULT_MULTIPLIER))||1;return[i,Math.ceil(i/s.MAXIMUM_DIVISIONS)]}static getIntegerRangeForValues(t,e,a){const[r,i]=s.calculateMaxChartValueAndDivisions(t,e,a);return[r,i]}static formatBytesValue(t,e,a){let r=t;e&&(r=s.getMaxValueFromDataHolder(e,a));const i=Math.floor(Math.log(r)/Math.log(1024));return`${(parseFloat(t)/Math.pow(1024,i)).toFixed(2)} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}`}formatNumber(t){if(!angular.isUndefined(t)&&this.filter)return this.filter("currency")(t,"",0)}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[91,242],{210:function(t,e,a){"use strict";a.r(e),a.d(e,"GlobalCacheChart",(function(){return s}));var r=a(
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[91,242],{210:function(t,e,a){"use strict";a.r(e),a.d(e,"GlobalCacheChart",(function(){return s}));var r=a(64);class s extends r.ChartData{constructor(t,e){super(t,!1,!1,e)}chartSetup(t){const e={yAxis:{axisLabel:{formatter:t=>this.formatNumber(t)},minInterval:1},tooltip:{valueFormatter:t=>this.formatNumber(t)}};_.merge(t,e)}createDataHolder(){return[{name:this.translateService.instant("resources.global_cache.hits"),type:"line",showSymbol:!1,smooth:!0,data:[]},{name:this.translateService.instant("resources.global_cache.miss"),type:"line",showSymbol:!1,smooth:!0,data:[]}]}translateLabels(){const[t,e]=this.dataHolder;t.name=this.translateService.instant("resources.global_cache.hits"),e.name=this.translateService.instant("resources.global_cache.miss")}addNewData(t,e,a){const[r,s]=t;r.data.push({value:[e,a.cacheHit]}),s.data.push({value:[e,a.cacheMiss]})}}},64:function(t,e,a){"use strict";a.r(e),a.d(e,"ChartData",(function(){return s}));var r=a(445);class s{static get DEFAULT_MULTIPLIER(){return 1.2}static get MAXIMUM_DIVISIONS(){return 10}static get COLORS(){return[s.cssVar("--secondary-color"),s.cssVar("--primary-color"),s.cssVar("--tertiary-color"),s.cssVar("--gray-color")]}static get AREA_BAR_OPACITY(){return.5}static cssVar(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}constructor(t,e,a,r){this.filter=r,this.disableRangeUpdate=e,this.disableOldDataRemoval=a,this.translateService=t,this.refreshHandlers=[],this.initialChartSetup()}registerRefreshHandler(t){this.refreshHandlers.push(t)}unregisterRefreshHandler(t){const e=this.refreshHandlers.indexOf(t);e>-1&&this.refreshHandlers.splice(e,1)}initialChartSetup(t=!0){this.range=150,this.chartOptions=this.getDefaultChartOptions(this.translateService),t&&(this.dataHolder=this.createDataHolder(),this.chartOptions.series=this.dataHolder,this.firstLoad=!0),this.chartSetup(this.chartOptions)}refresh(t=!1){t||(this.chartSetup(this.chartOptions),this.updateRange(this.dataHolder)),this.refreshHandlers.forEach(t=>t(this.chartOptions))}setSubTitle(t,e=0){this.chartOptions.title.show=!0;let a="";t.forEach((r,s)=>{if(Array.isArray(r.value)&&!r.value.length)return;const i=Array.isArray(r.value)?r.value.join("/"):r.value;a+=`{a|${r.label}}`,void 0!==i&&(a+=`{b|${i}}`),s+1<t.length&&(a+=e>0&&(s+1)%e==0?"\n":"{a| · }")}),this.chartOptions.title.text=a}chartSetup(t){}createDataHolder(){throw new Error("Must implement data holder creation")}addData(t,e){this.removeOldData(this.dataHolder,this.range),this.addNewData(this.dataHolder,t,e,this.isFirstLoad()),this.hasSelectedSeries()&&(this.updateRange(this.dataHolder),this.firstLoad&&(this.firstLoad=!1),this.refresh(!0))}hasSelectedSeries(){return!this.selectedSeries||Object.values(this.selectedSeries).some(t=>!0===t)}removeOldData(t,e){this.disableOldDataRemoval||t[0].data.length>e&&t.forEach(t=>t.data.shift())}addNewData(t,e,a,r){}setSelectedSeries(t){this.selectedSeries=t}updateRange(t,e){if(this.disableRangeUpdate)return;const[a]=s.calculateMaxChartValueAndDivisions(t,e,this.selectedSeries);this.chartOptions.yAxis.max=a}isFirstLoad(){return this.firstLoad}getDefaultChartOptions(){return{title:{show:!1,text:"",left:"center",textStyle:{overflow:"breakAll",rich:{a:{fontWeight:400,fontSize:14},b:{color:s.cssVar("--secondary-color"),fontWeight:400,fontSize:14}}}},animation:!1,color:s.COLORS,legend:{right:"15%",top:"6%",textStyle:{overflow:"truncate"},icon:"circle"},tooltip:{trigger:"axis",axisPointer:{animation:!1,label:{formatter:function(t){return r.b.format(t.value,"{HH}:{mm}:{ss}",!1)}}}},grid:{containLabel:!0,left:40},xAxis:{type:"time",splitLine:{show:!0},axisLabel:{hideOverlap:!0,padding:8,formatter:{hour:"{bold|{HH}:{mm}}",minute:"{bold|{HH}:{mm}}",second:"{HH}:{mm}:{ss}"},color:s.cssVar("--gray-color-dark"),rich:{bold:{fontWeight:500}}}},yAxis:{type:"value",splitLine:{show:!0},axisLabel:{color:s.cssVar("--gray-color-dark")},axisTick:{lineStyle:{type:"solid"}}},textStyle:{fontFamily:s.cssVar("--main-font"),fontWeight:400}}}static getMaxValueFromDataHolder(t,e){const a=t.filter(t=>!e||angular.isUndefined(e[t.name])||!0===e[t.name]).map(t=>s.getMaxValueForDataSeries(t));return Math.max(1,...a)}static getMaxValueForDataSeries(t){return Math.max(...t.data.map(t=>t.value[1]))}static calculateMaxChartValueAndDivisions(t,e,a){let r;r=Array.isArray(t)?s.getMaxValueFromDataHolder(t,a):s.getMaxValueForDataSeries(t);const i=Math.ceil(r*(e||s.DEFAULT_MULTIPLIER))||1;return[i,Math.ceil(i/s.MAXIMUM_DIVISIONS)]}static getIntegerRangeForValues(t,e,a){const[r,i]=s.calculateMaxChartValueAndDivisions(t,e,a);return[r,i]}static formatBytesValue(t,e,a){let r=t;e&&(r=s.getMaxValueFromDataHolder(e,a));const i=Math.floor(Math.log(r)/Math.log(1024));return`${(parseFloat(t)/Math.pow(1024,i)).toFixed(2)} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}`}formatNumber(t){if(!angular.isUndefined(t)&&this.filter)return this.filter("currency")(t,"",0)}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[92,242],{103:function(t,e,a){"use strict";a.r(e),a.d(e,"HeapMemoryChart",(function(){return s}));var r=a(
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[92,242],{103:function(t,e,a){"use strict";a.r(e),a.d(e,"HeapMemoryChart",(function(){return s}));var r=a(64);class s extends r.ChartData{constructor(t){super(t,!1,!1)}chartSetup(t){const e={yAxis:{axisLabel:{formatter:t=>this.hasSelectedSeries()?s.formatBytesValue(t,this.dataHolder,this.selectedSeries):s.formatBytesValue(t,this.dataHolder)},min:0},tooltip:{valueFormatter:t=>s.formatBytesValue(t,null,this.selectedSeries)}};_.merge(t,e)}createDataHolder(){return[{name:this.translateService.instant("resource.memory.committed"),type:"line",showSymbol:!1,smooth:!0,data:[]},{name:this.translateService.instant("resource.memory.used"),type:"line",areaStyle:{opacity:r.ChartData.AREA_BAR_OPACITY},showSymbol:!1,smooth:!0,data:[]}]}translateLabels(){const[t,e]=this.dataHolder;t.name=this.translateService.instant("resource.memory.committed"),e.name=this.translateService.instant("resource.memory.used"),this.configureSubtitle()}addNewData(t,e,a){const[r,s]=t,i=this.parseData(a);this.latestData={committed:i.committed,used:i.used,max:i.max},r.data.push({value:[e,i.committed]}),s.data.push({value:[e,i.used]}),this.configureSubtitle()}configureSubtitle(){if(this.latestData.max>0){const t=[{label:this.translateService.instant("resource.memory.heap.max"),value:s.formatBytesValue(this.latestData.max,null,this.selectedSeries)}];this.setSubTitle(t)}}parseData(t){return t.heapMemoryUsage}updateRange(t,e,a){super.updateRange(t,e,a)}}},64:function(t,e,a){"use strict";a.r(e),a.d(e,"ChartData",(function(){return s}));var r=a(445);class s{static get DEFAULT_MULTIPLIER(){return 1.2}static get MAXIMUM_DIVISIONS(){return 10}static get COLORS(){return[s.cssVar("--secondary-color"),s.cssVar("--primary-color"),s.cssVar("--tertiary-color"),s.cssVar("--gray-color")]}static get AREA_BAR_OPACITY(){return.5}static cssVar(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}constructor(t,e,a,r){this.filter=r,this.disableRangeUpdate=e,this.disableOldDataRemoval=a,this.translateService=t,this.refreshHandlers=[],this.initialChartSetup()}registerRefreshHandler(t){this.refreshHandlers.push(t)}unregisterRefreshHandler(t){const e=this.refreshHandlers.indexOf(t);e>-1&&this.refreshHandlers.splice(e,1)}initialChartSetup(t=!0){this.range=150,this.chartOptions=this.getDefaultChartOptions(this.translateService),t&&(this.dataHolder=this.createDataHolder(),this.chartOptions.series=this.dataHolder,this.firstLoad=!0),this.chartSetup(this.chartOptions)}refresh(t=!1){t||(this.chartSetup(this.chartOptions),this.updateRange(this.dataHolder)),this.refreshHandlers.forEach(t=>t(this.chartOptions))}setSubTitle(t,e=0){this.chartOptions.title.show=!0;let a="";t.forEach((r,s)=>{if(Array.isArray(r.value)&&!r.value.length)return;const i=Array.isArray(r.value)?r.value.join("/"):r.value;a+=`{a|${r.label}}`,void 0!==i&&(a+=`{b|${i}}`),s+1<t.length&&(a+=e>0&&(s+1)%e==0?"\n":"{a| · }")}),this.chartOptions.title.text=a}chartSetup(t){}createDataHolder(){throw new Error("Must implement data holder creation")}addData(t,e){this.removeOldData(this.dataHolder,this.range),this.addNewData(this.dataHolder,t,e,this.isFirstLoad()),this.hasSelectedSeries()&&(this.updateRange(this.dataHolder),this.firstLoad&&(this.firstLoad=!1),this.refresh(!0))}hasSelectedSeries(){return!this.selectedSeries||Object.values(this.selectedSeries).some(t=>!0===t)}removeOldData(t,e){this.disableOldDataRemoval||t[0].data.length>e&&t.forEach(t=>t.data.shift())}addNewData(t,e,a,r){}setSelectedSeries(t){this.selectedSeries=t}updateRange(t,e){if(this.disableRangeUpdate)return;const[a]=s.calculateMaxChartValueAndDivisions(t,e,this.selectedSeries);this.chartOptions.yAxis.max=a}isFirstLoad(){return this.firstLoad}getDefaultChartOptions(){return{title:{show:!1,text:"",left:"center",textStyle:{overflow:"breakAll",rich:{a:{fontWeight:400,fontSize:14},b:{color:s.cssVar("--secondary-color"),fontWeight:400,fontSize:14}}}},animation:!1,color:s.COLORS,legend:{right:"15%",top:"6%",textStyle:{overflow:"truncate"},icon:"circle"},tooltip:{trigger:"axis",axisPointer:{animation:!1,label:{formatter:function(t){return r.b.format(t.value,"{HH}:{mm}:{ss}",!1)}}}},grid:{containLabel:!0,left:40},xAxis:{type:"time",splitLine:{show:!0},axisLabel:{hideOverlap:!0,padding:8,formatter:{hour:"{bold|{HH}:{mm}}",minute:"{bold|{HH}:{mm}}",second:"{HH}:{mm}:{ss}"},color:s.cssVar("--gray-color-dark"),rich:{bold:{fontWeight:500}}}},yAxis:{type:"value",splitLine:{show:!0},axisLabel:{color:s.cssVar("--gray-color-dark")},axisTick:{lineStyle:{type:"solid"}}},textStyle:{fontFamily:s.cssVar("--main-font"),fontWeight:400}}}static getMaxValueFromDataHolder(t,e){const a=t.filter(t=>!e||angular.isUndefined(e[t.name])||!0===e[t.name]).map(t=>s.getMaxValueForDataSeries(t));return Math.max(1,...a)}static getMaxValueForDataSeries(t){return Math.max(...t.data.map(t=>t.value[1]))}static calculateMaxChartValueAndDivisions(t,e,a){let r;r=Array.isArray(t)?s.getMaxValueFromDataHolder(t,a):s.getMaxValueForDataSeries(t);const i=Math.ceil(r*(e||s.DEFAULT_MULTIPLIER))||1;return[i,Math.ceil(i/s.MAXIMUM_DIVISIONS)]}static getIntegerRangeForValues(t,e,a){const[r,i]=s.calculateMaxChartValueAndDivisions(t,e,a);return[r,i]}static formatBytesValue(t,e,a){let r=t;e&&(r=s.getMaxValueFromDataHolder(e,a));const i=Math.floor(Math.log(r)/Math.log(1024));return`${(parseFloat(t)/Math.pow(1024,i)).toFixed(2)} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}`}formatNumber(t){if(!angular.isUndefined(t)&&this.filter)return this.filter("currency")(t,"",0)}}}}]);
|