summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-06-30 10:03:23 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-06-30 10:03:23 +0000
commit83eb854d01145ddb03b03d71e93a39b27539650e (patch)
tree1bf0472607c3e1968972d0b0624a8b2cf6c83f4e
parent197f0c3db5a4fd740a8783049c75fa6693e438bf (diff)
downloadzabbix-83eb854d01145ddb03b03d71e93a39b27539650e.tar.gz
zabbix-83eb854d01145ddb03b03d71e93a39b27539650e.tar.xz
zabbix-83eb854d01145ddb03b03d71e93a39b27539650e.zip
- [DEV-137] minor changes in locales and sorting discovery hosts table (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5807 97f52cf1-0a1b-0410-bd0e-c28be96e8082
-rw-r--r--frontends/php/discovery.php8
-rw-r--r--frontends/php/include/forms.inc.php31
-rw-r--r--frontends/php/include/graphs.inc.php10
-rw-r--r--frontends/php/include/locales/en_gb.inc.php38
-rw-r--r--frontends/php/include/maps.inc.php8
-rw-r--r--frontends/php/include/perm.inc.php2
-rw-r--r--frontends/php/srv_status.php2
-rw-r--r--frontends/php/sysmap.php10
-rw-r--r--frontends/php/tr_status.php8
9 files changed, 73 insertions, 44 deletions
diff --git a/frontends/php/discovery.php b/frontends/php/discovery.php
index 595bdbd5..68a38cdd 100644
--- a/frontends/php/discovery.php
+++ b/frontends/php/discovery.php
@@ -35,7 +35,7 @@ include_once "include/page_header.php";
);
check_fields($fields);
- validate_sort_and_sortorder('dhostid',ZBX_SORT_UP);
+ validate_sort_and_sortorder('ip',ZBX_SORT_UP);
$r_form = new CForm();
$r_form->SetMethod('get');
@@ -87,8 +87,8 @@ include_once "include/page_header.php";
$header = array(
is_show_subnodes() ? new CCol(S_NODE, 'center') : null,
- new CCol(make_sorting_link(S_HOST,'dhostid'), 'center'),
- new CCol(array(S_UPTIME.'/',BR(),S_DOWNTIME),'center')
+ new CCol(make_sorting_link(S_HOST,'ip'), 'center'),
+ new CCol(array(S_UPTIME.'/',S_DOWNTIME),'center')
);
foreach ($services as $name => $foo) {
@@ -107,7 +107,7 @@ include_once "include/page_header.php";
$db_dhosts = DBselect('SELECT dhostid,druleid,ip,status,lastup,lastdown '.
' FROM dhosts WHERE '.DBin_node('dhostid').
' AND druleid='.$drule['druleid'].
- order_by('dhostid','status,ip'));
+ order_by('ip','dhostid,status'));
while($dhost = DBfetch($db_dhosts)){
$class = 'enabled';
$time = 'lastup';
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php
index cbfd701a..b69001e8 100644
--- a/frontends/php/include/forms.inc.php
+++ b/frontends/php/include/forms.inc.php
@@ -1548,7 +1548,7 @@
}
if(count($delay_flex_el)==0)
- array_push($delay_flex_el, "No flexible intervals");
+ array_push($delay_flex_el, S_NO_FLEXIBLE_INTERVALS);
else
array_push($delay_flex_el, new CButton('del_delay_flex','delete selected'));
@@ -1711,8 +1711,8 @@
if($type != ITEM_TYPE_TRAPPER && $type != ITEM_TYPE_HTTPTEST)
{
$frmItem->AddRow(S_UPDATE_INTERVAL_IN_SEC, new CNumericBox("delay",$delay,5));
- $frmItem->AddRow("Flexible intervals (sec)", $delay_flex_el);
- $frmItem->AddRow("New flexible interval",
+ $frmItem->AddRow(S_FLEXIBLE_INTERVALS, $delay_flex_el);
+ $frmItem->AddRow(S_NEW_FLEXIBLE_INTERVAL,
array(
S_DELAY, SPACE,
new CNumericBox("new_delay_flex[delay]","50",5),
@@ -2248,10 +2248,10 @@
}
if(count($dep_el)==0)
- array_push($dep_el, "No dependencies defined");
+ array_push($dep_el, S_NO_DEPENDENCES_DEFINED);
else
array_push($dep_el, new CButton('del_dependence','delete selected'));
- $frmTrig->AddRow("The trigger depends on",$dep_el);
+ $frmTrig->AddRow(S_THE_TRIGGER_DEPENDS_ON,$dep_el);
/* end dependencies */
global $USER_DETAILS;
@@ -2266,7 +2266,7 @@
"&srcfld1=triggerid&srcfld2=description',600,450);",
'T');
- $frmTrig->AddRow("New dependency",array($txtCondVal,
+ $frmTrig->AddRow(S_NEW_DEPENDENCY,array($txtCondVal,
$btnSelect, BR(),
new CButton("add_dependence",S_ADD)
),'new');
@@ -2279,8 +2279,7 @@
$frmTrig->AddRow(S_EVENT_GENERATION,$type_select);
$cmbPrior = new CComboBox("priority",$priority);
- for($i = 0; $i <= 5; $i++)
- {
+ for($i = 0; $i <= 5; $i++){
$cmbPrior->AddItem($i,get_severity_description($i));
}
$frmTrig->AddRow(S_SEVERITY,$cmbPrior);
@@ -2290,13 +2289,11 @@
$frmTrig->AddRow(S_DISABLED,new CCheckBox("status",$status));
$frmTrig->AddItemToBottomRow(new CButton("save",S_SAVE));
- if(isset($_REQUEST["triggerid"]))
- {
+ if(isset($_REQUEST["triggerid"])){
$frmTrig->AddItemToBottomRow(SPACE);
$frmTrig->AddItemToBottomRow(new CButton("clone",S_CLONE));
$frmTrig->AddItemToBottomRow(SPACE);
- if( !$limited )
- {
+ if( !$limited ){
$frmTrig->AddItemToBottomRow(new CButtonDelete("Delete trigger?",
url_param("form").url_param("groupid").url_param("hostid").
url_param("triggerid")));
@@ -5319,7 +5316,7 @@
$frmEl->AddRow(S_TYPE,$cmbType);
- $frmEl->AddRow("Label", new CTextBox("label", $label, 32));
+ $frmEl->AddRow(S_LABEL, new CTextBox("label", $label, 32));
$cmbLocation = new CComboBox("label_location",$label_location);
$cmbLocation->AddItem(-1,'-');
@@ -5444,8 +5441,8 @@
$frmEl->AddRow(S_ICON_ON,$cmbIconOn);
$frmEl->AddRow(S_ICON_UNKNOWN,$cmbIconUnknown);
- $frmEl->AddRow("Coordinate X", new CNumericBox("x", $x, 5));
- $frmEl->AddRow("Coordinate Y", new CNumericBox("y", $y, 5));
+ $frmEl->AddRow(S_COORDINATE_X, new CNumericBox("x", $x, 5));
+ $frmEl->AddRow(S_COORDINATE_Y, new CNumericBox("y", $y, 5));
$frmEl->AddRow(S_URL, new CTextBox("url", $url, 64));
$frmEl->AddItemToBottomRow(new CButton("save",S_SAVE));
@@ -5539,8 +5536,8 @@
/* END preparation */
- $frmCnct->AddRow("Element 1",$cmbElements1);
- $frmCnct->AddRow("Element 2",$cmbElements2);
+ $frmCnct->AddRow(S_ELEMENT_1,$cmbElements1);
+ $frmCnct->AddRow(S_ELEMENT_2,$cmbElements2);
//trigger links
foreach($triggers as $id => $trigger){
diff --git a/frontends/php/include/graphs.inc.php b/frontends/php/include/graphs.inc.php
index b6b64fd9..8c203c6b 100644
--- a/frontends/php/include/graphs.inc.php
+++ b/frontends/php/include/graphs.inc.php
@@ -79,11 +79,11 @@
if($type == GRAPH_ITEM_AGGREGATED) return '-';
switch($drawtype){
- case GRAPH_ITEM_DRAWTYPE_LINE: $drawtype = "Line"; break;
- case GRAPH_ITEM_DRAWTYPE_FILLED_REGION: $drawtype = "Filled region"; break;
- case GRAPH_ITEM_DRAWTYPE_BOLD_LINE: $drawtype = "Bold line"; break;
- case GRAPH_ITEM_DRAWTYPE_DOT: $drawtype = "Dot"; break;
- case GRAPH_ITEM_DRAWTYPE_DASHED_LINE: $drawtype = "Dashed line"; break;
+ case GRAPH_ITEM_DRAWTYPE_LINE: $drawtype = S_LINE; break;
+ case GRAPH_ITEM_DRAWTYPE_FILLED_REGION: $drawtype = S_FILLED_REGION; break;
+ case GRAPH_ITEM_DRAWTYPE_BOLD_LINE: $drawtype = S_BOLD_LINE; break;
+ case GRAPH_ITEM_DRAWTYPE_DOT: $drawtype = S_DOT; break;
+ case GRAPH_ITEM_DRAWTYPE_DASHED_LINE: $drawtype = S_DASHED_LINE; break;
default: $drawtype = S_UNKNOWN; break;
}
return $drawtype;
diff --git a/frontends/php/include/locales/en_gb.inc.php b/frontends/php/include/locales/en_gb.inc.php
index ee92fb57..8d7746df 100644
--- a/frontends/php/include/locales/en_gb.inc.php
+++ b/frontends/php/include/locales/en_gb.inc.php
@@ -364,6 +364,13 @@
'S_SHOW_NEXT_100'=> 'Show next 100',
'S_SHOW_PREVIOUS_100'=> 'Show previous 100',
+// Lines
+ 'S_LINE'=> 'Line',
+ 'S_FILLED_REGION'=> 'Filled region',
+ 'S_BOLD_LINE'=> 'Bold line',
+ 'S_DOT'=> 'Dot',
+ 'S_DASHED_LINE'=> 'Dashed line',
+
// charts.php
'S_CUSTOM_GRAPHS'=> 'Custom graphs',
'S_GRAPHS_BIG'=> 'GRAPHS',
@@ -406,6 +413,13 @@
'S_WHITE'=> 'White',
'S_YELLOW'=> 'Yellow',
+// Lines
+ 'S_LINE'=> 'Line',
+ 'S_FILLED_REGION'=> 'Filled region',
+ 'S_BOLD_LINE'=> 'Bold line',
+ 'S_DOT'=> 'Dot',
+ 'S_DASHED_LINE'=> 'Dashed line',
+
// config.php
'S_THEMES'=> 'Themes',
'S_SYSTEM_DEFAULT'=> 'System default',
@@ -736,6 +750,7 @@
'S_CREATE_PROXY'=> 'Create Proxy',
'S_PROXY_NAME'=> 'Proxy name',
'S_LASTSEEN_AGE'=> 'Last seen (age)',
+
// Host profiles
'S_HOST_PROFILE'=> 'Host profile',
'S_DEVICE_TYPE'=> 'Device type',
@@ -881,6 +896,7 @@
'S_ORIGINAL'=> 'Original',
'S_NEW_FLEXIBLE_INTERVAL'=> 'New flexible interval',
'S_FLEXIBLE_INTERVALS'=> 'Flexible intervals (sec)',
+ 'S_NO_FLEXIBLE_INTERVALS'=> 'No flexible intervals',
'S_PARAMS'=> 'Additional parameters',
// events.php
@@ -907,13 +923,25 @@
'S_ICON_UNKNOWN'=> 'Icon (unknown)',
'S_ELEMENT_1'=> 'Element 1',
'S_ELEMENT_2'=> 'Element 2',
- 'S_LINK_STATUS_INDICATOR'=> 'Link status indicator',
- 'S_CONFIGURATION_OF_NETWORK_MAPS'=> 'Configuration of network maps',
+ 'S_LINK_STATUS_INDICATOR'=> 'Link status indicator',
+ 'S_CONFIGURATION_OF_NETWORK_MAPS'=> 'Configuration of network maps',
+ 'S_CONFIGURATION_OF_NETWORK_MAPS_BIG'=> 'CONFIGURATION OF NETWORK MAPS',
+ 'S_DISPLAYED_ELEMENTS'=> 'DISPLAYED ELEMENTS',
+ 'S_CONNECTORS'=> 'CONNECTORS',
+ 'S_ADD_ELEMENT'=> 'Add element',
+ 'S_CREATE_CONNECTION'=> 'Create connection',
+ 'S_COORDINATE_X'=> 'Coordinate X',
+ 'S_COORDINATE_Y'=> 'Coordinate Y',
+ 'S_TYPE_OFF'=> 'Type (OFF)',
+ 'S_TYPE_ON'=> 'Type (ON)',
+ 'S_COLOR_OFF'=> 'Color (OFF)',
+ 'S_COLOR_ON'=> 'Color (ON)',
+
+
// sysmaps.php
'S_MAPS_BIG'=> 'MAPS',
'S_NO_MAPS_DEFINED'=> 'No maps defined',
- 'S_CONFIGURATION_OF_NETWORK_MAPS'=> 'CONFIGURATION OF NETWORK MAPS',
'S_CREATE_MAP'=> 'Create Map',
'S_ICON_LABEL_LOCATION'=> 'Icon label location',
'S_BOTTOM'=> 'Bottom',
@@ -1324,6 +1352,9 @@
'S_MULTIPLE_TRUE_EVENTS'=> 'Multiple TRUE events',
'S_SHOW_DISABLED_TRIGGERS'=> 'Show disabled triggers',
'S_HIDE_DISABLED_TRIGGERS'=> 'Hide disabled triggers',
+ 'S_THE_TRIGGER_DEPENDS_ON'=> 'The trigger depends on',
+ 'S_NO_DEPENDENCES_DEFINED'=> 'No dependences defined',
+ 'S_NEW_DEPENDENCY'=> 'New dependency',
'S_MULTIPLE_EVENTS'=> 'Multiple events',
'S_EVENT_GENERATION'=> 'Event generation',
@@ -1351,6 +1382,7 @@
'S_HIDE_DETAILS'=> 'Hide details',
'S_SHOW_DETAILS'=> 'Show details',
'S_SELECT'=> 'Select',
+ 'S_INVERSE_SELECT'=> 'Inverse Select',
'S_HIDE_SELECT'=> 'Hide select',
'S_TRIGGERS_BIG'=> 'TRIGGERS',
'S_NAME_BIG'=> 'NAME',
diff --git a/frontends/php/include/maps.inc.php b/frontends/php/include/maps.inc.php
index a06564df..5754b0d2 100644
--- a/frontends/php/include/maps.inc.php
+++ b/frontends/php/include/maps.inc.php
@@ -56,10 +56,10 @@
*/
function map_link_drawtype2str($drawtype){
switch($drawtype){
- case MAP_LINK_DRAWTYPE_LINE: $drawtype = "Line"; break;
- case MAP_LINK_DRAWTYPE_BOLD_LINE: $drawtype = "Bold line"; break;
- case MAP_LINK_DRAWTYPE_DOT: $drawtype = "Dot"; break;
- case MAP_LINK_DRAWTYPE_DASHED_LINE: $drawtype = "Dashed line"; break;
+ case MAP_LINK_DRAWTYPE_LINE: $drawtype = S_LINE; break;
+ case MAP_LINK_DRAWTYPE_BOLD_LINE: $drawtype = S_BOLD_LINE; break;
+ case MAP_LINK_DRAWTYPE_DOT: $drawtype = S_DOT; break;
+ case MAP_LINK_DRAWTYPE_DASHED_LINE: $drawtype = S_DASHED_LINE; break;
default: $drawtype = S_UNKNOWN; break;
}
return $drawtype;
diff --git a/frontends/php/include/perm.inc.php b/frontends/php/include/perm.inc.php
index 65bcf4c1..e8565471 100644
--- a/frontends/php/include/perm.inc.php
+++ b/frontends/php/include/perm.inc.php
@@ -251,7 +251,7 @@ COpt::counter_up('perm');
$where = '';
// $sortorder = (isset($DB['TYPE']) && (($DB['TYPE'] == 'MYSQL') || ($DB['TYPE'] == 'SQLITE3')))?' DESC ':'';
-
+//SDI($sql);
$sql = 'SELECT DISTINCT n.nodeid, n.name as node_name, h.hostid, h.host, min(r.permission) as permission, ug.userid '.
' FROM hosts h '.
' LEFT JOIN hosts_groups hg ON hg.hostid=h.hostid '.
diff --git a/frontends/php/srv_status.php b/frontends/php/srv_status.php
index 8a0e6d65..3d75981c 100644
--- a/frontends/php/srv_status.php
+++ b/frontends/php/srv_status.php
@@ -107,7 +107,7 @@ include_once "include/page_header.php";
'id' => 0,
'serviceid' => 0,
'serviceupid' => 0,
- 'caption' => 'root',
+ 'caption' => S_ROOT_SMALL,
'status' => SPACE,
'reason' => SPACE,
'sla' => SPACE,
diff --git a/frontends/php/sysmap.php b/frontends/php/sysmap.php
index d0068968..87a5dc6c 100644
--- a/frontends/php/sysmap.php
+++ b/frontends/php/sysmap.php
@@ -68,7 +68,7 @@ include_once "include/page_header.php";
check_fields($fields);
?>
<?php
- show_table_header("CONFIGURATION OF NETWORK MAP");
+ show_table_header(S_CONFIGURATION_OF_NETWORK_MAPS_BIG);
if(!sysmap_accessible($_REQUEST["sysmapid"],PERM_READ_WRITE)) access_deny();
$sysmap = DBfetch(DBselect("select * from sysmaps where sysmapid=".$_REQUEST["sysmapid"]));
@@ -153,7 +153,7 @@ include_once "include/page_header.php";
if(isset($_REQUEST["form"]) && ($_REQUEST["form"]=="add_element" ||
($_REQUEST["form"]=="update" && isset($_REQUEST["selementid"]))))
{
- show_table_header("DISPLAYED ELEMENTS");
+ show_table_header(S_DISPLAYED_ELEMENTS);
echo SBR;
insert_map_element_form();
}
@@ -163,7 +163,7 @@ include_once "include/page_header.php";
$row = DBfetch(DBselect("select count(*) as count from sysmaps_elements where sysmapid=".$_REQUEST["sysmapid"]));
if($row["count"]>1)
{
- show_table_header("CONNECTORS");
+ show_table_header(S_CONNECTORS);
echo SBR;
insert_map_link_form();
}
@@ -173,7 +173,7 @@ include_once "include/page_header.php";
}
}
else{
- show_table_header("DISPLAYED ELEMENTS", new CButton("form","Add element",
+ show_table_header(S_DISPLAYED_ELEMENTS, new CButton("form",S_ADD_ELEMENT,
"return redirect('".$page["file"]."?form=add_element".url_param("sysmapid")."');"));
$table = new CTableInfo();
@@ -207,7 +207,7 @@ include_once "include/page_header.php";
$table->show();
echo SBR;
- show_table_header("CONNECTORS", new CButton("form","Create connection",
+ show_table_header(S_CONNECTORS, new CButton("form",S_CREATE_CONNECTION,
"return redirect('".$page["file"]."?form=add_link".
url_param("sysmapid")."');"));
diff --git a/frontends/php/tr_status.php b/frontends/php/tr_status.php
index 95a07f88..a19ef1a8 100644
--- a/frontends/php/tr_status.php
+++ b/frontends/php/tr_status.php
@@ -323,8 +323,8 @@ include_once "include/page_header.php";
$form->SetMethod('get');
$form->AddItem(new CTextBox("txt_select",$txt_select,15));
- $form->AddItem(new CButton("btnSelect", "Select"));
- $form->AddItem(new CButton("btnSelect", "Inverse select"));
+ $form->AddItem(new CButton("btnSelect", S_SELECT));
+ $form->AddItem(new CButton("btnSelect", S_INVERSE_SELECT));
$form->AddVar("compact",$compact);
$form->AddVar("noactions",$noactions);
$form->AddVar("select",$select);
@@ -437,7 +437,7 @@ include_once "include/page_header.php";
$description = expand_trigger_description($row['triggerid']);
- if(isset($_REQUEST["btnSelect"]) && '' != $txt_select && ((zbx_stristr($description, $txt_select)) == ($_REQUEST["btnSelect"]=="Inverse select"))) continue;
+ if(isset($_REQUEST["btnSelect"]) && '' != $txt_select && ((zbx_stristr($description, $txt_select)) == ($_REQUEST["btnSelect"]==S_INVERSE_SELECT))) continue;
if($row["url"] != "")
{
@@ -614,4 +614,4 @@ include_once "include/page_header.php";
?>
<?php
include_once "include/page_footer.php";
-?> \ No newline at end of file
+?>