graphdb-workbench 2.8.0-RC1 → 2.8.0-RC3

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.
Files changed (94) hide show
  1. package/dist/{105.647434fb577715a0cbf0.bundle.js → 105.f1f5759395f8ba9fff6f.bundle.js} +1 -1
  2. package/dist/182.dfcc20ae89193db499d9.bundle.js +1 -1
  3. package/dist/22.673ef35a23421e7dffcb.bundle.js +1 -1
  4. package/dist/{265.7fc757395a64fed907fc.bundle.js → 265.d128932eb1a7be270b66.bundle.js} +1 -1
  5. package/dist/27.2e7f5c9f8f4a670b3984.bundle.js +1 -0
  6. package/dist/33.d4d571fa95fe4279e91a.bundle.js +1 -0
  7. package/dist/341.40c87b67067473b65948.bundle.js +1 -1
  8. package/dist/347.9da36037aa6cf847fca9.bundle.js +1 -1
  9. package/dist/350.98af5dc7b011f3bb0cea.bundle.js +1 -1
  10. package/dist/351.4b24b91033c1f2ff99bc.bundle.js +1 -1
  11. package/dist/352.95aa115bee7aac6ad664.bundle.js +1 -1
  12. package/dist/353.23320eb168ae4ae33394.bundle.js +1 -1
  13. package/dist/354.979dc4d4d8495191a364.bundle.js +1 -1
  14. package/dist/384.5538193bdeac0703bc47.bundle.js +1 -1
  15. package/dist/396.c5a25717c4fc949419a7.bundle.js +1 -1
  16. package/dist/397.33463b93b02b13a80453.bundle.js +1 -1
  17. package/dist/{398.42f0bbe65197ac4cee74.bundle.js → 398.b83b6410f7cceec4fc3f.bundle.js} +1 -1
  18. package/dist/399.0916866cffd7814843af.bundle.js +1 -1
  19. package/dist/400.1ce74b220dacdb1ab34c.bundle.js +1 -1
  20. package/dist/402.61aaab5f119f02d6a6c4.bundle.js +1 -1
  21. package/dist/403.203cccb77544e449317a.bundle.js +1 -1
  22. package/dist/404.b921697f6552cc581aac.bundle.js +1 -1
  23. package/dist/405.3e17362183cfe674af25.bundle.js +1 -1
  24. package/dist/41.edbd16a2fc60a997c1ee.bundle.js +1 -1
  25. package/dist/42.f76e5e500efcc079a9c7.bundle.js +1 -1
  26. package/dist/48.49ca75d24206ea496ef5.bundle.js +1 -0
  27. package/dist/49.32ed550dc99d64e69f20.bundle.js +1 -0
  28. package/dist/{53.55925fb9fea11ab046d3.bundle.js → 53.a429006d4cd89ca07d7f.bundle.js} +1 -1
  29. package/dist/59.69785f5f7ae1e65841ff.bundle.js +1 -1
  30. package/dist/6.1143a99a77f0463b21b0.bundle.js +1 -0
  31. package/dist/64.2f87215d70caab13c80d.bundle.js +1 -0
  32. package/dist/70.4e944a1170802f15dc71.bundle.js +1 -1
  33. package/dist/77.c518fffc84eb04d570a9.bundle.js +1 -0
  34. package/dist/{bundle.a3c65cb24062525b5dd1.bundle.js → bundle.debfe2fd949a59877cbe.bundle.js} +2 -2
  35. package/dist/css/ttyg/chat-item-details.css +1 -0
  36. package/dist/i18n/locale-en.json +6 -3
  37. package/dist/i18n/locale-fr.json +6 -3
  38. package/dist/index.html +3 -3
  39. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  40. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  41. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  42. package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
  43. package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
  44. package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
  45. package/dist/js/angular/security/templates/user.html +1 -1
  46. package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
  47. package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
  48. package/dist/js/angular/ttyg/templates/chat-item-detail.html +4 -3
  49. package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
  50. package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
  51. package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
  52. package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +1 -1
  53. package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
  54. package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
  55. package/dist/license-checker.json +2 -2
  56. package/dist/pages/aclmanagement.html +2 -2
  57. package/dist/pages/autocomplete.html +1 -1
  58. package/dist/pages/choose-repository-type.html +1 -1
  59. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  60. package/dist/pages/create-index.html +1 -1
  61. package/dist/pages/dependencies.html +1 -1
  62. package/dist/pages/domainRangeInfo.html +2 -2
  63. package/dist/pages/edit.html +1 -1
  64. package/dist/pages/explore.html +1 -1
  65. package/dist/pages/export.html +1 -1
  66. package/dist/pages/find.html +1 -1
  67. package/dist/pages/graph-config/saveGraphConfig.html +8 -8
  68. package/dist/pages/graphs-visualizations.html +8 -8
  69. package/dist/pages/guides.html +1 -1
  70. package/dist/pages/import.html +2 -2
  71. package/dist/pages/jdbc-create.html +1 -1
  72. package/dist/pages/monitor/backup-and-restore.html +1 -1
  73. package/dist/pages/monitor/queries.html +1 -1
  74. package/dist/pages/monitor/resources.html +1 -1
  75. package/dist/pages/namespaces.html +2 -2
  76. package/dist/pages/plugins.html +1 -1
  77. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  78. package/dist/pages/rdfrank.html +2 -2
  79. package/dist/pages/repositories.html +1 -1
  80. package/dist/pages/repository.html +1 -1
  81. package/dist/pages/similarity-indexes.html +1 -1
  82. package/dist/pages/sparql-editor.html +1 -1
  83. package/dist/pages/sparql-template-create.html +1 -1
  84. package/dist/pages/ux-test1.html +2 -2
  85. package/dist/pages/webapi.html +2 -2
  86. package/dist/res/swagger5/index.html +12 -12
  87. package/package.json +1 -1
  88. package/dist/27.0bef4e8a2036ac558363.bundle.js +0 -1
  89. package/dist/33.af2c6f75cf2552a3673a.bundle.js +0 -1
  90. package/dist/48.3f307ccfc9f7fdb4493a.bundle.js +0 -1
  91. package/dist/49.cb3092e45da0b746f614.bundle.js +0 -1
  92. package/dist/6.f0a3eb64b7f08f563a1e.bundle.js +0 -1
  93. package/dist/64.d22107a2323b4f530473.bundle.js +0 -1
  94. package/dist/77.8ec067adfbc7ace36ba9.bundle.js +0 -1
@@ -4,15 +4,15 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
  <title>Swagger UI</title>
7
- <link rel="stylesheet" type="text/css" href="./swagger-ui.css?v=2.8.0-RC1" />
8
- <link rel="stylesheet" type="text/css" href="./index.css?v=2.8.0-RC1" />
9
- <link rel="icon" type="image/png" href="./favicon-32x32.png?v=2.8.0-RC1" sizes="32x32" />
10
- <link rel="icon" type="image/png" href="./favicon-16x16.png?v=2.8.0-RC1" sizes="16x16" />
11
- <link href='../../css/common.css?v=2.8.0-RC1' media='screen' rel='stylesheet' type='text/css'/>
12
- <link href='css/reset.css?v=2.8.0-RC1' media='screen' rel='stylesheet' type='text/css'/>
13
- <link href='css/screen.css?v=2.8.0-RC1' media='screen' rel='stylesheet' type='text/css'/>
14
- <link href='css/onto-theme.css?v=2.8.0-RC1' media='screen' rel='stylesheet' type='text/css'/>
15
- <link href='css/print.css?v=2.8.0-RC1' media='print' rel='stylesheet' type='text/css'/>
7
+ <link rel="stylesheet" type="text/css" href="./swagger-ui.css?v=2.8.0-RC3" />
8
+ <link rel="stylesheet" type="text/css" href="./index.css?v=2.8.0-RC3" />
9
+ <link rel="icon" type="image/png" href="./favicon-32x32.png?v=2.8.0-RC3" sizes="32x32" />
10
+ <link rel="icon" type="image/png" href="./favicon-16x16.png?v=2.8.0-RC3" sizes="16x16" />
11
+ <link href='../../css/common.css?v=2.8.0-RC3' media='screen' rel='stylesheet' type='text/css'/>
12
+ <link href='css/reset.css?v=2.8.0-RC3' media='screen' rel='stylesheet' type='text/css'/>
13
+ <link href='css/screen.css?v=2.8.0-RC3' media='screen' rel='stylesheet' type='text/css'/>
14
+ <link href='css/onto-theme.css?v=2.8.0-RC3' media='screen' rel='stylesheet' type='text/css'/>
15
+ <link href='css/print.css?v=2.8.0-RC3' media='print' rel='stylesheet' type='text/css'/>
16
16
  </head>
17
17
 
18
18
  <body class="swagger-section">
@@ -21,8 +21,8 @@
21
21
  <br>
22
22
  <br>
23
23
  <div id="swagger-ui-container-rdf4j" class="swagger-ui-wrap"></div>
24
- <script src="./swagger-ui-bundle.js?v=2.8.0-RC1" charset="UTF-8"> </script>
25
- <script src="./swagger-ui-standalone-preset.js?v=2.8.0-RC1" charset="UTF-8"> </script>
26
- <script src="./swagger-initializer.js?v=2.8.0-RC1" charset="UTF-8"> </script>
24
+ <script src="./swagger-ui-bundle.js?v=2.8.0-RC3" charset="UTF-8"> </script>
25
+ <script src="./swagger-ui-standalone-preset.js?v=2.8.0-RC3" charset="UTF-8"> </script>
26
+ <script src="./swagger-initializer.js?v=2.8.0-RC3" charset="UTF-8"> </script>
27
27
  </body>
28
28
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench",
3
- "version": "2.8.0-RC1",
3
+ "version": "2.8.0-RC3",
4
4
  "description": "The web application for GraphDB APIs",
