TestSuiteDetails RouteController extend template baseTestsuiteLayout y

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
TestSuiteDetails = RouteController.extend({
template: 'baseTestsuiteLayout',
//yieldRegions: {
// 'testsuiteDetails': {to: 'tabContent'}
//},
waitOn: function(){
return Meteor.subscribe('ftests', parseInt(this.params.id))
},
onBeforeAction: function(){
Session.set('activeTestSuiteId', parseInt(this.params.id));
this.next();
},
action: function(){
if (this.ready()){
var ts = TestSuites.findOne({id: Session.get('activeTestSuiteId')});
if (ts == undefined){
this.render('error404',
{
data: {text: 'This test suite is not alive anymore :('}
}
);
return
}
TabsManager.setMainTab(ts.name,
Router.path('testsuiteDetails', {id: ts.id})
);
TabsManager.setActiveTab();
this.render('testsuiteDetails',
{
to: 'tabContent'
});
}
}
});