diff --git a/.gitignore b/.gitignore index 2f545a1a8e..0210cd833d 100644 --- a/.gitignore +++ b/.gitignore @@ -123,3 +123,4 @@ plugins/UPSModule plugins/VMwareSnapshotModule plugins/CustomalertModule plugins/SLAModule +plugins/NutanixModule diff --git a/src/Form/WizardSNMPV3Form.php b/src/Form/WizardSNMPV3Form.php new file mode 100644 index 0000000000..eb569fa79e --- /dev/null +++ b/src/Form/WizardSNMPV3Form.php @@ -0,0 +1,69 @@ + +// +// This file is dual licensed +// +// 1. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// + +// 2. +// If you purchased an openITCOCKPIT Enterprise Edition you can use this file +// under the terms of the openITCOCKPIT Enterprise Edition license agreement. +// License agreement and license key will be shipped with the order +// confirmation. + + +namespace App\Form; + +use Cake\Form\Form; +use Cake\Form\Schema; +use Cake\Validation\Validator; + +/** + * Class WizardSNMPForm + * @package App\Form + */ +class WizardSNMPV3Form extends Form { + protected function _buildSchema(Schema $schema): Schema { + return $schema + ->addField('securityName', ['type' => 'string']) + ->addField('authPassword', ['type' => 'string']) + ->addField('privacyProtocol', ['type' => 'string']) + ->addField('authProtocol', ['type' => 'string']) + ->addField('privacyPassword', ['type' => 'string']) + ->addField('services', ['type' => 'array']); + } + + public function validationDefault(Validator $validator): Validator { + $validator + ->requirePresence('securityName') + ->notEmptyString('securityName'); + $validator + ->requirePresence('authPassword') + ->notEmptyString('authPassword'); + $validator + ->requirePresence('privacyProtocol') + ->notEmptyString('privacyProtocol'); + $validator + ->requirePresence('authProtocol') + ->notEmptyString('authProtocol'); + $validator + ->requirePresence('privacyPassword') + ->notEmptyString('privacyPassword'); + + $validator + ->notEmptyArray('services', __('Please select at least one service')); + return $validator; + } +} diff --git a/src/Model/Table/WizardAssignmentsTable.php b/src/Model/Table/WizardAssignmentsTable.php index 1c0246da81..db290fbd48 100644 --- a/src/Model/Table/WizardAssignmentsTable.php +++ b/src/Model/Table/WizardAssignmentsTable.php @@ -345,6 +345,13 @@ public function getPossibleWizardsOfModules($availableWizards = []) { 'description' => __('These checks will allow you to monitor your HP server'), 'image' => 'hp.svg', 'category' => ['hardware'], + ], + 'nutanix' => [ + 'type_id' => 'nutanix', + 'title' => __('Nutanix'), + 'description' => __('Monitor your Nutanix infrastructure'), + 'image' => 'nutanix_logo.svg', + 'category' => ['virtualization', 'cloud'], ] ]; diff --git a/webroot/img/wizards/nutanix_logo.svg b/webroot/img/wizards/nutanix_logo.svg new file mode 100644 index 0000000000..f3422ba207 --- /dev/null +++ b/webroot/img/wizards/nutanix_logo.svg @@ -0,0 +1,20 @@ + + + + nutanix-seeklogo.com + Created with Sketch. + + + + + + + + + + + + + + + \ No newline at end of file