{"action":"created","comment":{"url":"https://api.github.com/repos/nasa/openmct/pulls/comments/132263816","pull_request_review_id":55325908,"id":132263816,"diff_hunk":"@@ -0,0 +1,200 @@\n+/*****************************************************************************\n+ * Open MCT, Copyright (c) 2014-2017, United States Government\n+ * as represented by the Administrator of the National Aeronautics and Space\n+ * Administration. All rights reserved.\n+ *\n+ * Open MCT is licensed under the Apache License, Version 2.0 (the\n+ * \"License\"); you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ * http://www.apache.org/licenses/LICENSE-2.0.\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n+ * License for the specific language governing permissions and limitations\n+ * under the License.\n+ *\n+ * Open MCT includes source code licensed under additional open source\n+ * licenses. See the Open Source Licenses file (LICENSES.md) included with\n+ * this source code distribution or the Licensing information page available\n+ * at runtime from the About dialog for additional information.\n+ *****************************************************************************/\n+ \n+define(['zepto'], function ($) {\n+\t'use strict';\n+    \n+    var IMPORT_FORM = {\n+        name: \"Import as JSON\",\n+        sections: [{\n+            name: \"Import A File\",\n+            rows: [{\n+                name: 'Select File',\n+                key: 'select-file',\n+                control: 'import-json',\n+                required: true,\n+                text: 'Select File'\n+            }]\n+    \t}]\n+    };\n+\n+    function ImportAsJSONAction(exportService, identifierService, \n+        dialogService, openmct, context) {\n+        \n+        this.openmct = openmct;\n+        this.context = context;\n+        this.exportService = exportService;\n+        this.dialogService = dialogService;\n+        this.identifierService = identifierService;\n+        this.instantiate = openmct.$injector.get(\"instantiate\");\n+    };\n+\n+    ImportAsJSONAction.prototype.perform = function() {\n+        var input;\n+        this.dialogService.getUserInput(IMPORT_FORM, {})","path":"import-export/ImportAsJSONAction.js","position":53,"original_position":53,"commit_id":"3ebf1ff379b22344d447e0d18de3bbdca8a41cdd","original_commit_id":"3ebf1ff379b22344d447e0d18de3bbdca8a41cdd","user":{"login":"prestonjcrowe","id":16281530,"avatar_url":"https://avatars2.githubusercontent.com/u/16281530?v=4","gravatar_id":"","url":"https://api.github.com/users/prestonjcrowe","html_url":"https://github.com/prestonjcrowe","followers_url":"https://api.github.com/users/prestonjcrowe/followers","following_url":"https://api.github.com/users/prestonjcrowe/following{/other_user}","gists_url":"https://api.github.com/users/prestonjcrowe/gists{/gist_id}","starred_url":"https://api.github.com/users/prestonjcrowe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestonjcrowe/subscriptions","organizations_url":"https://api.github.com/users/prestonjcrowe/orgs","repos_url":"https://api.github.com/users/prestonjcrowe/repos","events_url":"https://api.github.com/users/prestonjcrowe/events{/privacy}","received_events_url":"https://api.github.com/users/prestonjcrowe/received_events","type":"User","site_admin":false},"body":"Had a hard time formatting this promise chain to be readable. Would it be better practice to used named functions here for resolve and reject?","created_at":"2017-08-09T18:15:31Z","updated_at":"2017-08-09T18:15:32Z","html_url":"https://github.com/nasa/openmct/pull/1665#discussion_r132263816","pull_request_url":"https://api.github.com/repos/nasa/openmct/pulls/1665","_links":{"self":{"href":"https://api.github.com/repos/nasa/openmct/pulls/comments/132263816"},"html":{"href":"https://github.com/nasa/openmct/pull/1665#discussion_r132263816"},"pull_request":{"href":"https://api.github.com/repos/nasa/openmct/pulls/1665"}}},"pull_request":{"url":"https://api.github.com/repos/nasa/openmct/pulls/1665","id":134719771,"html_url":"https://github.com/nasa/openmct/pull/1665","diff_url":"https://github.com/nasa/openmct/pull/1665.diff","patch_url":"https://github.com/nasa/openmct/pull/1665.patch","issue_url":"https://api.github.com/repos/nasa/openmct/issues/1665","number":1665,"state":"open","locked":false,"title":"[Import/Export] [WIP] Allows for import and export of domain objects","user":{"login":"prestonjcrowe","id":16281530,"avatar_url":"https://avatars2.githubusercontent.com/u/16281530?v=4","gravatar_id":"","url":"https://api.github.com/users/prestonjcrowe","html_url":"https://github.com/prestonjcrowe","followers_url":"https://api.github.com/users/prestonjcrowe/followers","following_url":"https://api.github.com/users/prestonjcrowe/following{/other_user}","gists_url":"https://api.github.com/users/prestonjcrowe/gists{/gist_id}","starred_url":"https://api.github.com/users/prestonjcrowe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestonjcrowe/subscriptions","organizations_url":"https://api.github.com/users/prestonjcrowe/orgs","repos_url":"https://api.github.com/users/prestonjcrowe/repos","events_url":"https://api.github.com/users/prestonjcrowe/events{/privacy}","received_events_url":"https://api.github.com/users/prestonjcrowe/received_events","type":"User","site_admin":false},"body":"Addresses issue #593 \r\n\r\nAdds actions for importing and exporting JSON representations of domain objects.\r\n@larkin @luisschubert @adoubekk\r\n\r\n## Author Checklist\r\nChanges address original issue? Y\r\nUnit tests included and/or updated with changes? N\r\nCommand line build passes? Y\r\nChanges have been smoke-tested? Y\r\n\r\n## Todo\r\n- [ ] Unit tests\r\n- [x] Implement notification on invalid file submission\r\n- [x] Limit displayed file name length in 'Select file' control\r\n- [ ] Rewrite inline comments as JSDOC\r\n- [ ] Resolve inconsistent missing text.js error, in bundle","created_at":"2017-08-08T17:49:05Z","updated_at":"2017-08-09T18:15:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1b11d216e19a2f0d459927c5e249ca9e69da460","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/nasa/openmct/pulls/1665/commits","review_comments_url":"https://api.github.com/repos/nasa/openmct/pulls/1665/comments","review_comment_url":"https://api.github.com/repos/nasa/openmct/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nasa/openmct/issues/1665/comments","statuses_url":"https://api.github.com/repos/nasa/openmct/statuses/3ebf1ff379b22344d447e0d18de3bbdca8a41cdd","head":{"label":"nasa:import-export","ref":"import-export","sha":"3ebf1ff379b22344d447e0d18de3bbdca8a41cdd","user":{"login":"nasa","id":848102,"avatar_url":"https://avatars2.githubusercontent.com/u/848102?v=4","gravatar_id":"","url":"https://api.github.com/users/nasa","html_url":"https://github.com/nasa","followers_url":"https://api.github.com/users/nasa/followers","following_url":"https://api.github.com/users/nasa/following{/other_user}","gists_url":"https://api.github.com/users/nasa/gists{/gist_id}","starred_url":"https://api.github.com/users/nasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nasa/subscriptions","organizations_url":"https://api.github.com/users/nasa/orgs","repos_url":"https://api.github.com/users/nasa/repos","events_url":"https://api.github.com/users/nasa/events{/privacy}","received_events_url":"https://api.github.com/users/nasa/received_events","type":"Organization","site_admin":false},"repo":{"id":36753839,"name":"openmct","full_name":"nasa/openmct","owner":{"login":"nasa","id":848102,"avatar_url":"https://avatars2.githubusercontent.com/u/848102?v=4","gravatar_id":"","url":"https://api.github.com/users/nasa","html_url":"https://github.com/nasa","followers_url":"https://api.github.com/users/nasa/followers","following_url":"https://api.github.com/users/nasa/following{/other_user}","gists_url":"https://api.github.com/users/nasa/gists{/gist_id}","starred_url":"https://api.github.com/users/nasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nasa/subscriptions","organizations_url":"https://api.github.com/users/nasa/orgs","repos_url":"https://api.github.com/users/nasa/repos","events_url":"https://api.github.com/users/nasa/events{/privacy}","received_events_url":"https://api.github.com/users/nasa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nasa/openmct","description":"A web based mission control framework. ","fork":false,"url":"https://api.github.com/repos/nasa/openmct","forks_url":"https://api.github.com/repos/nasa/openmct/forks","keys_url":"https://api.github.com/repos/nasa/openmct/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nasa/openmct/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nasa/openmct/teams","hooks_url":"https://api.github.com/repos/nasa/openmct/hooks","issue_events_url":"https://api.github.com/repos/nasa/openmct/issues/events{/number}","events_url":"https://api.github.com/repos/nasa/openmct/events","assignees_url":"https://api.github.com/repos/nasa/openmct/assignees{/user}","branches_url":"https://api.github.com/repos/nasa/openmct/branches{/branch}","tags_url":"https://api.github.com/repos/nasa/openmct/tags","blobs_url":"https://api.github.com/repos/nasa/openmct/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nasa/openmct/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nasa/openmct/git/refs{/sha}","trees_url":"https://api.github.com/repos/nasa/openmct/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nasa/openmct/statuses/{sha}","languages_url":"https://api.github.com/repos/nasa/openmct/languages","stargazers_url":"https://api.github.com/repos/nasa/openmct/stargazers","contributors_url":"https://api.github.com/repos/nasa/openmct/contributors","subscribers_url":"https://api.github.com/repos/nasa/openmct/subscribers","subscription_url":"https://api.github.com/repos/nasa/openmct/subscription","commits_url":"https://api.github.com/repos/nasa/openmct/commits{/sha}","git_commits_url":"https://api.github.com/repos/nasa/openmct/git/commits{/sha}","comments_url":"https://api.github.com/repos/nasa/openmct/comments{/number}","issue_comment_url":"https://api.github.com/repos/nasa/openmct/issues/comments{/number}","contents_url":"https://api.github.com/repos/nasa/openmct/contents/{+path}","compare_url":"https://api.github.com/repos/nasa/openmct/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nasa/openmct/merges","archive_url":"https://api.github.com/repos/nasa/openmct/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nasa/openmct/downloads","issues_url":"https://api.github.com/repos/nasa/openmct/issues{/number}","pulls_url":"https://api.github.com/repos/nasa/openmct/pulls{/number}","milestones_url":"https://api.github.com/repos/nasa/openmct/milestones{/number}","notifications_url":"https://api.github.com/repos/nasa/openmct/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nasa/openmct/labels{/name}","releases_url":"https://api.github.com/repos/nasa/openmct/releases{/id}","deployments_url":"https://api.github.com/repos/nasa/openmct/deployments","created_at":"2015-06-02T18:40:28Z","updated_at":"2017-08-09T00:08:15Z","pushed_at":"2017-08-09T17:47:00Z","git_url":"git://github.com/nasa/openmct.git","ssh_url":"git@github.com:nasa/openmct.git","clone_url":"https://github.com/nasa/openmct.git","svn_url":"https://github.com/nasa/openmct","homepage":"https://nasa.github.io/openmct/","size":29326,"stargazers_count":4390,"watchers_count":4390,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":435,"mirror_url":null,"open_issues_count":431,"forks":435,"open_issues":431,"watchers":4390,"default_branch":"master"}},"base":{"label":"nasa:master","ref":"master","sha":"9e429802c214141a0d30231b19773ad81793ba4d","user":{"login":"nasa","id":848102,"avatar_url":"https://avatars2.githubusercontent.com/u/848102?v=4","gravatar_id":"","url":"https://api.github.com/users/nasa","html_url":"https://github.com/nasa","followers_url":"https://api.github.com/users/nasa/followers","following_url":"https://api.github.com/users/nasa/following{/other_user}","gists_url":"https://api.github.com/users/nasa/gists{/gist_id}","starred_url":"https://api.github.com/users/nasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nasa/subscriptions","organizations_url":"https://api.github.com/users/nasa/orgs","repos_url":"https://api.github.com/users/nasa/repos","events_url":"https://api.github.com/users/nasa/events{/privacy}","received_events_url":"https://api.github.com/users/nasa/received_events","type":"Organization","site_admin":false},"repo":{"id":36753839,"name":"openmct","full_name":"nasa/openmct","owner":{"login":"nasa","id":848102,"avatar_url":"https://avatars2.githubusercontent.com/u/848102?v=4","gravatar_id":"","url":"https://api.github.com/users/nasa","html_url":"https://github.com/nasa","followers_url":"https://api.github.com/users/nasa/followers","following_url":"https://api.github.com/users/nasa/following{/other_user}","gists_url":"https://api.github.com/users/nasa/gists{/gist_id}","starred_url":"https://api.github.com/users/nasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nasa/subscriptions","organizations_url":"https://api.github.com/users/nasa/orgs","repos_url":"https://api.github.com/users/nasa/repos","events_url":"https://api.github.com/users/nasa/events{/privacy}","received_events_url":"https://api.github.com/users/nasa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nasa/openmct","description":"A web based mission control framework. ","fork":false,"url":"https://api.github.com/repos/nasa/openmct","forks_url":"https://api.github.com/repos/nasa/openmct/forks","keys_url":"https://api.github.com/repos/nasa/openmct/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nasa/openmct/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nasa/openmct/teams","hooks_url":"https://api.github.com/repos/nasa/openmct/hooks","issue_events_url":"https://api.github.com/repos/nasa/openmct/issues/events{/number}","events_url":"https://api.github.com/repos/nasa/openmct/events","assignees_url":"https://api.github.com/repos/nasa/openmct/assignees{/user}","branches_url":"https://api.github.com/repos/nasa/openmct/branches{/branch}","tags_url":"https://api.github.com/repos/nasa/openmct/tags","blobs_url":"https://api.github.com/repos/nasa/openmct/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nasa/openmct/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nasa/openmct/git/refs{/sha}","trees_url":"https://api.github.com/repos/nasa/openmct/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nasa/openmct/statuses/{sha}","languages_url":"https://api.github.com/repos/nasa/openmct/languages","stargazers_url":"https://api.github.com/repos/nasa/openmct/stargazers","contributors_url":"https://api.github.com/repos/nasa/openmct/contributors","subscribers_url":"https://api.github.com/repos/nasa/openmct/subscribers","subscription_url":"https://api.github.com/repos/nasa/openmct/subscription","commits_url":"https://api.github.com/repos/nasa/openmct/commits{/sha}","git_commits_url":"https://api.github.com/repos/nasa/openmct/git/commits{/sha}","comments_url":"https://api.github.com/repos/nasa/openmct/comments{/number}","issue_comment_url":"https://api.github.com/repos/nasa/openmct/issues/comments{/number}","contents_url":"https://api.github.com/repos/nasa/openmct/contents/{+path}","compare_url":"https://api.github.com/repos/nasa/openmct/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nasa/openmct/merges","archive_url":"https://api.github.com/repos/nasa/openmct/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nasa/openmct/downloads","issues_url":"https://api.github.com/repos/nasa/openmct/issues{/number}","pulls_url":"https://api.github.com/repos/nasa/openmct/pulls{/number}","milestones_url":"https://api.github.com/repos/nasa/openmct/milestones{/number}","notifications_url":"https://api.github.com/repos/nasa/openmct/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nasa/openmct/labels{/name}","releases_url":"https://api.github.com/repos/nasa/openmct/releases{/id}","deployments_url":"https://api.github.com/repos/nasa/openmct/deployments","created_at":"2015-06-02T18:40:28Z","updated_at":"2017-08-09T00:08:15Z","pushed_at":"2017-08-09T17:47:00Z","git_url":"git://github.com/nasa/openmct.git","ssh_url":"git@github.com:nasa/openmct.git","clone_url":"https://github.com/nasa/openmct.git","svn_url":"https://github.com/nasa/openmct","homepage":"https://nasa.github.io/openmct/","size":29326,"stargazers_count":4390,"watchers_count":4390,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":435,"mirror_url":null,"open_issues_count":431,"forks":435,"open_issues":431,"watchers":4390,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nasa/openmct/pulls/1665"},"html":{"href":"https://github.com/nasa/openmct/pull/1665"},"issue":{"href":"https://api.github.com/repos/nasa/openmct/issues/1665"},"comments":{"href":"https://api.github.com/repos/nasa/openmct/issues/1665/comments"},"review_comments":{"href":"https://api.github.com/repos/nasa/openmct/pulls/1665/comments"},"review_comment":{"href":"https://api.github.com/repos/nasa/openmct/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nasa/openmct/pulls/1665/commits"},"statuses":{"href":"https://api.github.com/repos/nasa/openmct/statuses/3ebf1ff379b22344d447e0d18de3bbdca8a41cdd"}}}}
{"actor":{"display_login":"prestonjcrowe"}}