Last active
March 2, 2017 10:11
-
-
Save PankajWorks/08e23228e7352a0b892a214f240641b9 to your computer and use it in GitHub Desktop.
Revisions
-
Pankaj Singh revised this gist
Mar 2, 2017 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ // Sample handelbar code <h5> Current System Date- {{utctime}} (UTC)</h5> import Ember from 'ember'; import config from './../config/environment'; -
Pankaj Singh revised this gist
Feb 28, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export default Ember.Route.extend({ model() { var store = this.store; return Ember.RSVP.hash({ todayruns: Ember.$.ajax({ url: config.server_host + '/' + config.api + '/runs?query=' + this.get('query'), dataType: "json", type: 'GET' }), }); }, setupController(controller, model) { -
Pankaj Singh revised this gist
Feb 28, 2017 . No changes.There are no files selected for viewing
-
Pankaj Singh created this gist
Feb 28, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ mport Ember from 'ember'; import config from './../config/environment'; export default Ember.Route.extend({ query: 'from_unixtime(start_time)>=curdate() and from_unixtime(start_time)<=DATE_ADD(curdate(),INTERVAL+1 day)', model() { var store = this.store; return Ember.RSVP.hash({ todayruns: Ember.$.ajax({ url: config.server_host + '/' + config.api + '/runinfo?query=' + this.get('query'), dataType: "json", type: 'GET' }), }); }, setupController(controller, model) { this._super(controller, model); this.startWatchingTime(controller); controller.set('todayruns', model.todayruns); }, startWatchingTime: function(controller){ var self = this; controller.set('utctime', moment.utc().format('YYYY-MM-DD HH:mm:ss')); Ember.run.later(function(){ self.startWatchingTime(controller); }, 1000); } });