5
5
  "scripts": {
6
6
  "build": "webpack --config=webpack.config.prod.js",
@@ -1 +0,0 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[27,92,132,138,141,144,323],{104:function(e,t,n){"use strict";n.r(t),n.d(t,"UrlUtils",(function(){return i}));const r=/^(h|ht|htt|http|https|http:|https:|http:\/|https:\/|http:\/\/|https:\/\/|https?:\/\/[\S]*)$/i,o=/^(f|ft|ftp|ftps|ftp:|ftps:|ftp:\/|ftps:\/|ftp:\/\/|ftps:\/\/[\S]*)$/i;class i{static isValidUrl(e){return r.test(e)||o.test(e)}static doesNotContain(e,t){return!new RegExp(t).test(e)}static doesNotUseProtocol(e,t){return!new RegExp("^("+t.join("|")+")://","i").test(e)}}},121:function(e,t,n){"use strict";n.r(t);var r=n(104);angular.module("graphdb.framework.core.directives.validate-url",[]).directive("validateUrl",(function(){return{restrict:"A",require:"ngModel",link:function(e,t,n,o){o.$validators.validUrl=function(e,t){if(o.$isEmpty(t))return"false"!==n.allowEmpty;if(!r.UrlUtils.isValidUrl(t))return!1;if(n.exclude&&!r.UrlUtils.doesNotContain(t,n.exclude))return!1;if(n.excludeProtocol){const e=n.excludeProtocol.split(",");if(!r.UrlUtils.doesNotUseProtocol(t,e))return!1}return!0}}}}))},122:function(e,t){angular.module("graphdb.framework.core.directives.ascii-validator",[]).directive("asciiValidator",(function(){return{restrict:"A",require:"ngModel",link:function(e,t,n,r){function o(e){const t=/^[\x21-\x7E]*$/.test(e);return r.$setValidity("asciiValidator",t),e}r.$parsers.push(o),r.$formatters.push(o)}}}))},123:function(e,t){angular.module("graphdb.framework.core.directives.length-validator",[]).directive("lengthValidator",(function(){return{restrict:"A",require:"ngModel",link:function(e,t,n,r){function o(e){const t=n.minLength?parseInt(n.minLength,10):0,o=n.maxLength?parseInt(n.maxLength,10):1/0,i=e&&e.length>=t&&e.length<=o;return r.$setValidity("lengthValidator",i),e}r.$parsers.push(o),r.$formatters.push(o)}}}))},145:function(e,t,n){"use strict";n.r(t);var r=n(96);function o(e,t){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/cluster-properties.html",scope:{currentNode:"=",clusterModel:"=",clusterConfiguration:"="},link:n=>{n.isAdmin=!1,n.showEditConfigurationDialog=()=>{t.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html",controller:"EditClusterCtrl",size:"lg",resolve:{data:()=>({clusterConfiguration:n.clusterConfiguration})}}).result.finally((function(){n.$emit(r.UPDATE_CLUSTER,{force:!0})}))},n.showDeleteDialog=()=>{t.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html",controller:"DeleteClusterCtrl"}).result.then(e=>{n.$emit(r.DELETE_CLUSTER,{force:e})})};n.isAdmin=e.isAuthenticated()&&e.isAdmin()}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties",[]).directive("clusterProperties",o),o.$inject=["$jwtAuth","$uibModal"]},146:function(e,t){function n(){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/cluster-nodes.html",scope:{currentNode:"=",clusterModel:"="}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes",[]).directive("clusterNodes",n),n.$inject=[]},147:function(e,t,n){"use strict";n.r(t);n(122),n(123);var r=n(95),o=n(85);const i={minLen:"3",maxLen:"255"};function a(e,t,n,a,s,l,c){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/multi-region.html",scope:{clusterModel:"=",clusterConfiguration:"="},link:u=>{const d=[];u.topology=void 0,u.TopologyState=o.TopologyState,u.isAdmin=!1,u.addingTag=!1,u.loaderTimeout=void 0,u.secondaryTag=void 0,u.TagLengthConstraints=i,u.add=()=>{u.addingTag=!0},u.cancel=()=>{u.addingTag=!1},u.createTag=e=>{const n={tag:e};return p(!0),l.addCusterTag(n).then(()=>{a.success(t.instant("cluster_management.cluster_configuration_multi_region.created_tag",{tag:e}))}).catch(e=>{const n=getError(e);a.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.creating"))}).finally(()=>{u.addingTag=!1,p(!1)})},u.deleteTag=e=>{s.openSimpleModal({title:t.instant("cluster_management.cluster_configuration_multi_region.confirm.delete",{tag:e}),message:t.instant("cluster_management.cluster_configuration_multi_region.confirm.warning"),warning:!0,backdrop:"static",stopPropagation:!0}).result.then(()=>(p(!0),l.deleteClusterTag(e))).then(()=>a.success(t.instant("cluster_management.cluster_configuration_multi_region.deleted_tag",{tag:e}))).catch(e=>{if("cancel"===e||"escape key press"===e)return;const n=getError(e);a.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.deleting"))}).finally(()=>p(!1))},u.enableSecondaryMode=()=>{u.addingTag=!1;const e={title:t.instant("cluster_management.cluster_configuration_multi_region.confirm.enable_secondary"),message:t.instant("cluster_management.cluster_configuration_multi_region.confirm.enable_secondary_warning"),warning:!0,backdrop:"static",confirmButtonKey:"common.ok.btn",stopPropagation:!0};s.openSimpleModal(e).result.then(()=>g()).then(e=>(p(!0),l.enableSecondaryMode(e))).then(()=>a.success(t.instant("cluster_management.cluster_configuration_multi_region.secondary_enabled"))).catch(e=>{if("cancel"===e||"escape key press"===e)return;const n=getError(e);a.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.secondary"))}).finally(()=>p(!1))},u.disableSecondaryMode=()=>{s.openSimpleModal({title:t.instant("cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode"),message:t.instant("cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode_warning"),warning:!0,backdrop:"static",stopPropagation:!0}).result.then(()=>(p(!0),l.disableSecondaryMode())).then(()=>a.success(t.instant("cluster_management.cluster_configuration_multi_region.disabled_secondary_mode"))).catch(e=>{if("cancel"===e||"escape key press"===e)return;const n=getError(e);a.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.disabling"))}).finally(()=>p(!1))};const g=()=>{const e={title:t.instant("cluster_management.cluster_configuration_multi_region.secondary_cluster_settings"),templateUrl:"js/angular/clustermanagement/templates/modal/secondary-mode-modal.html",controller:function(e,t,n){e.rpcAddress="",e.tag="",e.title=n.title,e.onClick=e=>e.stopPropagation(),e.ok=()=>{t.close({primaryNode:e.rpcAddress,tag:e.tag})},e.cancel=()=>{t.dismiss("cancel")}},size:"lg",warning:!0,backdrop:"static"};return s.openCustomModal(e).result},m=e=>{p(!0),l.getClusterConfig().then(t=>{u.secondaryTag=r.ClusterConfiguration.fromJSON(t.data).secondaryTag,(e=>{const t=e.nodes.find(e=>e.nodeState===o.NodeState.LEADER);u.topology=t.topologyStatus})(r.ClusterModel.fromJSON(e))}).catch(e=>{const n=getError(e);a.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.disabling"))}).finally(()=>p(!1))},f=e=>{e||(u.addingTag=!1)},p=(e,t)=>{n.cancel(u.loaderTimeout),e?(u.loaderMessage=t,u.loaderTimeout=n(()=>{u.loader=e},150)):u.loader=!1};u.$on("$destroy",(function(){d.forEach(e=>e())}));u.isAdmin=e.isAuthenticated()&&e.isAdmin(),d.push(u.$watch("clusterModel",(function(e,t){e!==t&&m(e)}),!0)),d.push(c.onShowClusterConfigurationPanel(f)),m(u.clusterModel)}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region",["graphdb.framework.core.directives.ascii-validator","graphdb.framework.core.directives.length-validator"]).directive("multiRegion",a),a.$inject=["$jwtAuth","$translate","$timeout","toastr","ModalService","ClusterRestService","ClusterViewContextService"]},208:function(e,t,n){"use strict";n.r(t);n(11),n(209);var r=n(113),o=n(31),i=n(96);let a=240;const s={no_cluster_configured:"",create_cluster_btn:"",legend_node_state:"",legend_link_state:"",node_state_leader:"Leader",node_state_follower:"Follower",node_state_candidate:"Candidate",node_state_no_cluster:"No cluster",node_state_out_of_sync:"Out of sync",node_state_no_connection:"No connection",node_state_read_only:"Read only",node_state_restricted:"Restricted",link_state_in_sync:"In sync",link_state_syncing:"Syncing",link_state_out_of_sync:"Out of sync",recovery_state:{searching_for_node:"Searching for node",waiting_for_snapshot:"Waiting for snapshot from node",receiving_snapshot:"Receiving a snapshot from node",applying_snapshot:"Applying a snapshot",building_snapshot:"Building a snapshot for node",sending_snapshot:"Sending a snapshot to node",recovery_operation_failure_warning:"Node unable to recover. Action required"}},l={node_state:"legend_node_state",link_state:"legend_link_state"};angular.module("graphdb.framework.clustermanagement.directives.cluster-graphical-view",["graphdb.framework.utils.localstorageadapter","graphdb.framework.clustermanagement.directives.cluster-legend"]).directive("clusterGraphicalView",["$window","LocalStorageAdapter","LSKeys","UriUtils","$translate","$jwtAuth","$rootScope","ClusterViewContextService",function(e,t,n,c,u,d,g,m){return{restrict:"E",scope:{clusterModel:"="},link:function(f,p){const h=angular.element(e),_=[];let w,v,C,y,b,E=L(),S=U(),k=Math.min(E,S)/2-100,N=E/2,M=S/2;function T(){const e=m.getClusterViewD3Container();E=L(),S=U(),e.attr("width",E),e.attr("height",S),j()}function A(e,t=""){Object.keys(e).forEach(n=>{let r="";t&&(r+=t),r+="."+n;const o=e[n];"string"==typeof o?e[n]=u.instant("cluster_management.cluster_graphical_view"+r):"object"==typeof o&&A(o,r)})}function L(){const r="collapsedMenu"===t.get(n.MENU_STATE);return a=r?70:240,Math.max(Math.floor(.95*(e.innerWidth-a)),600)}function U(){return Math.max(.95*(e.innerHeight-250),675)}function x(){r.updateClusterZoneLabels(v,C,s),Object.keys(l).forEach(e=>{d3.select("#"+e).text(function(e){return s[l[e]]}(e))})}function R(){k=Math.min(E,S)/2-100,N=E/2,M=S/2,r.moveElement(C,N,M),C.select(".cluster-zone").attr("r",k)}function I(e){f.$emit(i.CLICK_IN_VIEW,e.target)}function j(){R(),v!==f.clusterModel.hasCluster&&(v=!!f.clusterModel.hasCluster,function(e){r.setCreateClusterZone(e,C,s,w),!e&&w&&C.on("mouseup",()=>{f.$emit(i.CREATE_CLUSTER)})}(v));const e=function(){const e=Object(o.cloneDeep)(f.clusterModel.nodes)||[];return e.forEach(e=>{if(e.hostname=c.shortenIri(e.endpoint),!Object(o.isEmpty)(e.recoveryStatus)){let t="cluster_management.cluster_graphical_view.recovery_state."+e.recoveryStatus.state.toLowerCase();e.recoveryStatus.affectedNodes&&e.recoveryStatus.affectedNodes.length>0&&(t+="_with_affected_node"),e.recoveryStatus.message=u.instant(t,{node:e.recoveryStatus.affectedNodes.join(", ")})}}),e}();!function(e){const t=y.selectAll("#node-group").data(e,e=>e.address),n=r.createNodes(t,45);n.on("click",(e,t)=>{f.$emit(i.NODE_SELECTED,t);const n=d3.select(".nodetooltip"),r=$(window).width();e.pageX<r/2?(n.style("left",e.pageX+"px"),n.style("right","")):(n.style("left",""),n.style("right",r-e.pageX+"px")),n.style("top",e.pageY-28+"px")}),r.updateNodes(n),r.positionNodesOnClusterZone(n,N,M,k)}(e);!function(e,t){const n=b.selectAll(".link").data(e,e=>e.id);r.createLinks(n),r.updateLinks(n,t)}(Object(o.cloneDeep)(f.clusterModel.links)||[],e)}f.width=function(){return E},f.height=function(){return S};f.$on("$destroy",(function(){h.unbind("resize",T),h.unbind("mousedown",I),r.removeEventListeners(),_.forEach(e=>e())})),w=d.isAdmin(),h.bind("resize",T),h.bind("mousedown",I),_.push(g.$on("$translateChangeSuccess",(function(){A(s),x()}))),_.push(f.$on(i.MODEL_UPDATED,(function(){j()}))),A(s),function(e){const t=r.createClusterSvgElement(p[0]).attr("width",E).attr("height",S);C=r.createClusterZone(t,e),b=t.append("g").attr("id","links-group"),y=t.append("g").attr("id","nodes-group"),r.addArrowHead(t,r.ARROW_CONFIG.BIG),r.addArrowHead(t,r.ARROW_CONFIG.SMALL),m.updateClusterViewD3Container(t)}(!(!f.clusterModel.nodes||!f.clusterModel.nodes.length)),j()}}}])},211:function(e,t,n){"use strict";n.r(t);n(145),n(146),n(147);angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration",["graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties","graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes","graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region"]).directive("clusterConfiguration",o),o.$inject=["$jwtAuth","$uibModal","$translate","toastr","ClusterViewContextService"];const r={PROPERTIES:"properties",NODES:"nodes",MULTI_REGION:"multi_region"};function o(e,t,n,o,i){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/cluster-configuration.html",scope:{currentNode:"=",clusterModel:"=",clusterConfiguration:"="},link:e=>{const t=[];e.CONFIGURATION_TABS=r,e.activeTab=r.PROPERTIES,e.closeClusterConfigurationPanel=()=>{i.hideClusterConfigurationPanel()},e.switchTab=(t,n)=>{e.activeTab=n};e.$on("$destroy",(function(){t.forEach(e=>e()),e.closeClusterConfigurationPanel()}));t.push(i.onShowClusterConfigurationPanel(t=>{t||(e.activeTab=r.PROPERTIES)}))}}}},212:function(e,t,n){"use strict";n.r(t);var r=n(95);function o(e,t,n,o,i,a,s){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-nodes-configuration.html",link:n=>{const o=[];n.rowHeights={},n.editedNodeIndex=void 0,n.allSuggestions=[],n.loader=!1,n.errors=[],n.addNewLocation=!1,n.hasCluster=!1,n.addNode=()=>{n.addNewLocation=!0,n.newLocation=new r.Location},n.filterSuggestions=e=>{const t=e.endpoint&&e.endpoint.toLowerCase();t?(n.suggestions=n.allSuggestions.filter(e=>e.toLowerCase().includes(t)),n.showDropdown=!0):(n.suggestions=[],n.showDropdown=!1)},n.selectSuggestion=(e,t)=>{e.endpoint=t,n.suggestions=[],n.showDropdown=!1},n.hideSuggestions=()=>{t(()=>{n.showDropdown=!1},200)},n.saveNode=e=>{const t=a.getAvailable(!0);!function(e,t){t?a.replace(t,e):a.addLocation(e);i()}(a.findByEndpoint(t,e)||new r.Location(e),a.getPendingReplace())},n.deleteNode=(t,n)=>{s.openSimpleModal({title:e.instant("location.confirm.detach"),message:e.instant("location.confirm.detach.warning",{uri:n.endpoint}),warning:!0}).result.then(()=>{a.deleteFromCluster(n.item)})},n.replaceNode=(t,r)=>{s.openSimpleModal({title:e.instant("location.change.confirm"),message:e.instant("location.change.confirm.warning"),warning:!0}).result.then(()=>{a.setPendingReplace(r.item),n.editedNodeIndex=t})},n.isClusterConfigurationValid=()=>{const e=void 0===n.editedNodeIndex,t=!1===n.addNewLocation,r=a.hasValidNodesCount(),o=n.form.$valid;return e&&t&&r&&o},n.setLoader=(e,r)=>{t.cancel(n.loaderTimeout),e?n.loaderTimeout=t(()=>{n.loader=e,n.loaderMessage=r},300):n.loader=!1},n.getAdvancedOptionsClass=()=>{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"},n.cancel=()=>{n.editedNodeIndex=void 0,n.addNewLocation=!1,a.emitUpdateClusterView()},n.restoreNode=e=>{a.restoreNode(e.item)};const i=()=>{a.setPendingReplace(void 0),n.editedNodeIndex=void 0,n.addNewLocation=!1},l=n.$watchGroup(["editedNodeIndex","addNewLocation","clusterConfiguration.electionMinTimeout","clusterConfiguration.electionRangeTimeout","clusterConfiguration.heartbeatInterval","clusterConfiguration.messageSizeKB","clusterConfiguration.verificationTimeout","clusterConfiguration.transactionLogMaximumSizeGB"],(e,t)=>{const r=n.isClusterConfigurationValid();a.updateClusterValidity(r)});o.push(l),o.push(a.onClusterViewChanged(e=>{n.hasCluster=a.hasCluster(),n.viewModel=a.getViewModel(),n.clusterNodesEndpoints=n.viewModel.map(e=>e.endpoint),n.clusterConfiguration=a.getClusterConfiguration(),n.allSuggestions=a.getAvailableNodeEndpoints(),n.canDeleteNode=a.canDeleteNode()})),n.$on("$destroy",()=>{o.forEach(e=>e())})}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-nodes-configuration",[]).directive("clusterNodesConfiguration",o),o.$inject=["$translate","$timeout","productInfo","toastr","RemoteLocationsService","ClusterContextService","ModalService"]},213:function(e,t){angular.module("graphdb.framework.core.directives.validate-duplicate-url",[]).directive("validateDuplicateUrl",(function(){return{restrict:"A",require:"ngModel",scope:{excludedUrls:"="},link:function(e,t,n,r){r.$validators.duplicateUrl=function(t,n){return e.excludedUrls&&e.excludedUrls.includes(n)?(r.$setValidity("duplicateUrl",!1),!1):(r.$setValidity("duplicateUrl",!0),!0)}}}}))},312:function(e,t,n){"use strict";n.r(t);n(7),n(32),n(299),n(208),n(211),n(212),n(33),n(519),n(297),n(121),n(213);angular.module("graphdb.framework.clustermanagement",["ngAnimate","toastr","graphdb.framework.clustermanagement.controllers.cluster-management","graphdb.framework.clustermanagement.directives.cluster-graphical-view","graphdb.framework.clustermanagement.directives.cluster-configuration","graphdb.framework.clustermanagement.directives.cluster-nodes-configuration","graphdb.framework.core.directives.validate-url","graphdb.framework.core.directives.validate-duplicate-url"])},519:function(e,t,n){var r,o;r=[n(527)],void 0===(o=function(){function e(e,t){return e.each((function(){var e=t.apply(this,arguments),n=select(this);for(var r in e)n.attr(r,e[r])}))}function t(e,t){for(var n in t)e.attr(n,t[n]);return e}return"undefined"==typeof d3&&(d3=n(527)),d3.selection.prototype.attrs=function(n){return("function"==typeof n?e:t)(this,n)},d3.selection.prototype.moveToFront=function(){return this.each((function(){d3.select(this.parentNode.appendChild(this))}))},d3.selection.prototype.moveToBack=function(){return this.each((function(){const e=this.parentNode.firstChild;e&&this.parentNode.insertBefore(this,e)}))},d3}.apply(t,r))||(e.exports=o)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[33,49,86,132,133,138,141,187,190,191],{122:function(t,e){angular.module("graphdb.framework.core.directives.ascii-validator",[]).directive("asciiValidator",(function(){return{restrict:"A",require:"ngModel",link:function(t,e,r,n){function i(t){const e=/^[\x21-\x7E]*$/.test(t);return n.$setValidity("asciiValidator",e),t}n.$parsers.push(i),n.$formatters.push(i)}}}))},123:function(t,e){angular.module("graphdb.framework.core.directives.length-validator",[]).directive("lengthValidator",(function(){return{restrict:"A",require:"ngModel",link:function(t,e,r,n){function i(t){const e=r.minLength?parseInt(r.minLength,10):0,i=r.maxLength?parseInt(r.maxLength,10):1/0,s=t&&t.length>=e&&t.length<=i;return n.$setValidity("lengthValidator",s),t}n.$parsers.push(i),n.$formatters.push(i)}}}))},145:function(t,e,r){"use strict";r.r(e);var n=r(96);function i(t,e){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/cluster-properties.html",scope:{currentNode:"=",clusterModel:"=",clusterConfiguration:"="},link:r=>{r.isAdmin=!1,r.showEditConfigurationDialog=()=>{e.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html",controller:"EditClusterCtrl",size:"lg",resolve:{data:()=>({clusterConfiguration:r.clusterConfiguration})}}).result.finally((function(){r.$emit(n.UPDATE_CLUSTER,{force:!0})}))},r.showDeleteDialog=()=>{e.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html",controller:"DeleteClusterCtrl"}).result.then(t=>{r.$emit(n.DELETE_CLUSTER,{force:t})})};r.isAdmin=t.isAuthenticated()&&t.isAdmin()}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties",[]).directive("clusterProperties",i),i.$inject=["$jwtAuth","$uibModal"]},146:function(t,e){function r(){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/cluster-nodes.html",scope:{currentNode:"=",clusterModel:"="}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes",[]).directive("clusterNodes",r),r.$inject=[]},147:function(t,e,r){"use strict";r.r(e);r(122),r(123);var n=r(95),i=r(85);const s={minLen:"3",maxLen:"255"};function o(t,e,r,o,a,l,u){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/multi-region.html",scope:{clusterModel:"=",clusterConfiguration:"="},link:c=>{const d=[];c.topology=void 0,c.TopologyState=i.TopologyState,c.isAdmin=!1,c.addingTag=!1,c.loaderTimeout=void 0,c.secondaryTag=void 0,c.TagLengthConstraints=s,c.add=()=>{c.addingTag=!0},c.cancel=()=>{c.addingTag=!1},c.createTag=t=>{const r={tag:t};return h(!0),l.addCusterTag(r).then(()=>{o.success(e.instant("cluster_management.cluster_configuration_multi_region.created_tag",{tag:t}))}).catch(t=>{const r=getError(t);o.error(r,e.instant("cluster_management.cluster_configuration_multi_region.error.creating"))}).finally(()=>{c.addingTag=!1,h(!1)})},c.deleteTag=t=>{a.openSimpleModal({title:e.instant("cluster_management.cluster_configuration_multi_region.confirm.delete",{tag:t}),message:e.instant("cluster_management.cluster_configuration_multi_region.confirm.warning"),warning:!0,backdrop:"static",stopPropagation:!0}).result.then(()=>(h(!0),l.deleteClusterTag(t))).then(()=>o.success(e.instant("cluster_management.cluster_configuration_multi_region.deleted_tag",{tag:t}))).catch(t=>{if("cancel"===t||"escape key press"===t)return;const r=getError(t);o.error(r,e.instant("cluster_management.cluster_configuration_multi_region.error.deleting"))}).finally(()=>h(!1))},c.enableSecondaryMode=()=>{c.addingTag=!1;const t={title:e.instant("cluster_management.cluster_configuration_multi_region.confirm.enable_secondary"),message:e.instant("cluster_management.cluster_configuration_multi_region.confirm.enable_secondary_warning"),warning:!0,backdrop:"static",confirmButtonKey:"common.ok.btn",stopPropagation:!0};a.openSimpleModal(t).result.then(()=>g()).then(t=>(h(!0),l.enableSecondaryMode(t))).then(()=>o.success(e.instant("cluster_management.cluster_configuration_multi_region.secondary_enabled"))).catch(t=>{if("cancel"===t||"escape key press"===t)return;const r=getError(t);o.error(r,e.instant("cluster_management.cluster_configuration_multi_region.error.secondary"))}).finally(()=>h(!1))},c.disableSecondaryMode=()=>{a.openSimpleModal({title:e.instant("cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode"),message:e.instant("cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode_warning"),warning:!0,backdrop:"static",stopPropagation:!0}).result.then(()=>(h(!0),l.disableSecondaryMode())).then(()=>o.success(e.instant("cluster_management.cluster_configuration_multi_region.disabled_secondary_mode"))).catch(t=>{if("cancel"===t||"escape key press"===t)return;const r=getError(t);o.error(r,e.instant("cluster_management.cluster_configuration_multi_region.error.disabling"))}).finally(()=>h(!1))};const g=()=>{const t={title:e.instant("cluster_management.cluster_configuration_multi_region.secondary_cluster_settings"),templateUrl:"js/angular/clustermanagement/templates/modal/secondary-mode-modal.html",controller:function(t,e,r){t.rpcAddress="",t.tag="",t.title=r.title,t.onClick=t=>t.stopPropagation(),t.ok=()=>{e.close({primaryNode:t.rpcAddress,tag:t.tag})},t.cancel=()=>{e.dismiss("cancel")}},size:"lg",warning:!0,backdrop:"static"};return a.openCustomModal(t).result},_=t=>{h(!0),l.getClusterConfig().then(e=>{c.secondaryTag=n.ClusterConfiguration.fromJSON(e.data).secondaryTag,(t=>{const e=t.nodes.find(t=>t.nodeState===i.NodeState.LEADER);c.topology=e.topologyStatus})(n.ClusterModel.fromJSON(t))}).catch(t=>{const r=getError(t);o.error(r,e.instant("cluster_management.cluster_configuration_multi_region.error.disabling"))}).finally(()=>h(!1))},m=t=>{t||(c.addingTag=!1)},h=(t,e)=>{r.cancel(c.loaderTimeout),t?(c.loaderMessage=e,c.loaderTimeout=r(()=>{c.loader=t},150)):c.loader=!1};c.$on("$destroy",(function(){d.forEach(t=>t())}));c.isAdmin=t.isAuthenticated()&&t.isAdmin(),d.push(c.$watch("clusterModel",(function(t,e){t!==e&&_(t)}),!0)),d.push(u.onShowClusterConfigurationPanel(m)),_(c.clusterModel)}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region",["graphdb.framework.core.directives.ascii-validator","graphdb.framework.core.directives.length-validator"]).directive("multiRegion",o),o.$inject=["$jwtAuth","$translate","$timeout","toastr","ModalService","ClusterRestService","ClusterViewContextService"]},211:function(t,e,r){"use strict";r.r(e);r(145),r(146),r(147);angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration",["graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties","graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes","graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region"]).directive("clusterConfiguration",i),i.$inject=["$jwtAuth","$uibModal","$translate","toastr","ClusterViewContextService"];const n={PROPERTIES:"properties",NODES:"nodes",MULTI_REGION:"multi_region"};function i(t,e,r,i,s){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/cluster-configuration.html",scope:{currentNode:"=",clusterModel:"=",clusterConfiguration:"="},link:t=>{const e=[];t.CONFIGURATION_TABS=n,t.activeTab=n.PROPERTIES,t.closeClusterConfigurationPanel=()=>{s.hideClusterConfigurationPanel()},t.switchTab=(e,r)=>{t.activeTab=r};t.$on("$destroy",(function(){e.forEach(t=>t()),t.closeClusterConfigurationPanel()}));e.push(s.onShowClusterConfigurationPanel(e=>{e||(t.activeTab=n.PROPERTIES)}))}}}},85:function(t,e,r){"use strict";r.r(e),r.d(e,"NodeState",(function(){return n})),r.d(e,"RecoveryState",(function(){return i})),r.d(e,"LinkState",(function(){return s})),r.d(e,"TopologyState",(function(){return o}));const n={LEADER:"LEADER",FOLLOWER:"FOLLOWER",CANDIDATE:"CANDIDATE",OUT_OF_SYNC:"OUT_OF_SYNC",NO_CONNECTION:"NO_CONNECTION",READ_ONLY:"READ_ONLY",RESTRICTED:"RESTRICTED",NO_CLUSTER:"NO_CLUSTER"},i={SEARCHING_FOR_NODE:"SEARCHING_FOR_NODE",WAITING_FOR_SNAPSHOT:"WAITING_FOR_SNAPSHOT",RECEIVING_SNAPSHOT:"RECEIVING_SNAPSHOT",APPLYING_SNAPSHOT:"APPLYING_SNAPSHOT",BUILDING_SNAPSHOT:"BUILDING_SNAPSHOT",SENDING_SNAPSHOT:"SENDING_SNAPSHOT",RECOVERY_OPERATION_FAILURE_WARNING:"RECOVERY_OPERATION_FAILURE_WARNING"},s={IN_SYNC:"IN_SYNC",OUT_OF_SYNC:"OUT_OF_SYNC",SYNCING:"SYNCING",NO_CONNECTION:"NO_CONNECTION",RECEIVING_SNAPSHOT:"RECEIVING_SNAPSHOT"},o={PRIMARY_NODE:"PRIMARY_NODE",SECONDARY_NODE:"SECONDARY_NODE"}},95:function(t,e,r){"use strict";r.r(e),r.d(e,"Location",(function(){return n})),r.d(e,"Node",(function(){return i})),r.d(e,"TopologyStatus",(function(){return s})),r.d(e,"Link",(function(){return o})),r.d(e,"ClusterModel",(function(){return a})),r.d(e,"ClusterViewModel",(function(){return l})),r.d(e,"ClusterItemViewModel",(function(){return u})),r.d(e,"ClusterConfiguration",(function(){return c}));class n{constructor(t,e=null,r=null,n=!1,i=!1){this._endpoint=t,this._rpcAddress=e,this._error=r,this._isAvailable=n,this._isLocal=i}get isLocal(){return this._isLocal}get endpoint(){return this._endpoint}get rpcAddress(){return this._rpcAddress}get error(){return this._error}get isAvailable(){return this._isAvailable}set endpoint(t){this._endpoint=t}set rpcAddress(t){this._rpcAddress=t}set error(t){this._error=t}set isAvailable(t){this._isAvailable=t}set isLocal(t){this._isLocal=t}static fromJSON({endpoint:t,rpcAddress:e,error:r=null,isAvailable:i=!1,isLocal:s=!1}){return new n(t,e,r,i,s)}}class i{constructor(t,e,r,n,i,o,a,l,u){this._address=t,this._nodeState=e,this._term=r,this._syncStatus=n,this._lastLogTerm=i,this._lastLogIndex=o,this._endpoint=a,this._recoveryStatus=l,this._topologyStatus=s.fromJSON(u)}get address(){return this._address}get nodeState(){return this._nodeState}get term(){return this._term}get syncStatus(){return this._syncStatus}get lastLogTerm(){return this._lastLogTerm}get lastLogIndex(){return this._lastLogIndex}get endpoint(){return this._endpoint}get recoveryStatus(){return this._recoveryStatus}set address(t){this._address=t}set nodeState(t){this._nodeState=t}set term(t){this._term=t}set syncStatus(t){this._syncStatus=t}set lastLogTerm(t){this._lastLogTerm=t}set lastLogIndex(t){this._lastLogIndex=t}set endpoint(t){this._endpoint=t}set recoveryStatus(t){this._recoveryStatus=t}get topologyStatus(){return this._topologyStatus}set topologyStatus(t){return this._topologyStatus=t}static fromJSON({address:t,nodeState:e,term:r,syncStatus:n,lastLogTerm:s,lastLogIndex:o,endpoint:a,recoveryStatus:l,topologyStatus:u}){return new i(t,e,r,n,s,o,a,l,u)}}class s{constructor(t,e=new Map,r,n){this._state=t,this._primaryTags=e,this._primaryIndex=r,this._primaryLeader=n}get state(){return this._state}get primaryTags(){return this._primaryTags}get primaryIndex(){return this._primaryIndex}get primaryLeader(){return this._primaryLeader}static fromJSON({state:t,primaryTags:e={},primaryIndex:r,primaryLeader:n}){const i=Object.entries(e);return new s(t,i,r,n)}}class o{constructor(t,e,r,n){this._id=t,this._source=e,this._target=r,this._status=n}static fromJSON({id:t,source:e,target:r,status:n}){return new o(t,e,r,n)}}class a{constructor(t,e,r,n){this._locations=t,this._hasCluster=e,this._nodes=r,this._links=n}get locations(){return this._locations}set locations(t){this._locations=t}get hasCluster(){return this._hasCluster}set hasCluster(t){this._hasCluster=t}get nodes(){return this._nodes}set nodes(t){this._nodes=t}get links(){return this._links}set links(t){this._links=t}static fromJSON(t){const e=t.locations.map(n.fromJSON),r=t.nodes.map(i.fromJSON),s=t.links.map(o.fromJSON);return new a(e,t.hasCluster,r,s)}}class l{constructor(t){this._clusterModel=a.fromJSON(t),this._addToCluster=new Map,this._deleteFromCluster=new Map,this._currentNodesCount=0,this._clusterConfiguration=new c,this._localNodeEndpoint=t.locations.find(t=>t.isLocal).endpoint,this.MINIMUM_NODES_REQUIRED=2}getAttached(){const t=this._clusterModel.nodes.concat(Array.from(this._addToCluster.values()));return this._currentNodesCount=t.filter(t=>!this._deleteFromCluster.has(t.endpoint)).length,t}getViewModel(){let t=0;return this.getAttached().map(e=>{const r=new u(e);return this._deleteFromCluster.has(e.endpoint)?r.isDeleted=!0:r.index=t++,this._localNodeEndpoint===e.endpoint&&(r.isLocal=!0),r})}getAvailable(t=!1){const e=this._clusterModel.nodes;return this._clusterModel.locations.filter(r=>{const n=!this.isPresentInList(e,r.endpoint),i=r.isAvailable,s=!this._addToCluster.has(r.endpoint),o=!!t||!this._deleteFromCluster.has(r.endpoint);return n&&i&&o&&s})}getAvailableNodeEndpoints(){return this.getAvailable().map(t=>t.endpoint)}getLocalNode(){return this._clusterModel.locations.find(t=>t.isLocal)}addToCluster(t){const e=t.endpoint;t.endpoint&&this.addToLocations(t),this._deleteFromCluster.has(e)?this._deleteFromCluster.delete(e):this._addToCluster.set(e,t)}addToLocations(t){const e=d.findIndexByEndpoint(this._clusterModel.locations,t.endpoint);-1===e?this._clusterModel.locations.push(t):this._clusterModel.locations.splice(e,1)}deleteFromCluster(t){const e=t.endpoint;this._addToCluster.has(e)?this._addToCluster.delete(e):this._deleteFromCluster.set(e,t)}getDeleteFromCluster(){return Array.from(this._deleteFromCluster.values())}getUpdateActions(){const t=Array.from(this._addToCluster.values()).map(t=>t.endpoint),e={addNodes:t,removeNodes:Array.from(this._deleteFromCluster.values()).map(t=>t.endpoint)},r=this.updateClusterConfiguration(t);return r&&(e.clusterConfiguration=r),e}updateClusterConfiguration(t){return this.hasCluster()?null:(this._clusterConfiguration.nodes=t,this._clusterConfiguration.toJSON())}getClusterConfiguration(){return this._clusterConfiguration}restoreFromDeletion(t){this._deleteFromCluster.delete(t.endpoint)}isChanged(){return this._addToCluster.size>0||this._deleteFromCluster.size>0}isPresentInList(t,e){return d.isPresentInList(t,e)}findByEndpoint(t,e){return d.findByEndpoint(t,e)}findIndexByEndpoint(t,e){return d.findIndexByEndpoint(t,e)}hasValidNodesCount(){return this._currentNodesCount>=this.MINIMUM_NODES_REQUIRED}canDeleteNode(){const t=Math.floor(this._clusterModel.nodes.length/2);return this._deleteFromCluster.size<t}hasCluster(){return this._clusterModel.hasCluster}}class u{constructor(t){this._item=t,this._endpoint=t.endpoint,this._isDeleted=!1,this._index=void 0,this._isLocal=!1}getEndPoint(){return this._item.endpoint}getAddress(){return void 0!==this._item._address?this._item._address:void 0!==this._item.rpcAddress?this._item.rpcAddress:null}isNode(){return void 0!==this._item._address}isLocation(){return void 0===this._item._address}getNodeState(){return this.isNode()?this._item._nodeState:null}getIsAvailable(){return this.isNode()?null:this._item.isAvailable}getTerm(){return this.isNode()?this._item.term:null}getSyncStatus(){return this.isNode()?this._item.syncStatus:null}getIsLocal(){return this.isNode()?null:this._item.isLocal}get item(){return this._item}get endpoint(){return this._endpoint}set endpoint(t){return this._endpoint=t}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}get index(){return this._index}set index(t){this._index=t}get isLocal(){return this._isLocal}set isLocal(t){this._isLocal=t}}class c{constructor({electionMinTimeout:t=8e3,electionRangeTimeout:e=6e3,heartbeatInterval:r=2e3,messageSizeKB:n=64,verificationTimeout:i=1500,transactionLogMaximumSizeGB:s=50,batchUpdateInterval:o=5e3,nodes:a=[],secondaryTag:l,primaryNodes:u}={}){this._electionMinTimeout=t,this._electionRangeTimeout=e,this._heartbeatInterval=r,this._messageSizeKB=n,this._verificationTimeout=i,this._transactionLogMaximumSizeGB=s,this._batchUpdateInterval=o,this._nodes=a,this._secondaryTag=l,this._primaryNodes=u}static fromJSON(t){return new c(t)}get electionMinTimeout(){return this._electionMinTimeout}set electionMinTimeout(t){this._electionMinTimeout=t}get electionRangeTimeout(){return this._electionRangeTimeout}set electionRangeTimeout(t){this._electionRangeTimeout=t}get heartbeatInterval(){return this._heartbeatInterval}set heartbeatInterval(t){this._heartbeatInterval=t}get messageSizeKB(){return this._messageSizeKB}set messageSizeKB(t){this._messageSizeKB=t}get verificationTimeout(){return this._verificationTimeout}set verificationTimeout(t){this._verificationTimeout=t}get transactionLogMaximumSizeGB(){return this._transactionLogMaximumSizeGB}set transactionLogMaximumSizeGB(t){this._transactionLogMaximumSizeGB=t}get nodes(){return this._nodes}set nodes(t){this._nodes=t}get batchUpdateInterval(){return this._batchUpdateInterval}set batchUpdateInterval(t){this._batchUpdateInterval=t}get secondaryTag(){return this._secondaryTag}set secondaryTag(t){this._secondaryTag=t}get primaryNodes(){return this._primaryNodes}set primaryNodes(t){this._primaryNodes=t}toJSON(){const t={electionMinTimeout:this._electionMinTimeout,electionRangeTimeout:this._electionRangeTimeout,heartbeatInterval:this._heartbeatInterval,messageSizeKB:this._messageSizeKB,verificationTimeout:this._verificationTimeout,transactionLogMaximumSizeGB:this._transactionLogMaximumSizeGB,batchUpdateInterval:this._batchUpdateInterval,nodes:this._nodes};return void 0!==this._secondaryTag&&(t.secondaryTag=this._secondaryTag),void 0!==this._primaryNodes&&(t.primaryNodes=this._primaryNodes),t}}class d{static isPresentInList(t,e){return t.some(t=>t.endpoint===e)}static findByEndpoint(t,e){return t.find(t=>t.endpoint===e)}static findIndexByEndpoint(t,e){return t.findIndex(t=>t.endpoint===e)}}},96:function(t,e,r){"use strict";r.r(e),r.d(e,"UPDATE_CLUSTER",(function(){return n})),r.d(e,"DELETE_CLUSTER",(function(){return i})),r.d(e,"CLICK_IN_VIEW",(function(){return s})),r.d(e,"NODE_SELECTED",(function(){return o})),r.d(e,"CREATE_CLUSTER",(function(){return a})),r.d(e,"MODEL_UPDATED",(function(){return l}));const n="updateCluster",i="deleteCluster",s="clickInView",o="nodeSelected",a="createCluster",l="modelUpdated"}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[48,64,77,105,265,266],{108:function(t,s,e){"use strict";e.r(s),e.d(s,"ChatAnswerModel",(function(){return a})),e.d(s,"ContinueChatRun",(function(){return i}));class a{constructor(t={}){this._chatId=t.chatId,this._chatName=t.chatName||"",this._timestamp=t.timestamp,this._messages=t.messages||[],this._continueRunId=t.continueRunId}get chatId(){return this._chatId}set chatId(t){this._chatId=t}get chatName(){return this._chatName}set chatName(t){this._chatName=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}get messages(){return this._messages}set messages(t){this._messages=t}get continueRunId(){return this._continueRunId}set continueRunId(t){this._continueRunId=t}}class i{constructor(t,s){this._chatItem=t,this._runId=s}get chatId(){return this._chatItem.chatId}toContinueRunRequestPayload(){return{conversationId:this.chatId,runId:this._runId,lastMessageId:this._chatItem.answers[this._chatItem.answers.length-1].id,agentId:this._chatItem.agentId}}}},136:function(t,s,e){"use strict";e.r(s),e.d(s,"chatMessageModelListMapper",(function(){return n})),e.d(s,"chatItemsModelMapper",(function(){return r})),e.d(s,"chatMessageModelMapper",(function(){return c})),e.d(s,"chatAnswerModelMapper",(function(){return m}));var a=e(79),i=e(83),h=e(108);const n=t=>t?t.map(t=>c(t)):[],r=(t=[])=>{const s=[];let e;return t.forEach(t=>{const h=t.conversationId;a.CHAT_MESSAGE_ROLE.USER===t.role?(e&&s.push(e),e=new i.ChatItemModel(h,c(t))):(e||(e=new i.ChatItemModel(h,null)),e.answers.push(c(t)),e.agentId=t.agentId)}),e&&s.push(e),new i.ChatItemsListModel(s)},c=t=>{if(t)return new a.ChatMessageModel({id:t.id,role:t.role,message:t.message,timestamp:t.timestamp,data:t})},m=t=>{if(t)return new h.ChatAnswerModel({chatId:t.id,chatName:t.name,timestamp:t.timestamp,messages:n(t.messages),continueRunId:t.continueRunId})}},223:function(t,s,e){"use strict";e.r(s),e.d(s,"chatsListMapper",(function(){return c})),e.d(s,"chatModelMapper",(function(){return m}));var a=e(98),i=e(17),h=e(136),n=e(83);const r=Object(i.md5HashGenerator)(),c=t=>{if(!t)return new a.ChatsListModel;const s=t.map(t=>m(t));return new a.ChatsListModel(s)},m=t=>{if(t)return new a.ChatModel({id:t.id,name:t.name,timestamp:t.timestamp,chatHistory:t.messages&&t.messages.length?Object(h.chatItemsModelMapper)(t.messages):new n.ChatItemsListModel},r)}},79:function(t,s,e){"use strict";e.r(s),e.d(s,"ChatMessageModel",(function(){return a})),e.d(s,"CHAT_MESSAGE_ROLE",(function(){return i}));class a{constructor(t){this._id=t.id,this._role=t.role,this._message=t.message,this._timestamp=1e3*t.timestamp}get id(){return this._id}set id(t){this._id=t}get role(){return this._role}set role(t){this._role=t}get message(){return this._message}set message(t){this._message=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}}const i={USER:"user",ASSISTANT:"assistant"}},83:function(t,s,e){"use strict";e.r(s),e.d(s,"ChatItemModel",(function(){return i})),e.d(s,"ChatItemsListModel",(function(){return h}));var a=e(79);class i{constructor(t,s){this._chatId=t,this._agentId=void 0,this._question=s,this._answers=[]}get chatId(){return this._chatId}set chatId(t){this._chatId=t}get agentId(){return this._agentId}set agentId(t){this._agentId=t}get question(){return this._question}set question(t){this._question=t}get answers(){return this._answers}set answers(t){this._answers=t}setQuestionMessage(t){this._question||(this._question=new a.ChatMessageModel({role:a.CHAT_MESSAGE_ROLE.USER})),this._question.message=t}getQuestionMessage(){return this._question.message}toCreateChatRequestPayload(){return{agentId:this._agentId,question:this._question.message}}toAskRequestPayload(){return{conversationId:this._chatId,agentId:this._agentId,question:this._question.message}}toExplainResponsePayload(t){return{conversationId:this._chatId,answerId:t}}}class h{constructor(t=[]){this._items=t}isEmpty(){return 0===this._items.length}appendItem(t){this._items.push(t)}get items(){return this._items}set items(t){this._items=t||[]}getLast(){if(!this.isEmpty())return this._items[this._items.length-1]}}},98:function(t,s,e){"use strict";e.r(s),e.d(s,"ChatModel",(function(){return h})),e.d(s,"ChatByDayModel",(function(){return n})),e.d(s,"ChatsListModel",(function(){return r}));var a=e(83),i=e(17);class h{static getEmptyChat(){const t={name:"· · ·",timestamp:Math.floor(Date.now()/1e3)};return new h(t,Object(i.md5HashGenerator)())}constructor(t,s){this.hashGenerator=s,this._id=t.id,this._name=t.name,this._timestamp=t.timestamp,this._chatHistory=t.chatHistory||new a.ChatItemsListModel,this.hash=this.generateHash()}generateHash(){return this.hashGenerator(JSON.stringify(this))}get id(){return this._id}set id(t){this._id=t}get name(){return this._name}set name(t){this.generateHash(),this._name=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}get chatHistory(){return this._chatHistory}set chatHistory(t){this._chatHistory=t||new a.ChatItemsListModel}toRenameRequestPayload(){return{name:this._name}}}class n{constructor(t){this._day=t.day,this._timestamp=t.timestamp,this._chats=t.chats}get day(){return this._day}set day(t){this._day=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}get chats(){return this._chats}set chats(t){this._chats=t}}class r{constructor(t){this._chats=t||[],this._chatsByDay=[],this.sortByTime(),this.updateChatsByDay()}sortByTime(){this._chats.sort((t,s)=>s.timestamp-t.timestamp)}updateChatTimestamp(t,s){const e=this._chats.find(s=>s.id===t);e&&(e.timestamp=s,this.sortByTime(),this.updateChatsByDay())}updateChatName(t,s){const e=this._chats.find(s=>s.id===t);e&&(e.name=s)}deleteChat(t){this._chats=this._chats.filter(s=>s.id!==t.id),this.sortByTime(),this.updateChatsByDay()}updateChatsByDay(){this._chatsByDay=[],this._chats.forEach(t=>{const s=new Date(1e3*t.timestamp).toDateString(),e=this._chatsByDay.find(t=>t.day===s);e?e.chats.push(t):this._chatsByDay.push(new n({day:s,timestamp:1e3*t.timestamp,chats:[t]}))})}appendChat(t){this._chats.push(t),this.sortByTime(),this.updateChatsByDay()}replaceChat(t,s){this._chats=this._chats.map(e=>e.id===s.id?t:e),this.sortByTime(),this.updateChatsByDay()}isEmpty(){return 0===this._chats.length}getFirstChat(){return this._chats[0]}deselectAll(){this._chats.forEach(t=>{t.selected=!1})}selectChat(t){this.deselectAll(),this._chats.forEach(s=>{s.selected=s.id===t.id})}getChat(t){return this._chats.find(s=>s.id===t)}getNonPersistedChat(){return this._chats.find(t=>!t.id)}renameChat(t){const s=this._chats.find(s=>s.id===t.id);s&&(s.name=t.name)}get chats(){return this._chats}set chats(t){this._chats=t}get chatsByDay(){return this._chatsByDay}set chatsByDay(t){this._chatsByDay=t}}}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[49,138,141,187,190,191],{122:function(t,e){angular.module("graphdb.framework.core.directives.ascii-validator",[]).directive("asciiValidator",(function(){return{restrict:"A",require:"ngModel",link:function(t,e,s,i){function n(t){const e=/^[\x21-\x7E]*$/.test(t);return i.$setValidity("asciiValidator",e),t}i.$parsers.push(n),i.$formatters.push(n)}}}))},123:function(t,e){angular.module("graphdb.framework.core.directives.length-validator",[]).directive("lengthValidator",(function(){return{restrict:"A",require:"ngModel",link:function(t,e,s,i){function n(t){const e=s.minLength?parseInt(s.minLength,10):0,n=s.maxLength?parseInt(s.maxLength,10):1/0,r=t&&t.length>=e&&t.length<=n;return i.$setValidity("lengthValidator",r),t}i.$parsers.push(n),i.$formatters.push(n)}}}))},147:function(t,e,s){"use strict";s.r(e);s(122),s(123);var i=s(95),n=s(85);const r={minLen:"3",maxLen:"255"};function o(t,e,s,o,a,l,d){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/multi-region.html",scope:{clusterModel:"=",clusterConfiguration:"="},link:u=>{const c=[];u.topology=void 0,u.TopologyState=n.TopologyState,u.isAdmin=!1,u.addingTag=!1,u.loaderTimeout=void 0,u.secondaryTag=void 0,u.TagLengthConstraints=r,u.add=()=>{u.addingTag=!0},u.cancel=()=>{u.addingTag=!1},u.createTag=t=>{const s={tag:t};return m(!0),l.addCusterTag(s).then(()=>{o.success(e.instant("cluster_management.cluster_configuration_multi_region.created_tag",{tag:t}))}).catch(t=>{const s=getError(t);o.error(s,e.instant("cluster_management.cluster_configuration_multi_region.error.creating"))}).finally(()=>{u.addingTag=!1,m(!1)})},u.deleteTag=t=>{a.openSimpleModal({title:e.instant("cluster_management.cluster_configuration_multi_region.confirm.delete",{tag:t}),message:e.instant("cluster_management.cluster_configuration_multi_region.confirm.warning"),warning:!0,backdrop:"static",stopPropagation:!0}).result.then(()=>(m(!0),l.deleteClusterTag(t))).then(()=>o.success(e.instant("cluster_management.cluster_configuration_multi_region.deleted_tag",{tag:t}))).catch(t=>{if("cancel"===t||"escape key press"===t)return;const s=getError(t);o.error(s,e.instant("cluster_management.cluster_configuration_multi_region.error.deleting"))}).finally(()=>m(!1))},u.enableSecondaryMode=()=>{u.addingTag=!1;const t={title:e.instant("cluster_management.cluster_configuration_multi_region.confirm.enable_secondary"),message:e.instant("cluster_management.cluster_configuration_multi_region.confirm.enable_secondary_warning"),warning:!0,backdrop:"static",confirmButtonKey:"common.ok.btn",stopPropagation:!0};a.openSimpleModal(t).result.then(()=>_()).then(t=>(m(!0),l.enableSecondaryMode(t))).then(()=>o.success(e.instant("cluster_management.cluster_configuration_multi_region.secondary_enabled"))).catch(t=>{if("cancel"===t||"escape key press"===t)return;const s=getError(t);o.error(s,e.instant("cluster_management.cluster_configuration_multi_region.error.secondary"))}).finally(()=>m(!1))},u.disableSecondaryMode=()=>{a.openSimpleModal({title:e.instant("cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode"),message:e.instant("cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode_warning"),warning:!0,backdrop:"static",stopPropagation:!0}).result.then(()=>(m(!0),l.disableSecondaryMode())).then(()=>o.success(e.instant("cluster_management.cluster_configuration_multi_region.disabled_secondary_mode"))).catch(t=>{if("cancel"===t||"escape key press"===t)return;const s=getError(t);o.error(s,e.instant("cluster_management.cluster_configuration_multi_region.error.disabling"))}).finally(()=>m(!1))};const _=()=>{const t={title:e.instant("cluster_management.cluster_configuration_multi_region.secondary_cluster_settings"),templateUrl:"js/angular/clustermanagement/templates/modal/secondary-mode-modal.html",controller:function(t,e,s){t.rpcAddress="",t.tag="",t.title=s.title,t.onClick=t=>t.stopPropagation(),t.ok=()=>{e.close({primaryNode:t.rpcAddress,tag:t.tag})},t.cancel=()=>{e.dismiss("cancel")}},size:"lg",warning:!0,backdrop:"static"};return a.openCustomModal(t).result},g=t=>{m(!0),l.getClusterConfig().then(e=>{u.secondaryTag=i.ClusterConfiguration.fromJSON(e.data).secondaryTag,(t=>{const e=t.nodes.find(t=>t.nodeState===n.NodeState.LEADER);u.topology=e.topologyStatus})(i.ClusterModel.fromJSON(t))}).catch(t=>{const s=getError(t);o.error(s,e.instant("cluster_management.cluster_configuration_multi_region.error.disabling"))}).finally(()=>m(!1))},h=t=>{t||(u.addingTag=!1)},m=(t,e)=>{s.cancel(u.loaderTimeout),t?(u.loaderMessage=e,u.loaderTimeout=s(()=>{u.loader=t},150)):u.loader=!1};u.$on("$destroy",(function(){c.forEach(t=>t())}));u.isAdmin=t.isAuthenticated()&&t.isAdmin(),c.push(u.$watch("clusterModel",(function(t,e){t!==e&&g(t)}),!0)),c.push(d.onShowClusterConfigurationPanel(h)),g(u.clusterModel)}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region",["graphdb.framework.core.directives.ascii-validator","graphdb.framework.core.directives.length-validator"]).directive("multiRegion",o),o.$inject=["$jwtAuth","$translate","$timeout","toastr","ModalService","ClusterRestService","ClusterViewContextService"]},85:function(t,e,s){"use strict";s.r(e),s.d(e,"NodeState",(function(){return i})),s.d(e,"RecoveryState",(function(){return n})),s.d(e,"LinkState",(function(){return r})),s.d(e,"TopologyState",(function(){return o}));const i={LEADER:"LEADER",FOLLOWER:"FOLLOWER",CANDIDATE:"CANDIDATE",OUT_OF_SYNC:"OUT_OF_SYNC",NO_CONNECTION:"NO_CONNECTION",READ_ONLY:"READ_ONLY",RESTRICTED:"RESTRICTED",NO_CLUSTER:"NO_CLUSTER"},n={SEARCHING_FOR_NODE:"SEARCHING_FOR_NODE",WAITING_FOR_SNAPSHOT:"WAITING_FOR_SNAPSHOT",RECEIVING_SNAPSHOT:"RECEIVING_SNAPSHOT",APPLYING_SNAPSHOT:"APPLYING_SNAPSHOT",BUILDING_SNAPSHOT:"BUILDING_SNAPSHOT",SENDING_SNAPSHOT:"SENDING_SNAPSHOT",RECOVERY_OPERATION_FAILURE_WARNING:"RECOVERY_OPERATION_FAILURE_WARNING"},r={IN_SYNC:"IN_SYNC",OUT_OF_SYNC:"OUT_OF_SYNC",SYNCING:"SYNCING",NO_CONNECTION:"NO_CONNECTION",RECEIVING_SNAPSHOT:"RECEIVING_SNAPSHOT"},o={PRIMARY_NODE:"PRIMARY_NODE",SECONDARY_NODE:"SECONDARY_NODE"}},95:function(t,e,s){"use strict";s.r(e),s.d(e,"Location",(function(){return i})),s.d(e,"Node",(function(){return n})),s.d(e,"TopologyStatus",(function(){return r})),s.d(e,"Link",(function(){return o})),s.d(e,"ClusterModel",(function(){return a})),s.d(e,"ClusterViewModel",(function(){return l})),s.d(e,"ClusterItemViewModel",(function(){return d})),s.d(e,"ClusterConfiguration",(function(){return u}));class i{constructor(t,e=null,s=null,i=!1,n=!1){this._endpoint=t,this._rpcAddress=e,this._error=s,this._isAvailable=i,this._isLocal=n}get isLocal(){return this._isLocal}get endpoint(){return this._endpoint}get rpcAddress(){return this._rpcAddress}get error(){return this._error}get isAvailable(){return this._isAvailable}set endpoint(t){this._endpoint=t}set rpcAddress(t){this._rpcAddress=t}set error(t){this._error=t}set isAvailable(t){this._isAvailable=t}set isLocal(t){this._isLocal=t}static fromJSON({endpoint:t,rpcAddress:e,error:s=null,isAvailable:n=!1,isLocal:r=!1}){return new i(t,e,s,n,r)}}class n{constructor(t,e,s,i,n,o,a,l,d){this._address=t,this._nodeState=e,this._term=s,this._syncStatus=i,this._lastLogTerm=n,this._lastLogIndex=o,this._endpoint=a,this._recoveryStatus=l,this._topologyStatus=r.fromJSON(d)}get address(){return this._address}get nodeState(){return this._nodeState}get term(){return this._term}get syncStatus(){return this._syncStatus}get lastLogTerm(){return this._lastLogTerm}get lastLogIndex(){return this._lastLogIndex}get endpoint(){return this._endpoint}get recoveryStatus(){return this._recoveryStatus}set address(t){this._address=t}set nodeState(t){this._nodeState=t}set term(t){this._term=t}set syncStatus(t){this._syncStatus=t}set lastLogTerm(t){this._lastLogTerm=t}set lastLogIndex(t){this._lastLogIndex=t}set endpoint(t){this._endpoint=t}set recoveryStatus(t){this._recoveryStatus=t}get topologyStatus(){return this._topologyStatus}set topologyStatus(t){return this._topologyStatus=t}static fromJSON({address:t,nodeState:e,term:s,syncStatus:i,lastLogTerm:r,lastLogIndex:o,endpoint:a,recoveryStatus:l,topologyStatus:d}){return new n(t,e,s,i,r,o,a,l,d)}}class r{constructor(t,e=new Map,s,i){this._state=t,this._primaryTags=e,this._primaryIndex=s,this._primaryLeader=i}get state(){return this._state}get primaryTags(){return this._primaryTags}get primaryIndex(){return this._primaryIndex}get primaryLeader(){return this._primaryLeader}static fromJSON({state:t,primaryTags:e={},primaryIndex:s,primaryLeader:i}){const n=Object.entries(e);return new r(t,n,s,i)}}class o{constructor(t,e,s,i){this._id=t,this._source=e,this._target=s,this._status=i}static fromJSON({id:t,source:e,target:s,status:i}){return new o(t,e,s,i)}}class a{constructor(t,e,s,i){this._locations=t,this._hasCluster=e,this._nodes=s,this._links=i}get locations(){return this._locations}set locations(t){this._locations=t}get hasCluster(){return this._hasCluster}set hasCluster(t){this._hasCluster=t}get nodes(){return this._nodes}set nodes(t){this._nodes=t}get links(){return this._links}set links(t){this._links=t}static fromJSON(t){const e=t.locations.map(i.fromJSON),s=t.nodes.map(n.fromJSON),r=t.links.map(o.fromJSON);return new a(e,t.hasCluster,s,r)}}class l{constructor(t){this._clusterModel=a.fromJSON(t),this._addToCluster=new Map,this._deleteFromCluster=new Map,this._currentNodesCount=0,this._clusterConfiguration=new u,this._localNodeEndpoint=t.locations.find(t=>t.isLocal).endpoint,this.MINIMUM_NODES_REQUIRED=2}getAttached(){const t=this._clusterModel.nodes.concat(Array.from(this._addToCluster.values()));return this._currentNodesCount=t.filter(t=>!this._deleteFromCluster.has(t.endpoint)).length,t}getViewModel(){let t=0;return this.getAttached().map(e=>{const s=new d(e);return this._deleteFromCluster.has(e.endpoint)?s.isDeleted=!0:s.index=t++,this._localNodeEndpoint===e.endpoint&&(s.isLocal=!0),s})}getAvailable(t=!1){const e=this._clusterModel.nodes;return this._clusterModel.locations.filter(s=>{const i=!this.isPresentInList(e,s.endpoint),n=s.isAvailable,r=!this._addToCluster.has(s.endpoint),o=!!t||!this._deleteFromCluster.has(s.endpoint);return i&&n&&o&&r})}getAvailableNodeEndpoints(){return this.getAvailable().map(t=>t.endpoint)}getLocalNode(){return this._clusterModel.locations.find(t=>t.isLocal)}addToCluster(t){const e=t.endpoint;t.endpoint&&this.addToLocations(t),this._deleteFromCluster.has(e)?this._deleteFromCluster.delete(e):this._addToCluster.set(e,t)}addToLocations(t){const e=c.findIndexByEndpoint(this._clusterModel.locations,t.endpoint);-1===e?this._clusterModel.locations.push(t):this._clusterModel.locations.splice(e,1)}deleteFromCluster(t){const e=t.endpoint;this._addToCluster.has(e)?this._addToCluster.delete(e):this._deleteFromCluster.set(e,t)}getDeleteFromCluster(){return Array.from(this._deleteFromCluster.values())}getUpdateActions(){const t=Array.from(this._addToCluster.values()).map(t=>t.endpoint),e={addNodes:t,removeNodes:Array.from(this._deleteFromCluster.values()).map(t=>t.endpoint)},s=this.updateClusterConfiguration(t);return s&&(e.clusterConfiguration=s),e}updateClusterConfiguration(t){return this.hasCluster()?null:(this._clusterConfiguration.nodes=t,this._clusterConfiguration.toJSON())}getClusterConfiguration(){return this._clusterConfiguration}restoreFromDeletion(t){this._deleteFromCluster.delete(t.endpoint)}isChanged(){return this._addToCluster.size>0||this._deleteFromCluster.size>0}isPresentInList(t,e){return c.isPresentInList(t,e)}findByEndpoint(t,e){return c.findByEndpoint(t,e)}findIndexByEndpoint(t,e){return c.findIndexByEndpoint(t,e)}hasValidNodesCount(){return this._currentNodesCount>=this.MINIMUM_NODES_REQUIRED}canDeleteNode(){const t=Math.floor(this._clusterModel.nodes.length/2);return this._deleteFromCluster.size<t}hasCluster(){return this._clusterModel.hasCluster}}class d{constructor(t){this._item=t,this._endpoint=t.endpoint,this._isDeleted=!1,this._index=void 0,this._isLocal=!1}getEndPoint(){return this._item.endpoint}getAddress(){return void 0!==this._item._address?this._item._address:void 0!==this._item.rpcAddress?this._item.rpcAddress:null}isNode(){return void 0!==this._item._address}isLocation(){return void 0===this._item._address}getNodeState(){return this.isNode()?this._item._nodeState:null}getIsAvailable(){return this.isNode()?null:this._item.isAvailable}getTerm(){return this.isNode()?this._item.term:null}getSyncStatus(){return this.isNode()?this._item.syncStatus:null}getIsLocal(){return this.isNode()?null:this._item.isLocal}get item(){return this._item}get endpoint(){return this._endpoint}set endpoint(t){return this._endpoint=t}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}get index(){return this._index}set index(t){this._index=t}get isLocal(){return this._isLocal}set isLocal(t){this._isLocal=t}}class u{constructor({electionMinTimeout:t=8e3,electionRangeTimeout:e=6e3,heartbeatInterval:s=2e3,messageSizeKB:i=64,verificationTimeout:n=1500,transactionLogMaximumSizeGB:r=50,batchUpdateInterval:o=5e3,nodes:a=[],secondaryTag:l,primaryNodes:d}={}){this._electionMinTimeout=t,this._electionRangeTimeout=e,this._heartbeatInterval=s,this._messageSizeKB=i,this._verificationTimeout=n,this._transactionLogMaximumSizeGB=r,this._batchUpdateInterval=o,this._nodes=a,this._secondaryTag=l,this._primaryNodes=d}static fromJSON(t){return new u(t)}get electionMinTimeout(){return this._electionMinTimeout}set electionMinTimeout(t){this._electionMinTimeout=t}get electionRangeTimeout(){return this._electionRangeTimeout}set electionRangeTimeout(t){this._electionRangeTimeout=t}get heartbeatInterval(){return this._heartbeatInterval}set heartbeatInterval(t){this._heartbeatInterval=t}get messageSizeKB(){return this._messageSizeKB}set messageSizeKB(t){this._messageSizeKB=t}get verificationTimeout(){return this._verificationTimeout}set verificationTimeout(t){this._verificationTimeout=t}get transactionLogMaximumSizeGB(){return this._transactionLogMaximumSizeGB}set transactionLogMaximumSizeGB(t){this._transactionLogMaximumSizeGB=t}get nodes(){return this._nodes}set nodes(t){this._nodes=t}get batchUpdateInterval(){return this._batchUpdateInterval}set batchUpdateInterval(t){this._batchUpdateInterval=t}get secondaryTag(){return this._secondaryTag}set secondaryTag(t){this._secondaryTag=t}get primaryNodes(){return this._primaryNodes}set primaryNodes(t){this._primaryNodes=t}toJSON(){const t={electionMinTimeout:this._electionMinTimeout,electionRangeTimeout:this._electionRangeTimeout,heartbeatInterval:this._heartbeatInterval,messageSizeKB:this._messageSizeKB,verificationTimeout:this._verificationTimeout,transactionLogMaximumSizeGB:this._transactionLogMaximumSizeGB,batchUpdateInterval:this._batchUpdateInterval,nodes:this._nodes};return void 0!==this._secondaryTag&&(t.secondaryTag=this._secondaryTag),void 0!==this._primaryNodes&&(t.primaryNodes=this._primaryNodes),t}}class c{static isPresentInList(t,e){return t.some(t=>t.endpoint===e)}static findByEndpoint(t,e){return t.find(t=>t.endpoint===e)}static findIndexByEndpoint(t,e){return t.findIndex(t=>t.endpoint===e)}}}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[6,48,64,77,78,103,105,106,107,264,265,266,267,268,311],{101:function(e,t,s){"use strict";s.r(t);var n=s(223),r=(s(224),s(136)),a=s(160),i=s(226),o=s(227);function d(e,t){return{getConversation:t=>e.getConversation(t).then(e=>Object(n.chatModelMapper)(e.data)),renameConversation:t=>e.renameConversation(t.id,t.toRenameRequestPayload()).then(e=>Object(n.chatModelMapper)(e.data)),exportConversation:t=>e.exportConversation(t).then((function(e){const t=e.data,s=e.headers()["content-disposition"];let n="chat-export";return s&&(n=s.split("filename=")[1],n=n.substring(0,n.length)),{data:t,filename:n}})),askQuestion:t=>e.askQuestion(t.toAskRequestPayload()).then(e=>Object(r.chatAnswerModelMapper)(e.data)),continueChatRun:t=>{const s=t.toContinueRunRequestPayload();return e.continueChatRun(s).then(e=>Object(r.chatAnswerModelMapper)(e.data))},getConversations:(t,s)=>e.getConversations().then(e=>Object(n.chatsListMapper)(e.data)),deleteConversation:t=>e.deleteConversation(t),createConversation:t=>e.createConversation(t.toCreateChatRequestPayload()).then(e=>Object(r.chatAnswerModelMapper)(e.data)),getAgents:()=>{const s=t.getLocalReadablGraphdbRepositoryIds();return e.getAgents().then(e=>Object(a.agentListMapper)(e.data,s))},getAgent:s=>{const n=t.getLocalReadablGraphdbRepositoryIds();return e.getAgent(s).then(e=>Object(a.agentModelMapper)(e.data,n))},createAgent:s=>{const n=t.getLocalReadablGraphdbRepositoryIds();return e.createAgent(s).then(e=>Object(a.agentModelMapper)(e.data,n))},editAgent:s=>{const n=t.getLocalReadablGraphdbRepositoryIds();return e.editAgent(s).then(e=>Object(a.agentModelMapper)(e.data,n))},deleteAgent:t=>e.deleteAgent(t),explainResponse:(t,s)=>e.explainResponse(t.toExplainResponsePayload(s)).then(e=>Object(i.explainResponseMapper)(e.data)),getDefaultAgent:()=>{const s=t.getLocalReadablGraphdbRepositoryIds();return e.getAgentDefaultValues().then(e=>Object(a.agentModelMapper)(e.data,s))},explainAgentSettings:t=>e.explainAgentSettings(t).then(e=>Object(o.agentInstructionsExplainMapper)(e.data))}}angular.module("graphdb.framework.core.services.ttyg-service",["graphdb.framework.rest.ttyg.service"]).factory("TTYGService",d),d.$inject=["TTYGRestService","$repositories"]},108:function(e,t,s){"use strict";s.r(t),s.d(t,"ChatAnswerModel",(function(){return n})),s.d(t,"ContinueChatRun",(function(){return r}));class n{constructor(e={}){this._chatId=e.chatId,this._chatName=e.chatName||"",this._timestamp=e.timestamp,this._messages=e.messages||[],this._continueRunId=e.continueRunId}get chatId(){return this._chatId}set chatId(e){this._chatId=e}get chatName(){return this._chatName}set chatName(e){this._chatName=e}get timestamp(){return this._timestamp}set timestamp(e){this._timestamp=e}get messages(){return this._messages}set messages(e){this._messages=e}get continueRunId(){return this._continueRunId}set continueRunId(e){this._continueRunId=e}}class r{constructor(e,t){this._chatItem=e,this._runId=t}get chatId(){return this._chatItem.chatId}toContinueRunRequestPayload(){return{conversationId:this.chatId,runId:this._runId,lastMessageId:this._chatItem.answers[this._chatItem.answers.length-1].id,agentId:this._chatItem.agentId}}}},118:function(e,t,s){"use strict";s.r(t),s.d(t,"ExplainResponseModel",(function(){return n})),s.d(t,"ExplainQueryMethodsListModel",(function(){return r})),s.d(t,"ExplainQueryMethodModel",(function(){return a})),s.d(t,"ExplainQueryType",(function(){return i}));class n{constructor(e={}){this._chatId=e.chatId,this._answerId=e.answerId,this._queryMethods=e.queryMethods,this._expanded=void 0===e.expanded||e.expanded}get chatId(){return this._chatId}set chatId(e){this._chatId=e}get answerId(){return this._answerId}set answerId(e){this._answerId=e}get queryMethods(){return this._queryMethods}set queryMethods(e){this._queryMethods=e}get expanded(){return this._expanded}set expanded(e){this._expanded=e}}class r{constructor(e=[]){this._items=e}get items(){return this._items}set items(e){this._items=e}}class a{constructor(e={}){this._name=e.name,this._rawQuery=e.rawQuery,this._query=e.query,this._queryType=e.queryType,this._errorMessage=e.errorOutput}get name(){return this._name}set name(e){this._name=e}get rawQuery(){return this._rawQuery}set rawQuery(e){this._rawQuery=e}get query(){return this._query}set query(e){this._query=e}get queryType(){return this._queryType}set queryType(e){this._queryType=e}get errorMessage(){return this._errorMessage}set errorMessage(e){this._errorMessage=e}}const i={SPARQL:"sparql",JSON:"json",OTHER:"other"}},136:function(e,t,s){"use strict";s.r(t),s.d(t,"chatMessageModelListMapper",(function(){return i})),s.d(t,"chatItemsModelMapper",(function(){return o})),s.d(t,"chatMessageModelMapper",(function(){return d})),s.d(t,"chatAnswerModelMapper",(function(){return h}));var n=s(79),r=s(83),a=s(108);const i=e=>e?e.map(e=>d(e)):[],o=(e=[])=>{const t=[];let s;return e.forEach(e=>{const a=e.conversationId;n.CHAT_MESSAGE_ROLE.USER===e.role?(s&&t.push(s),s=new r.ChatItemModel(a,d(e))):(s||(s=new r.ChatItemModel(a,null)),s.answers.push(d(e)),s.agentId=e.agentId)}),s&&t.push(s),new r.ChatItemsListModel(t)},d=e=>{if(e)return new n.ChatMessageModel({id:e.id,role:e.role,message:e.message,timestamp:e.timestamp,data:e})},h=e=>{if(e)return new a.ChatAnswerModel({chatId:e.id,chatName:e.name,timestamp:e.timestamp,messages:i(e.messages),continueRunId:e.continueRunId})}},159:function(e,t,s){"use strict";s.r(t),s.d(t,"TtygRestServiceFakeBackend",(function(){return a}));var n=s(31),r=s(79);class a{constructor(){this.conversations=[...i]}getConversations(){return new Promise(e=>{setTimeout(()=>e({data:Object(n.cloneDeep)(this.conversations)}),2e3)})}getConversation(e){return new Promise(t=>{setTimeout(()=>t({data:Object(n.cloneDeep)(this.conversations.find(t=>t.id===e))}),2e3)})}renameConversation(e,t){const s=this.conversations.find(t=>t.id===e);return s&&(s.name=t.name),Promise.resolve({data:Object(n.cloneDeep)(s)})}exportConversation(e){return console.log("Exporting conversation with id: ",e),Promise.resolve()}askQuestion(e){const t={id:"msg_Bn07kVDCYT1qmgu1G7Zw0KNe",conversationId:e.conversationId,agentId:null,message:""+e.question,role:r.CHAT_MESSAGE_ROLE.USER,timestamp:Math.floor(Date.now()/1e3)},s=this.conversations.find(t=>t.id===e.conversationId),n={id:e.conversationId,name:s?s.name:"Han Solo is a character in the Star Wars...",timestamp:Math.floor(Date.now()/1e3),messages:[{id:"msg_Bn07kVDCYT1qmgu1G7Zw0KNe_"+Date.now(),conversationId:e.conversationId,role:r.CHAT_MESSAGE_ROLE.ASSISTANT,agentId:e.agentId,message:'Certainly! Here\'s a random example that incorporates code, JSON, and a SPARQL query:\n\n### Code (Python)\n\n```python\ndef greet(name):\n return f"Hello, {name}!"\n\nprint(greet("World"))\n```\n\n### JSON\n\n```json\n{\n "greeting": "Hello",\n "target": "World",\n "language": "English"\n}\n```\n\n### SPARQL Query\n\n```sparql\nSELECT ?person ?name\nWHERE {\n ?person a ex:Person .\n ?person ex:hasName ?name .\n}\nLIMIT 10\n```\n\nThis example demonstrates a simple Python function for greeting, a JSON object representing a greeting structure, and a SPARQL query to retrieve names of persons from a dataset.',timestamp:Math.floor(Date.now()/1e3),name:null},{id:"msg_Bn07kVDCYT1qmgu1G7Zw0KNeс_"+Date.now(),conversationId:e.conversationId,role:r.CHAT_MESSAGE_ROLE.ASSISTANT,agentId:e.agentId,message:`Reply to '${e.question}' It seems there was an error with the query. Let me rectify this and try again.`,timestamp:Math.floor(Date.now()/1e3),name:null}]};return s&&(s.messages.push(t),s.messages.push(...n.messages)),new Promise(e=>setTimeout(()=>e({data:n}),2e3))}continueChatRun(e){alert("continueChatRun() not implemented")}deleteConversation(e){return this.conversations=this.conversations.filter(t=>t.id!==e),new Promise(e=>setTimeout(()=>e(),2e3))}createConversation(e){const t={id:"thread_"+this.conversations.length,name:"Thread "+this.conversations.length,timestamp:Math.floor(Date.now()/1e3),messages:[]};this.conversations.unshift(t);const s=Object(n.cloneDeep)(e);return s.conversationId=t.id,this.askQuestion(s)}getAgents(){return new Promise(e=>setTimeout(()=>e({data:[...o]}),2e3))}getAgent(e){return Promise.resolve({data:Object(n.cloneDeep)(o.find(t=>t.id===e))})}createAgent(e){return"err"===e.name?new Promise((e,t)=>setTimeout(()=>t({status:500,message:"Internal Server Error"}),2e3)):(o.push(e),new Promise(t=>setTimeout(()=>t({data:e}),2e3)))}editAgent(e){return"err"===e.name?new Promise((e,t)=>setTimeout(()=>t({status:500,message:"Internal Server Error"}),2e3)):(o=o.map(t=>t.id===e.id?e:t),new Promise(t=>setTimeout(()=>t({data:e}),2e3)))}deleteAgent(e){return o=o.filter(t=>t.id!==e),Promise.resolve()}getAgentDefaultValues(){return Promise.resolve({data:d})}explainAgentSettings(){return Promise.resolve({data:{}})}simulateHttpError(){return Promise.reject({status:500,message:"Internal Server Error"})}explainResponse(e){return Promise.resolve({data:{conversationId:e.conversationId,answerId:e.answerId,queryMethods:[{name:"sparql_query",rawQuery:'SELECT ?character ?name ?height WHERE {\n ?character a voc:Character;\n rdfs:label ?name;\n voc:height ?height.\n FILTER(?name = "Luke Skywalker" || ?name = "Leia Organa")\n}',query:'SELECT ?character ?name ?height WHERE {\n ?character a voc:Character;\n rdfs:label ?name;\n voc:height ?height.\n FILTER(?name = "Luke Skywalker" || ?name = "Leia Organa")\n}',queryType:"sparql",errorOutput:"Error: org.eclipse.rdf4j.query.MalformedQueryException: org.eclipse.rdf4j.query.parser.sparql.ast.VisitorException: QName 'voc:Character' uses an undefined prefix"},{name:"retrieval_search",rawQuery:'{"queries":[{"query":"pilots that work with Luke Skywalker","filter":{"document_id":"https://swapi.co/resource/human/1"},"top_k":3}]}',query:'{\n "queries" : [ {\n "query" : "pilots that work with Luke Skywalker",\n "filter" : {\n "document_id" : "https://swapi.co/resource/human/1"\n },\n "top_k" : 3\n } ]\n}',queryType:"json",errorOutput:null},{name:"iri_discovery",rawQuery:"Luke Skywalker",query:"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nPREFIX skos: <http://www.w3.org/2004/02/skos/core#>\nPREFIX onto: <http://www.ontotext.com/>\nSELECT ?label ?iri {\n ?label onto:fts ('''Luke~ Skywalker~''' '*') .\n ?iri rdfs:label|skos:prefLabel ?label .\n}",queryType:"sparql",errorOutput:null},{name:"sparql_query",rawQuery:"SELECT ?height WHERE {\n <https://swapi.co/resource/human/1> voc:height ?height.\n}",query:"SELECT ?height WHERE {\n <https://swapi.co/resource/human/1> voc:height ?height.\n}",queryType:"sparql",errorOutput:"Error: org.eclipse.rdf4j.query.MalformedQueryException: org.eclipse.rdf4j.query.parser.sparql.ast.VisitorException: QName 'voc:height' uses an undefined prefix"},{name:"sparql_query",rawQuery:'PREFIX voc: <https://swapi.co/vocabulary/>\nSELECT ?name ?height WHERE {\n ?character voc:height ?height;\n rdfs:label ?name.\n FILTER(?name = "Luke Skywalker" || ?name = "Leia Organa")\n}',query:'PREFIX voc: <https://swapi.co/vocabulary/>\nSELECT ?name ?height WHERE {\n ?character voc:height ?height;\n rdfs:label ?name.\n FILTER(?name = "Luke Skywalker" || ?name = "Leia Organa")\n}',queryType:"sparql",errorOutput:null},{name:"fts_search",rawQuery:"Second Luke",query:"PREFIX onto: <http://www.ontotext.com/>\nDESCRIBE ?iri {\n\t?x onto:fts '''Second Luke''' .\n\t{\n\t\t?x ?p ?iri .\n\t} union {\n\t\t?iri ?p ?x .\n\t}\n}",queryType:"sparql",errorOutput:null},{name:"similarity_search",rawQuery:"Second Luke",query:"PREFIX onto: <http://www.ontotext.com/>\nDESCRIBE ?iri {\n\t?x onto:fts '''Second Luke''' .\n\t{\n\t\t?x ?p ?iri .\n\t} union {\n\t\t?iri ?p ?x .\n\t}\n}",queryType:"sparql",errorOutput:null},{name:"iri_discovery",rawQuery:"Luke Skywalker",query:"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nPREFIX skos: <http://www.w3.org/2004/02/skos/core#>\nPREFIX onto: <http://www.ontotext.com/>\nSELECT ?label ?iri {\n ?label onto:fts ('''Luke~ Skywalker~''' '*') .\n ?iri rdfs:label|skos:prefLabel ?label .\n}",queryType:"sparql",errorOutput:null}]}})}}const i=[{id:"thread_jdQBvbkaU6JPoO48oFbC54dA",name:"Very long chat name which does not fit in the sidebar",timestamp:1725235200,messages:[]},{id:"thread_jdQBvbkaU6JPoO48oQaL76dB",name:"Test chat 2",timestamp:1725238800,messages:[]},{id:"thread_jdQBvbkaU6JPoO48oQaL76dC",name:"Test chat 3",timestamp:1725242400,messages:[]},{id:"thread_jdQBvbkaU6JPoO48oFbC54dD",name:"Test chat 4",timestamp:1697331600,messages:[]}];let o=[{id:"asst_gAPcrHQQ9ZIxD5eXWH2BNFfo",name:"agent-1",model:"gpt-4o",temperature:0,topP:0,seed:null,repositoryId:"starwars",instructions:{systemInstruction:"\n\n",userInstruction:""},assistantExtractionMethods:[{ftsMethod:"fts_search"}],maxNumberOfTriplesPerCall:null},{id:"asst_qMyCpCBmqxV9I2B8UoMfFzc5",name:"agent-2",model:"gpt-4o",temperature:0,topP:0,seed:null,repositoryId:"Non existing repo",instructions:{systemInstruction:"string\n\nstring",userInstruction:"string"},assistantExtractionMethods:[{ftsMethod:"fts_search"}],maxNumberOfTriplesPerCall:null},{id:"asst_Cr0RxobrY07WpOvvyQilEWMI",name:"Databricks-general-unbiased",model:"gpt-4o-2024-08-06",temperature:1,topP:1,seed:null,repositoryId:"starwars",instructions:{systemInstruction:"You are helpful assistant in discovering information regarding diagnostic biomarkers.",userInstruction:null},assistantExtractionMethods:[],maxNumberOfTriplesPerCall:null},{id:"asst_5GxNYTdaOh7Tl6lLl6Pya2aH",name:"Databricks-biomarkers",model:"gpt-3.5-turbo-0125",temperature:1,topP:1,seed:null,repositoryId:"biomarkers",instructions:{systemInstruction:"You're a helpful assistant in discovering new diagnostic biomarkers for given diseases. I'll submit a set of publication abstracts discussing given disease and your task is to find in the abstracts any potential new biomarkers which are not yet listed in the appropriate databases. Each abstract is preceded by identifier - its PubMed id called for short PMID. \n\nReturn the set of biomarkers listed one per row, each marker followed by the | and PMID of the respective abstract if was mentioned in.\n\nExample: \nInput: 36418457\t[Amyotrophic lateral sclerosis (ALS) is a genetically and phenotypically heterogeneous disease results in the loss of motor neurons. Mounting information points to involvement of other systems including cognitive impairment. However, neither the valid biomarker for diagnosis nor effective therapeutic intervention is available for ALS. The present study is aimed at identifying potentially genetic biomarker that improves the diagnosis and treatment of ALS patients based on the data of the Gene Expression Omnibus. We retrieved datasets and conducted a weighted gene co-expression network analysis (WGCNA) to identify ALS-related co-expression genes. Functional enrichment analysis was performed to determine the features and pathways of the main modules. We then constructed an ALS-related model using the least absolute shrinkage and selection operator (LASSO) regression analysis and verified the model by the receiver operating characteristic (ROC) curve. Besides we screened the non-preserved gene modules in FTD and ALS-mimic disorders to distinct ALS-related genes from disorders with overlapping genes and features. Altogether, 4198 common genes between datasets with the most variation were analyzed and 16 distinct modules were identified through WGCNA. Blue module had the most correlation with ALS and functionally enriched in pathways of neurodegeneration-multiple diseases', 'amyotrophic lateral sclerosis', and 'endocytosis' KEGG terms. Further, some of other modules related to ALS were enriched in 'autophagy' and 'amyotrophic lateral sclerosis'. The 30 top of hub genes were recruited to a LASSO regression model and 5 genes (BCLAF1, GNA13, ARL6IP5, ARGLU1, and YPEL5) were identified as potentially diagnostic ALS biomarkers with validating of the ROC curve and AUC value.]\n\nYour response: BCLAF1|36418457\nGNA13|36418457\nARL6IP5|36418457\nARGLU1|36418457\nYPEL5|36418457",userInstruction:null},assistantExtractionMethods:[],maxNumberOfTriplesPerCall:null}];const d={id:"id",name:"Quadro",model:"gpt-4o",temperature:.7,topP:1,seed:0,repositoryId:"test-repository",instructions:{systemInstruction:"You are a helpful, knowledgeable, and friendly assistant. Your goal is to provide clear and accurate information while being polite, respectful, and professional.",userInstruction:"If you need to write a SPARQL query, use only the classes and properties provided in the schema and don't invent or guess any. Always try to return human-readable names or labels and not only the IRIs. If SPARQL fails to provide the necessary information you can try another tool too."},assistantExtractionMethods:[{method:"sparql_search",ontologyGraph:"http://example.com",sparqlQuery:"CONSTRUCT {?s ?p ?o} WHERE {GRAPH <http://example.org/ontology> {?s ?p ?o .}}"},{method:"fts_search",maxNumberOfTriplesPerCall:0},{method:"similarity_search",similarityIndex:"similarity-index",similarityIndexThreshold:.6,maxNumberOfTriplesPerCall:0},{method:"retrieval_search",retrievalConnectorInstance:"retrieval-connector",queryTemplate:'{"query": "string"}',maxNumberOfTriplesPerCall:0}],additionalExtractionMethods:[{method:"iri_discovery_search"}]}},160:function(e,t,s){"use strict";s.r(t),s.d(t,"agentFormModelMapper",(function(){return d})),s.d(t,"agentListMapper",(function(){return c})),s.d(t,"agentModelMapper",(function(){return l}));var n=s(102),r=s(225),a=s(80),i=s(17),o=s(94);const d=(e,t,s)=>{if(!e)return;const n=new r.AgentFormModel;return n.id=e.id||t.id,n.name=e.name||t.name,n.repositoryId=e.repositoryId||t.repositoryId,n.model=e.model||t.model,n.temperature.value=void 0!==e.temperature?e.temperature:t.temperature,n.topP.value=void 0!==e.topP?e.topP:t.topP,n.seed=e.seed||t.seed,n.instructions=h(e.instructions,t.instructions),u(n,s,t.assistantExtractionMethods,e.assistantExtractionMethods),n.additionalExtractionMethods.additionalExtractionMethods.forEach(t=>{t.selected=e.additionalExtractionMethods&&e.additionalExtractionMethods.some(e=>e.method===t.method)}),n},h=(e,t)=>{if(!e&&!t)return;const s=e&&e.systemInstruction||t.systemInstruction,n=e&&e.userInstruction||t.userInstruction;return new r.AgentInstructionsFormModel({systemInstruction:s,userInstruction:n,defaultSystemInstruction:t.systemInstruction,defaultUserInstruction:t.userInstruction})},u=(e,t,s,n=[])=>{const i=s.filter(e=>!n.some(t=>t.method===e.method));[...n,...i].forEach(s=>{const i=n.some(e=>e.method===s.method);let d="";i&&"sparql_search"===s.method&&(o.AGENT_OPERATION.CREATE===t?d="":s.sparqlQuery?d="sparqlQuery":s.ontologyGraph&&(d="ontologyGraph"));const h=t===o.AGENT_OPERATION.EDIT||t===o.AGENT_OPERATION.CLONE,u=new r.ExtractionMethodFormModel({selected:h&&i,method:s.method,sparqlOption:d,ontologyGraph:s.ontologyGraph,addMissingNamespaces:s.addMissingNamespaces,sparqlQuery:s.sparqlQuery&&new a.TextFieldModel({value:s.sparqlQuery,minLength:1,maxLength:2380}),similarityIndex:s.similarityIndex,similarityIndexThreshold:s.similarityIndexThreshold&&new a.NumericRangeModel({value:s.similarityIndexThreshold,minValue:0,maxValue:1,step:.1}),maxNumberOfTriplesPerCall:0===s.maxNumberOfTriplesPerCall?null:s.maxNumberOfTriplesPerCall,queryTemplate:s.queryTemplate&&new a.TextFieldModel({value:s.queryTemplate,minLength:1,maxLength:2380}),retrievalConnectorInstance:s.retrievalConnectorInstance});e.assistantExtractionMethods.setExtractionMethod(u)})},c=(e,t)=>{if(!e)return new n.AgentListModel;const s=e.map(e=>l(e,t));return new n.AgentListModel(s)},l=(e,t)=>{if(!e)return;const s=Object(i.md5HashGenerator)();return new n.AgentModel({id:e.id,name:e.name,repositoryId:e.repositoryId,isRepositoryDeleted:!t.includes(e.repositoryId),model:e.model,temperature:e.temperature,topP:e.topP,seed:e.seed,instructions:f(e.instructions),assistantExtractionMethods:m(e.assistantExtractionMethods),additionalExtractionMethods:g(e.additionalExtractionMethods)},s)},m=e=>{if(e)return e.map(e=>p(e))},p=e=>{if(e)return new n.ExtractionMethodModel({method:e.method,ontologyGraph:e.ontologyGraph,addMissingNamespaces:e.addMissingNamespaces,sparqlQuery:e.sparqlQuery,similarityIndex:e.similarityIndex,similarityIndexThreshold:e.similarityIndexThreshold,maxNumberOfTriplesPerCall:e.maxNumberOfTriplesPerCall,queryTemplate:e.queryTemplate,retrievalConnectorInstance:e.retrievalConnectorInstance})},g=e=>{if(e)return e.map(e=>y(e))},y=e=>{if(e)return new n.AdditionalExtractionMethodModel({method:e.method})},f=e=>{if(e)return new n.AgentInstructionsModel({systemInstruction:e.systemInstruction,userInstruction:e.userInstruction})}},161:function(e,t,s){"use strict";s.r(t),s.d(t,"AgentInstructionsExplain",(function(){return n})),s.d(t,"AgentInstructionsExplainList",(function(){return r}));class n{constructor(e){this._type=e.type,this._content=e.content,this._size=e.size}get size(){return this._size}set size(e){this._size=e}get content(){return this._content}set content(e){this._content=e}get type(){return this._type}set type(e){this._type=e}}class r{constructor(e){this._instructions=e.instructions}get instructions(){return this._instructions}set instructions(e){this._instructions=e}}},223:function(e,t,s){"use strict";s.r(t),s.d(t,"chatsListMapper",(function(){return d})),s.d(t,"chatModelMapper",(function(){return h}));var n=s(98),r=s(17),a=s(136),i=s(83);const o=Object(r.md5HashGenerator)(),d=e=>{if(!e)return new n.ChatsListModel;const t=e.map(e=>h(e));return new n.ChatsListModel(t)},h=e=>{if(e)return new n.ChatModel({id:e.id,name:e.name,timestamp:e.timestamp,chatHistory:e.messages&&e.messages.length?Object(a.chatItemsModelMapper)(e.messages):new i.ChatItemsListModel},o)}},224:function(e,t,s){"use strict";s.r(t);var n=s(159);angular.module("graphdb.framework.rest.ttyg.service",[]).factory("TTYGRestService",r),r.$inject=["$http"];function r(e){new n.TtygRestServiceFakeBackend;return{getConversation:t=>e.get("rest/chat/conversations/"+t),renameConversation:(t,s)=>e.put("rest/chat/conversations/"+t,s),exportConversation:t=>e.get("rest/chat/conversations/export/"+t,{responseType:"blob"}),askQuestion:t=>e.post("rest/chat/conversations",t),continueChatRun:t=>e.post("rest/chat/conversations/continue",t),getConversations:()=>e.get("rest/chat/conversations"),deleteConversation:t=>e.delete("rest/chat/conversations/"+t),createConversation:(t={})=>e.post("rest/chat/conversations",t),getAgents:()=>e.get("rest/chat/agents"),getAgent:t=>e.get("rest/chat/agents/"+t),createAgent:t=>e.post("rest/chat/agents",t),editAgent:t=>e.put("rest/chat/agents",t),deleteAgent:t=>e.delete("rest/chat/agents/"+t),explainResponse:(t={})=>e.post("rest/chat/conversations/explain",t),getAgentDefaultValues:()=>e.get("rest/chat/agents/default"),explainAgentSettings:t=>e.post("rest/chat/agents/explain",t)}}},226:function(e,t,s){"use strict";s.r(t),s.d(t,"explainResponseMapper",(function(){return r})),s.d(t,"explainQueryMethodsListMapper",(function(){return a})),s.d(t,"explainQueryMethodMapper",(function(){return i}));var n=s(118);const r=e=>new n.ExplainResponseModel({chatId:e.conversationId,answerId:e.answerId,queryMethods:a(e.queryMethods)}),a=(e=[])=>new n.ExplainQueryMethodsListModel(e.map(i)),i=e=>new n.ExplainQueryMethodModel(e)},227:function(e,t,s){"use strict";s.r(t),s.d(t,"agentInstructionsExplainMapper",(function(){return r}));var n=s(161);const r=e=>e?e.map(e=>new n.AgentInstructionsExplain(e)):new n.AgentInstructionsExplainList([])},79:function(e,t,s){"use strict";s.r(t),s.d(t,"ChatMessageModel",(function(){return n})),s.d(t,"CHAT_MESSAGE_ROLE",(function(){return r}));class n{constructor(e){this._id=e.id,this._role=e.role,this._message=e.message,this._timestamp=1e3*e.timestamp}get id(){return this._id}set id(e){this._id=e}get role(){return this._role}set role(e){this._role=e}get message(){return this._message}set message(e){this._message=e}get timestamp(){return this._timestamp}set timestamp(e){this._timestamp=e}}const r={USER:"user",ASSISTANT:"assistant"}},83:function(e,t,s){"use strict";s.r(t),s.d(t,"ChatItemModel",(function(){return r})),s.d(t,"ChatItemsListModel",(function(){return a}));var n=s(79);class r{constructor(e,t){this._chatId=e,this._agentId=void 0,this._question=t,this._answers=[]}get chatId(){return this._chatId}set chatId(e){this._chatId=e}get agentId(){return this._agentId}set agentId(e){this._agentId=e}get question(){return this._question}set question(e){this._question=e}get answers(){return this._answers}set answers(e){this._answers=e}setQuestionMessage(e){this._question||(this._question=new n.ChatMessageModel({role:n.CHAT_MESSAGE_ROLE.USER})),this._question.message=e}getQuestionMessage(){return this._question.message}toCreateChatRequestPayload(){return{agentId:this._agentId,question:this._question.message}}toAskRequestPayload(){return{conversationId:this._chatId,agentId:this._agentId,question:this._question.message}}toExplainResponsePayload(e){return{conversationId:this._chatId,answerId:e}}}class a{constructor(e=[]){this._items=e}isEmpty(){return 0===this._items.length}appendItem(e){this._items.push(e)}get items(){return this._items}set items(e){this._items=e||[]}getLast(){if(!this.isEmpty())return this._items[this._items.length-1]}}},98:function(e,t,s){"use strict";s.r(t),s.d(t,"ChatModel",(function(){return a})),s.d(t,"ChatByDayModel",(function(){return i})),s.d(t,"ChatsListModel",(function(){return o}));var n=s(83),r=s(17);class a{static getEmptyChat(){const e={name:"· · ·",timestamp:Math.floor(Date.now()/1e3)};return new a(e,Object(r.md5HashGenerator)())}constructor(e,t){this.hashGenerator=t,this._id=e.id,this._name=e.name,this._timestamp=e.timestamp,this._chatHistory=e.chatHistory||new n.ChatItemsListModel,this.hash=this.generateHash()}generateHash(){return this.hashGenerator(JSON.stringify(this))}get id(){return this._id}set id(e){this._id=e}get name(){return this._name}set name(e){this.generateHash(),this._name=e}get timestamp(){return this._timestamp}set timestamp(e){this._timestamp=e}get chatHistory(){return this._chatHistory}set chatHistory(e){this._chatHistory=e||new n.ChatItemsListModel}toRenameRequestPayload(){return{name:this._name}}}class i{constructor(e){this._day=e.day,this._timestamp=e.timestamp,this._chats=e.chats}get day(){return this._day}set day(e){this._day=e}get timestamp(){return this._timestamp}set timestamp(e){this._timestamp=e}get chats(){return this._chats}set chats(e){this._chats=e}}class o{constructor(e){this._chats=e||[],this._chatsByDay=[],this.sortByTime(),this.updateChatsByDay()}sortByTime(){this._chats.sort((e,t)=>t.timestamp-e.timestamp)}updateChatTimestamp(e,t){const s=this._chats.find(t=>t.id===e);s&&(s.timestamp=t,this.sortByTime(),this.updateChatsByDay())}updateChatName(e,t){const s=this._chats.find(t=>t.id===e);s&&(s.name=t)}deleteChat(e){this._chats=this._chats.filter(t=>t.id!==e.id),this.sortByTime(),this.updateChatsByDay()}updateChatsByDay(){this._chatsByDay=[],this._chats.forEach(e=>{const t=new Date(1e3*e.timestamp).toDateString(),s=this._chatsByDay.find(e=>e.day===t);s?s.chats.push(e):this._chatsByDay.push(new i({day:t,timestamp:1e3*e.timestamp,chats:[e]}))})}appendChat(e){this._chats.push(e),this.sortByTime(),this.updateChatsByDay()}replaceChat(e,t){this._chats=this._chats.map(s=>s.id===t.id?e:s),this.sortByTime(),this.updateChatsByDay()}isEmpty(){return 0===this._chats.length}getFirstChat(){return this._chats[0]}deselectAll(){this._chats.forEach(e=>{e.selected=!1})}selectChat(e){this.deselectAll(),this._chats.forEach(t=>{t.selected=t.id===e.id})}getChat(e){return this._chats.find(t=>t.id===e)}getNonPersistedChat(){return this._chats.find(e=>!e.id)}renameChat(e){const t=this._chats.find(t=>t.id===e.id);t&&(t.name=e.name)}get chats(){return this._chats}set chats(e){this._chats=e}get chatsByDay(){return this._chatsByDay}set chatsByDay(e){this._chatsByDay=e}}}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[64,105,265,266],{108:function(t,e,s){"use strict";s.r(e),s.d(e,"ChatAnswerModel",(function(){return n})),s.d(e,"ContinueChatRun",(function(){return i}));class n{constructor(t={}){this._chatId=t.chatId,this._chatName=t.chatName||"",this._timestamp=t.timestamp,this._messages=t.messages||[],this._continueRunId=t.continueRunId}get chatId(){return this._chatId}set chatId(t){this._chatId=t}get chatName(){return this._chatName}set chatName(t){this._chatName=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}get messages(){return this._messages}set messages(t){this._messages=t}get continueRunId(){return this._continueRunId}set continueRunId(t){this._continueRunId=t}}class i{constructor(t,e){this._chatItem=t,this._runId=e}get chatId(){return this._chatItem.chatId}toContinueRunRequestPayload(){return{conversationId:this.chatId,runId:this._runId,lastMessageId:this._chatItem.answers[this._chatItem.answers.length-1].id,agentId:this._chatItem.agentId}}}},136:function(t,e,s){"use strict";s.r(e),s.d(e,"chatMessageModelListMapper",(function(){return r})),s.d(e,"chatItemsModelMapper",(function(){return h})),s.d(e,"chatMessageModelMapper",(function(){return u})),s.d(e,"chatAnswerModelMapper",(function(){return o}));var n=s(79),i=s(83),a=s(108);const r=t=>t?t.map(t=>u(t)):[],h=(t=[])=>{const e=[];let s;return t.forEach(t=>{const a=t.conversationId;n.CHAT_MESSAGE_ROLE.USER===t.role?(s&&e.push(s),s=new i.ChatItemModel(a,u(t))):(s||(s=new i.ChatItemModel(a,null)),s.answers.push(u(t)),s.agentId=t.agentId)}),s&&e.push(s),new i.ChatItemsListModel(e)},u=t=>{if(t)return new n.ChatMessageModel({id:t.id,role:t.role,message:t.message,timestamp:t.timestamp,data:t})},o=t=>{if(t)return new a.ChatAnswerModel({chatId:t.id,chatName:t.name,timestamp:t.timestamp,messages:r(t.messages),continueRunId:t.continueRunId})}},79:function(t,e,s){"use strict";s.r(e),s.d(e,"ChatMessageModel",(function(){return n})),s.d(e,"CHAT_MESSAGE_ROLE",(function(){return i}));class n{constructor(t){this._id=t.id,this._role=t.role,this._message=t.message,this._timestamp=1e3*t.timestamp}get id(){return this._id}set id(t){this._id=t}get role(){return this._role}set role(t){this._role=t}get message(){return this._message}set message(t){this._message=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}}const i={USER:"user",ASSISTANT:"assistant"}},83:function(t,e,s){"use strict";s.r(e),s.d(e,"ChatItemModel",(function(){return i})),s.d(e,"ChatItemsListModel",(function(){return a}));var n=s(79);class i{constructor(t,e){this._chatId=t,this._agentId=void 0,this._question=e,this._answers=[]}get chatId(){return this._chatId}set chatId(t){this._chatId=t}get agentId(){return this._agentId}set agentId(t){this._agentId=t}get question(){return this._question}set question(t){this._question=t}get answers(){return this._answers}set answers(t){this._answers=t}setQuestionMessage(t){this._question||(this._question=new n.ChatMessageModel({role:n.CHAT_MESSAGE_ROLE.USER})),this._question.message=t}getQuestionMessage(){return this._question.message}toCreateChatRequestPayload(){return{agentId:this._agentId,question:this._question.message}}toAskRequestPayload(){return{conversationId:this._chatId,agentId:this._agentId,question:this._question.message}}toExplainResponsePayload(t){return{conversationId:this._chatId,answerId:t}}}class a{constructor(t=[]){this._items=t}isEmpty(){return 0===this._items.length}appendItem(t){this._items.push(t)}get items(){return this._items}set items(t){this._items=t||[]}getLast(){if(!this.isEmpty())return this._items[this._items.length-1]}}}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[77,105,266],{79:function(t,s,e){"use strict";e.r(s),e.d(s,"ChatMessageModel",(function(){return i})),e.d(s,"CHAT_MESSAGE_ROLE",(function(){return a}));class i{constructor(t){this._id=t.id,this._role=t.role,this._message=t.message,this._timestamp=1e3*t.timestamp}get id(){return this._id}set id(t){this._id=t}get role(){return this._role}set role(t){this._role=t}get message(){return this._message}set message(t){this._message=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}}const a={USER:"user",ASSISTANT:"assistant"}},83:function(t,s,e){"use strict";e.r(s),e.d(s,"ChatItemModel",(function(){return a})),e.d(s,"ChatItemsListModel",(function(){return h}));var i=e(79);class a{constructor(t,s){this._chatId=t,this._agentId=void 0,this._question=s,this._answers=[]}get chatId(){return this._chatId}set chatId(t){this._chatId=t}get agentId(){return this._agentId}set agentId(t){this._agentId=t}get question(){return this._question}set question(t){this._question=t}get answers(){return this._answers}set answers(t){this._answers=t}setQuestionMessage(t){this._question||(this._question=new i.ChatMessageModel({role:i.CHAT_MESSAGE_ROLE.USER})),this._question.message=t}getQuestionMessage(){return this._question.message}toCreateChatRequestPayload(){return{agentId:this._agentId,question:this._question.message}}toAskRequestPayload(){return{conversationId:this._chatId,agentId:this._agentId,question:this._question.message}}toExplainResponsePayload(t){return{conversationId:this._chatId,answerId:t}}}class h{constructor(t=[]){this._items=t}isEmpty(){return 0===this._items.length}appendItem(t){this._items.push(t)}get items(){return this._items}set items(t){this._items=t||[]}getLast(){if(!this.isEmpty())return this._items[this._items.length-1]}}},98:function(t,s,e){"use strict";e.r(s),e.d(s,"ChatModel",(function(){return h})),e.d(s,"ChatByDayModel",(function(){return n})),e.d(s,"ChatsListModel",(function(){return r}));var i=e(83),a=e(17);class h{static getEmptyChat(){const t={name:"· · ·",timestamp:Math.floor(Date.now()/1e3)};return new h(t,Object(a.md5HashGenerator)())}constructor(t,s){this.hashGenerator=s,this._id=t.id,this._name=t.name,this._timestamp=t.timestamp,this._chatHistory=t.chatHistory||new i.ChatItemsListModel,this.hash=this.generateHash()}generateHash(){return this.hashGenerator(JSON.stringify(this))}get id(){return this._id}set id(t){this._id=t}get name(){return this._name}set name(t){this.generateHash(),this._name=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}get chatHistory(){return this._chatHistory}set chatHistory(t){this._chatHistory=t||new i.ChatItemsListModel}toRenameRequestPayload(){return{name:this._name}}}class n{constructor(t){this._day=t.day,this._timestamp=t.timestamp,this._chats=t.chats}get day(){return this._day}set day(t){this._day=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}get chats(){return this._chats}set chats(t){this._chats=t}}class r{constructor(t){this._chats=t||[],this._chatsByDay=[],this.sortByTime(),this.updateChatsByDay()}sortByTime(){this._chats.sort((t,s)=>s.timestamp-t.timestamp)}updateChatTimestamp(t,s){const e=this._chats.find(s=>s.id===t);e&&(e.timestamp=s,this.sortByTime(),this.updateChatsByDay())}updateChatName(t,s){const e=this._chats.find(s=>s.id===t);e&&(e.name=s)}deleteChat(t){this._chats=this._chats.filter(s=>s.id!==t.id),this.sortByTime(),this.updateChatsByDay()}updateChatsByDay(){this._chatsByDay=[],this._chats.forEach(t=>{const s=new Date(1e3*t.timestamp).toDateString(),e=this._chatsByDay.find(t=>t.day===s);e?e.chats.push(t):this._chatsByDay.push(new n({day:s,timestamp:1e3*t.timestamp,chats:[t]}))})}appendChat(t){this._chats.push(t),this.sortByTime(),this.updateChatsByDay()}replaceChat(t,s){this._chats=this._chats.map(e=>e.id===s.id?t:e),this.sortByTime(),this.updateChatsByDay()}isEmpty(){return 0===this._chats.length}getFirstChat(){return this._chats[0]}deselectAll(){this._chats.forEach(t=>{t.selected=!1})}selectChat(t){this.deselectAll(),this._chats.forEach(s=>{s.selected=s.id===t.id})}getChat(t){return this._chats.find(s=>s.id===t)}getNonPersistedChat(){return this._chats.find(t=>!t.id)}renameChat(t){const s=this._chats.find(s=>s.id===t.id);s&&(s.name=t.name)}get chats(){return this._chats}set chats(t){this._chats=t}get chatsByDay(){return this._chatsByDay}set chatsByDay(t){this._chatsByDay=t}}}}]);