Module: Yast::HttpServerRoutinesInclude
- Defined in:
- ../../src/include/http-server/routines.rb
Instance Method Summary (collapse)
-
- (Object) Abort
Abort function.
- - (Object) initialize_http_server_routines(include_target)
-
- (Yast::Term) listen2item(arg, id)
Convert a Listen string to an item for table.
-
- (Hash) listen2map(arg)
Convert a Listen string to a pair: $[ “port”: port, “address”: network ].
-
- (Object) PollAbort
Check for pending Abort press.
-
- (Object) ProgressNextStage(title)
Progress::NextStage and Progress::Title combined into one function.
-
- (Object) ReallyAbort
If modified, ask for confirmation.
Instance Method Details
- (Object) Abort
Abort function
25 26 27 28 |
# File '../../src/include/http-server/routines.rb', line 25 def Abort return @AbortFunction.call == true if @AbortFunction != nil false end |
- (Object) initialize_http_server_routines(include_target)
14 15 16 17 18 19 20 21 |
# File '../../src/include/http-server/routines.rb', line 14 def initialize_http_server_routines(include_target) textdomain "http-server" Yast.import "Directory" Yast.import "Progress" Yast.import "String" Yast.import "Popup" end |
- (Yast::Term) listen2item(arg, id)
Convert a Listen string to an item for table. Splits by the colon.
56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File '../../src/include/http-server/routines.rb', line 56 def listen2item(arg, id) colon = Builtins.search(arg, ":") address = _("All Addresses") port = arg if colon != nil # address is present address = Builtins.substring(arg, 0, colon) port = Builtins.substring(arg, Ops.add(colon, 1)) end Item(Id(id), address, port) end |
- (Hash) listen2map(arg)
Convert a Listen string to a pair: $[ “port”: port, “address”: network ]
74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File '../../src/include/http-server/routines.rb', line 74 def listen2map(arg) colon = Builtins.search(arg, ":") address = "all" port = arg if colon != nil # address is present address = Builtins.substring(arg, 0, colon) port = Builtins.substring(arg, Ops.add(colon, 1)) end { "port" => port, "address" => address } end |
- (Object) PollAbort
Check for pending Abort press
32 33 34 |
# File '../../src/include/http-server/routines.rb', line 32 def PollAbort UI.PollInput == :abort end |
- (Object) ProgressNextStage(title)
Progress::NextStage and Progress::Title combined into one function
44 45 46 47 48 49 |
# File '../../src/include/http-server/routines.rb', line 44 def ProgressNextStage(title) Progress.NextStage Progress.Title(title) nil end |
- (Object) ReallyAbort
If modified, ask for confirmation
38 39 40 |
# File '../../src/include/http-server/routines.rb', line 38 def ReallyAbort !Modified() || Popup.ReallyAbort(true) end |