{"action":"created","comment":{"url":"https://api.github.com/repos/skyarch-networks/skyhopper/pulls/comments/42593258","id":42593258,"diff_hunk":"@@ -1757,201 +1764,214 @@\n     }\n   });\n \n-  var newVM = function (stack) {\n-    return new Vue({\n-      template: '#infra-show-template',\n-      data: {\n-        current_infra: {\n-          stack: stack,\n-          resources : {},\n-          events: [],\n-          templates: {histories: null, globals: null},\n-          add_modify: {name: \"\", detail: \"\", value: \"\"},\n-        },\n-        tabpaneID: 'default',     // tabpane 一つ一つのID. これに対応する tab の中身が表示される\n-        tabpaneGroupID: null,     // 複数の tabpane をまとめるID. これに対応する tab が表示される\n-        loading: true,  // trueにすると、loading-tabpaneが表示される。\n-      },\n-      methods:{\n-        screen_name: function (res) {\n-          if (res.screen_name) {\n-            return res.screen_name + ' / ' + res.physical_id;\n-          } else {\n-            return res.physical_id;\n-          }\n-        },\n-        show_ec2: function (physical_id) {\n-          this.show_tabpane('ec2');\n-          this.loading = true;\n-          this.tabpaneGroupID = physical_id;\n-        },\n-        show_rds: function (physical_id) {\n-          this.show_tabpane('rds');\n-          this.tabpaneGroupID = physical_id;\n-          this.loading = true;\n-        },\n-        show_elb: function (physical_id) {\n-          this.show_tabpane('elb');\n-          this.tabpaneGroupID = physical_id;\n-          this.loading = true;\n-        },\n-        show_s3: function (physical_id) {\n-          this.show_tabpane('s3');\n-          this.tabpaneGroupID = physical_id;\n-          this.loading = true;\n-        },\n-        show_add_modify: function () {\n-          var self = this;\n-          self.loading = true;\n-          self.$event.preventDefault();\n-\n-          var cft = new CFTemplate(current_infra);\n-          cft.new().done(function (data) {\n-            self.current_infra.templates.histories = data.histories;\n-            self.current_infra.templates.globals = data.globals;\n-\n-            self.show_tabpane('add_modify');\n-          }).fail(alert_danger());\n-        },\n-\n-        show_add_ec2: function () { this.show_tabpane('add-ec2'); },\n-\n-        show_cf_history: function () {\n-          var self = this;\n-          self.$event.preventDefault();\n-          self.show_tabpane('cf_history');\n-          self.loading = true;\n-        },\n-        show_event_logs: function () {\n-          if (this.no_stack) {return;}\n-          var self = this;\n-          self.loading = true;\n-          self.$event.preventDefault();\n-\n-          current_infra.stack_events().done(function (res) {\n-            self.current_infra.events = res.stack_events;\n-            self.show_tabpane('event_logs');\n+\n+  Vue.component('operation-sched-tabpane',  {\n+    template: '#operation-sched-tabpane-template',\n+    data: function () {return {\n+      event_loading:   false,\n+      instances: null,\n+      dates: [{day: t('operation_scheduler.dates.monday'),   checked: false, value : 1},\n+              {day: t('operation_scheduler.dates.tuesday'),  checked: false, value : 2},\n+              {day: t('operation_scheduler.dates.wednesday'),checked: false, value : 3},\n+              {day: t('operation_scheduler.dates.thursday'), checked: false, value : 4},\n+              {day: t('operation_scheduler.dates.friday'),   checked: false, value : 5},\n+              {day: t('operation_scheduler.dates.saturday'), checked: false, value : 6},\n+              {day: t('operation_scheduler.dates.sunday'),   checked: false, value : 0}],\n+      default_start: moment().utcOffset (\"Asia/Tokyo\").startOf('day').hour(7).minute(0).format('YYYY/MM/D h:mm a'),\n+      default_end: moment().utcOffset (\"Asia/Tokyo\").startOf('day').add(1, 'years').hour(19).minute(0).format('YYYY/MM/D h:mm a'),\n+      time_start: moment().utcOffset (\"Asia/Tokyo\").startOf('day').hour(7).minute(0).format('h:mm a'),\n+      time_end: moment().utcOffset (\"Asia/Tokyo\").startOf('day').hour(19).minute(0).format('h:mm a'),\n+      modes: [{desc: t('operation_scheduler.desc.everyday'), value: 1},","path":"app/assets/javascripts/infrastructures.js","position":146,"original_position":146,"commit_id":"3da4144c72f9b5c828e3589d264ca7bf781a3102","original_commit_id":"3da4144c72f9b5c828e3589d264ca7bf781a3102","user":{"login":"Joeper214","id":2352389,"avatar_url":"https://avatars.githubusercontent.com/u/2352389?v=3","gravatar_id":"","url":"https://api.github.com/users/Joeper214","html_url":"https://github.com/Joeper214","followers_url":"https://api.github.com/users/Joeper214/followers","following_url":"https://api.github.com/users/Joeper214/following{/other_user}","gists_url":"https://api.github.com/users/Joeper214/gists{/gist_id}","starred_url":"https://api.github.com/users/Joeper214/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joeper214/subscriptions","organizations_url":"https://api.github.com/users/Joeper214/orgs","repos_url":"https://api.github.com/users/Joeper214/repos","events_url":"https://api.github.com/users/Joeper214/events{/privacy}","received_events_url":"https://api.github.com/users/Joeper214/received_events","type":"User","site_admin":false},"body":"But on ui I set iT18N so that it could also use Japanesse version. is it also needed for the enum?","created_at":"2015-10-21T07:59:09Z","updated_at":"2015-10-21T07:59:09Z","html_url":"https://github.com/skyarch-networks/skyhopper/pull/85#discussion_r42593258","pull_request_url":"https://api.github.com/repos/skyarch-networks/skyhopper/pulls/85","_links":{"self":{"href":"https://api.github.com/repos/skyarch-networks/skyhopper/pulls/comments/42593258"},"html":{"href":"https://github.com/skyarch-networks/skyhopper/pull/85#discussion_r42593258"},"pull_request":{"href":"https://api.github.com/repos/skyarch-networks/skyhopper/pulls/85"}}},"pull_request":{"url":"https://api.github.com/repos/skyarch-networks/skyhopper/pulls/85","id":47760745,"html_url":"https://github.com/skyarch-networks/skyhopper/pull/85","diff_url":"https://github.com/skyarch-networks/skyhopper/pull/85.diff","patch_url":"https://github.com/skyarch-networks/skyhopper/pull/85.patch","issue_url":"https://api.github.com/repos/skyarch-networks/skyhopper/issues/85","number":85,"state":"open","locked":false,"title":"NC-532","user":{"login":"Joeper214","id":2352389,"avatar_url":"https://avatars.githubusercontent.com/u/2352389?v=3","gravatar_id":"","url":"https://api.github.com/users/Joeper214","html_url":"https://github.com/Joeper214","followers_url":"https://api.github.com/users/Joeper214/followers","following_url":"https://api.github.com/users/Joeper214/following{/other_user}","gists_url":"https://api.github.com/users/Joeper214/gists{/gist_id}","starred_url":"https://api.github.com/users/Joeper214/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joeper214/subscriptions","organizations_url":"https://api.github.com/users/Joeper214/orgs","repos_url":"https://api.github.com/users/Joeper214/repos","events_url":"https://api.github.com/users/Joeper214/events{/privacy}","received_events_url":"https://api.github.com/users/Joeper214/received_events","type":"User","site_admin":false},"body":"According to this ticket: https://skyarch.backlog.jp/view/NC-532\r\n\r\n### Goals for this PR:\r\n\r\n- [x] Add button for Operation Schedule\r\n- [x] Import fullcalendar.io\r\n- [x] Fetch all available instances/resources and display to UI\r\n- [x] Add manage schedule button for each instances/resources\r\n- [x] Create modal for manage schedule\r\n- [x] Add tooltip/popover for information on the manage schedule\r\n- [x] Create  DB model for saving of schedules and events\r\n- [x] Insert selected event to DB\r\n- [x] Fetch the events\r\n- [x] Print events to fullcalendarUI\r\n- [x] iT18N\r\n\r\n\r\n\r\n### next goal\r\n - Add Icalendar format\r\n - Background task for stopping and starting of instance according to time","created_at":"2015-10-15T09:07:07Z","updated_at":"2015-10-21T07:59:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7ed2c2a99a7cc095786c0de03e9391f55b9aa269","assignee":{"login":"pocke","id":4361134,"avatar_url":"https://avatars.githubusercontent.com/u/4361134?v=3","gravatar_id":"","url":"https://api.github.com/users/pocke","html_url":"https://github.com/pocke","followers_url":"https://api.github.com/users/pocke/followers","following_url":"https://api.github.com/users/pocke/following{/other_user}","gists_url":"https://api.github.com/users/pocke/gists{/gist_id}","starred_url":"https://api.github.com/users/pocke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pocke/subscriptions","organizations_url":"https://api.github.com/users/pocke/orgs","repos_url":"https://api.github.com/users/pocke/repos","events_url":"https://api.github.com/users/pocke/events{/privacy}","received_events_url":"https://api.github.com/users/pocke/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/skyarch-networks/skyhopper/pulls/85/commits","review_comments_url":"https://api.github.com/repos/skyarch-networks/skyhopper/pulls/85/comments","review_comment_url":"https://api.github.com/repos/skyarch-networks/skyhopper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/skyarch-networks/skyhopper/issues/85/comments","statuses_url":"https://api.github.com/repos/skyarch-networks/skyhopper/statuses/3da4144c72f9b5c828e3589d264ca7bf781a3102","head":{"label":"skyarch-networks:NC-532","ref":"NC-532","sha":"3da4144c72f9b5c828e3589d264ca7bf781a3102","user":{"login":"skyarch-networks","id":10970571,"avatar_url":"https://avatars.githubusercontent.com/u/10970571?v=3","gravatar_id":"","url":"https://api.github.com/users/skyarch-networks","html_url":"https://github.com/skyarch-networks","followers_url":"https://api.github.com/users/skyarch-networks/followers","following_url":"https://api.github.com/users/skyarch-networks/following{/other_user}","gists_url":"https://api.github.com/users/skyarch-networks/gists{/gist_id}","starred_url":"https://api.github.com/users/skyarch-networks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyarch-networks/subscriptions","organizations_url":"https://api.github.com/users/skyarch-networks/orgs","repos_url":"https://api.github.com/users/skyarch-networks/repos","events_url":"https://api.github.com/users/skyarch-networks/events{/privacy}","received_events_url":"https://api.github.com/users/skyarch-networks/received_events","type":"User","site_admin":false},"repo":{"id":31754199,"name":"skyhopper","full_name":"skyarch-networks/skyhopper","owner":{"login":"skyarch-networks","id":10970571,"avatar_url":"https://avatars.githubusercontent.com/u/10970571?v=3","gravatar_id":"","url":"https://api.github.com/users/skyarch-networks","html_url":"https://github.com/skyarch-networks","followers_url":"https://api.github.com/users/skyarch-networks/followers","following_url":"https://api.github.com/users/skyarch-networks/following{/other_user}","gists_url":"https://api.github.com/users/skyarch-networks/gists{/gist_id}","starred_url":"https://api.github.com/users/skyarch-networks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyarch-networks/subscriptions","organizations_url":"https://api.github.com/users/skyarch-networks/orgs","repos_url":"https://api.github.com/users/skyarch-networks/repos","events_url":"https://api.github.com/users/skyarch-networks/events{/privacy}","received_events_url":"https://api.github.com/users/skyarch-networks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/skyarch-networks/skyhopper","description":"システム自動構築ツール","fork":false,"url":"https://api.github.com/repos/skyarch-networks/skyhopper","forks_url":"https://api.github.com/repos/skyarch-networks/skyhopper/forks","keys_url":"https://api.github.com/repos/skyarch-networks/skyhopper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skyarch-networks/skyhopper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skyarch-networks/skyhopper/teams","hooks_url":"https://api.github.com/repos/skyarch-networks/skyhopper/hooks","issue_events_url":"https://api.github.com/repos/skyarch-networks/skyhopper/issues/events{/number}","events_url":"https://api.github.com/repos/skyarch-networks/skyhopper/events","assignees_url":"https://api.github.com/repos/skyarch-networks/skyhopper/assignees{/user}","branches_url":"https://api.github.com/repos/skyarch-networks/skyhopper/branches{/branch}","tags_url":"https://api.github.com/repos/skyarch-networks/skyhopper/tags","blobs_url":"https://api.github.com/repos/skyarch-networks/skyhopper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skyarch-networks/skyhopper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skyarch-networks/skyhopper/git/refs{/sha}","trees_url":"https://api.github.com/repos/skyarch-networks/skyhopper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skyarch-networks/skyhopper/statuses/{sha}","languages_url":"https://api.github.com/repos/skyarch-networks/skyhopper/languages","stargazers_url":"https://api.github.com/repos/skyarch-networks/skyhopper/stargazers","contributors_url":"https://api.github.com/repos/skyarch-networks/skyhopper/contributors","subscribers_url":"https://api.github.com/repos/skyarch-networks/skyhopper/subscribers","subscription_url":"https://api.github.com/repos/skyarch-networks/skyhopper/subscription","commits_url":"https://api.github.com/repos/skyarch-networks/skyhopper/commits{/sha}","git_commits_url":"https://api.github.com/repos/skyarch-networks/skyhopper/git/commits{/sha}","comments_url":"https://api.github.com/repos/skyarch-networks/skyhopper/comments{/number}","issue_comment_url":"https://api.github.com/repos/skyarch-networks/skyhopper/issues/comments{/number}","contents_url":"https://api.github.com/repos/skyarch-networks/skyhopper/contents/{+path}","compare_url":"https://api.github.com/repos/skyarch-networks/skyhopper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skyarch-networks/skyhopper/merges","archive_url":"https://api.github.com/repos/skyarch-networks/skyhopper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skyarch-networks/skyhopper/downloads","issues_url":"https://api.github.com/repos/skyarch-networks/skyhopper/issues{/number}","pulls_url":"https://api.github.com/repos/skyarch-networks/skyhopper/pulls{/number}","milestones_url":"https://api.github.com/repos/skyarch-networks/skyhopper/milestones{/number}","notifications_url":"https://api.github.com/repos/skyarch-networks/skyhopper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skyarch-networks/skyhopper/labels{/name}","releases_url":"https://api.github.com/repos/skyarch-networks/skyhopper/releases{/id}","created_at":"2015-03-06T05:30:44Z","updated_at":"2015-10-06T08:11:45Z","pushed_at":"2015-10-21T07:14:36Z","git_url":"git://github.com/skyarch-networks/skyhopper.git","ssh_url":"git@github.com:skyarch-networks/skyhopper.git","clone_url":"https://github.com/skyarch-networks/skyhopper.git","svn_url":"https://github.com/skyarch-networks/skyhopper","homepage":"","size":7630,"stargazers_count":15,"watchers_count":15,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":15,"default_branch":"master"}},"base":{"label":"skyarch-networks:develop","ref":"develop","sha":"30674ae3daa519d2e1d15e2b95cb9539075a1769","user":{"login":"skyarch-networks","id":10970571,"avatar_url":"https://avatars.githubusercontent.com/u/10970571?v=3","gravatar_id":"","url":"https://api.github.com/users/skyarch-networks","html_url":"https://github.com/skyarch-networks","followers_url":"https://api.github.com/users/skyarch-networks/followers","following_url":"https://api.github.com/users/skyarch-networks/following{/other_user}","gists_url":"https://api.github.com/users/skyarch-networks/gists{/gist_id}","starred_url":"https://api.github.com/users/skyarch-networks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyarch-networks/subscriptions","organizations_url":"https://api.github.com/users/skyarch-networks/orgs","repos_url":"https://api.github.com/users/skyarch-networks/repos","events_url":"https://api.github.com/users/skyarch-networks/events{/privacy}","received_events_url":"https://api.github.com/users/skyarch-networks/received_events","type":"User","site_admin":false},"repo":{"id":31754199,"name":"skyhopper","full_name":"skyarch-networks/skyhopper","owner":{"login":"skyarch-networks","id":10970571,"avatar_url":"https://avatars.githubusercontent.com/u/10970571?v=3","gravatar_id":"","url":"https://api.github.com/users/skyarch-networks","html_url":"https://github.com/skyarch-networks","followers_url":"https://api.github.com/users/skyarch-networks/followers","following_url":"https://api.github.com/users/skyarch-networks/following{/other_user}","gists_url":"https://api.github.com/users/skyarch-networks/gists{/gist_id}","starred_url":"https://api.github.com/users/skyarch-networks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyarch-networks/subscriptions","organizations_url":"https://api.github.com/users/skyarch-networks/orgs","repos_url":"https://api.github.com/users/skyarch-networks/repos","events_url":"https://api.github.com/users/skyarch-networks/events{/privacy}","received_events_url":"https://api.github.com/users/skyarch-networks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/skyarch-networks/skyhopper","description":"システム自動構築ツール","fork":false,"url":"https://api.github.com/repos/skyarch-networks/skyhopper","forks_url":"https://api.github.com/repos/skyarch-networks/skyhopper/forks","keys_url":"https://api.github.com/repos/skyarch-networks/skyhopper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skyarch-networks/skyhopper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skyarch-networks/skyhopper/teams","hooks_url":"https://api.github.com/repos/skyarch-networks/skyhopper/hooks","issue_events_url":"https://api.github.com/repos/skyarch-networks/skyhopper/issues/events{/number}","events_url":"https://api.github.com/repos/skyarch-networks/skyhopper/events","assignees_url":"https://api.github.com/repos/skyarch-networks/skyhopper/assignees{/user}","branches_url":"https://api.github.com/repos/skyarch-networks/skyhopper/branches{/branch}","tags_url":"https://api.github.com/repos/skyarch-networks/skyhopper/tags","blobs_url":"https://api.github.com/repos/skyarch-networks/skyhopper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skyarch-networks/skyhopper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skyarch-networks/skyhopper/git/refs{/sha}","trees_url":"https://api.github.com/repos/skyarch-networks/skyhopper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skyarch-networks/skyhopper/statuses/{sha}","languages_url":"https://api.github.com/repos/skyarch-networks/skyhopper/languages","stargazers_url":"https://api.github.com/repos/skyarch-networks/skyhopper/stargazers","contributors_url":"https://api.github.com/repos/skyarch-networks/skyhopper/contributors","subscribers_url":"https://api.github.com/repos/skyarch-networks/skyhopper/subscribers","subscription_url":"https://api.github.com/repos/skyarch-networks/skyhopper/subscription","commits_url":"https://api.github.com/repos/skyarch-networks/skyhopper/commits{/sha}","git_commits_url":"https://api.github.com/repos/skyarch-networks/skyhopper/git/commits{/sha}","comments_url":"https://api.github.com/repos/skyarch-networks/skyhopper/comments{/number}","issue_comment_url":"https://api.github.com/repos/skyarch-networks/skyhopper/issues/comments{/number}","contents_url":"https://api.github.com/repos/skyarch-networks/skyhopper/contents/{+path}","compare_url":"https://api.github.com/repos/skyarch-networks/skyhopper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skyarch-networks/skyhopper/merges","archive_url":"https://api.github.com/repos/skyarch-networks/skyhopper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skyarch-networks/skyhopper/downloads","issues_url":"https://api.github.com/repos/skyarch-networks/skyhopper/issues{/number}","pulls_url":"https://api.github.com/repos/skyarch-networks/skyhopper/pulls{/number}","milestones_url":"https://api.github.com/repos/skyarch-networks/skyhopper/milestones{/number}","notifications_url":"https://api.github.com/repos/skyarch-networks/skyhopper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skyarch-networks/skyhopper/labels{/name}","releases_url":"https://api.github.com/repos/skyarch-networks/skyhopper/releases{/id}","created_at":"2015-03-06T05:30:44Z","updated_at":"2015-10-06T08:11:45Z","pushed_at":"2015-10-21T07:14:36Z","git_url":"git://github.com/skyarch-networks/skyhopper.git","ssh_url":"git@github.com:skyarch-networks/skyhopper.git","clone_url":"https://github.com/skyarch-networks/skyhopper.git","svn_url":"https://github.com/skyarch-networks/skyhopper","homepage":"","size":7630,"stargazers_count":15,"watchers_count":15,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/skyarch-networks/skyhopper/pulls/85"},"html":{"href":"https://github.com/skyarch-networks/skyhopper/pull/85"},"issue":{"href":"https://api.github.com/repos/skyarch-networks/skyhopper/issues/85"},"comments":{"href":"https://api.github.com/repos/skyarch-networks/skyhopper/issues/85/comments"},"review_comments":{"href":"https://api.github.com/repos/skyarch-networks/skyhopper/pulls/85/comments"},"review_comment":{"href":"https://api.github.com/repos/skyarch-networks/skyhopper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/skyarch-networks/skyhopper/pulls/85/commits"},"statuses":{"href":"https://api.github.com/repos/skyarch-networks/skyhopper/statuses/3da4144c72f9b5c828e3589d264ca7bf781a3102"}}}}