Check user idle and popup a passcode login

How can I check user idle for 1min and display a popup in Ember CLI app. I did create an application route and add: Using Modal Dialogs - User Interface and Interaction - Ember Guides

I need to check user idle, fire application route action to display popup.

I follow this code to check user idle: Detecting ‘Idle’ and ‘Away’ Timeouts in Javascript | BedroomLAN. Where will I place this code in Ember and fire route action?

Thanks,

Phat Le