Changeset - e703b3434dbd
[Not reviewed]
bin/effecteval
Show inline comments
 
@@ -24,6 +24,7 @@ from lib.cycloneerr import PrettyErrorHa
 

	
 
class EffectEdit(PrettyErrorHandler, cyclone.web.RequestHandler):
 
    def get(self):
 
        self.set_header('Content-Type', 'text/html')        
 
        self.write(open("light9/effecteval/effect.html").read())
 
    def delete(self):
 
        graph = self.settings.graph
bin/homepageConfig
Show inline comments
 
@@ -18,7 +18,18 @@ def printConfig(result):
 
                continue
 
            path = current.value(role, L9['urlPath'])
 
            server = server.rstrip('/')
 
            print "location /%(path)s { proxy_pass %(server)s; rewrite /[^/]+/(.*) /$1 break; }" % vars()
 
            print """
 
            location /%(path)s {
 

	
 
              # for websocket
 
              proxy_http_version 1.1;
 
              proxy_set_header Upgrade $http_upgrade;
 
              proxy_set_header Connection "upgrade";
 
              proxy_set_header Host $host;
 

	
 
              proxy_pass %(server)s;
 
              rewrite /[^/]+/(.*) /$1 break;
 
            }""" % vars()
 

	
 
    reactor.stop()
 

	
bin/subserver
Show inline comments
 
@@ -115,7 +115,7 @@ if __name__ == "__main__":
 

	
 
    log.setLevel(logging.DEBUG if options.verbose else logging.INFO)
 

	
 
    graph = SyncedGraph(networking.rdfdb.url, "subserver")
 
    graph = SyncedGraph(networking.rdfdb.url, "subServer")
 

	
 
    d = {}
 
    def updateSubs():
 
@@ -146,7 +146,7 @@ if __name__ == "__main__":
 
    graph.addHandler(updateSubs)
 
    
 
    
 
    port = 8052
 
    port = networking.subServer.port
 
    reactor.listenTCP(port, cyclone.web.Application(handlers=[
 
        (r'/live', Live),
 
        (r'/effectsUpdates', EffectsUpdates),
light9/effecteval/effect.coffee
Show inline comments
 
@@ -4,7 +4,7 @@ model =
 
    uri: ko.observable(qs.value('uri'))
 
    codeLines: ko.observableArray([])
 
  
 
socket = reconnectingWebSocket "ws://localhost:8070/effectUpdates" + window.location.search, (msg) ->
 
socket = reconnectingWebSocket "../effectUpdates" + window.location.search, (msg) ->
 
  console.log('effectData ' + JSON.stringify(msg))
 
  model.toSave.codeLines(msg.codeLines.map((x) -> {text: ko.observable(x)})) if msg.codeLines?
 

	
light9/effecteval/effect.html
Show inline comments
 
@@ -7,6 +7,8 @@
 

	
 
  </head>
 
  <body>
 
    <div id="status">starting...</div>
 

	
 
    <a href="./">Effects</a> / <a class="effect" data-bind="attr: {href: toSave.uri}, text: toSave.uri"></a>
 

	
 
    <div data-bind="foreach: toSave.codeLines">
light9/effecteval/index.coffee
Show inline comments
 
@@ -21,7 +21,7 @@ deleteEffect = (uri) ->
 
    url: 'effect?' + $.param({uri: uri})
 
  console.log("del", uri)
 
  
 
reconnectingWebSocket "ws://localhost:8070/songEffectsUpdates", (msg) ->
 
reconnectingWebSocket "songEffectsUpdates", (msg) ->
 
  for s in msg.songs
 
    for e in s.effects
 
      do (e) ->
light9/effecteval/index.html
Show inline comments
 
@@ -6,6 +6,7 @@
 
    <link rel="stylesheet" href="/style.css">
 
  </head>
 
  <body>
 
    <div id="status">starting...</div>
 
    <div><a href="stats">/stats</a></div>
 
    <h1>Effect instances</h1>
 
    <div><a href=".">View all songs</a></div>
light9/networking.py
Show inline comments
 
@@ -35,15 +35,16 @@ class ServiceAddress(object):
 
    def path(self, more):
 
        return self.url + str(more)
 

	
 
curveCalc = ServiceAddress(L9['curveCalc'])
 
dmxServer = ServiceAddress(L9['dmxServer'])
 
oscDmxServer = ServiceAddress(L9['oscDmxServer'])
 
musicPlayer = ServiceAddress(L9['musicPlayer'])
 
effectEval = ServiceAddress(L9['effectEval'])
 
keyboardComposer = ServiceAddress(L9['keyboardComposer'])
 
curveCalc = ServiceAddress(L9['curveCalc'])
 
vidref = ServiceAddress(L9['vidref'])
 
effectEval = ServiceAddress(L9['effectEval'])
 
musicPlayer = ServiceAddress(L9['musicPlayer'])
 
oscDmxServer = ServiceAddress(L9['oscDmxServer'])
 
picamserve = ServiceAddress(L9['picamserve'])
 
rdfdb = ServiceAddress(L9['rdfdb'])
 
subComposer = ServiceAddress(L9['subComposer'])
 
subServer = ServiceAddress(L9['subServer'])
 
vidref = ServiceAddress(L9['vidref'])
 

	
 
patchReceiverUpdateHost = ServiceAddress(L9['patchReceiverUpdateHost'])
light9/rdfdb/web/graphView.xhtml
Show inline comments
 
@@ -13,8 +13,8 @@
 
        graph all the time
 
    -->
 

	
 
    <p>status: <span id="status">starting...</span></p>
 

	
 
    <div id="status">starting...</div>
 
    
 
    <fieldset>
 
      <legend>Messages</legend>
 
      <div id="out"></div>
light9/rdfdb/web/index.xhtml
Show inline comments
 
@@ -8,7 +8,7 @@
 
  </head>
 
  <body>
 
    <h1>rdfdb</h1>
 
    <p>status: <span id="status">starting...</span></p>
 
    <div id="status">starting...</div>
 
    
 
    <section>
 
      <h2>Edits</h2>
 
@@ -52,7 +52,7 @@
 

	
 
              $('#out').append($('<div>').text(JSON.stringify(d)));
 
          }
 
          reconnectingWebSocket("ws://localhost:8051/live", onMessage);
 
          reconnectingWebSocket("live", onMessage);
 
      });
 
      // ]]>
 
    </script>
