2018-09-12 00:52:29 +02:00
|
|
|
BlazeComponent.extendComponent({
|
|
|
|
|
onCreated() {
|
|
|
|
|
this.subscribe('allRules');
|
2018-09-14 16:49:06 +02:00
|
|
|
this.subscribe('allTriggers');
|
|
|
|
|
this.subscribe('allActions');
|
|
|
|
|
|
2018-09-12 00:52:29 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
trigger(){
|
2018-09-14 16:49:06 +02:00
|
|
|
const ruleId = this.data().ruleId;
|
|
|
|
|
const rule = Rules.findOne({_id: ruleId.get()});
|
|
|
|
|
const trigger = Triggers.findOne({_id:rule.triggerId});
|
|
|
|
|
console.log(trigger);
|
|
|
|
|
return trigger.description();
|
2018-09-12 00:52:29 +02:00
|
|
|
},
|
|
|
|
|
action(){
|
2018-09-14 16:49:06 +02:00
|
|
|
const ruleId = this.data().ruleId;
|
|
|
|
|
const rule = Rules.findOne({_id: ruleId.get()});
|
|
|
|
|
const action = Actions.findOne({_id:rule.actionId});
|
|
|
|
|
console.log(action);
|
|
|
|
|
return action.description();
|
2018-09-12 00:52:29 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
events() {
|
|
|
|
|
return [{
|
|
|
|
|
}];
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
}).register('ruleDetails');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|