{"action":"created","comment":{"url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/pulls/comments/51424357","id":51424357,"diff_hunk":"@@ -0,0 +1,122 @@\n+import React from 'react/addons';\n+import actions from 'actions';\n+\n+export default React.createClass({\n+    getInitialState: function()  {\n+        return({\n+            type: \"URL\"\n+        })\n+    },\n+\n+    onChangeType: function(e) {\n+        let type = e.target.value;\n+        this.setState({\n+            type\n+        })\n+    },\n+\n+    onChangeTitle: function(e) {\n+        let title = e.target.value;\n+        this.setState({\n+            title\n+        })\n+    },\n+\n+    onChangeText: function(e) {\n+        let text = e.target.value;\n+        this.setState({\n+            text\n+        })\n+    },\n+\n+    onCreateScript: function() {\n+        let script = actions.ScriptActions.create({\n+            title: this.state.title,\n+            type: this.state.type,\n+            text: this.state.text\n+        });\n+\n+        this.props.onAddAttachedScript(script);\n+        this.props.close();\n+    },\n+\n+    renderInputType: function() {\n+        if (this.state.type === \"URL\") {\n+            return (\n+                <div className=\"form-group\">\n+                    <label>Script URL</label>\n+                    <input className=\"form-control\"\n+                        onInput={this.onChangeText}\n+                    />\n+                </div>\n+            )\n+        }\n+        else {\n+            return (\n+                <div className=\"form-group\">\n+                    <label>Full Text</label>\n+                    <textarea className=\"form-control\" rows=\"6\"\n+                        onInput={this.onChangeText}\n+                    />\n+                </div>\n+            )\n+        }\n+    },\n+\n+    render: function() {\n+        return (\n+            <div style={{position:\"reletive\"}}>\n+                <h3 className=\"t-subheading\">Create and Add a New Script</h3>\n+                <hr/>\n+                <div className=\"row\">\n+                    <div className=\"col-md-6\">\n+                        <div className=\"form-group\">\n+                            <label>Script Tilte</label>\n+                            <input className=\"form-control\"\n+                                onInput={this.onChangeTitle}\n+                            />\n+                        </div>\n+\n+                        <h4 className=\"t-body-2\">Input Type</h4>\n+                        <div className=\"radio-inline\">\n+                            <label className=\"radio\">\n+                                <input type=\"radio\" name=\"optionsRadios\" \n+                                    value=\"URL\"\n+                                    checked={this.state.type === \"URL\"}\n+                                    onClick={this.onChangeType}\n+                                />\n+                                URL\n+                            </label>\n+                        </div>\n+                        <div className=\"radio-inline\">\n+                            <label className=\"radio\">\n+                                <input type=\"radio\" name=\"optionsRadios\" \n+                                    value=\"Raw Text\"\n+                                    checked={this.state.type === \"Raw Text\"}\n+                                    onClick={this.onChangeType}\n+                                />\n+                                Full Text\n+                            </label>\n+                        </div>\n+                    </div>\n+                    <div className=\"col-md-6\">\n+                            {this.renderInputType()}\n+                    </div>\n+                </div>\n+                <div style={{position: \"absolute\", bottom: \"75px\", right: \"15px\"}}>\n+                    <a className=\"btn btn-primary pull-right\"\n+                        onClick={this.onCreateScript}","path":"troposphere/static/js/components/modals/instance/launch/components/CreateScript.react.js","position":108,"original_position":108,"commit_id":"11e55ef8d190082414e3569a2ed3a85b1c6fa73a","original_commit_id":"11e55ef8d190082414e3569a2ed3a85b1c6fa73a","user":{"login":"steve-gregory","id":2889930,"avatar_url":"https://avatars.githubusercontent.com/u/2889930?v=3","gravatar_id":"","url":"https://api.github.com/users/steve-gregory","html_url":"https://github.com/steve-gregory","followers_url":"https://api.github.com/users/steve-gregory/followers","following_url":"https://api.github.com/users/steve-gregory/following{/other_user}","gists_url":"https://api.github.com/users/steve-gregory/gists{/gist_id}","starred_url":"https://api.github.com/users/steve-gregory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steve-gregory/subscriptions","organizations_url":"https://api.github.com/users/steve-gregory/orgs","repos_url":"https://api.github.com/users/steve-gregory/repos","events_url":"https://api.github.com/users/steve-gregory/events{/privacy}","received_events_url":"https://api.github.com/users/steve-gregory/received_events","type":"User","site_admin":false},"body":"Can we protect this method with an 'isSubmittable'? Would like to ensure that the data we pass back has been validated in the UI before sending it to the API doomed-for-failure.","created_at":"2016-02-01T14:36:24Z","updated_at":"2016-02-01T14:36:24Z","html_url":"https://github.com/iPlantCollaborativeOpenSource/troposphere/pull/264#discussion_r51424357","pull_request_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/pulls/264","_links":{"self":{"href":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/pulls/comments/51424357"},"html":{"href":"https://github.com/iPlantCollaborativeOpenSource/troposphere/pull/264#discussion_r51424357"},"pull_request":{"href":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/pulls/264"}}},"pull_request":{"url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/pulls/264","id":57717238,"html_url":"https://github.com/iPlantCollaborativeOpenSource/troposphere/pull/264","diff_url":"https://github.com/iPlantCollaborativeOpenSource/troposphere/pull/264.diff","patch_url":"https://github.com/iPlantCollaborativeOpenSource/troposphere/pull/264.patch","issue_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/issues/264","number":264,"state":"open","locked":false,"title":"Wizard","user":{"login":"cdosborn","id":3847314,"avatar_url":"https://avatars.githubusercontent.com/u/3847314?v=3","gravatar_id":"","url":"https://api.github.com/users/cdosborn","html_url":"https://github.com/cdosborn","followers_url":"https://api.github.com/users/cdosborn/followers","following_url":"https://api.github.com/users/cdosborn/following{/other_user}","gists_url":"https://api.github.com/users/cdosborn/gists{/gist_id}","starred_url":"https://api.github.com/users/cdosborn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdosborn/subscriptions","organizations_url":"https://api.github.com/users/cdosborn/orgs","repos_url":"https://api.github.com/users/cdosborn/repos","events_url":"https://api.github.com/users/cdosborn/events{/privacy}","received_events_url":"https://api.github.com/users/cdosborn/received_events","type":"User","site_admin":false},"body":"This work is a merge of collaborative efforts in #251 #250.\r\n\r\n- [ ]  Fix propTypes errors in Advanced Settings\r\n- [ ]  Add red highlight validation in Advanced Input elements","created_at":"2016-01-29T23:26:19Z","updated_at":"2016-02-01T14:36:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49514db11a0637211050d0a9bcf75d09f7fb5d38","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/pulls/264/commits","review_comments_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/pulls/264/comments","review_comment_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/issues/264/comments","statuses_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/statuses/11e55ef8d190082414e3569a2ed3a85b1c6fa73a","head":{"label":"iPlantCollaborativeOpenSource:wizard","ref":"wizard","sha":"11e55ef8d190082414e3569a2ed3a85b1c6fa73a","user":{"login":"iPlantCollaborativeOpenSource","id":669032,"avatar_url":"https://avatars.githubusercontent.com/u/669032?v=3","gravatar_id":"","url":"https://api.github.com/users/iPlantCollaborativeOpenSource","html_url":"https://github.com/iPlantCollaborativeOpenSource","followers_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/followers","following_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/following{/other_user}","gists_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/gists{/gist_id}","starred_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/subscriptions","organizations_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/orgs","repos_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/repos","events_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/events{/privacy}","received_events_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/received_events","type":"Organization","site_admin":false},"repo":{"id":17913633,"name":"troposphere","full_name":"iPlantCollaborativeOpenSource/troposphere","owner":{"login":"iPlantCollaborativeOpenSource","id":669032,"avatar_url":"https://avatars.githubusercontent.com/u/669032?v=3","gravatar_id":"","url":"https://api.github.com/users/iPlantCollaborativeOpenSource","html_url":"https://github.com/iPlantCollaborativeOpenSource","followers_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/followers","following_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/following{/other_user}","gists_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/gists{/gist_id}","starred_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/subscriptions","organizations_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/orgs","repos_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/repos","events_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/events{/privacy}","received_events_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iPlantCollaborativeOpenSource/troposphere","description":"Atmosphere web client","fork":false,"url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere","forks_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/forks","keys_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/teams","hooks_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/hooks","issue_events_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/issues/events{/number}","events_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/events","assignees_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/assignees{/user}","branches_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/branches{/branch}","tags_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/tags","blobs_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/statuses/{sha}","languages_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/languages","stargazers_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/stargazers","contributors_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/contributors","subscribers_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/subscribers","subscription_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/subscription","commits_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/contents/{+path}","compare_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/merges","archive_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/downloads","issues_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/issues{/number}","pulls_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/pulls{/number}","milestones_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/milestones{/number}","notifications_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/labels{/name}","releases_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/releases{/id}","deployments_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/deployments","created_at":"2014-03-19T17:26:44Z","updated_at":"2016-01-12T20:54:14Z","pushed_at":"2016-01-29T23:59:28Z","git_url":"git://github.com/iPlantCollaborativeOpenSource/troposphere.git","ssh_url":"git@github.com:iPlantCollaborativeOpenSource/troposphere.git","clone_url":"https://github.com/iPlantCollaborativeOpenSource/troposphere.git","svn_url":"https://github.com/iPlantCollaborativeOpenSource/troposphere","homepage":null,"size":5994,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":5,"forks":3,"open_issues":5,"watchers":8,"default_branch":"master"}},"base":{"label":"iPlantCollaborativeOpenSource:kicking-kestrel","ref":"kicking-kestrel","sha":"caf15c348da1147274c6ae54d9094b8a99a4ecb1","user":{"login":"iPlantCollaborativeOpenSource","id":669032,"avatar_url":"https://avatars.githubusercontent.com/u/669032?v=3","gravatar_id":"","url":"https://api.github.com/users/iPlantCollaborativeOpenSource","html_url":"https://github.com/iPlantCollaborativeOpenSource","followers_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/followers","following_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/following{/other_user}","gists_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/gists{/gist_id}","starred_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/subscriptions","organizations_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/orgs","repos_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/repos","events_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/events{/privacy}","received_events_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/received_events","type":"Organization","site_admin":false},"repo":{"id":17913633,"name":"troposphere","full_name":"iPlantCollaborativeOpenSource/troposphere","owner":{"login":"iPlantCollaborativeOpenSource","id":669032,"avatar_url":"https://avatars.githubusercontent.com/u/669032?v=3","gravatar_id":"","url":"https://api.github.com/users/iPlantCollaborativeOpenSource","html_url":"https://github.com/iPlantCollaborativeOpenSource","followers_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/followers","following_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/following{/other_user}","gists_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/gists{/gist_id}","starred_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/subscriptions","organizations_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/orgs","repos_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/repos","events_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/events{/privacy}","received_events_url":"https://api.github.com/users/iPlantCollaborativeOpenSource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iPlantCollaborativeOpenSource/troposphere","description":"Atmosphere web client","fork":false,"url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere","forks_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/forks","keys_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/teams","hooks_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/hooks","issue_events_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/issues/events{/number}","events_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/events","assignees_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/assignees{/user}","branches_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/branches{/branch}","tags_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/tags","blobs_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/statuses/{sha}","languages_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/languages","stargazers_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/stargazers","contributors_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/contributors","subscribers_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/subscribers","subscription_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/subscription","commits_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/contents/{+path}","compare_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/merges","archive_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/downloads","issues_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/issues{/number}","pulls_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/pulls{/number}","milestones_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/milestones{/number}","notifications_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/labels{/name}","releases_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/releases{/id}","deployments_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/deployments","created_at":"2014-03-19T17:26:44Z","updated_at":"2016-01-12T20:54:14Z","pushed_at":"2016-01-29T23:59:28Z","git_url":"git://github.com/iPlantCollaborativeOpenSource/troposphere.git","ssh_url":"git@github.com:iPlantCollaborativeOpenSource/troposphere.git","clone_url":"https://github.com/iPlantCollaborativeOpenSource/troposphere.git","svn_url":"https://github.com/iPlantCollaborativeOpenSource/troposphere","homepage":null,"size":5994,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":5,"forks":3,"open_issues":5,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/pulls/264"},"html":{"href":"https://github.com/iPlantCollaborativeOpenSource/troposphere/pull/264"},"issue":{"href":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/issues/264"},"comments":{"href":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/issues/264/comments"},"review_comments":{"href":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/pulls/264/comments"},"review_comment":{"href":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/pulls/264/commits"},"statuses":{"href":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/statuses/11e55ef8d190082414e3569a2ed3a85b1c6fa73a"}}}}