Skip to content

Commit

Permalink
Pass "read_only" flag to the proposal clients
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Oct 31, 2016
1 parent 48c12ca commit f8e02a9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions doc/installation_clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,18 @@ section)[TODO link].

The actions can be:

- `"MakeProposal"` that creates a proposal for the module. It can have parameter `"force_reset"`
that can force reset and create a new one from scratch. Response is a `Hash` with proposal text,
optional link definitions and a help text. **TODO specify exactly format.**
- `"MakeProposal"` that creates a proposal for the module. The optional `Hash`
then has this structure:
```ruby
{
"force_reset" => true/false,
"language_changed" => true/false,
"read_only" => true/false
}
```

See more details [in the generic `ProposalClient` class](
https://github.com/yast/yast-yast2/blob/5762181d62762816a73fc040362c1efb5d97deed/library/general/src/lib/installation/proposal_client.rb#L100)
- `"AskUser"` for automatic or manual user request to change the proposed configuration. Parameter is
`"chosen_id"` which specify action. It can be `"id"` from `"Description"` action
which should open dialog to modify values or links specified in `"MakeProposal"`
Expand Down
1 change: 0 additions & 1 deletion src/lib/installation/proposal_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def initialize(store = ::Installation::ProposalStore)
Yast.import "GetInstArgs"
Yast.import "ProductControl"
Yast.import "HTML"
Yast.import "Report"

# values used in defined functions

Expand Down
1 change: 1 addition & 0 deletions src/lib/installation/proposal_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ def make_proposal(client, force_reset: false, language_changed: false, callback:
[
"MakeProposal",
{
"read_only" => read_only?(client),
"force_reset" => force_reset,
"language_changed" => language_changed
}
Expand Down

0 comments on commit f8e02a9

Please sign in to comment.