• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

yast / yast-squid / 10845679279

13 Sep 2024 08:23AM UTC coverage: 37.03%. Remained the same
10845679279

push

github

lslezak
Adapt files for the SLE-15-SP7 branch

748 of 2020 relevant lines covered (37.03%)

3.87 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

62.5
/src/include/squid/dialogs.rb
1
# encoding: utf-8
2

3
# ------------------------------------------------------------------------------
4
# Copyright (c) 2006 Novell, Inc. All Rights Reserved.
5
#
6
#
7
# This program is free software; you can redistribute it and/or modify it under
8
# the terms of version 2 of the GNU General Public License as published by the
9
# Free Software Foundation.
10
#
11
# This program is distributed in the hope that it will be useful, but WITHOUT
12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
14
#
15
# You should have received a copy of the GNU General Public License along with
16
# this program; if not, contact Novell, Inc.
17
#
18
# To contact Novell about this file by physical or electronic mail, you may find
19
# current contact information at www.novell.com.
20
# ------------------------------------------------------------------------------
21

22
# File:        include/squid/dialogs.ycp
23
# Package:        Configuration of squid
24
# Summary:        Dialogs definitions
25
# Authors:        Daniel Fiser <dfiser@suse.cz>
26
#
27
# $Id: dialogs.ycp 27914 2006-02-13 14:32:08Z locilka $
28
module Yast
1✔
29
  module SquidDialogsInclude
1✔
30
    def initialize_squid_dialogs(include_target)
1✔
31
      textdomain "squid"
5✔
32

33
      Yast.import "Label"
5✔
34

35
      Yast.include include_target, "squid/helper_functions.rb"
5✔
36
    end
37

38
    def HttpPortsTableWidget
1✔
39
      VBox(
×
40
        Left(Label(_("HTTP Ports"))),
41
        Table(
42
          Id("http_port"),
43
          Opt(:notify),
44
          Header(_("Host"), _("Port"), _("Options"))
45
        ),
46
        HBox(
47
          PushButton(Id(:add), Label.AddButton),
48
          PushButton(Id(:edit), Label.EditButton),
49
          PushButton(Id(:del), Label.DeleteButton),
50
          HStretch()
51
        )
52
      )
53
    end
54

55
    def RefreshPatternsTableWidget
1✔
56
      VBox(
×
57
        Left(Label(_("Refresh Patterns"))),
58
        HBox(
59
          Table(
60
            Id("refresh_patterns"),
61
            Opt(:keepSorting, :notify),
62
            Header(
63
              _("Regular Expression"), # , _("Options")
64
              # table header, stands for minimum
65
              _("Min"),
66
              # table header
67
              _("Percent"),
68
              # table header, stands for maximum
69
              _("Max")
70
            )
71
          ),
72
          Top(
73
            VBox(
74
              PushButton(Id(:up), Label.UpButton),
75
              PushButton(Id(:down), Label.DownButton)
76
            )
77
          )
78
        ),
79
        HBox(
80
          PushButton(Id(:add), Label.AddButton),
81
          PushButton(Id(:edit), Label.EditButton),
82
          PushButton(Id(:del), Label.DeleteButton),
83
          HStretch()
84
        )
85
      )
86
    end
87

88
    def Cache2DialogWidget
