Issue #286 Popular Ports
- scripts.js - selection and filling port based on a selection from the popular port - update.tpl.html - Added section with a selection of popular ports - ServerController.php - Methods to getLabels added new label - en_US.lang.php + cs_CZ.lang.php - modified the language of the new textspull/288/merge
parent
2d460abbf8
commit
5fc59454d0
|
@ -123,6 +123,9 @@ $sm_lang = array(
|
|||
'timeout' => 'Časový limit',
|
||||
'timeout_description' => 'Počet vteřin čekání na odpověď serveru.',
|
||||
'port' => 'Port',
|
||||
'custom_port' => 'Uživatelský Port',
|
||||
'popular_ports' => 'Populární Porty',
|
||||
'please_select' => 'Prosím vyberte',
|
||||
'type' => 'Typ',
|
||||
'type_website' => 'Web',
|
||||
'type_service' => 'Služba',
|
||||
|
|
|
@ -122,6 +122,9 @@ $sm_lang = array(
|
|||
'timeout' => 'Timeout',
|
||||
'timeout_description' => 'Number of seconds to wait for the server to respond.',
|
||||
'port' => 'Port',
|
||||
'custom_port' => 'Custom Port',
|
||||
'popular_ports' => 'Popular Ports',
|
||||
'please_select' => 'Please select',
|
||||
'type' => 'Type',
|
||||
'type_website' => 'Website',
|
||||
'type_service' => 'Service',
|
||||
|
|
|
@ -391,10 +391,12 @@ class ServerController extends AbstractServerController {
|
|||
'label_timeout' => psm_get_lang('servers', 'timeout'),
|
||||
'label_timeout_description' => psm_get_lang('servers', 'timeout_description'),
|
||||
'label_port' => psm_get_lang('servers', 'port'),
|
||||
'label_custom_port' => psm_get_lang('servers', 'custom_port'),
|
||||
'label_please_select' => psm_get_lang('servers', 'please_select'),
|
||||
'label_popular_ports' => psm_get_lang('servers', 'popular_ports'),
|
||||
'label_type' => psm_get_lang('servers', 'type'),
|
||||
'label_website' => psm_get_lang('servers', 'type_website'),
|
||||
'label_service' => psm_get_lang('servers', 'type_service'),
|
||||
'label_type' => psm_get_lang('servers', 'type'),
|
||||
'label_pattern' => psm_get_lang('servers', 'pattern'),
|
||||
'label_pattern_description' => psm_get_lang('servers', 'pattern_description'),
|
||||
'label_last_check' => psm_get_lang('servers', 'last_check'),
|
||||
|
|
|
@ -24,8 +24,34 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="port">{{ label_port }}</label>
|
||||
<div class="control-group popularPortsGroup">
|
||||
<label class="control-label" for="popularPorts">{{ label_port }}</label>
|
||||
<div class="controls">
|
||||
<select id="popularPorts" name="popularPorts">
|
||||
<option value="">{{ label_please_select }}</option>
|
||||
<option value="custom">{{ label_custom_port }}</option>
|
||||
<optgroup label="{{ label_popular_ports }}">
|
||||
<option value="80">HTTP (80)</option>
|
||||
<option value="443">HTTPS (443)</option>
|
||||
<option value="21">FTP (21)</option>
|
||||
<option value="25">SMTP (25)</option>
|
||||
<option value="465">SMTP Secure (465)</option>
|
||||
<option value="110">POP3 (110)</option>
|
||||
<option value="995">POP3 Secure (995)</option>
|
||||
<option value="143">IMAP (143)</option>
|
||||
<option value="993">IMAP over SSL (993)</option>
|
||||
<option value="22">SSH (22)</option>
|
||||
<option value="389">LDAP (389)</option>
|
||||
<option value="3306">MySQL (3306)</option>
|
||||
<option value="115">SFTP (115)</option>
|
||||
<option value="43">WHOIS (43)</option>
|
||||
<option value="53">BIND (53)</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group portGroup">
|
||||
<label class="control-label" for="port">{{ label_custom_port }}</label>
|
||||
<div class="controls">
|
||||
<input class="input-mini" type="text" id="port" name="port" value="{{ edit_value_port }}" maxlength="5" />
|
||||
</div>
|
||||
|
|
|
@ -48,6 +48,33 @@ $().ready(function() {
|
|||
|
||||
psm_flash_message();
|
||||
psm_tooltips();
|
||||
|
||||
// popularPorts
|
||||
// initial
|
||||
$('.portGroup').hide();
|
||||
var portInput = $('#port').val();
|
||||
|
||||
if (portInput != '') {
|
||||
var findPopularPorts = $('#popularPorts').find('option[value=' + portInput + ']');
|
||||
|
||||
if(findPopularPorts.length) {
|
||||
$(findPopularPorts).attr("selected", "selected");
|
||||
} else {
|
||||
$('#popularPorts').find('option[value=custom]').attr("selected", "selected");
|
||||
$('.portGroup').slideDown();
|
||||
}
|
||||
}
|
||||
|
||||
$('#popularPorts').change(function () {
|
||||
var popularPorts = $(this).val();
|
||||
|
||||
if (popularPorts == 'custom') {
|
||||
$('.portGroup').slideDown();
|
||||
} else {
|
||||
$('#port').val(popularPorts);
|
||||
$('.portGroup').slideUp();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function psm_xhr(mod, params, method, on_complete, options) {
|
||||
|
|
Loading…
Reference in New Issue