Module: Yast::SquidDialogsInclude

Defined in:
../../src/include/squid/dialogs.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) ACLGroupsTableWidget



271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# File '../../src/include/squid/dialogs.rb', line 271

def ACLGroupsTableWidget
  VBox(
    Left(Label(_("ACL Groups"))),
    Table(
      Id("acl"),
      Opt(:notify),
      Header(_("Name"), _("Type"), _("Description"))
    ),
    HBox(
      PushButton(Id(:add_acl), Label.AddButton),
      PushButton(Id(:edit_acl), Label.EditButton),
      PushButton(Id(:del_acl), Label.DeleteButton),
      HStretch()
    )
  )
end

- (Object) Cache2DialogWidget



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# File '../../src/include/squid/dialogs.rb', line 88

def Cache2DialogWidget
  HBox(
    HSpacing(3),
    Frame(
      _("Cache Setting"),
      VBox(
        VWeight(
          1,
          HBox(
            IntField(Id("cache_mem"), _("C&ache Memory"), 1, 99999, 10),
            sizeUnitWidget("cache_mem_units")
          )
        ),
        VSpacing(0.4),
        VWeight(
          1,
          HBox(
            IntField(
              Id("cache_max_object_size"),
              _("Ma&x Object Size"),
              0,
              99999,
              0
            ),
            sizeUnitWidget("cache_max_object_size_units")
          )
        ),
        VSpacing(0.4),
        VWeight(
          1,
          HBox(
            IntField(
              Id("cache_min_object_size"),
              _("M&in Object Size"),
              0,
              99999,
              0
            ),
            sizeUnitWidget("cache_min_object_size_units")
          )
        ),
        VSpacing(0.4),
        VWeight(
          1,
          HBox(
            IntField(
              Id("cache_swap_low"),
              _("Swap &Low-Water Mark (percentage)"),
              0,
              100,
              0
            )
          )
        ),
        VSpacing(0.4),
        VWeight(
          1,
          HBox(
            IntField(
              Id("cache_swap_high"),
              _("Swap &High-Water Mark (percentage)"),
              0,
              100,
              0
            )
          )
        ),
        VSpacing(0.4),
        Left(
          VWeight(
            1,
            HBox(
              ComboBox(
                Id("cache_replacement_policy"),
                _("&Cache Replacement Policy"),
                [
                  Item("lru"),
                  Item("heap GDSF"),
                  Item("heap LFUDA"),
                  Item("heap LRU")
                ]
              )
            )
          )
        ),
        VSpacing(0.4),
        Left(
          VWeight(
            1,
            HBox(
              ComboBox(
                Id("memory_replacement_policy"),
                _("&Memory Replacement Policy"),
                [
                  Item("lru"),
                  Item("heap GDSF"),
                  Item("heap LFUDA"),
                  Item("heap LRU")
                ]
              )
            )
          )
        )
      )
    ),
    HSpacing(3)
  ) 
  #     `HBox(
  #         `HSpacing(3),
  #         `Frame(_("Cache Setting"),
  #             `HBox(
  #                 `HWeight(1,`VBox(
  #                     `VWeight(1, `HBox(
  #                         `IntField(`id("cache_mem"), _("C&ache Memory"), 1, 99999, 10),
  #                         sizeUnitWidget("cache_mem_units")
  #                     )),
  #                     `VSpacing(0.4),
  #                     `VWeight(1, `HBox(
  #                         `IntField(`id("cache_max_object_size"), _("Ma&x Object Size"), 0, 99999, 0),
  #                         sizeUnitWidget("cache_max_object_size_units")
  #                     )),
  #                     `VSpacing(0.4),
  #                     `VWeight(1, `HBox(
  #                         `IntField(`id("cache_swap_low"), _("Swap &Low-Water Mark (in percents)"), 0, 100, 0)
  #                     )),
  #                     `VSpacing(0.4),
  #                     `Left(`VWeight(1, `HBox(
  #                         `ComboBox(`id("cache_replacement_policy"),
  #                                   _("&Cache Replacement Policy"),
  #                                   [`item("lru"), `item("heap GDSF"), `item("heap LFUDA"), `item("heap LRU")])
  #                     )))
  #                 )),
  #                 `HSpacing(3),
  #                 `HWeight(1,`VBox(
  #                     `VWeight(1, `HBox(`Empty())),
  #                     `VSpacing(0.4),
  #                     `VWeight(1, `HBox(
  #                         `IntField(`id("cache_min_object_size"), _("M&in Object Size"), 0, 99999, 0),
  #                         sizeUnitWidget("cache_min_object_size_units")
  #                     )),
  #                     `VSpacing(0.4),
  #                     `VWeight(1, `HBox(
  #                         `IntField(`id("cache_swap_high"), _("Swap &High-Water Mark (in percents)"), 0, 100, 0)
  #                     )),
  #                     `VSpacing(0.4),
  #                     `Left(`VWeight(1, `HBox(
  #                         `ComboBox(`id("memory_replacement_policy"),
  #                                   _("&Memory Replacement Policy"),
  #                                   [`item("lru"), `item("heap GDSF"), `item("heap LFUDA"), `item("heap LRU")])
  #                     )))
  #                 ))
  #             )
  #         ),
  #         `HSpacing(3)
  #     );
end

- (Object) CacheDirectoryDialog



245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File '../../src/include/squid/dialogs.rb', line 245