1✔
89
      HBox(
×
90
        HSpacing(3),
91
        Frame(
92
          _("Cache Setting"),
93
          VBox(
94
            VWeight(
95
              1,
96
              HBox(
97
                IntField(Id("cache_mem"), _("C&ache Memory"), 1, 99999, 10),
98
                sizeUnitWidget("cache_mem_units")
99
              )
100
            ),
101
            VSpacing(0.4),
102
            VWeight(
103
              1,
104
              HBox(
105
                IntField(
106
                  Id("cache_max_object_size"),
107
                  _("Ma&x Object Size"),
108
                  0,
109
                  99999,
110
                  0
111
                ),
112
                sizeUnitWidget("cache_max_object_size_units")
113
              )
114
            ),
115
            VSpacing(0.4),
116
            VWeight(
117
              1,
118
              HBox(
119
                IntField(
120
                  Id("cache_min_object_size"),
121
                  _("M&in Object Size"),
122
                  0,
123
                  99999,
124
                  0
125
                ),
126
                sizeUnitWidget("cache_min_object_size_units")
127
              )
128
            ),
129
            VSpacing(0.4),
130
            VWeight(
131
              1,
132
              HBox(
133
                IntField(
134
                  Id("cache_swap_low"),
135
                  _("Swap &Low-Water Mark (percentage)"),
136
                  0,
137
                  100,
138
                  0
139
                )
140
              )
141
            ),
142
            VSpacing(0.4),
143
            VWeight(
144
              1,
145
              HBox(
146
                IntField(
147
                  Id("cache_swap_high"),
148
                  _("Swap &High-Water Mark (percentage)"),
149
                  0,
150
                  100,
151
                  0
152
                )
153
              )
154
            ),
155
            VSpacing(0.4),
156
            Left(
157
              VWeight(
158
                1,
159
                HBox(
160
                  ComboBox(
161
                    Id("cache_replacement_policy"),
162
                    _("&Cache Replacement Policy"),
163
                    [
164
                      Item("lru"),
165
                      Item("heap GDSF"),
166
                      Item("heap LFUDA"),
167
                      Item("heap LRU")
168
                    ]
169
                  )
170
                )
171
              )
172
            ),
173
            VSpacing(0.4),
174
            Left(
175
              VWeight(
176
                1,
177
                HBox(
178
                  ComboBox(
179
                    Id("memory_replacement_policy"),
180
                    _("&Memory Replacement Policy"),
181
                    [
182
                      Item("lru"),
183
                      Item("heap GDSF"),
184
                      Item("heap LFUDA"),
185
                      Item("heap LRU")
186
                    ]
187
                  )
188
                )
189
              )
190
            )
191
          )
192
        ),
193
        HSpacing(3)
194
      )
195
      #     `HBox(
196
      #         `HSpacing(3),
197
      #         `Frame(_("Cache Setting"),
198
      #             `HBox(
199
      #                 `HWeight(1,`VBox(
200
      #                     `VWeight(1, `HBox(
201
      #                         `IntField(`id("cache_mem"), _("C&ache Memory"), 1, 99999, 10),
202
      #                         sizeUnitWidget("cache_mem_units")
203
      #                     )),
204
      #                     `VSpacing(0.4),
205
      #                     `VWeight(1, `HBox(
206
      #                         `IntField(`id("cache_max_object_size"), _("Ma&x Object Size"), 0, 99999, 0),
207
      #                         sizeUnitWidget("cache_max_object_size_units")
208
      #                     )),
209
      #                     `VSpacing(0.4),
210
      #                     `VWeight(1, `HBox(
211
      #                         `IntField(`id("cache_swap_low"), _("Swap &Low-Water Mark (in percents)"), 0, 100, 0)
212
      #                     )),
213
      #                     `VSpacing(0.4),
214
      #                     `Left(`VWeight(1, `HBox(
215
      #                         `ComboBox(`id("cache_replacement_policy"),
216
      #                                   _("&Cache Replacement Policy"),
217
      #                                   [`item("lru"), `item("heap GDSF"), `item("heap LFUDA"), `item("heap LRU")])
218
      #                     )))
219
      #                 )),
220
      #                 `HSpacing(3),
221
      #                 `HWeight(1,`VBox(
222
      #                     `VWeight(1, `HBox(`Empty())),
223
      #                     `VSpacing(0.4),
224
      #                     `VWeight(1, `HBox(
225
      #                         `IntField(`id("cache_min_object_size"), _("M&in Object Size"), 0, 99999, 0),
226
      #                         sizeUnitWidget("cache_min_object_size_units")
227
      #                     )),
228
      #                     `VSpacing(0.4),
229
      #                     `VWeight(1, `HBox(
230
      #                         `IntField(`id("cache_swap_high"), _("Swap &High-Water Mark (in percents)"), 0, 100, 0)
231
      #                     )),
232
      #                     `VSpacing(0.4),
233
      #                     `Left(`VWeight(1, `HBox(
234
      #                         `ComboBox(`id("memory_replacement_policy"),
235
      #                                   _("&Memory Replacement Policy"),
236
      #                                   [`item("lru"), `item("heap GDSF"), `item("heap LFUDA"), `item("heap LRU")])
237
      #                     )))
238
      #                 ))
239
      #             )
240
      #         ),
241
      #         `HSpacing(3)
242
      #     );
243
    end
244

245
    def CacheDirectoryDialog
