| //- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| include /app/helpers/jade/mixins |
| include /app/configuration/mixins |
| |
| -var form = 'events' |
| -var model = '$ctrl.clonedCluster' |
| -var modelEventStorage = model + '.eventStorage' |
| -var modelEventStorageKind = modelEventStorage + '.kind' |
| -var eventStorageMemory = modelEventStorageKind + ' === "Memory"' |
| -var eventStorageCustom = modelEventStorageKind + ' === "Custom"' |
| |
| panel-collapsible(ng-form=form on-open=`ui.loadPanel('${form}')`) |
| panel-title Events |
| panel-description |
| | Grid events are used for notification about what happens within the grid. |
| | #[a.link-success(href="https://apacheignite.readme.io/docs/events" target="_blank") More info] |
| panel-content.pca-form-row(ng-if=`ui.isPanelLoaded('${form}')`) |
| .pca-form-column-6.pc-form-grid-row |
| .pc-form-grid-col-60(ng-if='$ctrl.available(["1.0.0", "2.0.0"])') |
| +form-field__dropdown({ |
| label: 'Event storage:', |
| model: modelEventStorageKind, |
| name: '"eventStorageKind"', |
| placeholder: 'Disabled', |
| options: '$ctrl.eventStorage', |
| tip: 'Regulate how grid store events locally on node\ |
| <ul>\ |
| <li>Memory - All events are kept in the FIFO queue in-memory</li>\ |
| <li>Custom - Custom implementation of event storage SPI</li>\ |
| </ul>' |
| }) |
| .pc-form-grid-col-60(ng-if='$ctrl.available("2.0.0")') |
| +form-field__dropdown({ |
| label: 'Event storage:', |
| model: modelEventStorageKind, |
| name: '"eventStorageKind"', |
| placeholder: 'Disabled', |
| options: '$ctrl.eventStorage', |
| tip: 'Regulate how grid store events locally on node\ |
| <ul>\ |
| <li>Memory - All events are kept in the FIFO queue in-memory</li>\ |
| <li>Custom - Custom implementation of event storage SPI</li>\ |
| <li>Disabled - Events are not collected</li>\ |
| </ul>' |
| }) |
| .pc-form-group.pc-form-grid-row(ng-if=modelEventStorageKind) |
| .pc-form-grid-col-30(ng-if-start=eventStorageMemory) |
| +form-field__number({ |
| label: 'Events expiration time:', |
| model: `${modelEventStorage}.Memory.expireAgeMs`, |
| name: '"writeBehindBatchSize"', |
| placeholder: 'Long.MAX_VALUE', |
| min: '1', |
| tip: 'All events that exceed this value will be removed from the queue when next event comes' |
| }) |
| .pc-form-grid-col-30 |
| +form-field__number({ |
| label: 'Events queue size:', |
| model: `${modelEventStorage}.Memory.expireCount`, |
| name: '"EventStorageExpireCount"', |
| placeholder: '10000', |
| min: '1', |
| tip: 'Events will be filtered out when new request comes' |
| }) |
| .pc-form-grid-col-60(ng-if-end) |
| +form-field__java-class({ |
| label: 'Filter:', |
| model: `${modelEventStorage}.Memory.filter`, |
| name: '"EventStorageFilter"', |
| tip: 'Filter for events to be recorded<br/>\ |
| Should be implementation of o.a.i.lang.IgnitePredicate<o.a.i.events.Event>', |
| validationActive: eventStorageMemory |
| }) |
| |
| .pc-form-grid-col-60(ng-if=eventStorageCustom) |
| +form-field__java-class({ |
| label: 'Class:', |
| model: `${modelEventStorage}.Custom.className`, |
| name: '"EventStorageCustom"', |
| required: eventStorageCustom, |
| tip: 'Event storage implementation class name', |
| validationActive: eventStorageCustom |
| }) |
| |
| .pc-form-grid-col-60 |
| +form-field__dropdown({ |
| label: 'Include type:', |
| model: `${model}.includeEventTypes`, |
| name: '"includeEventTypes"', |
| multiple: true, |
| placeholder: 'Choose recorded event types', |
| placeholderEmpty: '', |
| options: '$ctrl.eventGroups', |
| tip: 'Array of event types, which will be recorded by GridEventStorageManager#record(Event)<br/>\ |
| Note, that either the include event types or the exclude event types can be established' |
| }) |
| .pca-form-column-6 |
| +preview-xml-java(model, 'clusterEvents') |