Merge pull request #568 from leonindy/master

refactor heartbeat module, add user defined rule type
fix bracket error
refactor summary module's decorator part
add template for alteration summary
refactor summary module's data generator part
amend alert summary module
amend dependencies for alert summary module