Skip to content

Commit fe15909

Browse files
committed
streaming:refresh button
1 parent ef7afb8 commit fe15909

File tree

6 files changed

+69
-9
lines changed

6 files changed

+69
-9
lines changed

clients/web/css/ei.default.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,14 +312,22 @@ pre {
312312
float: right;
313313
height: 40px;
314314
}
315+
315316
.ei-console-stream-button {
316317
float: right;
317318
position: relative;
318319
left: 10px;
319320
bottom: 10px;
321+
}
320322

323+
.ei-console-refresh-button {
324+
float: right;
325+
position: relative;
326+
left: 10px;
327+
bottom: 10px;
321328
}
322329

330+
323331
.lint-error, .outclass-error {
324332
font-family: arial;
325333
font-size: 70%;

clients/web/js/doccontent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ window.DocContent = (function() {
171171
activeStreamButton:
172172
function(num){
173173
var self = this;
174-
this.contentArray[num].content.activeStreamButton(self);
174+
this.contentArray[num].content.activeStreamButton(self,num);
175175
},
176176

177177
removeStreamButton:

clients/web/js/dygraphcontent.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,19 @@ window.DygraphContent = (function() {
5959
});
6060
$(self.streamBttn).hide();
6161

62-
if(self.isStream())
62+
self.refreshBttn = $("<button class='ei-console-refresh-button'>Refresh</button>");
63+
$(self.refreshBttn).button({
64+
icons: { primary: "ui-icon-arrowrefresh-1-s"},
65+
text: "refresh"
66+
}).click( function() {
67+
self.doc.requestChunks(self.doc,self.stref);
68+
});
69+
$(self.refreshBttn).hide();
70+
71+
if(self.isStream()){
6372
self.content.prepend(self.streamBttn);
73+
self.content.prepend(self.refreshBttn);
74+
}
6475
}
6576

6677

@@ -380,6 +391,7 @@ window.DygraphContent = (function() {
380391
if(!this.isStream())
381392
return;
382393
this.streamBttn.show();
394+
this.refreshBttn.show();
383395
this.doc = doc;
384396
this.enableStreamButton();
385397
},
@@ -388,6 +400,7 @@ window.DygraphContent = (function() {
388400
if(!this.isStream())
389401
return;
390402
this.streamBttn.hide();
403+
this.refreshBttn.hide();
391404
this.stData.isStream = false;
392405
return;
393406
//self.contentArray[num].content.removeStreamButton();

clients/web/js/htmlcontent.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ window.HTMLContent = (function() {
3535
$(self.content).find(".data").append( $(options.content).prop('outerHTML') );
3636

3737
self.streamBttn = $("<button class='ei-console-stream-button'>Streaming...</button>");
38+
3839
$(self.streamBttn).button({
3940
icons: { primary: "ui-icon-stop"},
4041
text: "stream"
@@ -44,8 +45,19 @@ window.HTMLContent = (function() {
4445
});
4546
$(self.streamBttn).hide();
4647

47-
if(self.isStream())
48+
self.refreshBttn = $("<button class='ei-console-refresh-button'>Refresh</button>");
49+
$(self.refreshBttn).button({
50+
icons: { primary: "ui-icon-arrowrefresh-1-s"},
51+
text: "refresh"
52+
}).click( function() {
53+
self.doc.requestChunks(self.doc,self.stref);
54+
});
55+
$(self.refreshBttn).hide();
56+
57+
if(self.isStream()){
4858
self.content.prepend(self.streamBttn);
59+
self.content.prepend(self.refreshBttn);
60+
}
4961
}
5062

5163

@@ -95,18 +107,21 @@ window.HTMLContent = (function() {
95107

96108
// STREAM BUTTON
97109
activeStreamButton:
98-
function(doc){
110+
function(doc,ref){
99111
if(!this.isStream())
100112
return;
101113
this.streamBttn.show();
114+
this.refreshBttn.show();
102115
this.doc = doc;
116+
this.stref= ref;
103117
this.enableStreamButton();
104118
},
105119
removeStreamButton:
106120
function(){
107121
if(!this.isStream())
108122
return;
109123
this.streamBttn.hide();
124+
this.refreshBttn.hide();
110125
this.stData.isStream = false;
111126
return;
112127
//self.contentArray[num].content.removeStreamButton();

clients/web/js/svgcontent.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,20 @@ window.SVGContent = (function() {
4949
self.off(self.count,true);
5050
});
5151
$(self.streamBttn).hide();
52-
53-
if(self.isStream())
54-
self.content.prepend(self.streamBttn);
55-
5652

53+
self.refreshBttn = $("<button class='ei-console-refresh-button'>Refresh</button>");
54+
$(self.refreshBttn).button({
55+
icons: { primary: "ui-icon-arrowrefresh-1-s"},
56+
text: "refresh"
57+
}).click( function() {
58+
self.doc.requestChunks(self.doc,self.stref);
59+
});
60+
$(self.refreshBttn).hide();
5761

62+
if(self.isStream()){
63+
self.content.prepend(self.streamBttn);
64+
self.content.prepend(self.refreshBttn);
65+
}
5866
}
5967

6068

@@ -132,6 +140,7 @@ window.SVGContent = (function() {
132140
if(!this.isStream())
133141
return;
134142
this.streamBttn.show();
143+
this.refreshBttn.show();
135144
this.doc = doc;
136145
this.enableStreamButton();
137146
},
@@ -140,6 +149,7 @@ window.SVGContent = (function() {
140149
if(!this.isStream())
141150
return;
142151
this.streamBttn.hide();
152+
this.refreshBttn.hide();
143153
this.stData.execid = null;
144154
return;
145155
//self.contentArray[num].content.removeStreamButton();

clients/web/js/textcontent.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,20 @@ window.TextContent = (function() {
4343
});
4444
$(self.streamBttn).hide();
4545

46-
if(self.isStream())
46+
47+
self.refreshBttn = $("<button class='ei-console-refresh-button'>Refresh</button>");
48+
$(self.refreshBttn).button({
49+
icons: { primary: "ui-icon-arrowrefresh-1-s"},
50+
text: "refresh"
51+
}).click( function() {
52+
self.doc.requestChunks(self.doc,self.stref);
53+
});
54+
$(self.refreshBttn).hide();
55+
56+
if(self.isStream()){
4757
self.content.prepend(self.streamBttn);
58+
self.content.prepend(self.refreshBttn);
59+
}
4860
}
4961

5062

@@ -114,6 +126,7 @@ window.TextContent = (function() {
114126
if(!this.isStream())
115127
return;
116128
this.streamBttn.show();
129+
this.refreshBttn.show();
117130
this.doc = doc;
118131
this.enableStreamButton();
119132
},
@@ -122,6 +135,7 @@ window.TextContent = (function() {
122135
if(!this.isStream())
123136
return;
124137
this.streamBttn.hide();
138+
this.refreshBttn.hide();
125139
this.stData.isStream = false;
126140
return;
127141
//self.contentArray[num].content.removeStreamButton();

0 commit comments

Comments
 (0)