{"action":"created","comment":{"url":"https://api.github.com/repos/manucarrace/gn/pulls/comments/180498889","pull_request_review_id":110929141,"id":180498889,"diff_hunk":"@@ -9,29 +9,65 @@ dapp.app.factory('importService', [\n     'uuid4',\n     'getTenantService',\n     '$timeout',\n+    'PopupService',\n+    '$filter',\n+    '$translate',\n \n     function ($http, $cookies, CONFIG, CONSTANTS, IMPORT_CSV, \n-        uuid4, getTenantService, $timeout) {\n+        uuid4, getTenantService, $timeout, PopupService, $filter,\n+        $translate) {\n \n     var attrColumnPattern = new RegExp('(.*?)(\\<(.*?)\\>)'),\n         tenantConfig = {},\n-        throttlingConfig = 0;\n+        throttlingConfig = 0,\n+        iotaDevicesInfo = {},\n+        cookie = '';\n+\n+    // Translate\n+    function getTranslate(data) {\n+        return $filter('translate')(data);\n+    }\n+\n+    var infoResume = {\n+        cb: {\n+            status: 0,\n+            finalized: false,\n+            total: 0,\n+            msgError: ''\n+        },\n+        iota: {\n+            status: 0,\n+            devices: {\n+                meet: [],\n+                noMeet: [],\n+                err: []\n+            },\n+            finalized: false\n+        }\n+    }\n+\n+    \n+\n     getTenantService.getTenant().then(function success(response){\n         tenantConfig = response.data.tenant;\n         throttlingConfig = response.data.throttling;\n+        iotaDevicesInfo = response.data.iotaDevicesInfo;\n     });\n \n+    function isEmpty(value) {\n+        return value === null || value === undefined || value === '';\n+    }\n+\n     /**\n      *  Calls to CB endpoint for updating entities with a chunk of the csv read\n      */\n     function _updateBatchRequest(globalDataProcessed, lastRequest, callBackSuccess, callBackError){\n         var headers = {};\n-            headers[CONSTANTS.HEADERS.CONTENT_TYPE] = CONSTANTS.MIME.APPLICATION_JSON;\n             headers[CONSTANTS.HEADERS.FIWARE_SERVICE] = tenantConfig.service;\n             headers[CONSTANTS.HEADERS.FIWARE_SERVICEPATH] = tenantConfig.servicepath;\n             headers[CONSTANTS.HEADERS.X_AUTH_TOKEN] = $cookies.get(CONSTANTS.HEADERS.X_AUTH_TOKEN);\n             headers[CONSTANTS.HEADERS.FIWARE_CORRELATOR] = uuid4.generate();\n-           \n+            ","path":"lib/public/app/components/import/importService.js","position":66,"original_position":66,"commit_id":"83b90b3f6a501bc6df334e5898d247cfa20f2041","original_commit_id":"83b90b3f6a501bc6df334e5898d247cfa20f2041","user":{"login":"fgalan","id":1534240,"avatar_url":"https://avatars3.githubusercontent.com/u/1534240?v=4","gravatar_id":"","url":"https://api.github.com/users/fgalan","html_url":"https://github.com/fgalan","followers_url":"https://api.github.com/users/fgalan/followers","following_url":"https://api.github.com/users/fgalan/following{/other_user}","gists_url":"https://api.github.com/users/fgalan/gists{/gist_id}","starred_url":"https://api.github.com/users/fgalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgalan/subscriptions","organizations_url":"https://api.github.com/users/fgalan/orgs","repos_url":"https://api.github.com/users/fgalan/repos","events_url":"https://api.github.com/users/fgalan/events{/privacy}","received_events_url":"https://api.github.com/users/fgalan/received_events","type":"User","site_admin":false},"body":"Whitespace superfluo.","created_at":"2018-04-10T17:10:06Z","updated_at":"2018-04-10T17:10:06Z","html_url":"https://github.com/manucarrace/gn/pull/214#discussion_r180498889","pull_request_url":"https://api.github.com/repos/manucarrace/gn/pulls/214","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/manucarrace/gn/pulls/comments/180498889"},"html":{"href":"https://github.com/manucarrace/gn/pull/214#discussion_r180498889"},"pull_request":{"href":"https://api.github.com/repos/manucarrace/gn/pulls/214"}}},"pull_request":{"url":"https://api.github.com/repos/manucarrace/gn/pulls/214","id":180666888,"html_url":"https://github.com/manucarrace/gn/pull/214","diff_url":"https://github.com/manucarrace/gn/pull/214.diff","patch_url":"https://github.com/manucarrace/gn/pull/214.patch","issue_url":"https://api.github.com/repos/manucarrace/gn/issues/214","number":214,"state":"open","locked":false,"title":"Feature/191 creación device durante importación csv","user":{"login":"arubiogfi","id":35960308,"avatar_url":"https://avatars2.githubusercontent.com/u/35960308?v=4","gravatar_id":"","url":"https://api.github.com/users/arubiogfi","html_url":"https://github.com/arubiogfi","followers_url":"https://api.github.com/users/arubiogfi/followers","following_url":"https://api.github.com/users/arubiogfi/following{/other_user}","gists_url":"https://api.github.com/users/arubiogfi/gists{/gist_id}","starred_url":"https://api.github.com/users/arubiogfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arubiogfi/subscriptions","organizations_url":"https://api.github.com/users/arubiogfi/orgs","repos_url":"https://api.github.com/users/arubiogfi/repos","events_url":"https://api.github.com/users/arubiogfi/events{/privacy}","received_events_url":"https://api.github.com/users/arubiogfi/received_events","type":"User","site_admin":false},"body":"Implementa el issue #191 \r\n\r\n> PopUp con envíos al IOTA Manager fallidos.\r\n![iss191-iota_errorpng](https://user-images.githubusercontent.com/35960308/38571453-d9ffd214-3cf0-11e8-92d2-0e7338fdb45e.PNG)\r\n\r\n> PopUp progreso correcto\r\n![iss191-progreso_correcto](https://user-images.githubusercontent.com/35960308/38571455-dbfe9e56-3cf0-11e8-96ae-85d2a2123820.PNG)\r\n","created_at":"2018-04-10T16:57:20Z","updated_at":"2018-04-10T17:10:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"def424c943ecc13ebd663fed080d2ac2a41ad687","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/manucarrace/gn/pulls/214/commits","review_comments_url":"https://api.github.com/repos/manucarrace/gn/pulls/214/comments","review_comment_url":"https://api.github.com/repos/manucarrace/gn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/manucarrace/gn/issues/214/comments","statuses_url":"https://api.github.com/repos/manucarrace/gn/statuses/83b90b3f6a501bc6df334e5898d247cfa20f2041","head":{"label":"manucarrace:feature/191_Creación_Device_Durante_Importación_CSV","ref":"feature/191_Creación_Device_Durante_Importación_CSV","sha":"83b90b3f6a501bc6df334e5898d247cfa20f2041","user":{"login":"manucarrace","id":7370473,"avatar_url":"https://avatars1.githubusercontent.com/u/7370473?v=4","gravatar_id":"","url":"https://api.github.com/users/manucarrace","html_url":"https://github.com/manucarrace","followers_url":"https://api.github.com/users/manucarrace/followers","following_url":"https://api.github.com/users/manucarrace/following{/other_user}","gists_url":"https://api.github.com/users/manucarrace/gists{/gist_id}","starred_url":"https://api.github.com/users/manucarrace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manucarrace/subscriptions","organizations_url":"https://api.github.com/users/manucarrace/orgs","repos_url":"https://api.github.com/users/manucarrace/repos","events_url":"https://api.github.com/users/manucarrace/events{/privacy}","received_events_url":"https://api.github.com/users/manucarrace/received_events","type":"User","site_admin":false},"repo":{"id":118124697,"name":"gn","full_name":"manucarrace/gn","owner":{"login":"manucarrace","id":7370473,"avatar_url":"https://avatars1.githubusercontent.com/u/7370473?v=4","gravatar_id":"","url":"https://api.github.com/users/manucarrace","html_url":"https://github.com/manucarrace","followers_url":"https://api.github.com/users/manucarrace/followers","following_url":"https://api.github.com/users/manucarrace/following{/other_user}","gists_url":"https://api.github.com/users/manucarrace/gists{/gist_id}","starred_url":"https://api.github.com/users/manucarrace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manucarrace/subscriptions","organizations_url":"https://api.github.com/users/manucarrace/orgs","repos_url":"https://api.github.com/users/manucarrace/repos","events_url":"https://api.github.com/users/manucarrace/events{/privacy}","received_events_url":"https://api.github.com/users/manucarrace/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/manucarrace/gn","description":"dashboard para gn","fork":false,"url":"https://api.github.com/repos/manucarrace/gn","forks_url":"https://api.github.com/repos/manucarrace/gn/forks","keys_url":"https://api.github.com/repos/manucarrace/gn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manucarrace/gn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manucarrace/gn/teams","hooks_url":"https://api.github.com/repos/manucarrace/gn/hooks","issue_events_url":"https://api.github.com/repos/manucarrace/gn/issues/events{/number}","events_url":"https://api.github.com/repos/manucarrace/gn/events","assignees_url":"https://api.github.com/repos/manucarrace/gn/assignees{/user}","branches_url":"https://api.github.com/repos/manucarrace/gn/branches{/branch}","tags_url":"https://api.github.com/repos/manucarrace/gn/tags","blobs_url":"https://api.github.com/repos/manucarrace/gn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manucarrace/gn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manucarrace/gn/git/refs{/sha}","trees_url":"https://api.github.com/repos/manucarrace/gn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manucarrace/gn/statuses/{sha}","languages_url":"https://api.github.com/repos/manucarrace/gn/languages","stargazers_url":"https://api.github.com/repos/manucarrace/gn/stargazers","contributors_url":"https://api.github.com/repos/manucarrace/gn/contributors","subscribers_url":"https://api.github.com/repos/manucarrace/gn/subscribers","subscription_url":"https://api.github.com/repos/manucarrace/gn/subscription","commits_url":"https://api.github.com/repos/manucarrace/gn/commits{/sha}","git_commits_url":"https://api.github.com/repos/manucarrace/gn/git/commits{/sha}","comments_url":"https://api.github.com/repos/manucarrace/gn/comments{/number}","issue_comment_url":"https://api.github.com/repos/manucarrace/gn/issues/comments{/number}","contents_url":"https://api.github.com/repos/manucarrace/gn/contents/{+path}","compare_url":"https://api.github.com/repos/manucarrace/gn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manucarrace/gn/merges","archive_url":"https://api.github.com/repos/manucarrace/gn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manucarrace/gn/downloads","issues_url":"https://api.github.com/repos/manucarrace/gn/issues{/number}","pulls_url":"https://api.github.com/repos/manucarrace/gn/pulls{/number}","milestones_url":"https://api.github.com/repos/manucarrace/gn/milestones{/number}","notifications_url":"https://api.github.com/repos/manucarrace/gn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manucarrace/gn/labels{/name}","releases_url":"https://api.github.com/repos/manucarrace/gn/releases{/id}","deployments_url":"https://api.github.com/repos/manucarrace/gn/deployments","created_at":"2018-01-19T12:49:52Z","updated_at":"2018-04-09T11:30:30Z","pushed_at":"2018-04-10T16:57:21Z","git_url":"git://github.com/manucarrace/gn.git","ssh_url":"git@github.com:manucarrace/gn.git","clone_url":"https://github.com/manucarrace/gn.git","svn_url":"https://github.com/manucarrace/gn","homepage":null,"size":1437,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":25,"license":null,"forks":0,"open_issues":25,"watchers":0,"default_branch":"master"}},"base":{"label":"manucarrace:master","ref":"master","sha":"a45d773396310a4d5acbd66a70a00072876422ca","user":{"login":"manucarrace","id":7370473,"avatar_url":"https://avatars1.githubusercontent.com/u/7370473?v=4","gravatar_id":"","url":"https://api.github.com/users/manucarrace","html_url":"https://github.com/manucarrace","followers_url":"https://api.github.com/users/manucarrace/followers","following_url":"https://api.github.com/users/manucarrace/following{/other_user}","gists_url":"https://api.github.com/users/manucarrace/gists{/gist_id}","starred_url":"https://api.github.com/users/manucarrace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manucarrace/subscriptions","organizations_url":"https://api.github.com/users/manucarrace/orgs","repos_url":"https://api.github.com/users/manucarrace/repos","events_url":"https://api.github.com/users/manucarrace/events{/privacy}","received_events_url":"https://api.github.com/users/manucarrace/received_events","type":"User","site_admin":false},"repo":{"id":118124697,"name":"gn","full_name":"manucarrace/gn","owner":{"login":"manucarrace","id":7370473,"avatar_url":"https://avatars1.githubusercontent.com/u/7370473?v=4","gravatar_id":"","url":"https://api.github.com/users/manucarrace","html_url":"https://github.com/manucarrace","followers_url":"https://api.github.com/users/manucarrace/followers","following_url":"https://api.github.com/users/manucarrace/following{/other_user}","gists_url":"https://api.github.com/users/manucarrace/gists{/gist_id}","starred_url":"https://api.github.com/users/manucarrace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manucarrace/subscriptions","organizations_url":"https://api.github.com/users/manucarrace/orgs","repos_url":"https://api.github.com/users/manucarrace/repos","events_url":"https://api.github.com/users/manucarrace/events{/privacy}","received_events_url":"https://api.github.com/users/manucarrace/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/manucarrace/gn","description":"dashboard para gn","fork":false,"url":"https://api.github.com/repos/manucarrace/gn","forks_url":"https://api.github.com/repos/manucarrace/gn/forks","keys_url":"https://api.github.com/repos/manucarrace/gn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manucarrace/gn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manucarrace/gn/teams","hooks_url":"https://api.github.com/repos/manucarrace/gn/hooks","issue_events_url":"https://api.github.com/repos/manucarrace/gn/issues/events{/number}","events_url":"https://api.github.com/repos/manucarrace/gn/events","assignees_url":"https://api.github.com/repos/manucarrace/gn/assignees{/user}","branches_url":"https://api.github.com/repos/manucarrace/gn/branches{/branch}","tags_url":"https://api.github.com/repos/manucarrace/gn/tags","blobs_url":"https://api.github.com/repos/manucarrace/gn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manucarrace/gn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manucarrace/gn/git/refs{/sha}","trees_url":"https://api.github.com/repos/manucarrace/gn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manucarrace/gn/statuses/{sha}","languages_url":"https://api.github.com/repos/manucarrace/gn/languages","stargazers_url":"https://api.github.com/repos/manucarrace/gn/stargazers","contributors_url":"https://api.github.com/repos/manucarrace/gn/contributors","subscribers_url":"https://api.github.com/repos/manucarrace/gn/subscribers","subscription_url":"https://api.github.com/repos/manucarrace/gn/subscription","commits_url":"https://api.github.com/repos/manucarrace/gn/commits{/sha}","git_commits_url":"https://api.github.com/repos/manucarrace/gn/git/commits{/sha}","comments_url":"https://api.github.com/repos/manucarrace/gn/comments{/number}","issue_comment_url":"https://api.github.com/repos/manucarrace/gn/issues/comments{/number}","contents_url":"https://api.github.com/repos/manucarrace/gn/contents/{+path}","compare_url":"https://api.github.com/repos/manucarrace/gn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manucarrace/gn/merges","archive_url":"https://api.github.com/repos/manucarrace/gn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manucarrace/gn/downloads","issues_url":"https://api.github.com/repos/manucarrace/gn/issues{/number}","pulls_url":"https://api.github.com/repos/manucarrace/gn/pulls{/number}","milestones_url":"https://api.github.com/repos/manucarrace/gn/milestones{/number}","notifications_url":"https://api.github.com/repos/manucarrace/gn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manucarrace/gn/labels{/name}","releases_url":"https://api.github.com/repos/manucarrace/gn/releases{/id}","deployments_url":"https://api.github.com/repos/manucarrace/gn/deployments","created_at":"2018-01-19T12:49:52Z","updated_at":"2018-04-09T11:30:30Z","pushed_at":"2018-04-10T16:57:21Z","git_url":"git://github.com/manucarrace/gn.git","ssh_url":"git@github.com:manucarrace/gn.git","clone_url":"https://github.com/manucarrace/gn.git","svn_url":"https://github.com/manucarrace/gn","homepage":null,"size":1437,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":25,"license":null,"forks":0,"open_issues":25,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/manucarrace/gn/pulls/214"},"html":{"href":"https://github.com/manucarrace/gn/pull/214"},"issue":{"href":"https://api.github.com/repos/manucarrace/gn/issues/214"},"comments":{"href":"https://api.github.com/repos/manucarrace/gn/issues/214/comments"},"review_comments":{"href":"https://api.github.com/repos/manucarrace/gn/pulls/214/comments"},"review_comment":{"href":"https://api.github.com/repos/manucarrace/gn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/manucarrace/gn/pulls/214/commits"},"statuses":{"href":"https://api.github.com/repos/manucarrace/gn/statuses/83b90b3f6a501bc6df334e5898d247cfa20f2041"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"fgalan"}}