1✔
246
      HBox(
×
247
        HSpacing(3),
248
        Frame(
249
          _("Cache Directory"),
250
          VBox(
251
            VSquash(
252
              HBox(
253
                TextEntry(Id("cache_dir"), _("&Directory Name"), ""),
254
                Bottom(PushButton(Id(:browse_cache_dir), Label.BrowseButton))
255
              )
256
            ),
257
            VSpacing(0.4),
258
            IntField(Id("mbytes"), _("&Size (in MB)"), 1, 99999, 1),
259
            VSpacing(0.4),
260
            IntField(Id("l1dirs"), _("L&evel 1 Directories"), 1, 99999, 1),
261
            VSpacing(0.4),
262
            IntField(Id("l2dirs"), _("Le&vel 2 Directories"), 1, 99999, 1)
263
          )
264
        ),
265
        HSpacing(3)
266
      )
267
    end
268

269
    def ACLGroupsTableWidget
1✔
270
      VBox(
×
271
        Left(Label(_("ACL Groups"))),
272
        Table(
273
          Id("acl"),
274
          Opt(:notify),
275
          Header(_("Name"), _("Type"), _("Description"))
276
        ),
277
        HBox(
278
          PushButton(Id(:add_acl), Label.AddButton),
279
          PushButton(Id(:edit_acl), Label.EditButton),
280
          PushButton(Id(:del_acl), Label.DeleteButton),
281
          HStretch()
282
        )
283
      )
284
    end
285

286
    def HttpAccessTableWidget
1✔
287
      VBox(
×
288
        Left(Label(_("Access Control"))),
289
        HBox(
290
          Table(
291
            Id("http_access"),
292
            Opt(:keepSorting, :notify),
293
            Header(_("Allow/Deny"), _("ACL Groups"))
294
          ),
295
          HSquash(
296
            Top(
297
              VBox(
298
                HWeight(1, PushButton(Id(:up_http_access), Label.UpButton)),
299
                HWeight(1, PushButton(Id(:down_http_access), Label.DownButton))
300
              )
301
            )
302
          )
303
        ),
304
        HBox(
305
          PushButton(Id(:add_http_access), Label.AddButton),
306
          PushButton(Id(:edit_http_access), Label.EditButton),
307
          PushButton(Id(:del_http_access), Label.DeleteButton),
308
          HStretch()
309
        )
310
      )
311
    end
312

313
    def LoggingFrameWidget
1✔
314
      Frame(
×
315
        _("Logging"),
316
        VBox(
317
          VSquash(
318
            HBox(
319
              TextEntry(Id("access_log"), _("&Access Log"), ""),
320
              Bottom(PushButton(Id(:access_log_browse), Label.BrowseButton))
321
            )
322
          ),
323
          VSquash(
324
            HBox(
325
              TextEntry(Id("cache_log"), _("&Cache Log"), ""),
326
              Bottom(PushButton(Id(:cache_log_browse), Label.BrowseButton))
327
            )
328
          ),
329
          VSquash(
330
            HBox(
331
              TextEntry(Id("cache_store_log"), _("Cache &Store Log"), ""),
332
              Bottom(
333
                PushButton(Id(:cache_store_log_browse), Label.BrowseButton)
334
              )
335
            )
336
          )
337
        )
338
      )
339
    end
340

341
    def TimeoutsFrameWidget
1✔
342
      Frame(
×
343
        _("Timeouts"),
344
        VBox(
345
          HBox(
346
            IntField(
347
              Id("connect_timeout"),
348
              _("Connection &Timeout"),
349
              0,
350
              99999,
351
              0
352
            ),
353
            timeUnitWidget("connect_timeout_units")
354
          ),
355
          HBox(
356
            IntField(Id("client_lifetime"), _("Client &Lifetime"), 0, 99999, 0),
357
            timeUnitWidget("client_lifetime_units")
358
          )
359
        )
360
      )
361
    end
362

363
    def MiscellaneousFrameWidget
1✔
364
      HVCenter(
×
365
        Frame(
366
          _("Miscellaneous Setting"),
367
          VBox(
368
            ComboBox(Id("error_language"), _("&Language of error messages"), []),
369
            VSpacing(),
370
            TextEntry(Id("cache_mgr"), _("&Administrator's email"), ""),
371
            VSpacing(),
372
            Left(CheckBox(Id("ftp_passive"), _("&Use FTP Passive Mode")))
373
          )
374
        )
375
      )
376
    end
377
  end
378
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc