{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/carbon-device-mgt/pulls/comments/54445462","id":54445462,"diff_hunk":"@@ -109,8 +127,26 @@ if (!user) {\n         } else {\n             //URL: https://localhost:9443/{deviceType}/download?owner={username}\n             deviceManagerService = devicemgtProps[\"httpsURL\"] + \"/\" + deviceType + \"/manager\";\n-\n             sketchGenerateLinkEndPoint = deviceManagerService + \"/device/\" + sketchType + \"/generate_link\";\n+\n+            //check if config exists\n+            var deviceTypeConfigFile = new File(\"../app/units/cdmf.unit.device.type.\"+deviceType+\".type-view/private/conf/device-type.json\");\n+            if(deviceTypeConfigFile.isExists()){\n+                deviceTypeConfigFile.open(\"r\");\n+                try {\n+                    var deviceTypeConfig = parse(deviceTypeConfigFile.readAll());\n+                    //replace download endpoint\n+                    var downloadAgentLinkGenUri = deviceTypeConfig.deviceType.downloadAgentLinkGenUri;\n+                    if(downloadAgentUri){\n+                        sketchGenerateLinkEndPoint = downloadAgentLinkGenUri;\n+                    }\n+                }catch(err){\n+                    log.error(\"Error while reading device config file for `\" + deviceType + \"`: \" + err);\n+                }finally{","path":"features/cdmf-base-ui/org.wso2.carbon.devicemgt.ui.feature/src/main/resources/jaggeryapps/devicemgt/api/device-api.jag","position":48,"original_position":48,"commit_id":"d63bb932ea5951bf11e741e865caa2897c195a8d","original_commit_id":"d63bb932ea5951bf11e741e865caa2897c195a8d","user":{"login":"rasika90","id":1448489,"avatar_url":"https://avatars.githubusercontent.com/u/1448489?v=3","gravatar_id":"","url":"https://api.github.com/users/rasika90","html_url":"https://github.com/rasika90","followers_url":"https://api.github.com/users/rasika90/followers","following_url":"https://api.github.com/users/rasika90/following{/other_user}","gists_url":"https://api.github.com/users/rasika90/gists{/gist_id}","starred_url":"https://api.github.com/users/rasika90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rasika90/subscriptions","organizations_url":"https://api.github.com/users/rasika90/orgs","repos_url":"https://api.github.com/users/rasika90/repos","events_url":"https://api.github.com/users/rasika90/events{/privacy}","received_events_url":"https://api.github.com/users/rasika90/received_events","type":"User","site_admin":false},"body":"this is already fixed with [#6c75515](https://github.com/wso2/carbon-device-mgt/commit/6c75515dc4d31e1c5f63845ee1d2f6a70bc1b156).","created_at":"2016-02-29T17:33:01Z","updated_at":"2016-02-29T17:33:01Z","html_url":"https://github.com/wso2/carbon-device-mgt/pull/67#discussion_r54445462","pull_request_url":"https://api.github.com/repos/wso2/carbon-device-mgt/pulls/67","_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt/pulls/comments/54445462"},"html":{"href":"https://github.com/wso2/carbon-device-mgt/pull/67#discussion_r54445462"},"pull_request":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt/pulls/67"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/carbon-device-mgt/pulls/67","id":53359893,"html_url":"https://github.com/wso2/carbon-device-mgt/pull/67","diff_url":"https://github.com/wso2/carbon-device-mgt/pull/67.diff","patch_url":"https://github.com/wso2/carbon-device-mgt/pull/67.patch","issue_url":"https://api.github.com/repos/wso2/carbon-device-mgt/issues/67","number":67,"state":"closed","locked":false,"title":"adding modal popup","user":{"login":"rasika90","id":1448489,"avatar_url":"https://avatars.githubusercontent.com/u/1448489?v=3","gravatar_id":"","url":"https://api.github.com/users/rasika90","html_url":"https://github.com/rasika90","followers_url":"https://api.github.com/users/rasika90/followers","following_url":"https://api.github.com/users/rasika90/following{/other_user}","gists_url":"https://api.github.com/users/rasika90/gists{/gist_id}","starred_url":"https://api.github.com/users/rasika90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rasika90/subscriptions","organizations_url":"https://api.github.com/users/rasika90/orgs","repos_url":"https://api.github.com/users/rasika90/repos","events_url":"https://api.github.com/users/rasika90/events{/privacy}","received_events_url":"https://api.github.com/users/rasika90/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-11T06:59:07Z","updated_at":"2016-02-29T17:33:01Z","closed_at":"2015-12-11T07:00:27Z","merged_at":"2015-12-11T07:00:27Z","merge_commit_sha":"cc88dd0511aa797df36afc8aae36615b7263ebb1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2/carbon-device-mgt/pulls/67/commits","review_comments_url":"https://api.github.com/repos/wso2/carbon-device-mgt/pulls/67/comments","review_comment_url":"https://api.github.com/repos/wso2/carbon-device-mgt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/carbon-device-mgt/issues/67/comments","statuses_url":"https://api.github.com/repos/wso2/carbon-device-mgt/statuses/d63bb932ea5951bf11e741e865caa2897c195a8d","head":{"label":"rasika90:IoTS-1.0.0-M1","ref":"IoTS-1.0.0-M1","sha":"d63bb932ea5951bf11e741e865caa2897c195a8d","user":{"login":"rasika90","id":1448489,"avatar_url":"https://avatars.githubusercontent.com/u/1448489?v=3","gravatar_id":"","url":"https://api.github.com/users/rasika90","html_url":"https://github.com/rasika90","followers_url":"https://api.github.com/users/rasika90/followers","following_url":"https://api.github.com/users/rasika90/following{/other_user}","gists_url":"https://api.github.com/users/rasika90/gists{/gist_id}","starred_url":"https://api.github.com/users/rasika90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rasika90/subscriptions","organizations_url":"https://api.github.com/users/rasika90/orgs","repos_url":"https://api.github.com/users/rasika90/repos","events_url":"https://api.github.com/users/rasika90/events{/privacy}","received_events_url":"https://api.github.com/users/rasika90/received_events","type":"User","site_admin":false},"repo":{"id":47751483,"name":"carbon-device-mgt","full_name":"rasika90/carbon-device-mgt","owner":{"login":"rasika90","id":1448489,"avatar_url":"https://avatars.githubusercontent.com/u/1448489?v=3","gravatar_id":"","url":"https://api.github.com/users/rasika90","html_url":"https://github.com/rasika90","followers_url":"https://api.github.com/users/rasika90/followers","following_url":"https://api.github.com/users/rasika90/following{/other_user}","gists_url":"https://api.github.com/users/rasika90/gists{/gist_id}","starred_url":"https://api.github.com/users/rasika90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rasika90/subscriptions","organizations_url":"https://api.github.com/users/rasika90/orgs","repos_url":"https://api.github.com/users/rasika90/repos","events_url":"https://api.github.com/users/rasika90/events{/privacy}","received_events_url":"https://api.github.com/users/rasika90/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rasika90/carbon-device-mgt","description":"","fork":true,"url":"https://api.github.com/repos/rasika90/carbon-device-mgt","forks_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/forks","keys_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/teams","hooks_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/hooks","issue_events_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/issues/events{/number}","events_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/events","assignees_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/assignees{/user}","branches_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/branches{/branch}","tags_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/tags","blobs_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/git/refs{/sha}","trees_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/statuses/{sha}","languages_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/languages","stargazers_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/stargazers","contributors_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/contributors","subscribers_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/subscribers","subscription_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/subscription","commits_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/commits{/sha}","git_commits_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/git/commits{/sha}","comments_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/comments{/number}","issue_comment_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/issues/comments{/number}","contents_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/contents/{+path}","compare_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/merges","archive_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/downloads","issues_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/issues{/number}","pulls_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/pulls{/number}","milestones_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/milestones{/number}","notifications_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/labels{/name}","releases_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/releases{/id}","deployments_url":"https://api.github.com/repos/rasika90/carbon-device-mgt/deployments","created_at":"2015-12-10T09:28:24Z","updated_at":"2015-12-10T09:28:27Z","pushed_at":"2016-02-19T07:13:47Z","git_url":"git://github.com/rasika90/carbon-device-mgt.git","ssh_url":"git@github.com:rasika90/carbon-device-mgt.git","clone_url":"https://github.com/rasika90/carbon-device-mgt.git","svn_url":"https://github.com/rasika90/carbon-device-mgt","homepage":null,"size":21578,"stargazers_count":0,"watchers_count":0,"language":"Java","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:IoTS-1.0.0-M1","ref":"IoTS-1.0.0-M1","sha":"5caa83c68cd6cfc903c8dcd2d6f2c47acc802df6","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":30521489,"name":"carbon-device-mgt","full_name":"wso2/carbon-device-mgt","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-device-mgt","description":"","fork":false,"url":"https://api.github.com/repos/wso2/carbon-device-mgt","forks_url":"https://api.github.com/repos/wso2/carbon-device-mgt/forks","keys_url":"https://api.github.com/repos/wso2/carbon-device-mgt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/carbon-device-mgt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/carbon-device-mgt/teams","hooks_url":"https://api.github.com/repos/wso2/carbon-device-mgt/hooks","issue_events_url":"https://api.github.com/repos/wso2/carbon-device-mgt/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/carbon-device-mgt/events","assignees_url":"https://api.github.com/repos/wso2/carbon-device-mgt/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/carbon-device-mgt/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/carbon-device-mgt/tags","blobs_url":"https://api.github.com/repos/wso2/carbon-device-mgt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/carbon-device-mgt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/carbon-device-mgt/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/carbon-device-mgt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/carbon-device-mgt/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/carbon-device-mgt/languages","stargazers_url":"https://api.github.com/repos/wso2/carbon-device-mgt/stargazers","contributors_url":"https://api.github.com/repos/wso2/carbon-device-mgt/contributors","subscribers_url":"https://api.github.com/repos/wso2/carbon-device-mgt/subscribers","subscription_url":"https://api.github.com/repos/wso2/carbon-device-mgt/subscription","commits_url":"https://api.github.com/repos/wso2/carbon-device-mgt/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/carbon-device-mgt/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/carbon-device-mgt/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/carbon-device-mgt/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/carbon-device-mgt/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/carbon-device-mgt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/carbon-device-mgt/merges","archive_url":"https://api.github.com/repos/wso2/carbon-device-mgt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/carbon-device-mgt/downloads","issues_url":"https://api.github.com/repos/wso2/carbon-device-mgt/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/carbon-device-mgt/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/carbon-device-mgt/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/carbon-device-mgt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/carbon-device-mgt/labels{/name}","releases_url":"https://api.github.com/repos/wso2/carbon-device-mgt/releases{/id}","deployments_url":"https://api.github.com/repos/wso2/carbon-device-mgt/deployments","created_at":"2015-02-09T06:11:38Z","updated_at":"2016-01-28T13:41:34Z","pushed_at":"2016-02-29T13:14:03Z","git_url":"git://github.com/wso2/carbon-device-mgt.git","ssh_url":"git@github.com:wso2/carbon-device-mgt.git","clone_url":"https://github.com/wso2/carbon-device-mgt.git","svn_url":"https://github.com/wso2/carbon-device-mgt","homepage":null,"size":21676,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":2,"forks":26,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt/pulls/67"},"html":{"href":"https://github.com/wso2/carbon-device-mgt/pull/67"},"issue":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt/issues/67"},"comments":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt/issues/67/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt/pulls/67/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt/pulls/67/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt/statuses/d63bb932ea5951bf11e741e865caa2897c195a8d"}}}}