{"action":"created","comment":{"url":"https://api.github.com/repos/spinnaker/deck/pulls/comments/239637607","pull_request_review_id":182468146,"id":239637607,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTYzNzYwNw==","diff_hunk":"@@ -0,0 +1,135 @@\n+import * as React from 'react';\n+import Select, { Option } from 'react-select';\n+\n+import { IEntityRef, IEntityTag, IStage } from 'core/domain';\n+import { IStageConfigProps, StageConfigField } from 'core/pipeline';\n+import { SETTINGS } from 'core/config/settings';\n+\n+import { TagEditor } from './TagEditor';\n+import { FormField, ReactSelectInput, StringsAsOptions } from 'core/presentation';\n+\n+export interface IApplyEntityTagsStage extends IStage {\n+  entityRef: IEntityRef;\n+  tags: IEntityTag[];\n+}\n+\n+export interface IApplyEntityTagsStageConfigProps extends IStageConfigProps {\n+  stage: IApplyEntityTagsStage;\n+}\n+\n+export class ApplyEntityTagsStageConfig extends React.Component<IApplyEntityTagsStageConfigProps> {\n+  private entityOptions = [\n+    { label: 'Server Group', value: 'servergroup' },\n+    { label: 'Load Balancer', value: 'loadbalancer' },\n+    { label: 'Application', value: 'application' },\n+    { label: 'Cluster', value: 'cluster' },\n+    { label: 'Security Group', value: 'securitygroup' },\n+  ];\n+\n+  private entityRefTypeChanged = (entityType: string) => {\n+    const entityRef = { entityType };\n+    this.props.updateStageField({ entityRef });\n+  };\n+\n+  private entityRefFieldChanged = (key: string, value: string) => {\n+    const entityRef = { ...this.props.stage.entityRef, ...{ [key]: value } };\n+    this.props.updateStageField({ entityRef });\n+  };\n+\n+  private tagChanged = (tag: IEntityTag, index: number) => {\n+    const tags = this.props.stage.tags.slice();\n+    tags[index] = tag;\n+    this.props.updateStageField({ tags });\n+  };\n+\n+  private addTag = () => {\n+    this.props.stage.tags.push({ name: '', value: '' });\n+    this.props.updateStageField({ tags: this.props.stage.tags });\n+  };\n+\n+  public render() {\n+    const {\n+      stage: { entityRef = {} as IEntityRef, tags = [] as IEntityTag[] },\n+      application: {\n+        attributes: { cloudProviders = SETTINGS.defaultProviders },\n+      },\n+    } = this.props;\n+\n+    return (\n+      <div className=\"form-horizontal\">\n+        <StageConfigField label=\"Entity Type\">\n+          <Select\n+            clearable={false}\n+            options={this.entityOptions}\n+            onChange={(o: Option<string>) => this.entityRefTypeChanged(o.value)}\n+            value={entityRef.entityType || ''}\n+          />\n+        </StageConfigField>\n+        {entityRef.entityType && (\n+          <>\n+            <StageConfigField label=\"Name\">\n+              <input\n+                className=\"form-control input-sm\"\n+                value={entityRef.entityId || ''}\n+                onChange={e => this.entityRefFieldChanged('entityId', e.target.value)}\n+              />\n+            </StageConfigField>\n+            {entityRef.entityType !== 'application' && (\n+              <>\n+                <StageConfigField label=\"Cloud Provider\">\n+                  <FormField\n+                    input={fieldProps => (\n+                      <StringsAsOptions strings={cloudProviders}>","path":"app/scripts/modules/core/src/pipeline/config/stages/entityTags/ApplyEntityTagsStageConfig.tsx","position":82,"original_position":82,"commit_id":"f9232f50233288533e30b2ba5bf58e8d94042f1c","original_commit_id":"f9232f50233288533e30b2ba5bf58e8d94042f1c","user":{"login":"christopherthielen","id":2053478,"node_id":"MDQ6VXNlcjIwNTM0Nzg=","avatar_url":"https://avatars0.githubusercontent.com/u/2053478?v=4","gravatar_id":"","url":"https://api.github.com/users/christopherthielen","html_url":"https://github.com/christopherthielen","followers_url":"https://api.github.com/users/christopherthielen/followers","following_url":"https://api.github.com/users/christopherthielen/following{/other_user}","gists_url":"https://api.github.com/users/christopherthielen/gists{/gist_id}","starred_url":"https://api.github.com/users/christopherthielen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christopherthielen/subscriptions","organizations_url":"https://api.github.com/users/christopherthielen/orgs","repos_url":"https://api.github.com/users/christopherthielen/repos","events_url":"https://api.github.com/users/christopherthielen/events{/privacy}","received_events_url":"https://api.github.com/users/christopherthielen/received_events","type":"User","site_admin":false},"body":"ReactSelectInput can take `stringOptions` array\r\n\r\nhttps://github.com/spinnaker/deck/blob/49ec7716c0130264648e3a5c6e4664d79e1853c1/app/scripts/modules/core/src/presentation/forms/inputs/ReactSelectInput.tsx#L10-L13","created_at":"2018-12-06T22:24:29Z","updated_at":"2018-12-06T22:43:14Z","html_url":"https://github.com/spinnaker/deck/pull/6151#discussion_r239637607","pull_request_url":"https://api.github.com/repos/spinnaker/deck/pulls/6151","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/spinnaker/deck/pulls/comments/239637607"},"html":{"href":"https://github.com/spinnaker/deck/pull/6151#discussion_r239637607"},"pull_request":{"href":"https://api.github.com/repos/spinnaker/deck/pulls/6151"}}},"pull_request":{"url":"https://api.github.com/repos/spinnaker/deck/pulls/6151","id":236676041,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2Njc2MDQx","html_url":"https://github.com/spinnaker/deck/pull/6151","diff_url":"https://github.com/spinnaker/deck/pull/6151.diff","patch_url":"https://github.com/spinnaker/deck/pull/6151.patch","issue_url":"https://api.github.com/repos/spinnaker/deck/issues/6151","number":6151,"state":"open","locked":false,"title":"feat(core/pipelines): Add an apply entity tags stage","user":{"login":"jrsquared","id":56971,"node_id":"MDQ6VXNlcjU2OTcx","avatar_url":"https://avatars1.githubusercontent.com/u/56971?v=4","gravatar_id":"","url":"https://api.github.com/users/jrsquared","html_url":"https://github.com/jrsquared","followers_url":"https://api.github.com/users/jrsquared/followers","following_url":"https://api.github.com/users/jrsquared/following{/other_user}","gists_url":"https://api.github.com/users/jrsquared/gists{/gist_id}","starred_url":"https://api.github.com/users/jrsquared/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrsquared/subscriptions","organizations_url":"https://api.github.com/users/jrsquared/orgs","repos_url":"https://api.github.com/users/jrsquared/repos","events_url":"https://api.github.com/users/jrsquared/events{/privacy}","received_events_url":"https://api.github.com/users/jrsquared/received_events","type":"User","site_admin":false},"body":"The stage already exists, just adding a simple UI for it. Could definitely use some love, but it's functional for now.\r\n\r\n![screen shot 2018-12-06 at 1 17 02 pm](https://user-images.githubusercontent.com/56971/49612469-aaef1180-f959-11e8-94a4-fa0cd01aff86.png)\r\n\r\n@gcomstock FYI","created_at":"2018-12-06T21:20:43Z","updated_at":"2018-12-06T22:43:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d1179969d46653c6cb2760765a2b85012561ad13","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/spinnaker/deck/pulls/6151/commits","review_comments_url":"https://api.github.com/repos/spinnaker/deck/pulls/6151/comments","review_comment_url":"https://api.github.com/repos/spinnaker/deck/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spinnaker/deck/issues/6151/comments","statuses_url":"https://api.github.com/repos/spinnaker/deck/statuses/f9232f50233288533e30b2ba5bf58e8d94042f1c","head":{"label":"jrsquared:et","ref":"et","sha":"f9232f50233288533e30b2ba5bf58e8d94042f1c","user":{"login":"jrsquared","id":56971,"node_id":"MDQ6VXNlcjU2OTcx","avatar_url":"https://avatars1.githubusercontent.com/u/56971?v=4","gravatar_id":"","url":"https://api.github.com/users/jrsquared","html_url":"https://github.com/jrsquared","followers_url":"https://api.github.com/users/jrsquared/followers","following_url":"https://api.github.com/users/jrsquared/following{/other_user}","gists_url":"https://api.github.com/users/jrsquared/gists{/gist_id}","starred_url":"https://api.github.com/users/jrsquared/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrsquared/subscriptions","organizations_url":"https://api.github.com/users/jrsquared/orgs","repos_url":"https://api.github.com/users/jrsquared/repos","events_url":"https://api.github.com/users/jrsquared/events{/privacy}","received_events_url":"https://api.github.com/users/jrsquared/received_events","type":"User","site_admin":false},"repo":{"id":79277027,"node_id":"MDEwOlJlcG9zaXRvcnk3OTI3NzAyNw==","name":"deck","full_name":"jrsquared/deck","private":false,"owner":{"login":"jrsquared","id":56971,"node_id":"MDQ6VXNlcjU2OTcx","avatar_url":"https://avatars1.githubusercontent.com/u/56971?v=4","gravatar_id":"","url":"https://api.github.com/users/jrsquared","html_url":"https://github.com/jrsquared","followers_url":"https://api.github.com/users/jrsquared/followers","following_url":"https://api.github.com/users/jrsquared/following{/other_user}","gists_url":"https://api.github.com/users/jrsquared/gists{/gist_id}","starred_url":"https://api.github.com/users/jrsquared/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrsquared/subscriptions","organizations_url":"https://api.github.com/users/jrsquared/orgs","repos_url":"https://api.github.com/users/jrsquared/repos","events_url":"https://api.github.com/users/jrsquared/events{/privacy}","received_events_url":"https://api.github.com/users/jrsquared/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jrsquared/deck","description":"Management UI for Spinnaker","fork":true,"url":"https://api.github.com/repos/jrsquared/deck","forks_url":"https://api.github.com/repos/jrsquared/deck/forks","keys_url":"https://api.github.com/repos/jrsquared/deck/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jrsquared/deck/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jrsquared/deck/teams","hooks_url":"https://api.github.com/repos/jrsquared/deck/hooks","issue_events_url":"https://api.github.com/repos/jrsquared/deck/issues/events{/number}","events_url":"https://api.github.com/repos/jrsquared/deck/events","assignees_url":"https://api.github.com/repos/jrsquared/deck/assignees{/user}","branches_url":"https://api.github.com/repos/jrsquared/deck/branches{/branch}","tags_url":"https://api.github.com/repos/jrsquared/deck/tags","blobs_url":"https://api.github.com/repos/jrsquared/deck/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jrsquared/deck/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jrsquared/deck/git/refs{/sha}","trees_url":"https://api.github.com/repos/jrsquared/deck/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jrsquared/deck/statuses/{sha}","languages_url":"https://api.github.com/repos/jrsquared/deck/languages","stargazers_url":"https://api.github.com/repos/jrsquared/deck/stargazers","contributors_url":"https://api.github.com/repos/jrsquared/deck/contributors","subscribers_url":"https://api.github.com/repos/jrsquared/deck/subscribers","subscription_url":"https://api.github.com/repos/jrsquared/deck/subscription","commits_url":"https://api.github.com/repos/jrsquared/deck/commits{/sha}","git_commits_url":"https://api.github.com/repos/jrsquared/deck/git/commits{/sha}","comments_url":"https://api.github.com/repos/jrsquared/deck/comments{/number}","issue_comment_url":"https://api.github.com/repos/jrsquared/deck/issues/comments{/number}","contents_url":"https://api.github.com/repos/jrsquared/deck/contents/{+path}","compare_url":"https://api.github.com/repos/jrsquared/deck/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jrsquared/deck/merges","archive_url":"https://api.github.com/repos/jrsquared/deck/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jrsquared/deck/downloads","issues_url":"https://api.github.com/repos/jrsquared/deck/issues{/number}","pulls_url":"https://api.github.com/repos/jrsquared/deck/pulls{/number}","milestones_url":"https://api.github.com/repos/jrsquared/deck/milestones{/number}","notifications_url":"https://api.github.com/repos/jrsquared/deck/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jrsquared/deck/labels{/name}","releases_url":"https://api.github.com/repos/jrsquared/deck/releases{/id}","deployments_url":"https://api.github.com/repos/jrsquared/deck/deployments","created_at":"2017-01-17T22:08:52Z","updated_at":"2017-01-17T22:09:00Z","pushed_at":"2018-12-06T21:19:40Z","git_url":"git://github.com/jrsquared/deck.git","ssh_url":"git@github.com:jrsquared/deck.git","clone_url":"https://github.com/jrsquared/deck.git","svn_url":"https://github.com/jrsquared/deck","homepage":"","size":34737,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"spinnaker:master","ref":"master","sha":"98cedbf4f3ea2b02db73814a014b0c0bf415298a","user":{"login":"spinnaker","id":7634182,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MzQxODI=","avatar_url":"https://avatars1.githubusercontent.com/u/7634182?v=4","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"repo":{"id":21953642,"node_id":"MDEwOlJlcG9zaXRvcnkyMTk1MzY0Mg==","name":"deck","full_name":"spinnaker/deck","private":false,"owner":{"login":"spinnaker","id":7634182,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MzQxODI=","avatar_url":"https://avatars1.githubusercontent.com/u/7634182?v=4","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/spinnaker/deck","description":"Management UI for Spinnaker","fork":false,"url":"https://api.github.com/repos/spinnaker/deck","forks_url":"https://api.github.com/repos/spinnaker/deck/forks","keys_url":"https://api.github.com/repos/spinnaker/deck/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spinnaker/deck/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spinnaker/deck/teams","hooks_url":"https://api.github.com/repos/spinnaker/deck/hooks","issue_events_url":"https://api.github.com/repos/spinnaker/deck/issues/events{/number}","events_url":"https://api.github.com/repos/spinnaker/deck/events","assignees_url":"https://api.github.com/repos/spinnaker/deck/assignees{/user}","branches_url":"https://api.github.com/repos/spinnaker/deck/branches{/branch}","tags_url":"https://api.github.com/repos/spinnaker/deck/tags","blobs_url":"https://api.github.com/repos/spinnaker/deck/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spinnaker/deck/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spinnaker/deck/git/refs{/sha}","trees_url":"https://api.github.com/repos/spinnaker/deck/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spinnaker/deck/statuses/{sha}","languages_url":"https://api.github.com/repos/spinnaker/deck/languages","stargazers_url":"https://api.github.com/repos/spinnaker/deck/stargazers","contributors_url":"https://api.github.com/repos/spinnaker/deck/contributors","subscribers_url":"https://api.github.com/repos/spinnaker/deck/subscribers","subscription_url":"https://api.github.com/repos/spinnaker/deck/subscription","commits_url":"https://api.github.com/repos/spinnaker/deck/commits{/sha}","git_commits_url":"https://api.github.com/repos/spinnaker/deck/git/commits{/sha}","comments_url":"https://api.github.com/repos/spinnaker/deck/comments{/number}","issue_comment_url":"https://api.github.com/repos/spinnaker/deck/issues/comments{/number}","contents_url":"https://api.github.com/repos/spinnaker/deck/contents/{+path}","compare_url":"https://api.github.com/repos/spinnaker/deck/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spinnaker/deck/merges","archive_url":"https://api.github.com/repos/spinnaker/deck/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spinnaker/deck/downloads","issues_url":"https://api.github.com/repos/spinnaker/deck/issues{/number}","pulls_url":"https://api.github.com/repos/spinnaker/deck/pulls{/number}","milestones_url":"https://api.github.com/repos/spinnaker/deck/milestones{/number}","notifications_url":"https://api.github.com/repos/spinnaker/deck/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spinnaker/deck/labels{/name}","releases_url":"https://api.github.com/repos/spinnaker/deck/releases{/id}","deployments_url":"https://api.github.com/repos/spinnaker/deck/deployments","created_at":"2014-07-17T18:51:00Z","updated_at":"2018-12-06T18:12:39Z","pushed_at":"2018-12-06T21:21:08Z","git_url":"git://github.com/spinnaker/deck.git","ssh_url":"git@github.com:spinnaker/deck.git","clone_url":"https://github.com/spinnaker/deck.git","svn_url":"https://github.com/spinnaker/deck","homepage":"","size":34791,"stargazers_count":163,"watchers_count":163,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":400,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":400,"open_issues":6,"watchers":163,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spinnaker/deck/pulls/6151"},"html":{"href":"https://github.com/spinnaker/deck/pull/6151"},"issue":{"href":"https://api.github.com/repos/spinnaker/deck/issues/6151"},"comments":{"href":"https://api.github.com/repos/spinnaker/deck/issues/6151/comments"},"review_comments":{"href":"https://api.github.com/repos/spinnaker/deck/pulls/6151/comments"},"review_comment":{"href":"https://api.github.com/repos/spinnaker/deck/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spinnaker/deck/pulls/6151/commits"},"statuses":{"href":"https://api.github.com/repos/spinnaker/deck/statuses/f9232f50233288533e30b2ba5bf58e8d94042f1c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"christopherthielen"}}