def CacheDirectoryDialog
  HBox(
    HSpacing(3),
    Frame(
      _("Cache Directory"),
      VBox(
        VSquash(
          HBox(
            TextEntry(Id("cache_dir"), _("&Directory Name"), ""),
            Bottom(PushButton(Id(:browse_cache_dir), Label.BrowseButton))
          )
        ),
        VSpacing(0.4),
        IntField(Id("mbytes"), _("&Size (in MB)"), 1, 99999, 1),
        VSpacing(0.4),
        IntField(Id("l1dirs"), _("L&evel 1 Directories"), 1, 99999, 1),
        VSpacing(0.4),
        IntField(Id("l2dirs"), _("Le&vel 2 Directories"), 1, 99999, 1)
      )
    ),
    HSpacing(3)
  )
end

- (Object) HttpAccessTableWidget



288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
# File '../../src/include/squid/dialogs.rb', line 288

def HttpAccessTableWidget
  VBox(
    Left(Label(_("Access Control"))),
    HBox(
      Table(
        Id("http_access"),
        Opt(:keepSorting, :notify),
        Header(_("Allow/Deny"), _("ACL Groups"))
      ),
      HSquash(
        Top(
          VBox(
            HWeight(1, PushButton(Id(:up_http_access), Label.UpButton)),
            HWeight(1, PushButton(Id(:down_http_access), Label.DownButton))
          )
        )
      )
    ),
    HBox(
      PushButton(Id(:add_http_access), Label.AddButton),
      PushButton(Id(:edit_http_access), Label.EditButton),
      PushButton(Id(:del_http_access), Label.DeleteButton),
      HStretch()
    )
  )
end

- (Object) HttpPortsTableWidget



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File '../../src/include/squid/dialogs.rb', line 38

def HttpPortsTableWidget
  VBox(
    Left(Label(_("HTTP Ports"))),
    Table(
      Id("http_port"),
      Opt(:notify),
      Header(_("Host"), _("Port"), _("Options"))
    ),
    HBox(
      PushButton(Id(:add), Label.AddButton),
      PushButton(Id(:edit), Label.EditButton),
      PushButton(Id(:del), Label.DeleteButton),
      HStretch()
    )
  )
end

- (Object) initialize_squid_dialogs(include_target)



30
31
32
33
34
35
36
# File '../../src/include/squid/dialogs.rb', line 30

def initialize_squid_dialogs(include_target)
  textdomain "squid"

  Yast.import "Label"

  Yast.include include_target, "squid/helper_functions.rb"
end

- (Object) LoggingFrameWidget



315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File '../../src/include/squid/dialogs.rb', line 315

def LoggingFrameWidget
  Frame(
    _("Logging"),
    VBox(
      VSquash(
        HBox(
          TextEntry(Id("access_log"), _("&Access Log"), ""),
          Bottom(PushButton(Id(:access_log_browse), Label.BrowseButton))
        )
      ),
      VSquash(
        HBox(
          TextEntry(Id("cache_log"), _("&Cache Log"), ""),
          Bottom(PushButton(Id(:cache_log_browse), Label.BrowseButton))
        )
      ),
      VSquash(
        HBox(
          TextEntry(Id("cache_store_log"), _("Cache &Store Log"), ""),
          Bottom(
            PushButton(Id(:cache_store_log_browse), Label.BrowseButton)
          )
        )
      ),
      Left(CheckBox(Id("emulate_httpd_log"), _("&Emulate httpd Log?")))
    )
  )
end

- (Object) MiscellaneousFrameWidget



367
368
369
370
371
372
373
374
375
376
377
378
379
380
# File '../../src/include/squid/dialogs.rb', line 367

def MiscellaneousFrameWidget
  HVCenter(
    Frame(
      _("Miscellaneous Setting"),
      VBox(
        ComboBox(Id("error_language"), _("&Language of error messages"), []),
        VSpacing(),
        TextEntry(Id("cache_mgr"), _("&Administrator's email"), ""),
        VSpacing(),
        Left(CheckBox(Id("ftp_passive"), _("&Use FTP Passive Mode")))
      )
    )
  )
end

- (Object) RefreshPatternsTableWidget



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File '../../src/include/squid/dialogs.rb', line 55

def RefreshPatternsTableWidget
  VBox(
    Left(Label(_("Refresh Patterns"))),
    HBox(
      Table(
        Id("refresh_patterns"),
        Opt(:keepSorting, :notify),
        Header(
          _("Regular Expression"), #, _("Options")
          # table header, stands for minimum
          _("Min"),
          # table header
          _("Percent"),
          # table header, stands for maximum
          _("Max")
        )
      ),
      Top(
        VBox(
          PushButton(Id(:up), Label.UpButton),
          PushButton(Id(:down), Label.DownButton)
        )
      )
    ),
    HBox(
      PushButton(Id(:add), Label.AddButton),
      PushButton(Id(:edit), Label.EditButton),
      PushButton(Id(:del), Label.DeleteButton),
      HStretch()
    )
  )
end

- (Object) TimeoutsFrameWidget



344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
# File '../../src/include/squid/dialogs.rb', line 344

def TimeoutsFrameWidget
  Frame(
    _("Timeouts"),
    VBox(
      HBox(
        IntField(
          Id("connect_timeout"),
          _("Connection &Timeout"),
          0,
          99999,
          0
        ),
        timeUnitWidget("connect_timeout_units")
      ),
      HBox(
        IntField(Id("client_lifetime"), _("Client &Lifetime"), 0, 99999, 0),
        timeUnitWidget("client_lifetime_units")
      )
    )
  )
end