client/annotviz/app/annotsvizview.html
author rougeronj
Fri, 23 Jan 2015 01:00:00 +0100
changeset 129 7181e1f28eb0
parent 128 9f2334598088
child 131 0bb70072a56f
permissions -rw-r--r--
Merge with f9dd7bfed9976461c79bf521ed01bf4caaf4fbcf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
103
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
     1
<!DOCTYPE html>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
     2
<html lang="en">
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
     3
<head>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
     4
    <meta charset="utf-8">
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
     5
    <meta name="viewport" content="width=device-width,initial-scale=1">
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
     6
    <meta name="description" content="">
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
     7
    <meta name="author" content="I.R.I">
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
     8
    <link rel="shortcut icon" href="/img/favicon.ico">
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
     9
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    10
    <title>AnnotsVizView</title>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    11
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    12
    <!-- Custom styles for this template -->
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    13
    <link href="/css/annotviz.css" rel="stylesheet">
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    14
</head>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    15
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    16
<body>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    17
    <h1>Piano Roll vertical</h1>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    18
    <noscript>You must enable JavaScript</noscript>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    19
    <div id="canvasContainer"></div>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    20
    <!--pre id="log"></pre-->
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    21
    <script src="/js/libs-annotviz.js"></script>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    22
    <script src="/js/annotviz.js"></script>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    23
    <script>
129
7181e1f28eb0 Merge with f9dd7bfed9976461c79bf521ed01bf4caaf4fbcf
rougeronj
parents: 128
diff changeset
    24
    
103
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    25
	    var pianorollChannel  = 'PIANOROLL';
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    26
	    var annotationChannel = 'ANNOT';
128
9f2334598088 add archive variable to desactivate the socket listening for the static timeLines
rougeronj
parents: 122
diff changeset
    27
	    var eventCode = 'test_1';
9f2334598088 add archive variable to desactivate the socket listening for the static timeLines
rougeronj
parents: 122
diff changeset
    28
	    var serverUrl = "http://localhost:8080";
103
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    29
	    var wsUri;
121
df6b39f962bc Add getAnnotCategories to utils and propagate the modification to annotsvizview and annotstimeline
rougeronj
parents: 117
diff changeset
    30
	    
105
25ac8802c189 Improve interface + Add horizontal pianoroll to annotsvizview
rougeronj
parents: 104
diff changeset
    31
	    if (window.location.protocol === 'file:') {
104
685c5ebc59d0 update resolution screen
rougeronj
parents: 103
diff changeset
    32
	        wsUri = 'ws://172.16.0.20:8090/broadcast';
105
25ac8802c189 Improve interface + Add horizontal pianoroll to annotsvizview
rougeronj
parents: 104
diff changeset
    33
	    }
25ac8802c189 Improve interface + Add horizontal pianoroll to annotsvizview
rougeronj
parents: 104
diff changeset
    34
	    else {
25ac8802c189 Improve interface + Add horizontal pianoroll to annotsvizview
rougeronj
parents: 104
diff changeset
    35
	        wsUri = 'ws://' + window.location.hostname + ':8090/broadcast';
25ac8802c189 Improve interface + Add horizontal pianoroll to annotsvizview
rougeronj
parents: 104
diff changeset
    36
	    }
103
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    37
	    wsUriPianoroll = wsUri + '?channel=' + pianorollChannel + '&event_code=' + eventCode;
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    38
	    wsUriAnnotation = wsUri + '?channel=' + annotationChannel + '&event_code=' + eventCode;
108
082b64a5c699 add vizualizations to server
ymh <ymh.work@gmail.com>
parents: 105
diff changeset
    39
103
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    40
	    var logger = new annotviz.ConsoleLogger(true);
108
082b64a5c699 add vizualizations to server
ymh <ymh.work@gmail.com>
parents: 105
diff changeset
    41
103
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    42
	    var stageView = new annotviz.StageView({
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    43
	    	logger: logger
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    44
	    });
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    45
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    46
        var annotsvizview = new annotviz.AnnotsVizView({
121
df6b39f962bc Add getAnnotCategories to utils and propagate the modification to annotsvizview and annotstimeline
rougeronj
parents: 117
diff changeset
    47
        	urlCategories: serverUrl + "/p/api/v1/event/" + eventCode,
103
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    48
        	logger: logger,
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    49
        	stageView: stageView,
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    50
        	wsPianoroll: new annotviz.WsWrapper(wsUriPianoroll, logger),
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    51
        	wsAnnot: new annotviz.WsWrapper(wsUriAnnotation, logger),
129
7181e1f28eb0 Merge with f9dd7bfed9976461c79bf521ed01bf4caaf4fbcf
rougeronj
parents: 128
diff changeset
    52
        	timeBegin: Date.parse("2015-01-23T09:30:00+01:00"),
7181e1f28eb0 Merge with f9dd7bfed9976461c79bf521ed01bf4caaf4fbcf
rougeronj
parents: 128
diff changeset
    53
        	timeEnd: Date.parse("2015-01-23T18:30:00+01:00"),
128
9f2334598088 add archive variable to desactivate the socket listening for the static timeLines
rougeronj
parents: 122
diff changeset
    54
        	eventCode: eventCode,
9f2334598088 add archive variable to desactivate the socket listening for the static timeLines
rougeronj
parents: 122
diff changeset
    55
            channel: annotationChannel
103
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    56
        });
108
082b64a5c699 add vizualizations to server
ymh <ymh.work@gmail.com>
parents: 105
diff changeset
    57
103
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    58
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    59
        function stop() {
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    60
        	stageView.stop();
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    61
        }
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    62
        function start() {
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    63
        	stageView.start();
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    64
        }
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    65
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    66
        window.onload = function() {
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    67
        	stageView.init();
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    68
            start();
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    69
        }
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    70
    </script>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    71
</body>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    72
</html>