|
|
@@ -950,6 +950,25 @@
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+ self.executeAll = function () {
|
|
|
+ if (self.snippets().length < 1)
|
|
|
+ return;
|
|
|
+
|
|
|
+ var index = 0;
|
|
|
+ self.snippets()[index].execute();
|
|
|
+ var clock = setInterval(next, 100);
|
|
|
+
|
|
|
+ function next() {
|
|
|
+ if (self.snippets()[index].status() == 'available' || self.snippets()[index].status() == 'failed') {
|
|
|
+ index = index + 1;
|
|
|
+ if (self.snippets().length > index)
|
|
|
+ self.snippets()[index].execute();
|
|
|
+ else
|
|
|
+ clearInterval(clock);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
self.closeAndRemoveSession = function (session) {
|
|
|
self.closeSession(session, false, function() {
|
|
|
self.sessions.remove(session);
|