light9/rdfdb/web/syncedgraph.js
Show inline comments
 
@@ -23,5 +23,5 @@ function SyncedGraph(label) {
 
        $('#out').append($('<div>').text(JSON.stringify(d)));
 
    }
 
    
 
    reconnectingWebSocket("ws://localhost:8051/liveSyncedGraph", onMessage);
 
    reconnectingWebSocket("liveSyncedGraph", onMessage);
 
}
light9/subcomposer/index.html
Show inline comments
 
@@ -44,7 +44,7 @@
 
    <button data-chan="http://light9.bigasterisk.com/theater/piedmont/channel/f11-blue">f11-blue</button>
 
    <button data-chan="http://light9.bigasterisk.com/theater/piedmont/channel/f12-purp">f12-purp</button>
 

	
 
    <script src="static/jquery-2.1.1.min.js"></script>
 
    <script src="/lib/jquery-2.1.1.min.js"></script>
 
    <script>
 
      $(document).on("click", "button", function (ev) {
 
          var chan = ev.target.getAttribute('data-chan');
light9/subcomposer/subcomposerweb.py
Show inline comments
 
@@ -11,7 +11,6 @@ def init(graph, session, currentSub):
 
    app = cyclone.web.Application(handlers=[
 
        (r'/()', SFH,
 
         {'path': 'light9/subcomposer', 'default_filename': 'index.html'}),
 
        (r'/static/(.*)', SFH, {'path': 'static/'}),
 
        (r'/toggle', Toggle),
 
    ], debug=True, graph=graph, currentSub=currentSub)
 
    reactor.listenTCP(networking.subComposer.port, app)
light9/subserver/effects.coffee
Show inline comments
 
@@ -33,7 +33,7 @@ model.addToCurrentSong = (e) ->
 
    data: {drop: e.uri}
 
  })
 

	
 
reconnectingWebSocket "ws://localhost:8052/effectsUpdates", (msg) ->
 
reconnectingWebSocket "../effectsUpdates", (msg) ->
 
  model.chases(msg.chases) if msg.chases?
 
  model.classes(msg.classes) if msg.classes?
 

	
light9/subserver/effects.jade
Show inline comments
 
