-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
117 lines (107 loc) · 4.4 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
<!DOCTYPE html>
<html>
<head>
<title>VK graph export</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
.screen {
height: 500px;
}
</style>
<script src="//vk.com/js/api/xd_connection.js?2" type="text/javascript"></script>
<script src="lib/xmlwriter.js"></script>
<script src="lib/underscore-min.js"></script>
<script src="lib/knockout-2.3.0.js"></script>
<script src="gexf.js"></script>
<script src="vk.js"></script>
<script src="app.js"></script>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="../../assets/js/html5shiv.js"></script>
<script src="../../assets/js/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div id="main" style="width: 600px; background: #fff;" class="container">
<div id="fakevk" class="alert alert-danger" data-bind="visible: is_fake_vk">
Fake vk.com API active! (Used for testing) Probably there's some problem with vk API or you are viewing this page directly.
</div>
<div id="step1" class="screen" data-bind="visible: stage()=='ready'">
<p>Export friends graph to <a href="http://gexf.net/format/" target="blank_">GEXF</a> format
(can be processed with <a href="https://gephi.org/" target="blank_">Gephi</a>).
</p>
<form class="form-horizontal">
<div class="form-group">
<label for="user-id" class="col-xs-4 control-label">User ID</label>
<div class="input-group col-xs-8">
<input id="user-id" type="number" class="form-control" data-bind="value: starting_user_id">
<span class="input-group-btn">
<button class="btn btn-default" type="button" data-bind="click: resetStartingUserToMe">Me</button>
</span>
</div>
</div>
<div class="form-group">
<label for="depth" class="col-xs-4 control-label">Traversing Depth</label>
<div class="col-xs-8">
<select class="form-control" data-bind="value: depth">
<option value="1">1 (your friends)</option>
<option value="2">2 (your friends and friends of friends - lots of data!)</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-xs-4"></div>
<div class="col-xs-8">
<button type="submit" class="btn btn-primary" data-bind="click: start">Start</button>
</div>
</div>
</form>
</div>
<div id="step2" class="screen" data-bind="visible: stage()=='loading'">
<p>Loading data</p>
<div class="row" style="height: 60px;">
<div class="col-xs-6">
Users in queue: <span class="badge" data-bind="text: num_users_in_queue">0</span>
</div>
<div class="col-xs-6">
Users loaded: <span class="badge" data-bind="text: num_users_completed">0</span>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<button class="btn btn-danger" data-bind="click: cancel">Cancel</button>
</div>
</div>
</div>
<div id="step3" class="screen" data-bind="visible: stage()=='completed'">
<p>Data load completed, you can now download GEXF file.</p>
<p>Users in graph: <span class="badge" data-bind="text: num_users_in_graph">0</span></p>
<div class="row">
<div class="col-xs-12">
<div class="checkbox">
<label>
<input type="checkbox" data-bind="checked: do_not_include_me">
Do not include me (or starting user) in graph (recommended)
</label>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<a href="#" data-bind="attr: { href: download_data_url, download: download_filename }" class="btn btn-primary">Download .gexf</a>
</div>
<div class="col-xs-6">
<button class="btn btn-warning" data-bind="click: reset">Run again with different parameters</button>
</div>
</div>
</div>
</div>
<script>
var model = new vk_graph_export.Model()
ko.applyBindings(model)
VK.init(function() {
model.vk_init_completed()
});
</script>
</body>
</html>