-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
142 lines (123 loc) · 6.45 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DUI Demo</title>
<script src="smartcomposition/bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="smartcomposition/bower_components/polymer/polymer.html">
<link rel="import" href="smartcomposition/SmartComponent.html">
<link rel="import" href="smartcomposition/AttributeLink.html">
<link rel="import" href="smartcomposition/MessagingService.html">
<link rel="import" href="components/all.html">
<link rel="import" href="components/attribute-linker.html">
<link rel="stylesheet" href="normalize.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<attribute-linker></attribute-linker>
<input type="text" id="inpDeviceName" placeholder="Device Name" onchange="this.setAttribute('value', this.value)">
<component-selector>
<option value="text-input">TEXT INPUT</option>
<option value="simple-chart">SIMPLE CHART</option>
<option value="nytimes-news">NY TIMES NEWS</option>
<option value="translate-text">TRANSLATE TEXT</option>
<option value="semantic-extraction">SEMANTIC EXTRACTION</option>
<option value="youtube-search">YOUTUBE SEARCH</option>
<option value="smart-video">SMART VIDEO</option>
<option value="flickr-images">FLICKR IMAGES</option>
<option value="google-geocoder">GOOGLE GEOCODER</option>
<option value="google-map">GOOGLE MAP</option>
<option value="wikipedia-extract">WIKIPEDIA EXTRACT</option>
<option value="twitter-tweets">TWITTER TWEETS</option>
<option value="current-weather">CURRENT WEATHER</option>
<option value="philips-hue">PHILIPS HUE</option>
</component-selector><br>
<attribute-link source="#inpDeviceName@value" target="messaging-service@client-name"></attribute-link>
<attribute-link target="#inpDeviceName@value" source="messaging-service@client-name"></attribute-link>
<some-content>
<fieldset style="height:110px">
<navigation-pane>
<a href="#map">Show map</a>
<a href="#inputs">Show inputs</a>
</navigation-pane>
</fieldset>
</some-content>
<content-switcher active-content="map">
<some-content name="map">
<fieldset style="height:300px">
<legend>Navigate using a map</legend>
<google-map id="gmap1" lat="52.1" lng="12.3"></google-map>
</fieldset>
</some-content>
<some-content name="inputs">
<fieldset style="height:80px">
<legend>Navigate using manual input</legend>
<select id="cityselect" onchange="this.setAttribute('value', this.value)">
<option>Chemnitz</option>
<option>Lugano</option>
</select>
<input id="inpText" type="text" placeholder="Location" size="50" onchange="this.setAttribute('value', this.value)">
<google-geocoder id="geocoder"></google-geocoder>
</fieldset>
</some-content>
</content-switcher>
<some-content>
<fieldset class="w50">
<legend>Satellite View</legend>
<google-map id="gmap2" lat="52.1" lng="12.3" map-type="hybrid"></google-map>
<google-geocoder id="geocoder-reverse" reverse></google-geocoder>
</fieldset>
</some-content>
<some-content>
<fieldset class="w20">
<legend>Temperature</legend>
<simple-chart id="chart3" type="temperature" value="-10" min="-10" max="50" style="width:30px;height:250px"></simple-chart>
<input id="inpTemp" type="text" readonly value="" style="width:60px; border: none; font-size:1.1em">
<current-weather></current-weather>
</fieldset>
</some-content>
<some-content>
<fieldset class="w30">
<legend>Other Information</legend>
<wikipedia-extract></wikipedia-extract>
</fieldset>
</some-content>
<some-content>
<fieldset class="w50">
<legend>Some Numeric Input Options</legend>
<input id="inpTest" type="text" value="50" onchange="this.setAttribute('value', this.value)"><br><br>
<input id="inpTest2" type="range" min="0" max="100" value="50" onchange="this.setAttribute('value', this.value)">
</fieldset>
</some-content>
<some-content>
<fieldset class="w50">
<legend>Various Visualizations</legend>
<simple-chart id="chart2" type="circle" value="5" min="0" max="200" style="width:180px; height:180px"></simple-chart><br><br>
<simple-chart id="chart1" type="bar" value="5" min="0" max="100" style="width:300px; height:30px"></simple-chart>
</fieldset>
</some-content>
<messaging-service endpoint="http://localhost:9001">
<attribute-link source="navigation-pane@active-link" target="content-switcher@active-content" transformation="source.split('#')[1]"></attribute-link>
<attribute-link source="#inpTest@value" target="#chart1@value"></attribute-link>
<attribute-link source="#inpTest@value" target="#chart2@value"></attribute-link>
<attribute-link source="#inpTest@value" target="#inpTest2@value"></attribute-link>
<attribute-link source="#inpTest2@value" target="#inpTest@value"></attribute-link>
<attribute-link source="#gmap1@lat" target="#gmap2@lat"></attribute-link>
<attribute-link source="#gmap1@lng" target="#gmap2@lng"></attribute-link>
<attribute-link source="#gmap1@zoom" target="#gmap2@zoom"></attribute-link>
<attribute-link source="#gmap1@lat" target="#geocoder-reverse@lat"></attribute-link>
<attribute-link source="#gmap1@lng" target="#geocoder-reverse@lng"></attribute-link>
<attribute-link source="#geocoder-reverse@address" target="current-weather@city"></attribute-link>
<attribute-link source="#geocoder-reverse@address" target="wikipedia-extract@query" transformation="source.split(', ')[0]"></attribute-link>
<attribute-link source="#cityselect@value" target="#inpText@value"></attribute-link>
<attribute-link source="#inpText@value" target="#geocoder@address"></attribute-link>
<attribute-link source="#geocoder@lat" target="#gmap1@lat"></attribute-link>
<attribute-link source="#geocoder@lng" target="#gmap1@lng"></attribute-link>
<attribute-link source="#inpText@value" target="current-weather@city"></attribute-link>
<attribute-link source="#inpText@value" target="wikipedia-extract@query"></attribute-link>
<attribute-link source="current-weather@temperature" target="#chart3@value"></attribute-link>
<attribute-link source="current-weather@temperature" target="#inpTemp@value" transformation="source + '°C'"></attribute-link>
</messaging-service>
</body>
</html>