You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2018/04/02 12:24:32 UTC
[09/24] ignite git commit: IGNITE-5466 Web Console: Configuration
reworked to cluster centric model: 1. Reworked data model. 2. Implemented
migrations. 3. Reworked UI for all screens. 4. Reworked validation. 5. Many
refactorings to improve code base
http://git-wip-us.apache.org/repos/asf/ignite/blob/7ee1683e/modules/web-console/frontend/app/modules/states/configuration/clusters/load-balancing.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/load-balancing.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/load-balancing.pug
index 4fbc54e..2f2dd3b 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/load-balancing.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/load-balancing.pug
@@ -16,92 +16,103 @@
include /app/helpers/jade/mixins
--var model = 'backupItem'
+-var model = '$ctrl.clonedCluster'
-var form = 'loadBalancing'
-var loadBalancingSpi = model + '.loadBalancingSpi'
--var loadBalancingCustom = 'model.kind === "Custom"'
--var loadProbeCustom = 'model.kind === "Adaptive" && model.Adaptive.loadProbe.kind === "Custom"'
+-var loadBalancingCustom = '$item.kind === "Custom"'
+-var loadProbeCustom = '$item.kind === "Adaptive" && $item.Adaptive.loadProbe.kind === "Custom"'
-.panel.panel-default(ng-form=form novalidate)
- .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+.pca-panel.pca-panel-default(ng-form=form novalidate)
+ .pca-panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
ignite-form-panel-chevron
- label Load balancing configuration
- ignite-form-field-tooltip.tipLabel
- | Load balancing component balances job distribution among cluster nodes#[br]
- | #[a(href="https://apacheignite.readme.io/docs/load-balancing" target="_blank") More info]
- ignite-form-revert
- .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
- .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
- .col-sm-6
- .settings-row(ng-init='loadBalancingSpiTbl={type: "loadBalancingSpi", model: "loadBalancingSpi", focusId: "kind", ui: "load-balancing-table"}')
- +ignite-form-group()
- ignite-form-field-label
- | Load balancing configurations
- ignite-form-group-tooltip
- | Load balancing component balances job distribution among cluster nodes
- ignite-form-group-add(ng-click='tableNewItem(loadBalancingSpiTbl)')
- | Add load balancing configuration
- .group-content-empty(ng-if=`!(${loadBalancingSpi} && ${loadBalancingSpi}.length > 0)`)
- | Not defined
- .group-content(ng-show=`${loadBalancingSpi} && ${loadBalancingSpi}.length > 0` ng-repeat=`model in ${loadBalancingSpi} track by $index`)
- hr(ng-if='$index != 0')
- .settings-row
- +dropdown-required-autofocus('Load balancing:', 'model.kind', '"loadBalancingKind" + $index', 'true', 'true', 'Choose load balancing SPI', '[\
- {value: "RoundRobin", label: "Round-robin"},\
- {value: "Adaptive", label: "Adaptive"},\
- {value: "WeightedRandom", label: "Random"},\
- {value: "Custom", label: "Custom"}\
- ]', 'Provides the next best balanced node for job execution\
- <ul>\
- <li>Round-robin - Iterates through nodes in round-robin fashion and pick the next sequential node</li>\
- <li>Adaptive - Adapts to overall node performance</li>\
- <li>Random - Picks a random node for job execution</li>\
- <li>Custom - Custom load balancing implementation</li>\
- </ul>')
+ .pca-panel-heading-title Load balancing configuration
+ .pca-panel-heading-description
+ | Load balancing component balances job distribution among cluster nodes.
+ | #[a.link-success(href="https://apacheignite.readme.io/docs/load-balancing" target="_blank") More info]
+ .pca-panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+ .pca-panel-body(ng-if=`ui.isPanelLoaded('${form}')`).pca-form-row
+ .pca-form-column-6
+ mixin clusters-load-balancing-spi
+ .ignite-form-field(ng-init='loadBalancingSpiTbl={type: "loadBalancingSpi", model: "loadBalancingSpi", focusId: "kind", ui: "load-balancing-table"}')
+ +ignite-form-field__label('Load balancing configurations:', '"loadBalancingConfigurations"')
+ +tooltip(`Load balancing component balances job distribution among cluster nodes`)
+ .ignite-form-field__control
+ -let items = loadBalancingSpi
- +table-remove-button(loadBalancingSpi, 'Remove load balancing SPI')
- .settings-row(ng-show='model.kind === "RoundRobin"')
- +checkbox('Per task', 'model.RoundRobin.perTask', '"loadBalancingRRPerTask" + $index', 'A new round robin order should be created for every task flag')
- .settings-row(ng-show='model.kind === "Adaptive"')
- +dropdown('Load probe:', 'model.Adaptive.loadProbe.kind', '"loadBalancingAdaptiveLoadProbeKind" + $index', 'true', 'Default', '[\
- {value: "Job", label: "Job count"},\
- {value: "CPU", label: "CPU load"},\
- {value: "ProcessingTime", label: "Processing time"},\
- {value: "Custom", label: "Custom"},\
- {value: null, label: "Default"}\
- ]', 'Implementation of node load probing\
- <ul>\
- <li>Job count - Based on active and waiting job count</li>\
- <li>CPU load - Based on CPU load</li>\
- <li>Processing time - Based on total job processing time</li>\
- <li>Custom - Custom load probing implementation</li>\
- <li>Default - Default load probing implementation</li>\
- </ul>')
- .settings-row(ng-show='model.kind === "Adaptive" && model.Adaptive.loadProbe.kind')
- .panel-details(ng-show='model.Adaptive.loadProbe.kind === "Job"')
- .details-row
- +checkbox('Use average', 'model.Adaptive.loadProbe.Job.useAverage', '"loadBalancingAdaptiveJobUseAverage" + $index', 'Use average CPU load vs. current')
- .panel-details(ng-show='model.Adaptive.loadProbe.kind === "CPU"')
- .details-row
- +checkbox('Use average', 'model.Adaptive.loadProbe.CPU.useAverage', '"loadBalancingAdaptiveCPUUseAverage" + $index', 'Use average CPU load vs. current')
- .details-row
- +checkbox('Use processors', 'model.Adaptive.loadProbe.CPU.useProcessors', '"loadBalancingAdaptiveCPUUseProcessors" + $index', "divide each node's CPU load by the number of processors on that node")
- .details-row
- +number-min-max-step('Processor coefficient:', 'model.Adaptive.loadProbe.CPU.processorCoefficient',
- '"loadBalancingAdaptiveCPUProcessorCoefficient" + $index', 'true', '1', '0.001', '1', '0.05', 'Coefficient of every CPU')
- .panel-details(ng-show='model.Adaptive.loadProbe.kind === "ProcessingTime"')
- .details-row
- +checkbox('Use average', 'model.Adaptive.loadProbe.ProcessingTime.useAverage', '"loadBalancingAdaptiveJobUseAverage" + $index', 'Use average execution time vs. current')
- .panel-details(ng-show=loadProbeCustom)
- .details-row
- +java-class('Load brobe implementation:', 'model.Adaptive.loadProbe.Custom.className', '"loadBalancingAdaptiveJobUseClass" + $index', 'true', loadProbeCustom,
- 'Custom load balancing SPI implementation class name.', loadProbeCustom)
- .settings-row(ng-show='model.kind === "WeightedRandom"')
- +number('Node weight:', 'model.WeightedRandom.nodeWeight', '"loadBalancingWRNodeWeight" + $index', 'true', 10, '1', 'Weight of node')
- .settings-row(ng-show='model.kind === "WeightedRandom"')
- +checkbox('Use weights', 'model.WeightedRandom.useWeights', '"loadBalancingWRUseWeights" + $index', 'Node weights should be checked when doing random load balancing')
- .settings-row(ng-show=loadBalancingCustom)
- +java-class('Load balancing SPI implementation:', 'model.Custom.className', '"loadBalancingClass" + $index', 'true', loadBalancingCustom,
- 'Custom load balancing SPI implementation class name.', loadBalancingCustom)
- .col-sm-6
+ list-editable(ng-model=items name='loadBalancingConfigurations')
+ list-editable-item-edit
+ - form = '$parent.form'
+ .settings-row
+ +sane-ignite-form-field-dropdown({
+ label: 'Load balancing:',
+ model: '$item.kind',
+ name: '"loadBalancingKind"',
+ required: true,
+ options: '::$ctrl.Clusters.loadBalancingKinds',
+ tip: `Provides the next best balanced node for job execution
+ <ul>
+ <li>Round-robin - Iterates through nodes in round-robin fashion and pick the next sequential node</li>
+ <li>Adaptive - Adapts to overall node performance</li>
+ <li>Random - Picks a random node for job execution</li>
+ <li>Custom - Custom load balancing implementation</li>
+ </ul>`
+ })(
+ ignite-unique=`${loadBalancingSpi}`
+ ignite-unique-property='kind'
+ )
+ +unique-feedback('"loadBalancingKind"', 'Load balancing SPI of that type is already configured')
+ .settings-row(ng-show='$item.kind === "RoundRobin"')
+ +checkbox('Per task', '$item.RoundRobin.perTask', '"loadBalancingRRPerTask"', 'A new round robin order should be created for every task flag')
+ .settings-row(ng-show='$item.kind === "Adaptive"')
+ +dropdown('Load probe:', '$item.Adaptive.loadProbe.kind', '"loadBalancingAdaptiveLoadProbeKind"', 'true', 'Default', '[\
+ {value: "Job", label: "Job count"},\
+ {value: "CPU", label: "CPU load"},\
+ {value: "ProcessingTime", label: "Processing time"},\
+ {value: "Custom", label: "Custom"},\
+ {value: null, label: "Default"}\
+ ]', 'Implementation of node load probing\
+ <ul>\
+ <li>Job count - Based on active and waiting job count</li>\
+ <li>CPU load - Based on CPU load</li>\
+ <li>Processing time - Based on total job processing time</li>\
+ <li>Custom - Custom load probing implementation</li>\
+ <li>Default - Default load probing implementation</li>\
+ </ul>')
+ .settings-row(ng-show='$item.kind === "Adaptive" && $item.Adaptive.loadProbe.kind')
+ .panel-details(ng-show='$item.Adaptive.loadProbe.kind === "Job"')
+ .details-row
+ +checkbox('Use average', '$item.Adaptive.loadProbe.Job.useAverage', '"loadBalancingAdaptiveJobUseAverage"', 'Use average CPU load vs. current')
+ .panel-details(ng-show='$item.Adaptive.loadProbe.kind === "CPU"')
+ .details-row
+ +checkbox('Use average', '$item.Adaptive.loadProbe.CPU.useAverage', '"loadBalancingAdaptiveCPUUseAverage"', 'Use average CPU load vs. current')
+ .details-row
+ +checkbox('Use processors', '$item.Adaptive.loadProbe.CPU.useProcessors', '"loadBalancingAdaptiveCPUUseProcessors"', "divide each node's CPU load by the number of processors on that node")
+ .details-row
+ +number-min-max-step('Processor coefficient:', '$item.Adaptive.loadProbe.CPU.processorCoefficient',
+ '"loadBalancingAdaptiveCPUProcessorCoefficient"', 'true', '1', '0.001', '1', '0.05', 'Coefficient of every CPU')
+ .panel-details(ng-show='$item.Adaptive.loadProbe.kind === "ProcessingTime"')
+ .details-row
+ +checkbox('Use average', '$item.Adaptive.loadProbe.ProcessingTime.useAverage', '"loadBalancingAdaptiveJobUseAverage"', 'Use average execution time vs. current')
+ .panel-details(ng-show=loadProbeCustom)
+ .details-row
+ +java-class('Load brobe implementation:', '$item.Adaptive.loadProbe.Custom.className', '"loadBalancingAdaptiveJobUseClass"', 'true', loadProbeCustom,
+ 'Custom load balancing SPI implementation class name.', loadProbeCustom)
+ .settings-row(ng-show='$item.kind === "WeightedRandom"')
+ +number('Node weight:', '$item.WeightedRandom.nodeWeight', '"loadBalancingWRNodeWeight"', 'true', 10, '1', 'Weight of node')
+ .settings-row(ng-show='$item.kind === "WeightedRandom"')
+ +checkbox('Use weights', '$item.WeightedRandom.useWeights', '"loadBalancingWRUseWeights"', 'Node weights should be checked when doing random load balancing')
+ .settings-row(ng-show=loadBalancingCustom)
+ +java-class('Load balancing SPI implementation:', '$item.Custom.className', '"loadBalancingClass"', 'true', loadBalancingCustom,
+ 'Custom load balancing SPI implementation class name.', loadBalancingCustom)
+
+ list-editable-no-items
+ list-editable-add-item-button(
+ add-item=`$ctrl.Clusters.addLoadBalancingSpi(${model})`
+ label-single='load balancing configuration'
+ label-multiple='load balancing configurations'
+ )
+
+ +clusters-load-balancing-spi
+
+ .pca-form-column-6
+preview-xml-java(model, 'clusterLoadBalancing')
http://git-wip-us.apache.org/repos/asf/ignite/blob/7ee1683e/modules/web-console/frontend/app/modules/states/configuration/clusters/logger.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger.pug
index e750365..d1676fb 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger.pug
@@ -17,20 +17,19 @@
include /app/helpers/jade/mixins
-var form = 'logger'
--var model = 'backupItem.logger'
+-var model = '$ctrl.clonedCluster.logger'
-var kind = model + '.kind'
-.panel.panel-default(ng-form=form novalidate)
- .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+.pca-panel.pca-panel-default(ng-form=form novalidate)
+ .pca-panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
ignite-form-panel-chevron
- label Logger configuration
- ignite-form-field-tooltip.tipLabel
- | Logging functionality used throughout the system
- ignite-form-revert
- .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
- .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
- .col-sm-6
- .settings-row
+ .pca-panel-heading-title Logger configuration
+ .pca-panel-heading-description
+ | Logging functionality used throughout the system.
+ .pca-panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+ .pca-panel-body(ng-if=`ui.isPanelLoaded('${form}')`).pca-form-row
+ .pca-form-column-6.pc-form-grid-row
+ .pc-form-grid-col-60
+dropdown('Logger:', kind, '"logger"', 'true', 'Default',
'[\
{value: "Log4j", label: "Apache Log4j"},\
@@ -53,14 +52,13 @@ include /app/helpers/jade/mixins
<li>Custom - custom logger implementation</li>\
<li>Default - Apache Log4j if awailable on classpath or Java logger otherwise</li>\
</ul>')
- .settings-row(ng-show=`${kind} && (${kind} === 'Log4j2' || ${kind} === 'Log4j' || ${kind} === 'Custom')`)
- .panel-details
- div(ng-show=`${kind} === 'Log4j2'`)
- include ./logger/log4j2
- div(ng-show=`${kind} === 'Log4j'`)
- include ./logger/log4j
- div(ng-show=`${kind} === 'Custom'`)
- include ./logger/custom
- .col-sm-6
- -var model = 'backupItem.logger'
+ .pc-form-group(ng-show=`${kind} && (${kind} === 'Log4j2' || ${kind} === 'Log4j' || ${kind} === 'Custom')`)
+ .pc-form-grid-row(ng-show=`${kind} === 'Log4j2'`)
+ include ./logger/log4j2
+ .pc-form-grid-row(ng-show=`${kind} === 'Log4j'`)
+ include ./logger/log4j
+ .pc-form-grid-row(ng-show=`${kind} === 'Custom'`)
+ include ./logger/custom
+ .pca-form-column-6
+ -var model = '$ctrl.clonedCluster.logger'
+preview-xml-java(model, 'clusterLogger')
http://git-wip-us.apache.org/repos/asf/ignite/blob/7ee1683e/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/custom.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/custom.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/custom.pug
index 9852e94..a717754 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/custom.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/custom.pug
@@ -17,9 +17,8 @@
include /app/helpers/jade/mixins
-var form = 'logger'
--var model = 'backupItem.logger.Custom'
--var required = 'backupItem.logger.kind === "Custom"'
+-var model = '$ctrl.clonedCluster.logger.Custom'
+-var required = '$ctrl.clonedCluster.logger.kind === "Custom"'
-div
- .details-row
- +java-class('Class:', `${model}.class`, '"customLogger"', 'true', required, 'Logger implementation class name', required)
+.pc-form-grid-col-60
+ +java-class('Class:', `${model}.class`, '"customLogger"', 'true', required, 'Logger implementation class name', required)
http://git-wip-us.apache.org/repos/asf/ignite/blob/7ee1683e/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j.pug
index c4ab379..a1cab60 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j.pug
@@ -17,34 +17,33 @@
include /app/helpers/jade/mixins
-var form = 'logger'
--var model = 'backupItem.logger.Log4j'
--var pathRequired = model + '.mode === "Path" && backupItem.logger.kind === "Log4j"'
+-var model = '$ctrl.clonedCluster.logger.Log4j'
+-var pathRequired = model + '.mode === "Path" && $ctrl.clonedCluster.logger.kind === "Log4j"'
-div
- .details-row
- +dropdown('Level:', `${model}.level`, '"log4jLevel"', 'true', 'Default',
- '[\
- {value: "OFF", label: "OFF"},\
- {value: "FATAL", label: "FATAL"},\
- {value: "ERROR", label: "ERROR"},\
- {value: "WARN", label: "WARN"},\
- {value: "INFO", label: "INFO"},\
- {value: "DEBUG", label: "DEBUG"},\
- {value: "TRACE", label: "TRACE"},\
- {value: "ALL", label: "ALL"},\
- {value: null, label: "Default"}\
- ]',
- 'Level for internal log4j implementation')
- .details-row
- +dropdown-required('Logger configuration:', `${model}.mode`, '"log4jMode"', 'true', 'true', 'Choose logger mode',
- '[\
- {value: "Default", label: "Default"},\
- {value: "Path", label: "Path"}\
- ]',
- 'Choose logger configuration\
- <ul>\
- <li>Default - default logger</li>\
- <li>Path - path or URI to XML configuration</li>\
- </ul>')
- .details-row(ng-show=pathRequired)
- +text('Path:', `${model}.path`, '"log4jPath"', pathRequired, 'Input path', 'Path or URI to XML configuration')
+.pc-form-grid-col-30
+ +dropdown('Level:', `${model}.level`, '"log4jLevel"', 'true', 'Default',
+ '[\
+ {value: "OFF", label: "OFF"},\
+ {value: "FATAL", label: "FATAL"},\
+ {value: "ERROR", label: "ERROR"},\
+ {value: "WARN", label: "WARN"},\
+ {value: "INFO", label: "INFO"},\
+ {value: "DEBUG", label: "DEBUG"},\
+ {value: "TRACE", label: "TRACE"},\
+ {value: "ALL", label: "ALL"},\
+ {value: null, label: "Default"}\
+ ]',
+ 'Level for internal log4j implementation')
+.pc-form-grid-col-30
+ +dropdown-required('Logger configuration:', `${model}.mode`, '"log4jMode"', 'true', 'true', 'Choose logger mode',
+ '[\
+ {value: "Default", label: "Default"},\
+ {value: "Path", label: "Path"}\
+ ]',
+ 'Choose logger configuration\
+ <ul>\
+ <li>Default - default logger</li>\
+ <li>Path - path or URI to XML configuration</li>\
+ </ul>')
+.pc-form-grid-col-60(ng-show=pathRequired)
+ +text('Path:', `${model}.path`, '"log4jPath"', pathRequired, 'Input path', 'Path or URI to XML configuration')
http://git-wip-us.apache.org/repos/asf/ignite/blob/7ee1683e/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j2.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j2.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j2.pug
index 299386f..fc94e06 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j2.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j2.pug
@@ -17,23 +17,22 @@
include /app/helpers/jade/mixins
-var form = 'logger'
--var model = 'backupItem.logger.Log4j2'
--var log4j2Required = 'backupItem.logger.kind === "Log4j2"'
+-var model = '$ctrl.clonedCluster.logger.Log4j2'
+-var log4j2Required = '$ctrl.clonedCluster.logger.kind === "Log4j2"'
-div
- .details-row
- +dropdown('Level:', `${model}.level`, '"log4j2Level"', 'true', 'Default',
- '[\
- {value: "OFF", label: "OFF"},\
- {value: "FATAL", label: "FATAL"},\
- {value: "ERROR", label: "ERROR"},\
- {value: "WARN", label: "WARN"},\
- {value: "INFO", label: "INFO"},\
- {value: "DEBUG", label: "DEBUG"},\
- {value: "TRACE", label: "TRACE"},\
- {value: "ALL", label: "ALL"},\
- {value: null, label: "Default"}\
- ]',
- 'Level for internal log4j2 implementation')
- .details-row
- +text('Path:', `${model}.path`, '"log4j2Path"', log4j2Required, 'Input path', 'Path or URI to XML configuration')
+.pc-form-grid-col-60
+ +dropdown('Level:', `${model}.level`, '"log4j2Level"', 'true', 'Default',
+ '[\
+ {value: "OFF", label: "OFF"},\
+ {value: "FATAL", label: "FATAL"},\
+ {value: "ERROR", label: "ERROR"},\
+ {value: "WARN", label: "WARN"},\
+ {value: "INFO", label: "INFO"},\
+ {value: "DEBUG", label: "DEBUG"},\
+ {value: "TRACE", label: "TRACE"},\
+ {value: "ALL", label: "ALL"},\
+ {value: null, label: "Default"}\
+ ]',
+ 'Level for internal log4j2 implementation')
+.pc-form-grid-col-60
+ +text('Path:', `${model}.path`, '"log4j2Path"', log4j2Required, 'Input path', 'Path or URI to XML configuration')
http://git-wip-us.apache.org/repos/asf/ignite/blob/7ee1683e/modules/web-console/frontend/app/modules/states/configuration/clusters/marshaller.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/marshaller.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/marshaller.pug
index 0a7d4b2..61ab5d4 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/marshaller.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/marshaller.pug
@@ -17,68 +17,62 @@
include /app/helpers/jade/mixins
-var form = 'marshaller'
--var model = 'backupItem'
+-var model = '$ctrl.clonedCluster'
-var marshaller = model + '.marshaller'
-var optMarshaller = marshaller + '.OptimizedMarshaller'
-.panel.panel-default(ng-form=form novalidate)
- .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+.pca-panel.pca-panel-default(ng-form=form novalidate)
+ .pca-panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
ignite-form-panel-chevron
- label Marshaller
- ignite-form-field-tooltip.tipLabel
- | Marshaller allows to marshal or unmarshal objects in grid#[br]
- | It provides serialization/deserialization mechanism for all instances that are sent across networks or are otherwise serialized
- | By default BinaryMarshaller will be used#[br]
- | #[a(href="https://apacheignite.readme.io/docs/binary-marshaller" target="_blank") More info]
- ignite-form-revert
- .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
- .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
- .col-sm-6
- div(ng-if='$ctrl.available(["1.0.0", "2.1.0"])')
- .settings-row
- div(ng-if='$ctrl.available(["1.0.0", "2.0.0"])')
- +dropdown('Marshaller:', marshaller + '.kind', '"kind"', 'true', 'Default', 'marshallerVariant',
- 'Instance of marshaller to use in grid<br/>\
- <ul>\
- <li>OptimizedMarshaller - Optimized implementation of marshaller</li>\
- <li>JdkMarshaller - Marshaller based on JDK serialization mechanism</li>\
- <li>Default - BinaryMarshaller serialize and deserialize all objects in the binary format</li>\
- </ul>')
- div(ng-if='$ctrl.available("2.0.0")')
- +dropdown('Marshaller:', marshaller + '.kind', '"kind"', 'true', 'Default', 'marshallerVariant',
- 'Instance of marshaller to use in grid<br/>\
- <ul>\
- <li>JdkMarshaller - Marshaller based on JDK serialization mechanism</li>\
- <li>Default - BinaryMarshaller serialize and deserialize all objects in the binary format</li>\
- </ul>')
- a.customize(
- ng-if=`${marshaller}.kind && ${marshaller}.kind === 'OptimizedMarshaller'`
- ng-click=`${marshaller}.expanded = !${marshaller}.expanded`
- ) {{ #{marshaller}.expanded ? 'Hide settings' : 'Show settings'}}
- .settings-row
- .panel-details(ng-show=`${marshaller}.expanded && ${marshaller}.kind === 'OptimizedMarshaller'`)
- .details-row
- +number('Streams pool size:', `${optMarshaller}.poolSize`, '"poolSize"', 'true', '0', '0',
- 'Specifies size of cached object streams used by marshaller<br/>\
- Object streams are cached for performance reason to avoid costly recreation for every serialization routine<br/>\
- If 0 (default), pool is not used and each thread has its own cached object stream which it keeps reusing<br/>\
- Since each stream has an internal buffer, creating a stream for each thread can lead to high memory consumption if many large messages are marshalled or unmarshalled concurrently<br/>\
- Consider using pool in this case. This will limit number of streams that can be created and, therefore, decrease memory consumption<br/>\
- NOTE: Using streams pool can decrease performance since streams will be shared between different threads which will lead to more frequent context switching')
- .details-row
- +checkbox('Require serializable', `${optMarshaller}.requireSerializable`, '"requireSerializable"',
- 'Whether marshaller should require Serializable interface or not')
- .settings-row
+ .pca-panel-heading-title Marshaller
+ .pca-panel-heading-description
+ | Marshaller allows to marshal or unmarshal objects in grid.
+ | It provides serialization/deserialization mechanism for all instances that are sent across networks or are otherwise serialized.
+ | By default BinaryMarshaller will be used.
+ | #[a.link-success(href="https://apacheignite.readme.io/docs/binary-marshaller" target="_blank") More info]
+ .pca-panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+ .pca-panel-body(ng-if=`ui.isPanelLoaded('${form}')`).pca-form-row
+ .pca-form-column-6.pc-form-grid-row
+ .pc-form-grid-col-60(ng-if='$ctrl.available(["1.0.0", "2.0.0"])')
+ +dropdown('Marshaller:', marshaller + '.kind', '"kind"', 'true', 'Default', '$ctrl.marshallerVariant',
+ 'Instance of marshaller to use in grid<br/>\
+ <ul>\
+ <li>OptimizedMarshaller - Optimized implementation of marshaller</li>\
+ <li>JdkMarshaller - Marshaller based on JDK serialization mechanism</li>\
+ <li>Default - BinaryMarshaller serialize and deserialize all objects in the binary format</li>\
+ </ul>')
+ .pc-form-grid-col-60(ng-if='$ctrl.available(["2.0.0", "2.1.0"])')
+ +dropdown('Marshaller:', marshaller + '.kind', '"kind"', 'true', 'Default', '$ctrl.marshallerVariant',
+ 'Instance of marshaller to use in grid<br/>\
+ <ul>\
+ <li>JdkMarshaller - Marshaller based on JDK serialization mechanism</li>\
+ <li>Default - BinaryMarshaller serialize and deserialize all objects in the binary format</li>\
+ </ul>')
+ .pc-form-group.pc-form-grid-row(
+ ng-show=`${marshaller}.kind === 'OptimizedMarshaller'`
+ ng-if='$ctrl.available(["1.0.0", "2.1.0"])'
+ )
+ .pc-form-grid-col-60
+ +number('Streams pool size:', `${optMarshaller}.poolSize`, '"poolSize"', 'true', '0', '0',
+ 'Specifies size of cached object streams used by marshaller<br/>\
+ Object streams are cached for performance reason to avoid costly recreation for every serialization routine<br/>\
+ If 0 (default), pool is not used and each thread has its own cached object stream which it keeps reusing<br/>\
+ Since each stream has an internal buffer, creating a stream for each thread can lead to high memory consumption if many large messages are marshalled or unmarshalled concurrently<br/>\
+ Consider using pool in this case. This will limit number of streams that can be created and, therefore, decrease memory consumption<br/>\
+ NOTE: Using streams pool can decrease performance since streams will be shared between different threads which will lead to more frequent context switching')
+ .pc-form-grid-col-60
+ +checkbox('Require serializable', `${optMarshaller}.requireSerializable`, '"requireSerializable"',
+ 'Whether marshaller should require Serializable interface or not')
+ .pc-form-grid-col-60
+checkbox('Marshal local jobs', `${model}.marshalLocalJobs`, '"marshalLocalJobs"', 'If this flag is enabled, jobs mapped to local node will be marshalled as if it was remote node')
//- Removed in ignite 2.0
- div(ng-if='$ctrl.available(["1.0.0", "2.0.0"])')
- .settings-row
- +number('Keep alive time:', `${model}.marshallerCacheKeepAliveTime`, '"marshallerCacheKeepAliveTime"', 'true', '10000', '0',
- 'Keep alive time of thread pool that is in charge of processing marshaller messages')
- .settings-row
- +number('Pool size:', `${model}.marshallerCacheThreadPoolSize`, '"marshallerCacheThreadPoolSize"', 'true', 'max(8, availableProcessors) * 2', '1',
- 'Default size of thread pool that is in charge of processing marshaller messages')
+ .pc-form-grid-col-30(ng-if-start='$ctrl.available(["1.0.0", "2.0.0"])')
+ +number('Keep alive time:', `${model}.marshallerCacheKeepAliveTime`, '"marshallerCacheKeepAliveTime"', 'true', '10000', '0',
+ 'Keep alive time of thread pool that is in charge of processing marshaller messages')
+ .pc-form-grid-col-30(ng-if-end)
+ +number('Pool size:', `${model}.marshallerCacheThreadPoolSize`, '"marshallerCacheThreadPoolSize"', 'true', 'max(8, availableProcessors) * 2', '1',
+ 'Default size of thread pool that is in charge of processing marshaller messages')
- .col-sm-6
+ .pca-form-column-6
+preview-xml-java(model, 'clusterMarshaller')
http://git-wip-us.apache.org/repos/asf/ignite/blob/7ee1683e/modules/web-console/frontend/app/modules/states/configuration/clusters/memory.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/memory.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/memory.pug
index 705ba91..06c8e0b 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/memory.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/memory.pug
@@ -17,108 +17,178 @@
include /app/helpers/jade/mixins
-var form = 'memoryConfiguration'
--var model = 'backupItem.memoryConfiguration'
+-var model = '$ctrl.clonedCluster.memoryConfiguration'
-var memoryPolicies = model + '.memoryPolicies'
-.panel.panel-default(ng-show='$ctrl.available(["2.0.0", "2.3.0"])' ng-form=form novalidate)
- .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+.pca-panel.pca-panel-default(ng-show='$ctrl.available(["2.0.0", "2.3.0"])' ng-form=form novalidate)
+ .pca-panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
ignite-form-panel-chevron
- label Memory configuration
- ignite-form-field-tooltip.tipLabel
- | Page memory is a manageable off-heap based memory architecture that is split into pages of fixed size#[br]
- | #[a(href="https://apacheignite.readme.io/docs/durable-memory" target="_blank") More info]
- ignite-form-revert
- .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
- .panel-body(ng-if=`$ctrl.available(["2.0.0", "2.3.0"]) && ui.isPanelLoaded('${form}')`)
- .col-sm-6
- .settings-row
- +number-min-max('Page size:', model + '.pageSize', '"MemoryConfigurationPageSize"',
- 'true', '2048', '1024', '16384', 'Every memory region is split on pages of fixed size')
- .settings-row
+ .pca-panel-heading-title Memory configuration
+ .pca-panel-heading-description
+ | Page memory is a manageable off-heap based memory architecture that is split into pages of fixed size.
+ | #[a.link-success(href="https://apacheignite.readme.io/docs/durable-memory" target="_blank") More info]
+ .pca-panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+ .pca-panel-body(ng-if=`$ctrl.available(["2.0.0", "2.3.0"]) && ui.isPanelLoaded('${form}')`).pca-form-row
+ .pca-form-column-6.pc-form-grid-row
+ .pc-form-grid-col-60
+ +sane-ignite-form-field-dropdown({
+ label: 'Page size:',
+ model: `${model}.pageSize`,
+ name: '"MemoryConfigurationPageSize"',
+ options: `$ctrl.Clusters.memoryConfiguration.pageSize.values`,
+ tip: 'Every memory region is split on pages of fixed size'
+ })
+ .pc-form-grid-col-60
+number('Concurrency level:', model + '.concurrencyLevel', '"MemoryConfigurationConcurrencyLevel"',
'true', 'availableProcessors', '2', 'The number of concurrent segments in Ignite internal page mapping tables')
- .settings-row
- +ignite-form-group
- ignite-form-field-label
- | System cache
- ignite-form-group-tooltip
- | System cache properties
- .group-content
- .details-row
- +number('Initial size:', model + '.systemCacheInitialSize', '"systemCacheInitialSize"',
- 'true', '41943040', '10485760', 'Initial size of a memory region reserved for system cache')
- .details-row
- +number('Maximum size:', model + '.systemCacheMaxSize', '"systemCacheMaxSize"',
- 'true', '104857600', '10485760', 'Maximum size of a memory region reserved for system cache')
- .settings-row
- +ignite-form-group
- ignite-form-field-label
- | Memory policies
- ignite-form-group-tooltip
- | Memory policies configuration
- .group-content
- .details-row
- +text('Default memory policy name:', model + '.defaultMemoryPolicyName', '"defaultMemoryPolicyName"',
- 'false', 'default', 'Name of a memory policy to be used as default one')
- .details-row(ng-hide='(' + model + '.defaultMemoryPolicyName || "default") !== "default"')
- +number('Default memory policy size:', model + '.defaultMemoryPolicySize', '"defaultMemoryPolicySize"',
- 'true', '0.8 * totalMemoryAvailable', '10485760',
- 'Specify desired size of default memory policy without having to use more verbose syntax of MemoryPolicyConfiguration elements')
- .details-row(ng-init='memoryPoliciesTbl={type: "memoryPolicies", model: "memoryPolicies", focusId: "name", ui: "memory-policies-table"}')
- +ignite-form-group()
- ignite-form-field-label
- | Configured policies
- ignite-form-group-tooltip
- | List of configured policies
- ignite-form-group-add(ng-click='tableNewItem(memoryPoliciesTbl)')
- | Add Memory policy configuration
- .group-content-empty(ng-if=`!(${memoryPolicies} && ${memoryPolicies}.length > 0)`)
- | Not defined
- .group-content(ng-show=`${memoryPolicies} && ${memoryPolicies}.length > 0` ng-repeat=`model in ${memoryPolicies} track by $index`)
- hr(ng-if='$index != 0')
- .settings-row
- +text-enabled-autofocus('Name:', 'model.name', '"MemoryPolicyName" + $index', 'true', 'false', 'default', 'Memory policy name')
- +table-remove-button(memoryPolicies, 'Remove memory configuration')
- .settings-row
- +number('Initial size:', 'model.initialSize', '"MemoryPolicyInitialSize" + $index',
- 'true', '268435456', '10485760', 'Initial memory region size defined by this memory policy')
- .settings-row
- +number('Maximum size:', 'model.maxSize', '"MemoryPolicyMaxSize" + $index',
- 'true', '0.8 * totalMemoryAvailable', '10485760', 'Maximum memory region size defined by this memory policy')
- .settings-row
- +text('Swap file path:', 'model.swapFilePath', '"MemoryPolicySwapFilePath" + $index', 'false',
- 'Input swap file path', 'An optional path to a memory mapped file for this memory policy')
- .settings-row
- +dropdown('Eviction mode:', 'model.pageEvictionMode', '"MemoryPolicyPageEvictionMode"', 'true', 'DISABLED',
- '[\
- {value: "DISABLED", label: "DISABLED"},\
- {value: "RANDOM_LRU", label: "RANDOM_LRU"},\
- {value: "RANDOM_2_LRU", label: "RANDOM_2_LRU"}\
- ]',
- 'An algorithm for memory pages eviction\
- <ul>\
- <li>DISABLED - Eviction is disabled</li>\
- <li>RANDOM_LRU - Once a memory region defined by a memory policy is configured, an off - heap array is allocated to track last usage timestamp for every individual data page</li>\
- <li>RANDOM_2_LRU - Differs from Random - LRU only in a way that two latest access timestamps are stored for every data page</li>\
- </ul>')
- .settings-row
- +number-min-max-step('Eviction threshold:', 'model.evictionThreshold', '"MemoryPolicyEvictionThreshold" + $index',
- 'true', '0.9', '0.5', '0.999', '0.05', 'A threshold for memory pages eviction initiation')
- .settings-row
- +number('Empty pages pool size:', 'model.emptyPagesPoolSize', '"MemoryPolicyEmptyPagesPoolSize" + $index',
- 'true', '100', '11', 'The minimal number of empty pages to be present in reuse lists for this memory policy')
+ .pc-form-grid-col-60.pc-form-group__text-title
+ span System cache
+ .pc-form-group.pc-form-grid-row
+ .pc-form-grid-col-30
+ pc-form-field-size(
+ label='Initial size:'
+ ng-model=`${model}.systemCacheInitialSize`
+ name='systemCacheInitialSize'
+ placeholder='{{ $ctrl.Clusters.memoryConfiguration.systemCacheInitialSize.default / systemCacheInitialSizeScale.value }}'
+ min='{{ ::$ctrl.Clusters.memoryConfiguration.systemCacheInitialSize.min }}'
+ tip='Initial size of a memory region reserved for system cache'
+ on-scale-change='systemCacheInitialSizeScale = $event'
+ )
+ .pc-form-grid-col-30
+ pc-form-field-size(
+ label='Max size:'
+ ng-model=`${model}.systemCacheMaxSize`
+ name='systemCacheMaxSize'
+ placeholder='{{ $ctrl.Clusters.memoryConfiguration.systemCacheMaxSize.default / systemCacheMaxSizeScale.value }}'
+ min='{{ $ctrl.Clusters.memoryConfiguration.systemCacheMaxSize.min($ctrl.clonedCluster) }}'
+ tip='Maximum size of a memory region reserved for system cache'
+ on-scale-change='systemCacheMaxSizeScale = $event'
+ )
+ .pc-form-grid-col-60.pc-form-group__text-title
+ span Memory policies
+ .pc-form-group.pc-form-grid-row
+ .pc-form-grid-col-60
+ +sane-ignite-form-field-text({
+ label: 'Default memory policy name:',
+ model: `${model}.defaultMemoryPolicyName`,
+ name: '"defaultMemoryPolicyName"',
+ placeholder: '{{ ::$ctrl.Clusters.memoryPolicy.name.default }}',
+ tip: 'Name of a memory policy to be used as default one'
+ })(
+ pc-not-in-collection='::$ctrl.Clusters.memoryPolicy.name.invalidValues'
+ ui-validate=`{
+ defaultMemoryPolicyExists: '$ctrl.Clusters.memoryPolicy.customValidators.defaultMemoryPolicyExists($value, ${memoryPolicies})'
+ }`
+ ui-validate-watch=`"${memoryPolicies}"`
+ ui-validate-watch-object-equality='true'
+ ng-model-options='{allowInvalid: true}'
+ )
+ +form-field-feedback('"MemoryPolicyName"', 'notInCollection', '{{::$ctrl.Clusters.memoryPolicy.name.invalidValues[0]}} is reserved for internal use')
+ +form-field-feedback('"MemoryPolicyName"', 'defaultMemoryPolicyExists', 'Memory policy with that name should be configured')
+ .pc-form-grid-col-60(ng-hide='(' + model + '.defaultMemoryPolicyName || "default") !== "default"')
+ +number('Default memory policy size:', model + '.defaultMemoryPolicySize', '"defaultMemoryPolicySize"',
+ 'true', '0.8 * totalMemoryAvailable', '10485760',
+ 'Specify desired size of default memory policy without having to use more verbose syntax of MemoryPolicyConfiguration elements')
+ .pc-form-grid-col-60
+ mixin clusters-memory-policies
+ .ignite-form-field(ng-init='memoryPoliciesTbl={type: "memoryPolicies", model: "memoryPolicies", focusId: "name", ui: "memory-policies-table"}')
+ +ignite-form-field__label('Configured policies:', '"configuredPolicies"')
+ +tooltip(`List of configured policies`)
+ .ignite-form-field__control
+ -let items = memoryPolicies
- //- Since ignite 2.1
- .div(ng-if='$ctrl.available("2.1.0")')
- .settings-row
- +number('Sub intervals:', 'model.subIntervals', '"MemoryPolicySubIntervals" + $index',
+ list-editable(ng-model=items name='memoryPolicies')
+ list-editable-item-edit.pc-form-grid-row
+ - form = '$parent.form'
+ .pc-form-grid-col-60
+ +sane-ignite-form-field-text({
+ label: 'Name:',
+ model: '$item.name',
+ name: '"MemoryPolicyName"',
+ placeholder: '{{ ::$ctrl.Clusters.memoryPolicy.name.default }}',
+ tip: 'Memory policy name'
+ })(
+ ui-validate=`{
+ uniqueMemoryPolicyName: '$ctrl.Clusters.memoryPolicy.customValidators.uniqueMemoryPolicyName($item, ${items})'
+ }`
+ ui-validate-watch=`"${items}"`
+ ui-validate-watch-object-equality='true'
+ pc-not-in-collection='::$ctrl.Clusters.memoryPolicy.name.invalidValues'
+ ng-model-options='{allowInvalid: true}'
+ )
+ +form-field-feedback('"MemoryPolicyName', 'uniqueMemoryPolicyName', 'Memory policy with that name is already configured')
+ +form-field-feedback('"MemoryPolicyName', 'notInCollection', '{{::$ctrl.Clusters.memoryPolicy.name.invalidValues[0]}} is reserved for internal use')
+ .pc-form-grid-col-60
+ pc-form-field-size(
+ label='Initial size:'
+ ng-model='$item.initialSize'
+ ng-model-options='{allowInvalid: true}'
+ name='MemoryPolicyInitialSize'
+ placeholder='{{ $ctrl.Clusters.memoryPolicy.initialSize.default / scale.value }}'
+ min='{{ ::$ctrl.Clusters.memoryPolicy.initialSize.min }}'
+ tip='Initial memory region size defined by this memory policy'
+ on-scale-change='scale = $event'
+ )
+ .pc-form-grid-col-60
+ pc-form-field-size(
+ ng-model='$item.maxSize'
+ ng-model-options='{allowInvalid: true}'
+ name='MemoryPolicyMaxSize'
+ label='Maximum size:'
+ placeholder='{{ ::$ctrl.Clusters.memoryPolicy.maxSize.default }}'
+ min='{{ $ctrl.Clusters.memoryPolicy.maxSize.min($item) }}'
+ tip='Maximum memory region size defined by this memory policy'
+ )
+ .pc-form-grid-col-60
+ +text('Swap file path:', '$item.swapFilePath', '"MemoryPolicySwapFilePath"', 'false',
+ 'Input swap file path', 'An optional path to a memory mapped file for this memory policy')
+ .pc-form-grid-col-60
+ +dropdown('Eviction mode:', '$item.pageEvictionMode', '"MemoryPolicyPageEvictionMode"', 'true', 'DISABLED',
+ '[\
+ {value: "DISABLED", label: "DISABLED"},\
+ {value: "RANDOM_LRU", label: "RANDOM_LRU"},\
+ {value: "RANDOM_2_LRU", label: "RANDOM_2_LRU"}\
+ ]',
+ 'An algorithm for memory pages eviction\
+ <ul>\
+ <li>DISABLED - Eviction is disabled</li>\
+ <li>RANDOM_LRU - Once a memory region defined by a memory policy is configured, an off - heap array is allocated to track last usage timestamp for every individual data page</li>\
+ <li>RANDOM_2_LRU - Differs from Random - LRU only in a way that two latest access timestamps are stored for every data page</li>\
+ </ul>')
+ .pc-form-grid-col-30
+ +number-min-max-step('Eviction threshold:', '$item.evictionThreshold', '"MemoryPolicyEvictionThreshold"',
+ 'true', '0.9', '0.5', '0.999', '0.05', 'A threshold for memory pages eviction initiation')
+ .pc-form-grid-col-30
+ +sane-ignite-form-field-number({
+ label: 'Empty pages pool size:',
+ model: '$item.emptyPagesPoolSize',
+ name: '"MemoryPolicyEmptyPagesPoolSize"',
+ placeholder: '{{ ::$ctrl.Clusters.memoryPolicy.emptyPagesPoolSize.default }}',
+ min: '{{ ::$ctrl.Clusters.memoryPolicy.emptyPagesPoolSize.min }}',
+ max: '{{ $ctrl.Clusters.memoryPolicy.emptyPagesPoolSize.max($ctrl.clonedCluster, $item) }}',
+ tip: 'The minimal number of empty pages to be present in reuse lists for this memory policy'
+ })
+
+ //- Since ignite 2.1
+ .pc-form-grid-col-30(ng-if-start='$ctrl.available("2.1.0")')
+ +number('Sub intervals:', '$item.subIntervals', '"MemoryPolicySubIntervals"',
'true', '5', '1', 'A number of sub-intervals the whole rate time interval will be split into to calculate allocation and eviction rates')
- .settings-row
- +number('Rate time interval:', 'model.rateTimeInterval', '"MemoryPolicyRateTimeInterval" + $index',
+ .pc-form-grid-col-30(ng-if-end)
+ +number('Rate time interval:', '$item.rateTimeInterval', '"MemoryPolicyRateTimeInterval"',
'true', '60000', '1000', 'Time interval for allocation rate and eviction rate monitoring purposes')
-
- .settings-row
- +checkbox('Metrics enabled', 'model.metricsEnabled', '"MemoryPolicyMetricsEnabled" + $index',
- 'Whether memory metrics are enabled by default on node startup')
- .col-sm-6
+
+ .pc-form-grid-col-60
+ +checkbox('Metrics enabled', '$item.metricsEnabled', '"MemoryPolicyMetricsEnabled"',
+ 'Whether memory metrics are enabled by default on node startup')
+
+ list-editable-no-items
+ list-editable-add-item-button(
+ add-item=`$ctrl.Clusters.addMemoryPolicy($ctrl.clonedCluster)`
+ label-single='memory policy configuration'
+ label-multiple='memory policy configurations'
+ )
+
+ +clusters-memory-policies
+
+ .pca-form-column-6
+preview-xml-java(model, 'clusterMemory')
http://git-wip-us.apache.org/repos/asf/ignite/blob/7ee1683e/modules/web-console/frontend/app/modules/states/configuration/clusters/metrics.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/metrics.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/metrics.pug
index bae3267..2cfc59c 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/metrics.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/metrics.pug
@@ -17,29 +17,28 @@
include /app/helpers/jade/mixins
-var form = 'metrics'
--var model = 'backupItem'
+-var model = '$ctrl.clonedCluster'
-.panel.panel-default(ng-form=form novalidate)
- .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+.pca-panel.pca-panel-default(ng-form=form novalidate)
+ .pca-panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
ignite-form-panel-chevron
- label Metrics
- ignite-form-field-tooltip.tipLabel
- | Cluster runtime metrics settings
- ignite-form-revert
- .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
- .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
- .col-sm-6
- .settings-row
+ .pca-panel-heading-title Metrics
+ .pca-panel-heading-description
+ | Cluster runtime metrics settings.
+ .pca-panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+ .pca-panel-body(ng-if=`ui.isPanelLoaded('${form}')`).pca-form-row
+ .pca-form-column-6.pc-form-grid-row
+ .pc-form-grid-col-30
+number('Elapsed time:', `${model}.metricsExpireTime`, '"metricsExpireTime"', 'true', 'Long.MAX_VALUE', '1',
'Time in milliseconds after which a certain metric value is considered expired')
- .settings-row
+ .pc-form-grid-col-30
+number('History size:', `${model}.metricsHistorySize`, '"metricsHistorySize"', 'true', '10000', '1',
'Number of metrics kept in history to compute totals and averages')
- .settings-row
+ .pc-form-grid-col-30
+number('Log frequency:', `${model}.metricsLogFrequency`, '"metricsLogFrequency"', 'true', '60000', '0',
'Frequency of metrics log print out<br/>\ ' +
'When <b>0</b> log print of metrics is disabled')
- .settings-row
+ .pc-form-grid-col-30
+number('Update frequency:', `${model}.metricsUpdateFrequency`, '"metricsUpdateFrequency"', 'true', '2000', '-1',
'Job metrics update frequency in milliseconds\
<ul>\
@@ -47,5 +46,5 @@ include /app/helpers/jade/mixins
<li>If set to 0 job metrics are updated on each job start and finish</li>\
<li>Positive value defines the actual update frequency</li>\
</ul>')
- .col-sm-6
+ .pca-form-column-6
+preview-xml-java(model, 'clusterMetrics')
http://git-wip-us.apache.org/repos/asf/ignite/blob/7ee1683e/modules/web-console/frontend/app/modules/states/configuration/clusters/misc.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/misc.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/misc.pug
index e22ec6f..99f05f3 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/misc.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/misc.pug
@@ -17,48 +17,46 @@
include /app/helpers/jade/mixins
-var form = 'misc'
--var model = 'backupItem'
+-var model = '$ctrl.clonedCluster'
-.panel.panel-default(ng-form=form novalidate)
- .panel-heading(bs-collapse-toggle)
+.pca-panel.pca-panel-default(ng-form=form novalidate)
+ .pca-panel-heading(bs-collapse-toggle)
ignite-form-panel-chevron
- label Miscellaneous
- ignite-form-field-tooltip.tipLabel
- | Various miscellaneous cluster settings
- ignite-form-revert
- .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
- .panel-body
- .col-sm-6
- .settings-row
+ .pca-panel-heading-title Miscellaneous
+ .pca-panel-heading-description
+ | Various miscellaneous cluster settings.
+ .pca-panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+ .pca-panel-body.pca-form-row
+ .pca-form-column-6.pc-form-grid-row
+ .pc-form-grid-col-60
+text('Work directory:', model + '.workDirectory', '"workDirectory"', 'false', 'Input work directory',
'Ignite work directory.<br/>\
If not provided, the method will use work directory under IGNITE_HOME specified by IgniteConfiguration#setIgniteHome(String)\
or IGNITE_HOME environment variable or system property.')
//- Since ignite 2.0
- div(ng-if='$ctrl.available("2.0.0")')
- .settings-row
- +text('Consistent ID:', model + '.consistentId', '"ConsistentId"', 'false', 'Input consistent ID', 'Consistent globally unique node ID which survives node restarts')
- .settings-row
- +java-class('Warmup closure:', model + '.warmupClosure', '"warmupClosure"', 'true', 'false', 'This closure will be executed before actual grid instance start')
- .settings-row
- +checkbox('Active on start', model + '.activeOnStart', '"activeOnStart"',
- 'If cluster is not active on start, there will be no cache partition map exchanges performed until the cluster is activated')
- .settings-row
- +checkbox('Cache sanity check enabled', model + '.cacheSanityCheckEnabled', '"cacheSanityCheckEnabled"',
- 'If enabled, then Ignite will perform the following checks and throw an exception if check fails<br/>\
- <ul>\
- <li>Cache entry is not externally locked with lock or lockAsync methods when entry is enlisted to transaction</li>\
- <li>Each entry in affinity group - lock transaction has the same affinity key as was specified on affinity transaction start</li>\
- <li>Each entry in partition group - lock transaction belongs to the same partition as was specified on partition transaction start</li>\
- </ul>')
-
- .settings-row(ng-if='$ctrl.available(["1.0.0", "2.1.0"])')
+ .pc-form-grid-col-60(ng-if-start='$ctrl.available("2.0.0")')
+ +text('Consistent ID:', model + '.consistentId', '"ConsistentId"', 'false', 'Input consistent ID', 'Consistent globally unique node ID which survives node restarts')
+ .pc-form-grid-col-60
+ +java-class('Warmup closure:', model + '.warmupClosure', '"warmupClosure"', 'true', 'false', 'This closure will be executed before actual grid instance start')
+ .pc-form-grid-col-60
+ +checkbox('Active on start', model + '.activeOnStart', '"activeOnStart"',
+ 'If cluster is not active on start, there will be no cache partition map exchanges performed until the cluster is activated')
+ .pc-form-grid-col-60(ng-if-end)
+ +checkbox('Cache sanity check enabled', model + '.cacheSanityCheckEnabled', '"cacheSanityCheckEnabled"',
+ 'If enabled, then Ignite will perform the following checks and throw an exception if check fails<br/>\
+ <ul>\
+ <li>Cache entry is not externally locked with lock or lockAsync methods when entry is enlisted to transaction</li>\
+ <li>Each entry in affinity group - lock transaction has the same affinity key as was specified on affinity transaction start</li>\
+ <li>Each entry in partition group - lock transaction belongs to the same partition as was specified on partition transaction start</li>\
+ </ul>')
+
+ .pc-form-grid-col-60(ng-if='$ctrl.available(["1.0.0", "2.1.0"])')
+checkbox('Late affinity assignment', model + '.lateAffinityAssignment', '"lateAffinityAssignment"',
'With late affinity assignment mode if primary node was changed for some partition this nodes becomes primary only when rebalancing for all assigned primary partitions is finished')
- .settings-row(ng-if='$ctrl.available("2.1.0")')
+ .pc-form-grid-col-60(ng-if='$ctrl.available("2.1.0")')
+number('Long query timeout:', `${model}.longQueryWarningTimeout`, '"LongQueryWarningTimeout"', 'true', '3000', '0',
'Timeout in milliseconds after which long query warning will be printed')
- .col-sm-6
+ .pca-form-column-6
+preview-xml-java(model, 'clusterMisc', 'caches')
http://git-wip-us.apache.org/repos/asf/ignite/blob/7ee1683e/modules/web-console/frontend/app/modules/states/configuration/clusters/odbc.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/odbc.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/odbc.pug
index af2996f..b35b30c 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/odbc.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/odbc.pug
@@ -17,22 +17,32 @@
include /app/helpers/jade/mixins
-var form = 'odbcConfiguration'
--var model = 'backupItem.odbc'
+-var model = '$ctrl.clonedCluster.odbc'
-var enabled = model + '.odbcEnabled'
-.panel.panel-default(ng-show='$ctrl.available(["1.0.0", "2.1.0"])' ng-form=form novalidate)
- .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+.pca-panel.pca-panel-default(ng-show='$ctrl.available(["1.0.0", "2.1.0"])' ng-form=form novalidate)
+ .pca-panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
ignite-form-panel-chevron
- label ODBC configuration
- ignite-form-field-tooltip.tipLabel
- | ODBC server configuration#[br]
- | #[a(href="https://apacheignite.readme.io/docs/odbc-driver" target="_blank") More info]
- ignite-form-revert
- .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
- .panel-body(ng-if=`$ctrl.available(["1.0.0", "2.1.0"]) && ui.isPanelLoaded('${form}')`)
- .col-sm-6
+ .pca-panel-heading-title ODBC configuration
+ .pca-panel-heading-description
+ | ODBC server configuration.
+ | #[a.link-success(href="https://apacheignite.readme.io/docs/odbc-driver" target="_blank") More info]
+ .pca-panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+ .pca-panel-body(ng-if=`$ctrl.available(["1.0.0", "2.1.0"]) && ui.isPanelLoaded('${form}')`).pca-form-row
+ .pca-form-column-6
.settings-row
- +checkbox('Enabled', enabled, '"odbcEnabled"', 'Flag indicating whether to configure ODBC configuration')
+ +sane-form-field-checkbox({
+ label: 'Enabled',
+ model: enabled,
+ name: '"odbcEnabled"',
+ tip: 'Flag indicating whether to configure ODBC configuration'
+ })(
+ ui-validate=`{
+ correctMarshaller: '$ctrl.Clusters.odbc.odbcEnabled.correctMarshaller($ctrl.clonedCluster, $value)'
+ }`
+ ui-validate-watch='$ctrl.Clusters.odbc.odbcEnabled.correctMarshallerWatch("$ctrl.clonedCluster")'
+ )
+ +form-field-feedback(null, 'correctMarshaller', 'ODBC can only be used with BinaryMarshaller')
.settings-row
+text-ip-address-with-port-range('ODBC endpoint address:', `${model}.endpointAddress`, '"endpointAddress"', enabled, '0.0.0.0:10800..10810',
'ODBC endpoint address. <br/>\
@@ -55,5 +65,5 @@ include /app/helpers/jade/mixins
.settings-row
+number('Pool size:', `${model}.threadPoolSize`, '"ODBCThreadPoolSize"', enabled, 'max(8, availableProcessors)', '1',
'Size of thread pool that is in charge of processing ODBC tasks')
- .col-sm-6
+ .pca-form-column-6
+preview-xml-java(model, 'clusterODBC')
http://git-wip-us.apache.org/repos/asf/ignite/blob/7ee1683e/modules/web-console/frontend/app/modules/states/configuration/clusters/persistence.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/persistence.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/persistence.pug
index fcc170e..edd1c32 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/persistence.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/persistence.pug
@@ -17,66 +17,65 @@
include /app/helpers/jade/mixins
-var form = 'persistenceConfiguration'
--var model = 'backupItem.persistenceStoreConfiguration'
+-var model = '$ctrl.clonedCluster.persistenceStoreConfiguration'
-var enabled = model + '.enabled'
-.panel.panel-default(ng-show='$ctrl.available(["2.1.0", "2.3.0"])' ng-form=form novalidate)
- .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+.pca-panel.pca-panel-default(ng-show='$ctrl.available(["2.1.0", "2.3.0"])' ng-form=form novalidate)
+ .pca-panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
ignite-form-panel-chevron
- label Persistence store
- ignite-form-field-tooltip.tipLabel
- | Configures Apache Ignite Persistence store#[br]
- //- TODO IGNITE-5415 Add link to documentation.
- ignite-form-revert
- .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
- .panel-body(ng-if=`$ctrl.available(["2.1.0", "2.3.0"]) && ui.isPanelLoaded('${form}')`)
- .col-sm-6
- .settings-row
+ .pca-panel-heading-title Persistence store
+ .pca-panel-heading-description
+ | Configures Apache Ignite Native Persistence.
+ a.link-success(href='https://apacheignite.readme.io/docs/distributed-persistent-store' target='_blank') More info
+ .pca-panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+ .pca-panel-body(ng-if=`$ctrl.available(["2.1.0", "2.3.0"]) && ui.isPanelLoaded('${form}')`).pca-form-row
+ .pca-form-column-6.pc-form-grid-row
+ .pc-form-grid-col-60
+checkbox('Enabled', enabled, '"PersistenceEnabled"', 'Flag indicating whether to configure persistent configuration')
- .settings-row
+ .pc-form-grid-col-60
+text-enabled('Store path:', `${model}.persistentStorePath`, '"PersistenceStorePath"', enabled, 'false', 'Input store path',
'A path the root directory where the Persistent Store will persist data and indexes')
- .settings-row
+ .pc-form-grid-col-60
+checkbox-enabled('Metrics enabled', `${model}.metricsEnabled`, '"PersistenceMetricsEnabled"', enabled, 'Flag indicating whether persistence metrics collection is enabled')
- .settings-row
+ .pc-form-grid-col-60
+checkbox-enabled('Always write full pages', `${model}.alwaysWriteFullPages`, '"PersistenceAlwaysWriteFullPages"', enabled, 'Flag indicating whether always write full pages')
- .settings-row
+ .pc-form-grid-col-60
+number('Checkpointing frequency:', `${model}.checkpointingFrequency`, '"PersistenceCheckpointingFrequency"', enabled, '180000', '1',
'Frequency which is a minimal interval when the dirty pages will be written to the Persistent Store')
- .settings-row
+ .pc-form-grid-col-60
+number('Checkpointing page buffer size:', `${model}.checkpointingPageBufferSize`, '"PersistenceCheckpointingPageBufferSize"', enabled, '268435456', '0',
'Amount of memory allocated for a checkpointing temporary buffer')
- .settings-row
+ .pc-form-grid-col-60
+number('Checkpointing threads:', `${model}.checkpointingThreads`, '"PersistenceCheckpointingThreads"', enabled, '1', '1', 'A number of threads to use for the checkpointing purposes')
- .settings-row
+ .pc-form-grid-col-60
+text-enabled('WAL store path:', `${model}.walStorePath`, '"PersistenceWalStorePath"', enabled, 'false', 'Input store path', 'A path to the directory where WAL is stored')
- .settings-row
+ .pc-form-grid-col-60
+text-enabled('WAL archive path:', `${model}.walArchivePath`, '"PersistenceWalArchivePath"', enabled, 'false', 'Input archive path', 'A path to the WAL archive directory')
- .settings-row
+ .pc-form-grid-col-30
+number('WAL segments:', `${model}.walSegments`, '"PersistenceWalSegments"', enabled, '10', '1', 'A number of WAL segments to work with')
- .settings-row
+ .pc-form-grid-col-30
+number('WAL segment size:', `${model}.walSegmentSize`, '"PersistenceWalSegmentSize"', enabled, '67108864', '0', 'Size of a WAL segment')
- .settings-row
+ .pc-form-grid-col-30
+number('WAL history size:', `${model}.walHistorySize`, '"PersistenceWalHistorySize"', enabled, '20', '1', 'A total number of checkpoints to keep in the WAL history')
- .settings-row
+ .pc-form-grid-col-30
+number('WAL flush frequency:', `${model}.walFlushFrequency`, '"PersistenceWalFlushFrequency"', enabled, '2000', '1',
'How often will be fsync, in milliseconds. In background mode, exist thread which do fsync by timeout')
- .settings-row
+ .pc-form-grid-col-30
+number('WAL fsync delay:', `${model}.walFsyncDelayNanos`, '"PersistenceWalFsyncDelay"', enabled, '1000', '1', 'WAL fsync delay, in nanoseconds')
- .settings-row
+ .pc-form-grid-col-30
+number('WAL record iterator buffer size:', `${model}.walRecordIteratorBufferSize`, '"PersistenceWalRecordIteratorBufferSize"', enabled, '67108864', '1',
'How many bytes iterator read from disk(for one reading), during go ahead WAL')
- .settings-row
+ .pc-form-grid-col-30
+number('Lock wait time:', `${model}.lockWaitTime`, '"PersistenceLockWaitTime"', enabled, '10000', '1',
'Time out in second, while wait and try get file lock for start persist manager')
- .settings-row
+ .pc-form-grid-col-30
+number('Rate time interval:', `${model}.rateTimeInterval`, '"PersistenceRateTimeInterval"', enabled, '60000', '1000',
'The length of the time interval for rate - based metrics. This interval defines a window over which hits will be tracked.')
- .settings-row
+ .pc-form-grid-col-30
+number('Thread local buffer size:', `${model}.tlbSize`, '"PersistenceTlbSize"', enabled, '131072', '1',
'Define size thread local buffer. Each thread which write to WAL have thread local buffer for serialize recode before write in WAL')
- .settings-row
+ .pc-form-grid-col-30
+number('Sub intervals:', `${model}.subIntervals`, '"PersistenceSubIntervals"', enabled, '5', '1',
'Number of sub - intervals the whole rate time interval will be split into to calculate rate - based metrics')
- .col-sm-6
+ .pca-form-column-6
+preview-xml-java(model, 'clusterPersistence')