@@ -4,7 +4,10 @@ html
 
    title effects
 
    link(rel='stylesheet', href='/style.css')
 
  body
 
    #status starting...
 
    h1 Effects
 
    p: a(href='.') Go to Submasters
 

	
 

	
 
    div(data-bind="foreach: moreExprs")
 
      div.resource.chase
light9/subserver/gui.coffee
Show inline comments
 
@@ -18,7 +18,7 @@ model = new Model()
 
  return false if ev.target.tagName == 'INPUT'
 
)
 

	
 
reconnectingWebSocket "ws://localhost:8052/live", (msg) ->
 
reconnectingWebSocket "live", (msg) ->
 
  model.subs(msg.subs) if msg.subs?
 

	
 

	
light9/subserver/index.jade
Show inline comments
 
@@ -4,7 +4,9 @@ html
 
    title subs
 
    link(rel='stylesheet', href='/style.css')
 
  body
 
    #status starting...
 
    h1 Submasters
 
    p: a(href='effects') Go to Effects
 

	
 
    div
 
      input(type='checkbox', data-bind='checked: showLocal', id='showLocal')
light9/web/websocket.js
Show inline comments
 
/*
 
  url is now relative to the window location
 
*/
 
function reconnectingWebSocket(url, onMessage) {
 
    var pong = 0;
 
    
 
    var fullUrl = (
 
        "ws://"
 
            + window.location.host
 
            + window.location.pathname
 
            + (window.location.pathname.match(/\/$/) ? "" : "/")
 
            + url);
 
    function connect() {
 
        var ws = new WebSocket(url);
 
        var ws = new WebSocket(fullUrl);
 
        
 
        ws.onopen = function() {   $("#status").text("connected"); };
 
        ws.onerror = function(e) { $("#status").text("error: "+e); };
 
@@ -17,4 +27,4 @@ function reconnectingWebSocket(url, onMe
 
        };
 
    }
 
    connect();
 
}
 
\ No newline at end of file
 
}
show/dance2014/networking.n3
Show inline comments
 
@@ -5,24 +5,25 @@
 
show:dance2014 :networking sh:netHome .
 
sh:netHome
 
  :patchReceiverUpdateHost "localhost";
 
  :curveCalc        <http://dash:8060/>;
 
  :dmxServer        <http://dash:8030/>;
 
  :effectEval       <http://dash:8070/>;
 
  :keyboardComposer <http://dash:8050/>;
 
  :musicPlayer      <http://dash:8040/>;
 
  :oscDmxServer     <udp://dash:9050/>;
 
  :picamserve       <http://10.2.0.3:8001/>;
 
  :rdfdb            <http://localhost:8051/>;
 
  :effectEval       <http://plus:8070/>;
 
  :musicPlayer      <http://plus:8040/>;
 
  :dmxServer        <http://plus:8030/>;
 
  :oscDmxServer     <udp://plus:9050/>;
 
  :curveCalc        <http://plus:8060/>;
 
  :keyboardComposer <http://plus:8050/>;
 
  :subComposer <http://plus:8054/>;
 
  :picamserve       <http://10.2.0.3:8001/>;
 
  :subComposer      <http://dash:8055/>;
 
  :subServer        <http://dash:8052/>;
 
  :vidref           <http://dash:8053/> .
 

	
 
:rdfdb            :urlPath "rdfdb" .
 
:effectEval       :urlPath "effectEval" .
 
:musicPlayer      :urlPath "ascoltami" .
 
:curveCalc        :urlPath "curveCalc" .
 
:dmxServer        :urlPath "dmxServer" .
 
:oscDmxServer     :urlPath "oscDmxServer" .
 
:curveCalc        :urlPath "curveCalc" .
 
:effectEval       :urlPath "effectEval" .
 
:keyboardComposer :urlPath "keyboardComposer" .
 
:subComposer      :urlPath "subComposer" .
 
:musicPlayer      :urlPath "ascoltami" .
 
:picamserve       :urlPath "picamserve" .
 
:vidref           :urlPath "vidref" .
 
:rdfdb            :urlPath "rdfdb" .
 
:subComposer      :urlPath "subComposer" .
 
:subServer        :urlPath "subServer" .
 
:vidref           :urlPath "vidref" .
 
\ No newline at end of file
0 comments (0 inline, 0 general)