Merge branch 'ent-10179-wizard-deploy-agentes' into 'develop'
Ent 10179 wizard deploy agentes See merge request artica/pandorafms!5692
This commit is contained in:
commit
9b69ec4393
Binary file not shown.
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
/**
|
||||
* Agents deploy view.
|
||||
*
|
||||
* @category Agents deploy
|
||||
* @package Pandora FMS
|
||||
* @subpackage Opensource
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* 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 for version 2.
|
||||
* 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.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
global $config;
|
||||
|
||||
require_once $config['homedir'].'/include/class/AgentDeployWizard.class.php';
|
||||
|
||||
$ajaxPage = 'godmode/agentes/agent_deploy';
|
||||
|
||||
// Control call flow.
|
||||
try {
|
||||
// User access and validation is being processed on class constructor.
|
||||
$adw = new AgentDeployWizard($ajaxPage);
|
||||
} catch (Exception $e) {
|
||||
if (is_ajax()) {
|
||||
echo json_encode(['error' => '[AgentDeployWizard]'.$e->getMessage() ]);
|
||||
exit;
|
||||
} else {
|
||||
echo '[AgentDeployWizard]'.$e->getMessage();
|
||||
}
|
||||
|
||||
// Stop this execution, but continue 'globally'.
|
||||
return;
|
||||
}
|
||||
|
||||
// AJAX controller.
|
||||
if (is_ajax()) {
|
||||
$method = get_parameter('method');
|
||||
|
||||
if (method_exists($adw, $method) === true) {
|
||||
if ($adw->ajaxMethod($method) === true) {
|
||||
$adw->{$method}();
|
||||
} else {
|
||||
$adw->error('Unavailable method.');
|
||||
}
|
||||
} else {
|
||||
$adw->error('Method not found. ['.$method.']');
|
||||
}
|
||||
|
||||
// Stop any execution.
|
||||
exit;
|
||||
} else {
|
||||
// Run.
|
||||
$adw->run();
|
||||
}
|
|
@ -419,6 +419,9 @@ ui_toggle(
|
|||
'filter-datatable-main box-flat white_table_graph fixed_filter_bar'
|
||||
);
|
||||
|
||||
|
||||
require_once 'godmode/agentes/agent_deploy.php';
|
||||
|
||||
// Data table.
|
||||
$selected = true;
|
||||
$selectNameUp = false;
|
||||
|
@ -1025,23 +1028,35 @@ if ($agents !== false) {
|
|||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
||||
// Create agent button.
|
||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente">';
|
||||
echo '<form id="create-agent" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente"></form>';
|
||||
|
||||
$buttons = html_print_button(
|
||||
__('Create agent'),
|
||||
'crt-2',
|
||||
false,
|
||||
'',
|
||||
[
|
||||
'icon' => 'next',
|
||||
'onClick' => "document.getElementById('create-agent').submit();",
|
||||
],
|
||||
true
|
||||
).html_print_button(
|
||||
__('Deploy agent'),
|
||||
'modal_deploy_agent',
|
||||
false,
|
||||
'',
|
||||
[],
|
||||
true
|
||||
);
|
||||
|
||||
html_print_action_buttons(
|
||||
html_print_submit_button(
|
||||
__('Create agent'),
|
||||
'crt-2',
|
||||
false,
|
||||
[ 'icon' => 'next' ],
|
||||
true
|
||||
),
|
||||
$buttons,
|
||||
[
|
||||
'type' => 'data_table',
|
||||
'class' => 'fixed_action_buttons',
|
||||
'right_content' => $tablePagination,
|
||||
]
|
||||
);
|
||||
echo '</form>';
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="18px" height="20px" viewBox="0 0 18 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
|
||||
<title>apple-grey@svg</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Mockups" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Deploy-agents---1-Default" transform="translate(-1075.000000, -276.000000)" fill="#95A3BF">
|
||||
<g id="Popup" transform="translate(640.000000, 90.000000)">
|
||||
<g id="Content" transform="translate(0.000000, 13.000000)">
|
||||
<g id="OS" transform="translate(20.000000, 133.000000)">
|
||||
<g transform="translate(400.000000, 26.000000)" id="Icons/Dark/20/apple-grey">
|
||||
<g transform="translate(14.000000, 14.000000)">
|
||||
<path d="M11.0828122,4.66404762 C10.7880362,4.75190476 10.3713494,4.8197619 9.83853445,4.86785714 C9.86251847,3.67395238 10.1724148,2.64414286 10.7728685,1.77985714 C11.3622782,0.921142857 12.3579468,0.327809524 13.7615808,0 C13.7703023,0.022952381 13.7815833,0.0689047619 13.7923903,0.132714286 C13.8032922,0.19652381 13.8141466,0.240285714 13.8229629,0.264380952 C13.8229629,0.296095238 13.8250958,0.336619048 13.8294565,0.384714286 C13.8316843,0.433238095 13.8338173,0.472619048 13.8338173,0.505761905 C13.8338173,0.994428571 13.7180209,1.53852381 13.4868548,2.13947619 C13.2487683,2.74042857 12.8774426,3.2932381 12.3753897,3.79795238 C11.9452415,4.22971429 11.512913,4.5192381 11.0828122,4.66404762 Z M16.4425298,13.0888571 C15.8926037,12.2968095 15.6174985,11.4019048 15.6174985,10.4085714 C15.6174985,9.5027619 15.8752556,8.67347619 16.3946566,7.9212381 C16.6741226,7.511 17.1282548,7.03942857 17.759044,6.50233333 C17.3442058,5.98890476 16.9296519,5.58995238 16.5148137,5.30038095 C15.7637252,4.78038095 14.9144254,4.51928571 13.9648762,4.51928571 C13.3993084,4.51928571 12.7092701,4.65528571 11.8972735,4.92733333 C11.1158495,5.20157143 10.5436931,5.33614286 10.1855444,5.33614286 C9.91475245,5.33614286 9.36477894,5.21690476 8.53500766,4.97585714 C7.69689412,4.73519048 6.99164067,4.61590476 6.41739875,4.61590476 C5.04419506,4.61590476 3.91320154,5.19242857 3.0180667,6.3462381 C2.11643815,7.51538095 1.66666667,9.01561905 1.66666667,10.840381 C1.66666667,12.7818571 2.25399078,14.7951429 3.42641124,16.8875714 C4.61414166,18.9625238 5.81485948,20 7.02647912,20 C7.4326433,20 7.96081314,19.8639524 8.60511116,19.5919524 C9.25121034,19.3268571 9.81886376,19.1948095 10.3056067,19.1948095 C10.8233013,19.1948095 11.4257932,19.3231429 12.1111389,19.5787619 C12.8360157,19.8355238 13.394995,19.9635238 13.785944,19.9635238 C14.8077297,19.9635238 15.8313165,19.1787619 16.8618236,17.6081429 C17.5300582,16.6067619 18.0211619,15.6057619 18.3333333,14.604381 C17.6214914,14.3870952 16.9928825,13.8827143 16.4425298,13.0888571 Z" id="Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.1 KiB |
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
|
||||
<title>linux-grey@svg</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Mockups" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Deploy-agents---1-Default" transform="translate(-874.000000, -276.000000)" fill="#95A3BF">
|
||||
<g id="Popup" transform="translate(640.000000, 90.000000)">
|
||||
<g id="Content" transform="translate(0.000000, 13.000000)">
|
||||
<g id="OS" transform="translate(20.000000, 133.000000)">
|
||||
<g transform="translate(200.000000, 26.000000)" id="Icons/Dark/20/linux-grey">
|
||||
<g transform="translate(14.000000, 14.000000)">
|
||||
<path d="M6.05225389,3.20954057 C6.42861474,1.34333636 8.08089847,0 9.99996946,0 C11.9190404,0 13.5713642,1.34333636 13.9476317,3.20954057 L14.397366,5.43926559 C14.6324332,6.60521489 15.0956343,7.71417739 15.7607024,8.70352628 L16.5345709,9.85472888 C17.0175053,10.5730638 17.3332393,11.3846923 17.4639063,12.2310009 C18.2329747,12.2955877 18.9071095,12.7847088 19.1973769,13.5044304 L19.8529783,15.1299008 C20.1835124,15.9493693 19.9444452,16.8867047 19.2607103,17.4516393 L16.7485713,19.5277773 C16.017103,20.132312 14.9625673,20.1591121 14.2008323,19.5925775 L13.1892566,18.8401758 C13.1758833,18.8303091 13.1626566,18.8201757 13.1495766,18.8099091 C12.6530021,18.943376 12.1306009,19.0147095 11.5914264,19.0147095 L8.40851254,19.0147095 C7.86936465,19.0147095 7.34699014,18.9435094 6.85044236,18.8099091 C6.83737566,18.8201757 6.8241623,18.8303091 6.81078894,18.8401758 L5.79923999,19.5925775 C5.03749161,20.1591121 3.98300923,20.132312 3.25151425,19.5277773 L0.739281919,17.4516393 C0.0556237114,16.8867047 -0.183466827,15.9493693 0.147041917,15.1299008 L0.802702062,13.5044304 C1.09295605,12.7847488 1.7670309,12.2956277 2.5359793,12.2310142 C2.66667293,11.3846923 2.98240697,10.5730638 3.4653014,9.85472888 L4.23918314,8.70352628 C4.90425131,7.71417739 5.36743902,6.60521489 5.60258621,5.43926559 L6.05225389,3.20954057 Z M14.4593662,12.6344951 C14.1793655,12.8439356 13.9522984,13.1251229 13.8081647,13.4584303 L12.7840157,15.8284357 C12.2670412,16.1305697 11.6694799,16.2983034 11.0462251,16.2983034 L8.95375377,16.2983034 C8.33053903,16.2983034 7.73301768,16.1305697 7.21605652,15.828569 L6.19182754,13.4584303 C6.04776055,13.1250962 5.8207067,12.8438956 5.54062607,12.6344551 C5.57495948,12.2047608 5.69187975,11.7800665 5.89138686,11.3843723 L7.56905731,8.05680482 L7.579124,8.06677818 C8.91622035,9.3927945 11.0840786,9.3927945 12.4211616,8.06677818 L12.4310149,8.05700483 L14.1085654,11.384359 C14.3081658,11.7800799 14.4249661,12.2047875 14.4593662,12.6344951 Z M12.0542674,5.69209283 L12.0542674,4.07456918 L10.684731,4.07456918 L10.684731,5.14285159 C10.9753717,5.20165172 11.2601056,5.29829194 11.5313329,5.43278558 L12.0542674,5.69209283 Z M9.31519458,5.14291826 L9.31519458,4.07456918 L7.94565816,4.07456918 L7.94565816,5.69226616 L8.46895267,5.43278558 C8.74007328,5.29834527 9.02468726,5.20173172 9.31519458,5.14291826 Z M2.71007303,13.5818973 C2.4300724,13.5818973 2.17827183,13.7509643 2.07428493,14.0088316 L1.41863012,15.6343019 C1.3084552,15.9075025 1.38815005,16.2199032 1.61604389,16.4083036 L4.12827622,18.4844417 C4.37210344,18.6859088 4.72359757,18.6948421 4.97751814,18.5060417 L5.98906708,17.75364 C6.24174765,17.5657729 6.33202786,17.2307055 6.20761424,16.9428382 L4.9330247,13.9934982 C4.82513113,13.7437643 4.57755724,13.5818973 4.30362329,13.5818973 L2.71007303,13.5818973 Z M17.925774,14.0088316 C17.8217738,13.7509643 17.5700399,13.5818973 17.2899059,13.5818973 L15.6964356,13.5818973 C15.422435,13.5818973 15.1749678,13.7437643 15.0669675,13.9934982 L13.7924313,16.9428382 C13.6680311,17.2307055 13.7582979,17.5657729 14.0109652,17.75364 L15.0225674,18.5060417 C15.2764347,18.6948421 15.6279021,18.6859088 15.8717694,18.4844417 L18.3840417,16.4083036 C18.6119089,16.2199032 18.6916424,15.9075025 18.5813755,15.6343019 L17.925774,14.0088316 Z M9.08143405,6.64758832 C9.65976869,6.36081434 10.3405169,6.36081434 10.9188515,6.64758832 L11.583213,6.97701572 L11.4527594,7.10638935 C10.6505043,7.90200448 9.34978132,7.90200448 8.54752618,7.10638935 L8.41707256,6.97701572 L9.08143405,6.64758832 Z" id="Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.5 KiB |
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
|
||||
<title>windows-grey@svg</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Mockups" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Deploy-agents---1-Default" transform="translate(-674.000000, -276.000000)" fill="#95A3BF">
|
||||
<g id="Popup" transform="translate(640.000000, 90.000000)">
|
||||
<g id="Content" transform="translate(0.000000, 13.000000)">
|
||||
<g id="OS" transform="translate(20.000000, 133.000000)">
|
||||
<g transform="translate(0.000000, 26.000000)" id="Icons/Dark/20/windows-grey">
|
||||
<g transform="translate(14.000000, 14.000000)">
|
||||
<path d="M0,0 L9.16666667,0 L9.16666667,9.16666667 L0,9.16666667 L0,0 Z M10.8333333,0 L10.8333333,9.16666667 L20,9.16666667 L20,0 L10.8333333,0 Z M0,10.8333333 L0,20 L9.16666667,20 L9.16666667,10.8333333 L0,10.8333333 Z M10.8333333,10.8333333 L10.8333333,20 L20,20 L20,10.8333333 L10.8333333,10.8333333 Z" id="Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
|
@ -0,0 +1,782 @@
|
|||
<?php
|
||||
/**
|
||||
* Agent deploy wizard
|
||||
*
|
||||
* @category Class
|
||||
* @package Pandora FMS
|
||||
* @subpackage Agent deploy wizard
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* 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 for version 2.
|
||||
* 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.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
global $config;
|
||||
|
||||
/**
|
||||
* Provides functionality for agent deploy wizard.
|
||||
*/
|
||||
class AgentDeployWizard
|
||||
{
|
||||
|
||||
/**
|
||||
* Url of controller.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $ajaxController;
|
||||
|
||||
/**
|
||||
* References datatables object identifier.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $tableId;
|
||||
|
||||
/**
|
||||
* Allowed methods to be called using AJAX request.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $AJAXMethods = ['loadModal'];
|
||||
|
||||
|
||||
/**
|
||||
* Checks if target method is available to be called using AJAX.
|
||||
*
|
||||
* @param string $method Target method.
|
||||
*
|
||||
* @return boolean True allowed, false not.
|
||||
*/
|
||||
public function ajaxMethod($method)
|
||||
{
|
||||
return in_array($method, $this->AJAXMethods);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generates a JSON error.
|
||||
*
|
||||
* @param string $msg Error message.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function error($msg)
|
||||
{
|
||||
echo json_encode(
|
||||
['error' => $msg]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Minor function to dump json message as ajax response.
|
||||
*
|
||||
* @param string $type Type: result || error.
|
||||
* @param string $msg Message.
|
||||
* @param boolean $delete Deletion messages.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function ajaxMsg($type, $msg, $delete=false)
|
||||
{
|
||||
if ($type === 'error') {
|
||||
$msg_title = ($delete === true) ? 'Failed while removing' : 'Failed while saving';
|
||||
} else {
|
||||
$msg_title = ($delete === true) ? 'Successfully deleted' : 'Successfully saved into keystore';
|
||||
}
|
||||
|
||||
echo json_encode(
|
||||
[ $type => __($msg_title).':<br>'.$msg ]
|
||||
);
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Initializes object and validates user access.
|
||||
*
|
||||
* @param string $ajax_controller Path of ajaxController, is the 'page'
|
||||
* variable sent in ajax calls.
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
public function __construct($ajax_controller)
|
||||
{
|
||||
global $config;
|
||||
|
||||
// Check access.
|
||||
check_login();
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AR') === false) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to access agent deploy wizard'
|
||||
);
|
||||
|
||||
if (is_ajax()) {
|
||||
echo json_encode(['error' => 'noaccess']);
|
||||
} else {
|
||||
include 'general/noaccess.php';
|
||||
}
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
$this->ajaxController = $ajax_controller;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prints inputs for modal "Deploy agents".
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function loadModal()
|
||||
{
|
||||
ob_start();
|
||||
echo '<div id="wizard-modal-content">';
|
||||
echo $this->getModalContent();
|
||||
echo '</div>';
|
||||
echo ob_get_clean();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Run AgentDeployWizard.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
global $config;
|
||||
|
||||
if (check_acl($config['id_user'], 0, 'AR') === false) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to access agent deploy.'
|
||||
);
|
||||
include 'general/noaccess.php';
|
||||
return;
|
||||
}
|
||||
|
||||
ui_require_css_file('agent_deploy_wizard');
|
||||
|
||||
// Auxiliar div for agent deploy modal.
|
||||
echo '<div id="agent_deploy_modal" class="invisible"></div>';
|
||||
|
||||
echo $this->loadJS();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generates content of modal.
|
||||
*
|
||||
* @return string Modal content.
|
||||
*/
|
||||
public function getModalContent()
|
||||
{
|
||||
global $config;
|
||||
|
||||
ob_start();
|
||||
|
||||
$inputs = [];
|
||||
|
||||
// Container div for stepper.
|
||||
$stepper_container = html_print_div(
|
||||
[
|
||||
'id' => 'stepper_container',
|
||||
'class' => 'stepper',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'modal_header',
|
||||
'class' => 'margin-bottom-10',
|
||||
'content' => $stepper_container,
|
||||
]
|
||||
);
|
||||
|
||||
// Deploy configuration.
|
||||
$tableConfiguration = new stdClass();
|
||||
$tableConfiguration->class = 'filter-table-adv w100p';
|
||||
$tableConfiguration->data = [];
|
||||
$tableConfiguration->style = [];
|
||||
$tableConfiguration->cellclass = [];
|
||||
$tableConfiguration->colspan = [];
|
||||
$tableConfiguration->rowclass['os'] = 'margin-bottom-5';
|
||||
$tableConfiguration->rowstyle['block2'] = 'display: flex; justify-content: space-between;';
|
||||
$tableConfiguration->rowspan = [];
|
||||
|
||||
$windows_label_img = html_print_image(
|
||||
'/images/windows-grey@svg.svg',
|
||||
true,
|
||||
['class' => 'installer-title-icon main_menu_icon']
|
||||
);
|
||||
|
||||
$windows_label = html_print_div(
|
||||
[
|
||||
'style' => 'display: flex;align-items: center; margin-top: 5px;margin-bottom: 5px;',
|
||||
'content' => $windows_label_img.'Windows',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$linux_label_img = html_print_image(
|
||||
'/images/linux-grey@svg.svg',
|
||||
true,
|
||||
['class' => 'installer-title-icon main_menu_icon']
|
||||
);
|
||||
|
||||
$linux_label = html_print_div(
|
||||
[
|
||||
'style' => 'display: flex;align-items: center; margin-top: 5px;margin-bottom: 5px;',
|
||||
'content' => $linux_label_img.'Unix / Linux',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$mac_label_img = html_print_image(
|
||||
'/images/apple-grey@svg.svg',
|
||||
true,
|
||||
['class' => 'installer-title-icon main_menu_icon']
|
||||
);
|
||||
|
||||
$mac_label = html_print_div(
|
||||
[
|
||||
'style' => 'display: flex;align-items: center; margin-top: 5px;margin-bottom: 5px;',
|
||||
'content' => $mac_label_img.'Mac OS',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
// Operating System switch buttons.
|
||||
$switchButtons = [];
|
||||
$switchButtons[] = html_print_radio_button_extended(
|
||||
'os',
|
||||
0,
|
||||
$windows_label,
|
||||
0,
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
);
|
||||
$switchButtons[] = html_print_radio_button_extended(
|
||||
'os',
|
||||
1,
|
||||
$linux_label,
|
||||
0,
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
);
|
||||
$switchButtons[] = html_print_radio_button_extended(
|
||||
'os',
|
||||
2,
|
||||
$mac_label,
|
||||
0,
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
);
|
||||
|
||||
$sub_tip = '<span class="input_sub_placeholder_normal">'.__('Please note that all OS must be 64-bit based architecture').'</span>';
|
||||
|
||||
$tableConfiguration->data['os'][] = html_print_label_input_block(
|
||||
__('Choose your OS'),
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'os_selector',
|
||||
'class' => 'switch_radio_button custom-switch-radio-button',
|
||||
'content' => implode('', $switchButtons),
|
||||
],
|
||||
true
|
||||
).$sub_tip
|
||||
);
|
||||
|
||||
$server_add_help_tip = ui_print_help_tip(
|
||||
__('Use your %s Data Server IP address here. It must be possible to establish a connection from the agent to port 41121/tcp of this address.', get_product_name()),
|
||||
true
|
||||
);
|
||||
|
||||
$tableConfiguration->data['block2'][0] = html_print_label_input_block(
|
||||
__('Server address').$server_add_help_tip,
|
||||
html_print_input_text(
|
||||
'server_addr',
|
||||
$_SERVER['SERVER_ADDR'],
|
||||
'',
|
||||
16,
|
||||
100,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
'w260px'
|
||||
)
|
||||
);
|
||||
|
||||
$tableConfiguration->data['block2'][1] = html_print_label_input_block(
|
||||
__('Group'),
|
||||
html_print_select_groups(
|
||||
false,
|
||||
'AR',
|
||||
false,
|
||||
'group',
|
||||
$group,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w260px',
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
false,
|
||||
'id_grupo',
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
'260px',
|
||||
false,
|
||||
true,
|
||||
)
|
||||
);
|
||||
|
||||
echo '<div id="config_page">';
|
||||
echo '<form id="form_generate_installer" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/agent_deploy">';
|
||||
|
||||
if ($config['language'] === 'es') {
|
||||
$instructions_url = 'https://pandorafms.com/manual/es/documentation/02_installation/05_configuration_agents';
|
||||
} else {
|
||||
$instructions_url = 'https://pandorafms.com/manual/en/documentation/02_installation/05_configuration_agents';
|
||||
}
|
||||
|
||||
$instructions_link = '<a class="green-link" style="font-size: 15px;" href="'.$instructions_url.'" target="_blank">'.__('view the following instructions').'</a>';
|
||||
|
||||
$more_info_link = html_print_div(
|
||||
[
|
||||
'id' => 'config_form_more_info',
|
||||
'class' => 'warn-box',
|
||||
'content' => __('If you need more information regarding agents').', '.$instructions_link,
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$table_config = html_print_div(
|
||||
[
|
||||
'style' => 'flex: 1;',
|
||||
'content' => html_print_table($tableConfiguration, true),
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'config_form',
|
||||
'class' => 'white_table_flex agent_details_col modal-content',
|
||||
'content' => $table_config.$more_info_link,
|
||||
]
|
||||
);
|
||||
|
||||
html_print_div(
|
||||
['id' => 'footer_separator']
|
||||
);
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'config_buttonset',
|
||||
'class' => 'ui-dialog-buttonset',
|
||||
'content' => html_print_submit_button(
|
||||
__('Generate installer'),
|
||||
'generate_installer',
|
||||
false,
|
||||
[],
|
||||
true,
|
||||
),
|
||||
]
|
||||
);
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div id="installer_page">';
|
||||
echo '<div id="installer_data" class="white_table_flex agent_details_col modal-content">';
|
||||
|
||||
// Start of Unix / Linux installer section.
|
||||
$title = html_print_image(
|
||||
'/images/linux-grey@svg.svg',
|
||||
true,
|
||||
['class' => 'installer-title-icon main_menu_icon svg-brightness-0']
|
||||
);
|
||||
|
||||
$title .= '<span class="header_title">'.__('Linux agent').'</span>';
|
||||
|
||||
$content = html_print_div(
|
||||
[
|
||||
'class' => 'installer-title',
|
||||
'content' => $title,
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$content .= '<span>'.__('Run the following command in the shell of your Linux server to perform the installation of the generated agent:').'</span>';
|
||||
$content .= html_print_code_picker('run_command_box_linux', '', 'installer-code-fragment', false, true);
|
||||
|
||||
$content .= '<span>'.__('Once installed, you must run the following command to start the software agent service:').'</span>';
|
||||
$content .= html_print_code_picker('start_service_box_linux', '', 'installer-code-fragment', true, true);
|
||||
|
||||
if ($config['language'] === 'es') {
|
||||
$linux_dependencies_url = 'https://pandorafms.com/manual/es/documentation/02_installation/01_installing#requisitos_para_el_agente';
|
||||
} else {
|
||||
$linux_dependencies_url = 'https://pandorafms.com/manual/en/documentation/02_installation/01_installing#agent_requirements';
|
||||
}
|
||||
|
||||
$linux_dependencies_link = '<a class="green-link" href="'.$linux_dependencies_url.'" target="_blank">'.__('dependencies').'</a>';
|
||||
|
||||
$content .= '<span>'.__('For the correct operation of the Linux agent it is necessary that the server has installed the following ').$linux_dependencies_link.'</span>';
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'linux_installer',
|
||||
'class' => 'white_table_flex agent_details_col',
|
||||
'style' => 'margin-bottom: 20px',
|
||||
'content' => $content,
|
||||
]
|
||||
);
|
||||
|
||||
// Start of Windows installer section.
|
||||
$title = html_print_image(
|
||||
'/images/windows-grey@svg.svg',
|
||||
true,
|
||||
['class' => 'installer-title-icon main_menu_icon svg-brightness-0']
|
||||
);
|
||||
|
||||
$title .= '<span class="header_title">'.__('Windows agent').'</span>';
|
||||
|
||||
$content = html_print_div(
|
||||
[
|
||||
'class' => 'installer-title',
|
||||
'content' => $title,
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$content .= '<span>'.__('Run the following command in cmd.exe as an administrator:').'</span>';
|
||||
$content .= html_print_code_picker('run_command_box_windows', '', 'installer-code-fragment', false, true);
|
||||
|
||||
$content .= '<span>'.__('Once installed, you must run the following command to start the software agent service:').'</span>';
|
||||
$content .= html_print_code_picker('start_service_box_windows', '', 'installer-code-fragment', true, true);
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'win_installer',
|
||||
'class' => 'white_table_flex agent_details_col',
|
||||
'style' => 'margin-bottom: 20px',
|
||||
'content' => $content,
|
||||
]
|
||||
);
|
||||
|
||||
// Start of MacOS installer section.
|
||||
$title = html_print_image(
|
||||
'/images/apple-grey@svg.svg',
|
||||
true,
|
||||
['class' => 'installer-title-icon main_menu_icon svg-brightness-0']
|
||||
);
|
||||
|
||||
$title .= '<span class="header_title">'.__('Mac agent').'</span>';
|
||||
|
||||
$content = html_print_div(
|
||||
[
|
||||
'class' => 'installer-title',
|
||||
'content' => $title,
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$mac_warn_box = html_print_div(
|
||||
[
|
||||
'id' => 'warn_box_mac',
|
||||
'class' => 'warn-box',
|
||||
'content' => __('To complete the installation process, please perform a manual installation and configure the server address to XXX and specify the group as XXX. Thank you for your cooperation.'),
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'mac_installer',
|
||||
'class' => 'white_table_flex agent_details_col',
|
||||
'style' => 'margin-bottom: 20px',
|
||||
'content' => $content.$mac_warn_box,
|
||||
]
|
||||
);
|
||||
|
||||
// Footer.
|
||||
html_print_div(['id' => 'footer_separator']);
|
||||
|
||||
echo '</div>';
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'installer_buttonset',
|
||||
'class' => 'flex-row',
|
||||
'style' => '',
|
||||
'content' => html_print_button(
|
||||
__('Change configuration'),
|
||||
'change_configuration',
|
||||
false,
|
||||
'',
|
||||
['class' => 'secondary'],
|
||||
true,
|
||||
).html_print_button(
|
||||
__('Done'),
|
||||
'done',
|
||||
false,
|
||||
'',
|
||||
['style' => 'min-width: 0;'],
|
||||
true
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
echo '</div>';
|
||||
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Loads JS content.
|
||||
*
|
||||
* @return string JS content.
|
||||
*/
|
||||
public function loadJS()
|
||||
{
|
||||
ob_start();
|
||||
|
||||
ui_require_javascript_file('stepper', 'include/javascript/', true);
|
||||
|
||||
// Javascript content.
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
/**
|
||||
* Cleanup current dom entries.
|
||||
*/
|
||||
function cleanupDOM() {
|
||||
$('#div-identifier').empty();
|
||||
$('#div-product').empty();
|
||||
$('#div-username').empty();
|
||||
$('#div-password').empty();
|
||||
$('#div-extra_1').empty();
|
||||
$('#div-extra_2').empty();
|
||||
}
|
||||
|
||||
/**
|
||||
* Process ajax responses and shows a dialog with results.
|
||||
*/
|
||||
function showMsg(data) {
|
||||
var title = "<?php echo __('Success'); ?>";
|
||||
var text = '';
|
||||
var failed = 0;
|
||||
try {
|
||||
data = JSON.parse(data);
|
||||
text = data['result'];
|
||||
} catch (err) {
|
||||
title = "<?php echo __('Failed'); ?>";
|
||||
text = err.message;
|
||||
failed = 1;
|
||||
}
|
||||
if (!failed && data['error'] != undefined) {
|
||||
title = "<?php echo __('Failed'); ?>";
|
||||
text = data['error'];
|
||||
failed = 1;
|
||||
}
|
||||
if (data['report'] != undefined) {
|
||||
data['report'].forEach(function (item){
|
||||
text += '<br>'+item;
|
||||
});
|
||||
}
|
||||
|
||||
$('#msg').empty();
|
||||
$('#msg').html(text);
|
||||
$('#msg').dialog({
|
||||
width: 450,
|
||||
position: {
|
||||
my: 'center',
|
||||
at: 'center',
|
||||
of: window,
|
||||
collision: 'fit'
|
||||
},
|
||||
title: title,
|
||||
buttons: [
|
||||
{
|
||||
class: "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next",
|
||||
text: 'OK',
|
||||
click: function(e) {
|
||||
if (!failed) {
|
||||
$(".ui-dialog-content").dialog("close");
|
||||
$('.info').hide();
|
||||
cleanupDOM();
|
||||
dt_keystore.draw(false);
|
||||
} else {
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
function generate_installer() {
|
||||
$('#config_page').hide();
|
||||
$('#installer_page').show();
|
||||
|
||||
var os_val = $('input[name="os"]:checked').val();
|
||||
var server_addr_val = $('input[name="server_addr"]').val();
|
||||
var group_val = $('[name="group"] option:selected').text();
|
||||
|
||||
var win_installer_command = `Invoke-WebRequest -Uri https://firefly.pandorafms.com/pandorafms/latest/Windows/Pandora%20FMS%20Windows%20Agent%20v7.0NG.x86_64.exe -OutFile \$\{env:tmp\}\\\pandora-agent-windows.exe; & \$\{env:tmp\}\\\pandora-agent-windows.exe /S --ip ${server_addr_val} --group \"${group_val}\" --remote_config 1`;
|
||||
var linux_installer_command = `export PANDORA_SERVER_IP='${server_addr_val}' && \\ \nexport PANDORA_REMOTE_CONFIG=1 && \\ \nexport PANDORA_GROUP='${group_val}' && \\ \ncurl -Ls https://pfms.me/agent-deploy | bash`;
|
||||
var mac_installer_text = `To complete the installation process, please perform a manual installation and configure the server IP to ${server_addr_val} and specify the group as ${group_val}. Thank you for your cooperation`;
|
||||
var linux_service_start = "/etc/init.d/pandora_agent_daemon start";
|
||||
var win_service_start = "NET START PandoraFMSAgent";
|
||||
|
||||
switch (os_val) {
|
||||
case '0':
|
||||
$('#run_command_box_windows').text(win_installer_command);
|
||||
$('#start_service_box_windows').text(win_service_start);
|
||||
$('#linux_installer').hide();
|
||||
$('#mac_installer').hide();
|
||||
$('#win_installer').show();
|
||||
break;
|
||||
|
||||
case '1':
|
||||
$('#run_command_box_linux').text(linux_installer_command);
|
||||
$('#start_service_box_linux').text(linux_service_start);
|
||||
$('#win_installer').hide();
|
||||
$('#mac_installer').hide();
|
||||
$('#linux_installer').show();
|
||||
break;
|
||||
|
||||
case '2':
|
||||
$('#warn_box_mac').text(mac_installer_text);
|
||||
$('#win_installer').hide();
|
||||
$('#linux_installer').hide();
|
||||
$('#mac_installer').show();
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function display_deploy_configuration() {
|
||||
$('#installer_page').hide();
|
||||
$('#config_page').show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads modal from AJAX.
|
||||
*/
|
||||
function show_agent_install_modal() {
|
||||
var title = '<?php echo __('Deploy agent'); ?>';
|
||||
var method = '';
|
||||
|
||||
load_modal({
|
||||
target: $('#agent_deploy_modal'),
|
||||
form: 'modal_form',
|
||||
url: '<?php echo ui_get_full_url('ajax.php', false, false, false); ?>',
|
||||
ajax_callback: showMsg,
|
||||
cleanup: cleanupDOM,
|
||||
modal: {
|
||||
title: title,
|
||||
},
|
||||
extradata: [
|
||||
{
|
||||
name: 'identifier',
|
||||
}
|
||||
],
|
||||
onload: function() {
|
||||
display_deploy_configuration();
|
||||
|
||||
var stepper_step_names = [];
|
||||
stepper_step_names.push('<?php echo __('Configuration'); ?>');
|
||||
stepper_step_names.push('<?php echo __('Installer'); ?>');
|
||||
|
||||
var stepper_container = $('#stepper_container');
|
||||
var stepper = new Stepper(stepper_container, stepper_step_names);
|
||||
|
||||
stepper.render();
|
||||
|
||||
// Initial step: 1.
|
||||
stepper.selectStep(1);
|
||||
|
||||
$("#form_generate_installer").on('submit', function(e) {
|
||||
// We only want the form to be submitted for field validation.
|
||||
e.preventDefault();
|
||||
generate_installer();
|
||||
stepper.selectStep(2);
|
||||
});
|
||||
|
||||
$("#button-change_configuration").on('click', function() {
|
||||
display_deploy_configuration();
|
||||
stepper.selectStep(1);
|
||||
});
|
||||
|
||||
$("#button-done").on('click', function() {
|
||||
$(".ui-dialog-content").dialog("close");
|
||||
$('.info').hide();
|
||||
cleanupDOM();
|
||||
dt_keystore.draw(false);
|
||||
});
|
||||
},
|
||||
onshow: {
|
||||
page: '<?php echo $this->ajaxController; ?>',
|
||||
method: 'loadModal'
|
||||
},
|
||||
onsubmit: {
|
||||
page: '<?php echo $this->ajaxController; ?>',
|
||||
method: method
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
var page = 0;
|
||||
|
||||
$("#button-modal_deploy_agent").on('click', function() {
|
||||
show_agent_install_modal();
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
// EOF Javascript content.
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -6932,4 +6932,39 @@ function html_print_go_top()
|
|||
$output .= '</div>';
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render a code picker fragment with default Pandora styles.
|
||||
*
|
||||
* @param string $id,
|
||||
* @param string $content Content.
|
||||
* @param string $classes Classes for code picker.
|
||||
* @param boolean $single_line If true, code picker will be displayed as a single line of code.
|
||||
* @param boolean $return Return output if set to true.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function html_print_code_picker(
|
||||
string $id,
|
||||
string $content='',
|
||||
string $classes='',
|
||||
bool $single_line=false,
|
||||
bool $return=false
|
||||
) {
|
||||
$single_line_class = '';
|
||||
|
||||
if ($single_line === true) {
|
||||
$single_line_class = 'single-line ';
|
||||
}
|
||||
|
||||
$output = '<div class="code-fragment '.$single_line_class.$classes.'">';
|
||||
$output .= '<pre style="margin: 0;"><code class="code-font" id="'.$id.'" style="display: block; white-space: pre-wrap;">'.$content.'</code></pre>';
|
||||
$output .= '</div>';
|
||||
|
||||
if ($return === true) {
|
||||
return $output;
|
||||
} else {
|
||||
echo $output;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
function Stepper(container, steps) {
|
||||
if (container instanceof jQuery) {
|
||||
this.container = container[0];
|
||||
} else {
|
||||
this.container = container;
|
||||
}
|
||||
|
||||
this.steps = [];
|
||||
|
||||
for (var i = 1; i <= steps.length; i++) {
|
||||
var stepContainer = document.createElement("div");
|
||||
stepContainer.className = "step-container";
|
||||
var step = document.createElement("span");
|
||||
step.className = "step";
|
||||
step.textContent = i;
|
||||
var text = document.createElement("div");
|
||||
text.className = "step-text";
|
||||
text.textContent = steps[i - 1];
|
||||
stepContainer.appendChild(step);
|
||||
stepContainer.appendChild(text);
|
||||
this.steps.push(stepContainer);
|
||||
}
|
||||
}
|
||||
|
||||
Stepper.prototype.render = function() {
|
||||
var separator = document.createElement("div");
|
||||
separator.className = "step-separator";
|
||||
var stepsContainer = document.createElement("div");
|
||||
stepsContainer.className = "steps";
|
||||
|
||||
for (var i = 0; i < this.steps.length; i++) {
|
||||
if (i > 0) {
|
||||
stepsContainer.appendChild(separator.cloneNode());
|
||||
}
|
||||
stepsContainer.appendChild(this.steps[i]);
|
||||
}
|
||||
|
||||
this.container.innerHTML = "";
|
||||
this.container.appendChild(stepsContainer);
|
||||
};
|
||||
|
||||
Stepper.prototype.selectStep = function(step) {
|
||||
for (var i = 0; i < this.steps.length; i++) {
|
||||
if (i < step - 1) {
|
||||
this.steps[i].querySelector(".step").classList.add("visited");
|
||||
this.steps[i].querySelector(".step-text").classList.remove("active");
|
||||
var separators = this.container.querySelectorAll(".step-separator");
|
||||
if (separators[i]) {
|
||||
separators[i].classList.add("visited");
|
||||
}
|
||||
} else if (i === step - 1) {
|
||||
this.steps[i].querySelector(".step").classList.add("active");
|
||||
this.steps[i].querySelector(".step-text").classList.add("active");
|
||||
this.steps[i].querySelector(".step").classList.remove("visited");
|
||||
} else {
|
||||
this.steps[i]
|
||||
.querySelector(".step")
|
||||
.classList.remove("visited", "active");
|
||||
|
||||
this.steps[i].querySelector(".step-text").classList.remove("active");
|
||||
|
||||
var separators = this.container.querySelectorAll(".step-separator");
|
||||
|
||||
if (separators[i - 1]) {
|
||||
separators[i - 1].classList.remove("visited");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
|
@ -0,0 +1,97 @@
|
|||
#agent_deploy_modal {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#footer_separator {
|
||||
position: absolute;
|
||||
bottom: 57px;
|
||||
border-top: 1px solid #c1ccdc;
|
||||
width: 100%;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
#stepper_container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#modal_header {
|
||||
background-color: #f6f7fb;
|
||||
border-radius: 10px;
|
||||
width: 100%;
|
||||
height: 76px;
|
||||
/* padding: 10px; */
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#config_form_more_info {
|
||||
margin-bottom: 5px !important;
|
||||
}
|
||||
|
||||
#stepper_container {
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
#table1-os-0 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#os_selector {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#os_selector > label {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
display: flex;
|
||||
margin-bottom: 20px;
|
||||
min-height: 400px;
|
||||
flex-direction: column;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.installer-code-fragment {
|
||||
margin-bottom: 15px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.installer-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.installer-title-icon {
|
||||
margin-right: 9px;
|
||||
}
|
||||
|
||||
.green-link {
|
||||
color: #1d7873 !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.green-link:hover {
|
||||
color: #0d312f !important;
|
||||
}
|
||||
|
||||
.custom-switch-radio-button > label {
|
||||
color: #444 !important;
|
||||
}
|
||||
|
||||
.custom-switch-radio-button input:checked + label img {
|
||||
filter: brightness(100);
|
||||
}
|
||||
|
||||
.svg-brightness-0 {
|
||||
filter: brightness(0);
|
||||
}
|
|
@ -151,6 +151,14 @@
|
|||
src: local("Nunito-Regular"), url(../../fonts/nunito.woff) format("woff");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "firacode-regular";
|
||||
src: url("../fonts/FiraCode-Regular.woff") format("woff");
|
||||
src: local("FiraCode-Regular"),
|
||||
url(../../fonts/FiraCode-Regular.woff) format("woff");
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
* {
|
||||
font-size: 9pt;
|
||||
line-height: 16pt;
|
||||
|
@ -479,6 +487,11 @@ select:-internal-list-box {
|
|||
max-width: 250px;
|
||||
}
|
||||
|
||||
.w260px {
|
||||
width: 260px;
|
||||
max-width: 260px;
|
||||
}
|
||||
|
||||
.w280px {
|
||||
width: 280px;
|
||||
max-width: 280px;
|
||||
|
@ -1212,6 +1225,14 @@ p.center {
|
|||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.margin-top-5 {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.margin-bottom-5 {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.margin-top-10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
@ -11528,6 +11549,11 @@ p.trademark-copyright {
|
|||
color: #8a96a6;
|
||||
}
|
||||
|
||||
.input_sub_placeholder_normal {
|
||||
font-size: 13px;
|
||||
color: #8a96a6;
|
||||
}
|
||||
|
||||
.input_sub_placeholder_warning {
|
||||
color: #ffb900;
|
||||
font-style: italic;
|
||||
|
@ -11956,6 +11982,214 @@ div.parent_graph > p.legend_background > table > tbody > tr {
|
|||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.warn-box {
|
||||
background: #fffbdf;
|
||||
color: #454545;
|
||||
font-size: 15px;
|
||||
border-radius: 5px;
|
||||
padding: 15px;
|
||||
padding-left: 30px;
|
||||
position: relative;
|
||||
margin: 25px 0px;
|
||||
}
|
||||
.warn-box::before {
|
||||
content: "|";
|
||||
color: #dd9900;
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
height: 77%;
|
||||
background: #dd9900;
|
||||
border-radius: 12px;
|
||||
width: 4px;
|
||||
}
|
||||
.err-box {
|
||||
background: #fbdada;
|
||||
color: #454545;
|
||||
font-size: 15px;
|
||||
border-radius: 5px;
|
||||
padding: 15px;
|
||||
padding-left: 30px;
|
||||
position: relative;
|
||||
margin: 25px 0px;
|
||||
}
|
||||
.err-box::before {
|
||||
content: "|";
|
||||
color: red;
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
height: 77%;
|
||||
background: red;
|
||||
border-radius: 12px;
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
.signature {
|
||||
color: #8a96a6;
|
||||
font-size: 13px;
|
||||
font-weight: 300;
|
||||
margin-right: auto;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.link {
|
||||
color: #82b92e;
|
||||
text-decoration: none;
|
||||
}
|
||||
.signature a {
|
||||
color: #82b92e;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.steps {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.step {
|
||||
font-size: 15px;
|
||||
border: 2px solid #c0ccdc;
|
||||
color: #999;
|
||||
border-radius: 30px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.step.active {
|
||||
background-color: #0d312f !important;
|
||||
color: #ffffff !important;
|
||||
border-color: #0d312f !important;
|
||||
}
|
||||
|
||||
.step.visited {
|
||||
background-color: #1d7873 !important;
|
||||
color: #ffffff !important;
|
||||
border-color: #1d7873 !important;
|
||||
}
|
||||
|
||||
.steps {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.step-separator {
|
||||
flex: 1;
|
||||
height: calc(50% - 12px);
|
||||
border: none;
|
||||
border-top: 2px solid transparent;
|
||||
border-image: repeating-linear-gradient(
|
||||
to right,
|
||||
#c0ccdc 0,
|
||||
#c0ccdc 4px,
|
||||
transparent 4px,
|
||||
transparent 8px
|
||||
)
|
||||
1 0;
|
||||
position: relative;
|
||||
transform: translateY(-14px);
|
||||
}
|
||||
|
||||
.step-separator.visited {
|
||||
border-top: 2px solid #1d7873 !important;
|
||||
border-image: none;
|
||||
}
|
||||
|
||||
.step-separator:last-child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.step-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.step-text {
|
||||
font-size: 12px;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.step-text.active {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.code-fragment {
|
||||
background-color: #1f2435;
|
||||
color: #eaeaea;
|
||||
overflow-y: scroll;
|
||||
height: 100px;
|
||||
padding: 10px;
|
||||
font-family: "firacode-regular";
|
||||
font-size: 14px;
|
||||
padding-left: 25px;
|
||||
padding-right: 25px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.code-fragment.single-line {
|
||||
height: 20px !important;
|
||||
overflow-y: hidden !important;
|
||||
}
|
||||
|
||||
.code-font {
|
||||
font-family: "firacode-regular" !important;
|
||||
}
|
||||
|
||||
/* Webkit-based browsers */
|
||||
.code-fragment::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
.code-fragment::-webkit-scrollbar-track {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.code-fragment::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(255, 255, 255, 0.25);
|
||||
border-radius: 4px;
|
||||
width: 6px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.code-fragment::-webkit-scrollbar-thumb:hover {
|
||||
background-color: rgba(255, 255, 255, 0.25);
|
||||
}
|
||||
|
||||
/* Firefox */
|
||||
.code-fragment::-moz-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
.code-fragment::-moz-scrollbar-track {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.code-fragment::-moz-scrollbar-thumb {
|
||||
background-color: rgba(255, 255, 255, 0.25);
|
||||
border-radius: 4px;
|
||||
width: 6px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.code-fragment::-moz-scrollbar-thumb:hover {
|
||||
background-color: rgba(255, 255, 255, 0.25);
|
||||
}
|
||||
|
||||
.legend-font-small {
|
||||
font-size: 7px !important;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue