File tree Expand file tree Collapse file tree 1 file changed +32
-7
lines changed Expand file tree Collapse file tree 1 file changed +32
-7
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ $(document).ready(function() {
243243 sendChannelNameToParent ( ) ;
244244 } ) ;
245245
246- // publish();
246+ // publish();
247247} ) ;
248248
249249function showNotification ( title , message ) {
@@ -308,12 +308,37 @@ function publish() {
308308 var counterA = 0 ;
309309 setInterval ( ( ) => {
310310 counterA ++ ;
311- publisher . publish (
312- 'info' ,
313- `{"id":${ counterA } , "count" : ${
314- counterA % 2 === 0 ? 1 : 2
315- } , "size" : "one"}`
316- ) ;
311+ const prod = [
312+ {
313+ name : 'A' ,
314+ color : 'Blue' ,
315+ size : 50 ,
316+ locations : [ 'USA' , 'Europe' ] ,
317+ details : { length : 20 , width : 70 }
318+ } ,
319+ {
320+ name : 'B' ,
321+ color : 'Blue' ,
322+ size : 60 ,
323+ locations : [ ] ,
324+ details : { length : 20 , width : 70 }
325+ } ,
326+ {
327+ name : 'C' ,
328+ color : 'Black' ,
329+ size : 70 ,
330+ locations : [ 'Japan' ] ,
331+ details : { length : 20 , width : 71 }
332+ } ,
333+ {
334+ name : 'D' ,
335+ color : 'Green' ,
336+ size : 50 ,
337+ locations : [ 'USA' ] ,
338+ details : { length : 20 , width : 71 }
339+ }
340+ ] ;
341+ publisher . publish ( 'info' , JSON . stringify ( prod ) ) ;
317342 } , 1000 ) ;
318343}
319344
You can’t perform that action at this time.
0 commit comments