-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
111 lines (95 loc) · 6.9 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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<title>Palladio Embed App</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Palladio -->
<link type="text/css" href="bower_components/palladio/palladio.css" rel="stylesheet" />
<link type="text/css" href="bower_components/palladio-timeline-component/dist/palladio-timeline-component.css" rel="stylesheet" />
<link type="text/css" href="bower_components/palladio-facet-component/dist/palladio-facet-component.css" rel="stylesheet" />
<link type="text/css" href="bower_components/palladio-timespan-component/dist/palladio-timespan-component.css" rel="stylesheet" />
<link type="text/css" href="bower_components/palladio-graph-component/dist/palladio-graph-component.css" rel="stylesheet" />
<link type="text/css" href="bower_components/palladio-map-component/dist/palladio-map-component.css" rel="stylesheet" />
<link type="text/css" href="bower_components/palladio-table-component/dist/palladio-table-component.css" rel="stylesheet" />
<link type="text/css" href="bower_components/palladio-cards-component/dist/palladio-cards-component.css" rel="stylesheet" />
<link type="text/css" href="css/palladio-embed-app.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="bower_components/codemirror/lib/codemirror.css">
<script type="text/javascript" src="bower_components/codemirror/lib/codemirror.js"></script>
<script type="text/javascript" src="bower_components/codemirror/mode/xml/xml.js"></script>
<script type="text/javascript" src="bower_components/codemirror/mode/javascript/javascript.js"></script>
<script type="text/javascript" src="bower_components/codemirror/mode/css/css.js"></script>
<script type="text/javascript" src="bower_components/codemirror/mode/htmlmixed/htmlmixed.js"></script>
<script src="bower_components/palladio/palladio.min.js"></script>
<script src="bower_components/palladio-timeline-component/dist/palladio-timeline-component.min.js"></script>
<script src="bower_components/palladio-facet-component/dist/palladio-facet-component.min.js"></script>
<script src="bower_components/palladio-timespan-component/dist/palladio-timespan-component.min.js"></script>
<script src="bower_components/palladio-graph-component/dist/palladio-graph-component.min.js"></script>
<script src="bower_components/palladio-map-component/dist/palladio-map-component.min.js"></script>
<script src="bower_components/palladio-table-component/dist/palladio-table-component.min.js"></script>
<script src="bower_components/palladio-cards-component/dist/palladio-cards-component.js"></script>
<script type="text/javascript" src="bower_components/angular-ui-codemirror/ui-codemirror.min.js"></script>
<script src="js/app.js"></script>
</head>
<body>
<div id="main" class="container-fluid">
<div class="row">
<div class="col-md-9">
<!-- Visualization display area -->
<h2>Your visualizations will display here</h2>
<div id="components">
</div>
</div>
<div class="col-md-3" ng-app="palladioEmbedApp">
<!-- Visualization configuration area -->
<h2>Configure here</h2>
<div ng-controller="EmbedCtrl">
<!-- Load file -->
<div data-ng-hide="file" class="row">
<div data-ng-click="triggerDataModelSelector()">
<button class="btn btn-default">Load Palladio Save File</button>
</div>
<input type="file" id="dataModelSelector" style="display:none" onchange="angular.element(this).scope().loadDataModel(this)" />
</div>
<!-- Add components -->
<div data-ng-show="file" class="row">
<div ng-repeat="visualization in visualizations" data-ng-click="addVisualization(visualization)">
{{visualization.description}}
</div>
<div data-ng-show="visualizations.length === 0">
<button class="btn btn-default" data-ng-click="startOver()">Start over</button>
</div>
</div>
<div data-ng-show="file" class="row">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#instructions-modal">Embedding Instructions</button>
</div>
<div class="modal fade" id="instructions-modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Instructions for Embedding Components</h4>
</div>
<div class="modal-body">
<p>To use these components in your own web page, put this code at the end of your HTML page <code><body></code> tag, right before the <code></body></code> (If you don't see anything below, click in the box and the code should appear. Right-click to choose "Select all" for copying.)</p>
<p><ui-codemirror ui-codemirror-opts="editorOptions" ng-model="embedCodeString" ui-refresh="cmRefresh"></ui-codemirror></p>
<p>If you don't have Node.js installed, get it here: <a href="https://nodejs.org/">https://nodejs.org/</a></p>
<p>If you don't have Bower installed, run the command: <code>npm install -g bower</code></p>
<p>Then in the same directory as the HTML file where you are using these components, run (all on one line):</p>
<p><code>bower install palladio#1.2.0-beta.12 palladio-facet-component palladio-timeline-component palladio-timespan-component palladio-graph-component palladio-map-component palladio-table-component palladio-cards-component</code></p>
<p>If you want to serve the page locally to try it out, start a local web server with: <code>python -m SimpleHTTPServer</code></p>
<p>Alternatively, if you don't have Python installed, you can run a local web server like this: <code>npm install http-server -g; http-server -p 8000</code></p>
<p>You site will be available at <a href="http://localhost:8000/">http://localhost:8000/</a></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>