{"action":"created","comment":{"url":"https://api.github.com/repos/yast/yast-dns-server/pulls/comments/209220434","pull_request_review_id":145192562,"id":209220434,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTIyMDQzNA==","diff_hunk":"@@ -1876,38 +1870,72 @@ def HandleExpertZonesPage(key, event)\n     end\n \n     # Write settings dialog\n-    # @return `abort if aborted and `next otherwise\n+    #\n+    # @return [Symbol] :next whether configuration is saved successfully\n+    #                  :back if user decided to change settings\n+    #                  :abort otherwise\n     def WriteDialog\n-      Wizard.RestoreHelp(Ops.get_string(@HELPS, \"write\", \"\"))\n-      ret = DnsServer.Write\n-      if ret\n-        service.reload if service.running? && status_widget.reload_flag?\n-        :next\n-      else\n-        if Popup.YesNo(_(\"Saving the configuration failed. Change the settings?\"))\n-          :back\n-        else\n-          :abort\n-        end\n-      end\n+      log.info(\"Running write dialog\")\n+\n+      Wizard.RestoreHelp(write_help_text)\n+\n+      return :next if write_settings\n+      return :back if back_to_change_setting?\n+      :abort\n     end\n \n-    # Writes settings and restores the dialog without exiting\n-    def SaveAndRestart\n+    # Writes settings without exiting\n+    def SaveAndRestart(event)\n+      return nil unless validate_and_save_widgets(event)\n+\n       Wizard.CreateDialog\n-      Wizard.RestoreHelp(Ops.get_string(@HELPS, \"write\", \"\"))\n-      ret = DnsServer.Write\n-      if ret\n-        service.reload if service.running? && status_widget.reload_flag?\n-      else\n-        Report.Error(_(\"Saving the configuration failed\"))\n-      end\n-      Builtins.sleep(1000)\n-      UI.CloseDialog\n+      Wizard.RestoreHelp(write_help_text)\n+      Report.Error(_(\"Saving the configuration failed\")) unless write_settings\n+      Wizard.CloseDialog\n+\n+      service_widget.refresh\n \n       nil\n     end\n \n+    # Writes DNS server settings and save the service\n+    #\n+    # @note currently, the DnsServer is a Perl module, reason why the write of\n+    # settings is being performed in two steps.\n+    #\n+    # @return [Boolean] true if settings are saved successfully; false otherwise\n+    def write_settings\n+      DnsServer.Write && service.save\n+    end\n+\n+    # Shows a popup asking to user if wants to change settings\n+    #\n+    # @return [Boolean] true if user decides to go back to change settings; false otherwise\n+    def back_to_change_setting?\n+      change_settings_message = _(\"Saving the configuration failed. Change the settings?\")","path":"src/include/dns-server/dialog-main.rb","position":130,"original_position":130,"commit_id":"b02905384c515b857eb516615e4739dfe716e944","original_commit_id":"b02905384c515b857eb516615e4739dfe716e944","user":{"login":"dgdavid","id":1691872,"node_id":"MDQ6VXNlcjE2OTE4NzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1691872?v=4","gravatar_id":"","url":"https://api.github.com/users/dgdavid","html_url":"https://github.com/dgdavid","followers_url":"https://api.github.com/users/dgdavid/followers","following_url":"https://api.github.com/users/dgdavid/following{/other_user}","gists_url":"https://api.github.com/users/dgdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/dgdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgdavid/subscriptions","organizations_url":"https://api.github.com/users/dgdavid/orgs","repos_url":"https://api.github.com/users/dgdavid/repos","events_url":"https://api.github.com/users/dgdavid/events{/privacy}","received_events_url":"https://api.github.com/users/dgdavid/received_events","type":"User","site_admin":false},"body":"I agree","created_at":"2018-08-10T10:49:30Z","updated_at":"2018-08-10T10:49:30Z","html_url":"https://github.com/yast/yast-dns-server/pull/73#discussion_r209220434","pull_request_url":"https://api.github.com/repos/yast/yast-dns-server/pulls/73","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/yast/yast-dns-server/pulls/comments/209220434"},"html":{"href":"https://github.com/yast/yast-dns-server/pull/73#discussion_r209220434"},"pull_request":{"href":"https://api.github.com/repos/yast/yast-dns-server/pulls/73"}},"in_reply_to_id":209218509},"pull_request":{"url":"https://api.github.com/repos/yast/yast-dns-server/pulls/73","id":205390734,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1MzkwNzM0","html_url":"https://github.com/yast/yast-dns-server/pull/73","diff_url":"https://github.com/yast/yast-dns-server/pull/73.diff","patch_url":"https://github.com/yast/yast-dns-server/pull/73.patch","issue_url":"https://api.github.com/repos/yast/yast-dns-server/issues/73","number":73,"state":"open","locked":false,"title":"Use the new ServiceWidget","user":{"login":"dgdavid","id":1691872,"node_id":"MDQ6VXNlcjE2OTE4NzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1691872?v=4","gravatar_id":"","url":"https://api.github.com/users/dgdavid","html_url":"https://github.com/dgdavid","followers_url":"https://api.github.com/users/dgdavid/followers","following_url":"https://api.github.com/users/dgdavid/following{/other_user}","gists_url":"https://api.github.com/users/dgdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/dgdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgdavid/subscriptions","organizations_url":"https://api.github.com/users/dgdavid/orgs","repos_url":"https://api.github.com/users/dgdavid/repos","events_url":"https://api.github.com/users/dgdavid/events{/privacy}","received_events_url":"https://api.github.com/users/dgdavid/received_events","type":"User","site_admin":false},"body":"More info: https://trello.com/c/uAe4i9Ru/107-5-fate319428-allow-socket-activation-widget\r\n\r\n---\r\n\r\n| From | To |\r\n|--------|-----|\r\n| <img src=\"https://user-images.githubusercontent.com/1691872/43518484-22dcc7f8-9584-11e8-9e5b-7eca9beda7a0.png\" width=\"300\" /> | <img src=\"https://user-images.githubusercontent.com/1691872/43518556-5e07d980-9584-11e8-8ff1-9ff7fc48aeae.png\" width=\"300\" /> |\r\n| <img src=\"https://user-images.githubusercontent.com/1691872/43518518-444908b6-9584-11e8-879e-d146bcd0f13f.png\" width=\"300\" /> | <img src=\"https://user-images.githubusercontent.com/1691872/43518561-63e98e52-9584-11e8-9059-4178c97b4773.png\" width=\"300\" /> |\r\n\r\n\r\n","created_at":"2018-08-01T11:14:46Z","updated_at":"2018-08-10T10:49:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"40bbe44f0f00a5adb3f75b0bf98cd5324c36577d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/yast/yast-dns-server/pulls/73/commits","review_comments_url":"https://api.github.com/repos/yast/yast-dns-server/pulls/73/comments","review_comment_url":"https://api.github.com/repos/yast/yast-dns-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yast/yast-dns-server/issues/73/comments","statuses_url":"https://api.github.com/repos/yast/yast-dns-server/statuses/b02905384c515b857eb516615e4739dfe716e944","head":{"label":"yast:feature/service_widget","ref":"feature/service_widget","sha":"b02905384c515b857eb516615e4739dfe716e944","user":{"login":"yast","id":909990,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkwOTk5MA==","avatar_url":"https://avatars1.githubusercontent.com/u/909990?v=4","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"repo":{"id":4368102,"node_id":"MDEwOlJlcG9zaXRvcnk0MzY4MTAy","name":"yast-dns-server","full_name":"yast/yast-dns-server","owner":{"login":"yast","id":909990,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkwOTk5MA==","avatar_url":"https://avatars1.githubusercontent.com/u/909990?v=4","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yast/yast-dns-server","description":"YaST module dns-server","fork":false,"url":"https://api.github.com/repos/yast/yast-dns-server","forks_url":"https://api.github.com/repos/yast/yast-dns-server/forks","keys_url":"https://api.github.com/repos/yast/yast-dns-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yast/yast-dns-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yast/yast-dns-server/teams","hooks_url":"https://api.github.com/repos/yast/yast-dns-server/hooks","issue_events_url":"https://api.github.com/repos/yast/yast-dns-server/issues/events{/number}","events_url":"https://api.github.com/repos/yast/yast-dns-server/events","assignees_url":"https://api.github.com/repos/yast/yast-dns-server/assignees{/user}","branches_url":"https://api.github.com/repos/yast/yast-dns-server/branches{/branch}","tags_url":"https://api.github.com/repos/yast/yast-dns-server/tags","blobs_url":"https://api.github.com/repos/yast/yast-dns-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yast/yast-dns-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yast/yast-dns-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/yast/yast-dns-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yast/yast-dns-server/statuses/{sha}","languages_url":"https://api.github.com/repos/yast/yast-dns-server/languages","stargazers_url":"https://api.github.com/repos/yast/yast-dns-server/stargazers","contributors_url":"https://api.github.com/repos/yast/yast-dns-server/contributors","subscribers_url":"https://api.github.com/repos/yast/yast-dns-server/subscribers","subscription_url":"https://api.github.com/repos/yast/yast-dns-server/subscription","commits_url":"https://api.github.com/repos/yast/yast-dns-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/yast/yast-dns-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/yast/yast-dns-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/yast/yast-dns-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/yast/yast-dns-server/contents/{+path}","compare_url":"https://api.github.com/repos/yast/yast-dns-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yast/yast-dns-server/merges","archive_url":"https://api.github.com/repos/yast/yast-dns-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yast/yast-dns-server/downloads","issues_url":"https://api.github.com/repos/yast/yast-dns-server/issues{/number}","pulls_url":"https://api.github.com/repos/yast/yast-dns-server/pulls{/number}","milestones_url":"https://api.github.com/repos/yast/yast-dns-server/milestones{/number}","notifications_url":"https://api.github.com/repos/yast/yast-dns-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yast/yast-dns-server/labels{/name}","releases_url":"https://api.github.com/repos/yast/yast-dns-server/releases{/id}","deployments_url":"https://api.github.com/repos/yast/yast-dns-server/deployments","created_at":"2012-05-18T10:23:21Z","updated_at":"2018-07-26T09:46:55Z","pushed_at":"2018-08-10T10:26:22Z","git_url":"git://github.com/yast/yast-dns-server.git","ssh_url":"git@github.com:yast/yast-dns-server.git","clone_url":"https://github.com/yast/yast-dns-server.git","svn_url":"https://github.com/yast/yast-dns-server","homepage":"http://en.opensuse.org/Portal:YaST","size":1737,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":8,"open_issues":2,"watchers":3,"default_branch":"master"}},"base":{"label":"yast:master","ref":"master","sha":"29d565a90bcbaaa6b8e46996a0bbf55c09f725c6","user":{"login":"yast","id":909990,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkwOTk5MA==","avatar_url":"https://avatars1.githubusercontent.com/u/909990?v=4","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"repo":{"id":4368102,"node_id":"MDEwOlJlcG9zaXRvcnk0MzY4MTAy","name":"yast-dns-server","full_name":"yast/yast-dns-server","owner":{"login":"yast","id":909990,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkwOTk5MA==","avatar_url":"https://avatars1.githubusercontent.com/u/909990?v=4","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yast/yast-dns-server","description":"YaST module dns-server","fork":false,"url":"https://api.github.com/repos/yast/yast-dns-server","forks_url":"https://api.github.com/repos/yast/yast-dns-server/forks","keys_url":"https://api.github.com/repos/yast/yast-dns-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yast/yast-dns-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yast/yast-dns-server/teams","hooks_url":"https://api.github.com/repos/yast/yast-dns-server/hooks","issue_events_url":"https://api.github.com/repos/yast/yast-dns-server/issues/events{/number}","events_url":"https://api.github.com/repos/yast/yast-dns-server/events","assignees_url":"https://api.github.com/repos/yast/yast-dns-server/assignees{/user}","branches_url":"https://api.github.com/repos/yast/yast-dns-server/branches{/branch}","tags_url":"https://api.github.com/repos/yast/yast-dns-server/tags","blobs_url":"https://api.github.com/repos/yast/yast-dns-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yast/yast-dns-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yast/yast-dns-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/yast/yast-dns-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yast/yast-dns-server/statuses/{sha}","languages_url":"https://api.github.com/repos/yast/yast-dns-server/languages","stargazers_url":"https://api.github.com/repos/yast/yast-dns-server/stargazers","contributors_url":"https://api.github.com/repos/yast/yast-dns-server/contributors","subscribers_url":"https://api.github.com/repos/yast/yast-dns-server/subscribers","subscription_url":"https://api.github.com/repos/yast/yast-dns-server/subscription","commits_url":"https://api.github.com/repos/yast/yast-dns-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/yast/yast-dns-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/yast/yast-dns-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/yast/yast-dns-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/yast/yast-dns-server/contents/{+path}","compare_url":"https://api.github.com/repos/yast/yast-dns-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yast/yast-dns-server/merges","archive_url":"https://api.github.com/repos/yast/yast-dns-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yast/yast-dns-server/downloads","issues_url":"https://api.github.com/repos/yast/yast-dns-server/issues{/number}","pulls_url":"https://api.github.com/repos/yast/yast-dns-server/pulls{/number}","milestones_url":"https://api.github.com/repos/yast/yast-dns-server/milestones{/number}","notifications_url":"https://api.github.com/repos/yast/yast-dns-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yast/yast-dns-server/labels{/name}","releases_url":"https://api.github.com/repos/yast/yast-dns-server/releases{/id}","deployments_url":"https://api.github.com/repos/yast/yast-dns-server/deployments","created_at":"2012-05-18T10:23:21Z","updated_at":"2018-07-26T09:46:55Z","pushed_at":"2018-08-10T10:26:22Z","git_url":"git://github.com/yast/yast-dns-server.git","ssh_url":"git@github.com:yast/yast-dns-server.git","clone_url":"https://github.com/yast/yast-dns-server.git","svn_url":"https://github.com/yast/yast-dns-server","homepage":"http://en.opensuse.org/Portal:YaST","size":1737,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":8,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yast/yast-dns-server/pulls/73"},"html":{"href":"https://github.com/yast/yast-dns-server/pull/73"},"issue":{"href":"https://api.github.com/repos/yast/yast-dns-server/issues/73"},"comments":{"href":"https://api.github.com/repos/yast/yast-dns-server/issues/73/comments"},"review_comments":{"href":"https://api.github.com/repos/yast/yast-dns-server/pulls/73/comments"},"review_comment":{"href":"https://api.github.com/repos/yast/yast-dns-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yast/yast-dns-server/pulls/73/commits"},"statuses":{"href":"https://api.github.com/repos/yast/yast-dns-server/statuses/b02905384c515b857eb516615e4739dfe716e944"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"dgdavid"}}