{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/carbon-dashboards/pulls/comments/54840213","id":54840213,"diff_hunk":"@@ -14,15 +14,78 @@ $(function () {\n \n     var url = dashboardsApi + '/' + dashboard.id;\n \n-    var saveDashboard = function () {\n+    var permissionMenuHbs = Handlebars.compile($(\"#permission-menu-hbs\").html() || '');\n+\n+    /**\n+     * Generate Noty Messages as to the content given using parameters.\n+     * @param1 text {String}\n+     * @param2 ok {Object}\n+     * @param3 cancel {Object}\n+     * @param4 type {String}\n+     * @param5 layout {String}\n+     * @param6 timeout {Number}\n+     * @return {Object}\n+     * @private\n+     * */\n+    var generateMessage = function (text, ok, cancel, type, layout, timeout) {\n+        var properties = {};\n+        properties.text = text;\n+        if (ok || cancel) {\n+            properties.buttons = [\n+                {\n+                    addClass: 'btn btn-primary', text: 'Ok', onClick: function ($noty) {\n+                    $noty.close();\n+                    if (ok) {\n+                        ok();\n+                    }\n+                }\n+                },\n+                {\n+                    addClass: 'btn btn-danger', text: 'Cancel', onClick: function ($noty) {\n+                    $noty.close();\n+                    if (cancel) {\n+                        cancel();\n+                    }\n+                }\n+                }\n+            ];\n+        }\n+\n+        if (timeout) {\n+            properties.timeout = timeout;\n+        }\n+\n+        properties.layout = layout;\n+        properties.theme = 'wso2';\n+        properties.type = type;\n+        properties.dismissQueue = true;\n+        properties.killer = true;\n+        properties.maxVisible = 1;\n+        properties.animation = {\n+            open: {height: 'toggle'},\n+            close: {height: 'toggle'},\n+            easing: 'swing',\n+            speed: 500\n+        };\n+\n+        return noty(properties);\n+    };\n+\n+    var saveDashboard = function (callback) {\n         $.ajax({\n             url: url,\n             method: 'PUT',\n             data: JSON.stringify(dashboard),\n             contentType: 'application/json'\n         }).success(function (data) {\n+            generateMessage(\"Saved Successfully\", null, null, \"success\", \"bottom\", 2000);\n             console.log('dashboard saved successfully');","path":"apps/portal/js/dashboard-settings.js","position":70,"original_position":70,"commit_id":"4ab19ba7bb9a94b7bacf2eddad733d61e4720ff3","original_commit_id":"4ab19ba7bb9a94b7bacf2eddad733d61e4720ff3","user":{"login":"sinthuja","id":7677649,"avatar_url":"https://avatars.githubusercontent.com/u/7677649?v=3","gravatar_id":"","url":"https://api.github.com/users/sinthuja","html_url":"https://github.com/sinthuja","followers_url":"https://api.github.com/users/sinthuja/followers","following_url":"https://api.github.com/users/sinthuja/following{/other_user}","gists_url":"https://api.github.com/users/sinthuja/gists{/gist_id}","starred_url":"https://api.github.com/users/sinthuja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinthuja/subscriptions","organizations_url":"https://api.github.com/users/sinthuja/orgs","repos_url":"https://api.github.com/users/sinthuja/repos","events_url":"https://api.github.com/users/sinthuja/events{/privacy}","received_events_url":"https://api.github.com/users/sinthuja/received_events","type":"User","site_admin":false},"body":"Remove console.log.","created_at":"2016-03-03T06:21:36Z","updated_at":"2016-03-03T06:21:36Z","html_url":"https://github.com/wso2/carbon-dashboards/pull/109#discussion_r54840213","pull_request_url":"https://api.github.com/repos/wso2/carbon-dashboards/pulls/109","_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-dashboards/pulls/comments/54840213"},"html":{"href":"https://github.com/wso2/carbon-dashboards/pull/109#discussion_r54840213"},"pull_request":{"href":"https://api.github.com/repos/wso2/carbon-dashboards/pulls/109"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/carbon-dashboards/pulls/109","id":54202143,"html_url":"https://github.com/wso2/carbon-dashboards/pull/109","diff_url":"https://github.com/wso2/carbon-dashboards/pull/109.diff","patch_url":"https://github.com/wso2/carbon-dashboards/pull/109.patch","issue_url":"https://api.github.com/repos/wso2/carbon-dashboards/issues/109","number":109,"state":"closed","locked":false,"title":"Fixed the JIRA issues and Resolved conflicts and merge","user":{"login":"NipunaMarcus","id":9109762,"avatar_url":"https://avatars.githubusercontent.com/u/9109762?v=3","gravatar_id":"","url":"https://api.github.com/users/NipunaMarcus","html_url":"https://github.com/NipunaMarcus","followers_url":"https://api.github.com/users/NipunaMarcus/followers","following_url":"https://api.github.com/users/NipunaMarcus/following{/other_user}","gists_url":"https://api.github.com/users/NipunaMarcus/gists{/gist_id}","starred_url":"https://api.github.com/users/NipunaMarcus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NipunaMarcus/subscriptions","organizations_url":"https://api.github.com/users/NipunaMarcus/orgs","repos_url":"https://api.github.com/users/NipunaMarcus/repos","events_url":"https://api.github.com/users/NipunaMarcus/events{/privacy}","received_events_url":"https://api.github.com/users/NipunaMarcus/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-20T15:59:25Z","updated_at":"2016-03-03T06:21:36Z","closed_at":"2015-12-21T04:45:43Z","merged_at":"2015-12-21T04:45:43Z","merge_commit_sha":"9154942bf0fc79ee4049dec50120878d21fe9dc5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2/carbon-dashboards/pulls/109/commits","review_comments_url":"https://api.github.com/repos/wso2/carbon-dashboards/pulls/109/comments","review_comment_url":"https://api.github.com/repos/wso2/carbon-dashboards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/carbon-dashboards/issues/109/comments","statuses_url":"https://api.github.com/repos/wso2/carbon-dashboards/statuses/4ab19ba7bb9a94b7bacf2eddad733d61e4720ff3","head":{"label":"NipunaMarcus:master","ref":"master","sha":"4ab19ba7bb9a94b7bacf2eddad733d61e4720ff3","user":{"login":"NipunaMarcus","id":9109762,"avatar_url":"https://avatars.githubusercontent.com/u/9109762?v=3","gravatar_id":"","url":"https://api.github.com/users/NipunaMarcus","html_url":"https://github.com/NipunaMarcus","followers_url":"https://api.github.com/users/NipunaMarcus/followers","following_url":"https://api.github.com/users/NipunaMarcus/following{/other_user}","gists_url":"https://api.github.com/users/NipunaMarcus/gists{/gist_id}","starred_url":"https://api.github.com/users/NipunaMarcus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NipunaMarcus/subscriptions","organizations_url":"https://api.github.com/users/NipunaMarcus/orgs","repos_url":"https://api.github.com/users/NipunaMarcus/repos","events_url":"https://api.github.com/users/NipunaMarcus/events{/privacy}","received_events_url":"https://api.github.com/users/NipunaMarcus/received_events","type":"User","site_admin":false},"repo":{"id":44378930,"name":"carbon-dashboards","full_name":"NipunaMarcus/carbon-dashboards","owner":{"login":"NipunaMarcus","id":9109762,"avatar_url":"https://avatars.githubusercontent.com/u/9109762?v=3","gravatar_id":"","url":"https://api.github.com/users/NipunaMarcus","html_url":"https://github.com/NipunaMarcus","followers_url":"https://api.github.com/users/NipunaMarcus/followers","following_url":"https://api.github.com/users/NipunaMarcus/following{/other_user}","gists_url":"https://api.github.com/users/NipunaMarcus/gists{/gist_id}","starred_url":"https://api.github.com/users/NipunaMarcus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NipunaMarcus/subscriptions","organizations_url":"https://api.github.com/users/NipunaMarcus/orgs","repos_url":"https://api.github.com/users/NipunaMarcus/repos","events_url":"https://api.github.com/users/NipunaMarcus/events{/privacy}","received_events_url":"https://api.github.com/users/NipunaMarcus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NipunaMarcus/carbon-dashboards","description":"","fork":true,"url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards","forks_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/forks","keys_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/teams","hooks_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/hooks","issue_events_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/issues/events{/number}","events_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/events","assignees_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/assignees{/user}","branches_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/branches{/branch}","tags_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/tags","blobs_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/git/refs{/sha}","trees_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/statuses/{sha}","languages_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/languages","stargazers_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/stargazers","contributors_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/contributors","subscribers_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/subscribers","subscription_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/subscription","commits_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/commits{/sha}","git_commits_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/git/commits{/sha}","comments_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/comments{/number}","issue_comment_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/issues/comments{/number}","contents_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/contents/{+path}","compare_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/merges","archive_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/downloads","issues_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/issues{/number}","pulls_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/pulls{/number}","milestones_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/milestones{/number}","notifications_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/labels{/name}","releases_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/releases{/id}","deployments_url":"https://api.github.com/repos/NipunaMarcus/carbon-dashboards/deployments","created_at":"2015-10-16T10:40:25Z","updated_at":"2016-01-11T04:32:38Z","pushed_at":"2016-02-24T09:51:19Z","git_url":"git://github.com/NipunaMarcus/carbon-dashboards.git","ssh_url":"git@github.com:NipunaMarcus/carbon-dashboards.git","clone_url":"https://github.com/NipunaMarcus/carbon-dashboards.git","svn_url":"https://github.com/NipunaMarcus/carbon-dashboards","homepage":null,"size":8684,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wso2:ui-test-fixes","ref":"ui-test-fixes","sha":"55af2e0a6e70c7c527e74d76c53a3f3cb5447ae1","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":36008880,"name":"carbon-dashboards","full_name":"wso2/carbon-dashboards","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/carbon-dashboards","description":"","fork":false,"url":"https://api.github.com/repos/wso2/carbon-dashboards","forks_url":"https://api.github.com/repos/wso2/carbon-dashboards/forks","keys_url":"https://api.github.com/repos/wso2/carbon-dashboards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/carbon-dashboards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/carbon-dashboards/teams","hooks_url":"https://api.github.com/repos/wso2/carbon-dashboards/hooks","issue_events_url":"https://api.github.com/repos/wso2/carbon-dashboards/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/carbon-dashboards/events","assignees_url":"https://api.github.com/repos/wso2/carbon-dashboards/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/carbon-dashboards/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/carbon-dashboards/tags","blobs_url":"https://api.github.com/repos/wso2/carbon-dashboards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/carbon-dashboards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/carbon-dashboards/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/carbon-dashboards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/carbon-dashboards/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/carbon-dashboards/languages","stargazers_url":"https://api.github.com/repos/wso2/carbon-dashboards/stargazers","contributors_url":"https://api.github.com/repos/wso2/carbon-dashboards/contributors","subscribers_url":"https://api.github.com/repos/wso2/carbon-dashboards/subscribers","subscription_url":"https://api.github.com/repos/wso2/carbon-dashboards/subscription","commits_url":"https://api.github.com/repos/wso2/carbon-dashboards/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/carbon-dashboards/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/carbon-dashboards/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/carbon-dashboards/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/carbon-dashboards/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/carbon-dashboards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/carbon-dashboards/merges","archive_url":"https://api.github.com/repos/wso2/carbon-dashboards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/carbon-dashboards/downloads","issues_url":"https://api.github.com/repos/wso2/carbon-dashboards/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/carbon-dashboards/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/carbon-dashboards/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/carbon-dashboards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/carbon-dashboards/labels{/name}","releases_url":"https://api.github.com/repos/wso2/carbon-dashboards/releases{/id}","deployments_url":"https://api.github.com/repos/wso2/carbon-dashboards/deployments","created_at":"2015-05-21T11:25:31Z","updated_at":"2016-01-13T13:14:59Z","pushed_at":"2016-03-02T13:59:07Z","git_url":"git://github.com/wso2/carbon-dashboards.git","ssh_url":"git@github.com:wso2/carbon-dashboards.git","clone_url":"https://github.com/wso2/carbon-dashboards.git","svn_url":"https://github.com/wso2/carbon-dashboards","homepage":null,"size":37416,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":4,"forks":31,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-dashboards/pulls/109"},"html":{"href":"https://github.com/wso2/carbon-dashboards/pull/109"},"issue":{"href":"https://api.github.com/repos/wso2/carbon-dashboards/issues/109"},"comments":{"href":"https://api.github.com/repos/wso2/carbon-dashboards/issues/109/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/carbon-dashboards/pulls/109/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/carbon-dashboards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/carbon-dashboards/pulls/109/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/carbon-dashboards/statuses/4ab19ba7bb9a94b7bacf2eddad733d61e4720ff3"}}}}