2
$source_title = _("Data Source");
5
global $config_options;
6
global $SOURCE_KEEP_WINDOW;
9
function source_moduleSetDisplayInfo(s, module_name) {
10
if (module_name == "time") {
11
s.interval.window.module_on_display = true;
12
s.interval.module_on_display = true;
13
s.module_on_display = false;
15
s.interval.window.module_on_display = false;
16
s.interval.module_on_display = false;
17
s.module_on_display = true;
22
function source_popupSetDisplayInfo(s, status) {
24
source_moduleSetDisplayInfo(s, source_modules.current_module);
26
s.interval.window.module_on_display = false;
27
s.interval.module_on_display = false;
28
s.module_on_display = false;
32
function source_fixItemSelSize() {
33
/* We defined a source_db_item_sel size in procents, to fill completely two table cells.
34
However, this causes problems in Gecko while using adaptive SetWidth. The SELECT would
35
be extend during first step, but not shrinked back on the second. */
37
var itemsel = document.getElementById("source_db_item_sel");
38
domSetWidth(itemsel,itemsel.offsetWidth);
42
/* This problem only occurs in Gecko 1.8. The fix by iteself causes problems in IE (no
43
idea why). The Opera does not need the fix, but it not harmless as well */
44
domShow("popup_source");
45
source_fixItemSelSize();
46
domHide("popup_source");
51
source_modules = new MODULE("source");
52
source_modules.RegisterGeometryCallback(popupUpdateGeometryCallback, { 'popup': adei.popup, 'module': "source" });
53
source_modules.Open("source");
54
adei.popup.RegisterOnCallback("source", moduleUpdateGeometry, source_modules);
56
var source_opts = new Object();
57
<?if ($SOURCE_KEEP_WINDOW) {?> source_opts.keep_window = true; <?}?>
59
source_window = new WINDOW("source_timewindow_sel", "source_winstart_inp", "source_winend_inp", "source_miny_inp", "source_maxy_inp");
60
source_interval = new INTERVAL(source_window, "source_db_experiment_sel", "source_timestart_inp", "source_timeend_inp");
61
source = new SOURCE(source_interval, "source_db_server_sel", "source_db_name_sel", "source_db_group_sel", "source_db_mask_sel", "source_db_item_sel", source_opts);
63
adei.AttachSourceModule(source, source_interval, source_window);
65
source.RegisterGeometryCallback(moduleUpdateGeometry, source_modules);
67
adei.popup.RegisterOffCallback("source", source_popupSetDisplayInfo, source);
68
adei.popup.RegisterOnCallback("source", source_popupSetDisplayInfo, source);
69
source_modules.RegisterCallback(source_moduleSetDisplayInfo, source);
74
function sourcePage() {
77
<table width="100%"><tr>
78
<th class="module_source_link_current" id="module_link_source_source"><a href="javascript:source_modules.Open('source')"><?echo _("Source");?></a></th>
79
<th class="module_source_link" id="module_link_source_time"><a href="javascript:source_modules.Open('time')"><?echo _("Time");?></a></th>
80
</tr><tr><td colspan="2">
81
<div class="module" id="module_source_source">
83
echo "<td>" . _("Server") . "</td><td><select id=\"source_db_server_sel\" onchange='javascript:source.UpdateServer(this.value)'><option>Loading...</option></select></td>";
85
echo "<td>" . _("Database") . "</td><td><select id=\"source_db_name_sel\" onchange='javascript:source.UpdateDatabase(this.value)'><option>Loading...</option></select></td>";
87
echo "<td>" . _("LogGroup") . "</td><td><select id=\"source_db_group_sel\" onchange='javascript:source.UpdateGroup(this.value)'><option>Loading...</option></select></td>";
89
echo "<td>" . _("ItemMask") . "</td><td><select id=\"source_db_mask_sel\" onchange='javascript:source.UpdateMask(this.value)'><option>Loading...</option></select></td>";
90
?></tr><tr id="source_db_item_tr"><?
91
echo "<td colspan=\"2\"><select id=\"source_db_item_sel\" onchange='javascript:source.UpdateItem(this.value)'><option>Loading...</option></select></td>";
94
<div class="module" id="module_source_time" style="display: none;">
96
echo "<td>" . _("Experiment") . "</td><td><select id=\"source_db_experiment_sel\" onchange='javascript:source_interval.UpdateExperiment(this.value)'><option>Loading...</option></select></td>";
98
<td><div class="hide_experiment_custom"><?echo _("Start");?></div></td>
99
<td id="source_timestart"><div class="hide_experiment_custom">
100
<input type="text" id="source_timestart_inp" maxlength="25" onchange="javascript:source_window.UpdateRange()"/>
101
<a href="javascript:NewCal('source_timestart_inp','mmmddyyyy',true,24,windowUpdateRangeFunction(source_window))">
102
<img src="images/cal.gif"/>
106
<td><div class="hide_experiment_custom"><?echo _("End");?></div></td>
107
<td id="source_timeend"><div class="hide_experiment_custom">
108
<input type="text" id="source_timeend_inp" maxlength="25" onchange="javascript:source_window.UpdateRange()"/>
109
<a href="javascript:NewCal('source_timeend_inp','mmmddyyyy',true,24,windowUpdateRangeFunction(source_window))">
110
<img src="images/cal.gif"/>
114
<td><?echo _("Window");?></td><td><select id="source_timewindow_sel" onchange='javascript:source_window.UpdateWidth(this.value)'><option>Loading...</option></select></td>
116
<td><div class="hide_window_custom"><?echo _("Start");?></div></td>
117
<td id="source_winstart"><div class="hide_window_custom">
118
<input type="text" id="source_winstart_inp" maxlength="31" onchange="javascript:source_window.UpdateRange()"/>
119
<a href="javascript:NewCal('source_winstart_inp','mmmddyyyy',true,24,windowUpdateRangeFunction(source_window))">
120
<img src="images/cal.gif"/>
124
<td><div class="hide_window_custom"><?echo _("End");?></div></td>
125
<td id="source_winend"><div class="hide_window_custom">
126
<input type="text" id="source_winend_inp" maxlength="31" onchange="javascript:source_window.UpdateRange()" />
127
<a href="javascript:NewCal('source_winend_inp','mmmddyyyy',true,24,windowUpdateRangeFunction(source_window));">
128
<img src="images/cal.gif"/>
132
<td><div class="hide_window_custom"><?echo _("Y");?> [<a href='javascript:source_window.ResetY()'><?echo _("Reset");?></a>]</div></td>
133
<td id="source_yrange"><div class="hide_window_custom">
134
<input type="text" id="source_miny_inp" maxlength="8" onchange="javascript:source_window.UpdateRange()"/>
136
<input type="text" id="source_maxy_inp" maxlength="8" onchange="javascript:source_window.UpdateRange()"/>
140
</td></tr><tr class="source_apply"><td colspan="2">
141
<button id="source_apply_button" type="button" onclick="javascript:source.Apply()"><?echo translate("Apply");?></button>
b'\\ No newline at end of file'