-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
76 lines (72 loc) · 2.7 KB
/
index.php
File metadata and controls
76 lines (72 loc) · 2.7 KB
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
<?php
require(__DIR__ . '/vendor/autoload.php');
use Interact\Client;
$client = new Client("demo-private-key", "");
?>
<html>
<head>
<title>example - collector</title>
<link rel="stylesheet" href="./style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
<div class="container">
<div class="nav">
<div class="nav-logo" id="eiei" interact-click="hi-5">Example</div>
<div class="nav-logo" interact-click="hi-4">Examples</div>
<div class="nav-center">
<?php
if ( $client->getFeature("DemoFeature")->isA() ) :
?>
<div interact-click="card-1" class="feature-button">1A</div>
<div interact-click="card-1" class="feature-button">2A</div>
<?php
elseif ( $client->getFeature("DemoFeature")->isB() ) :
?>
<div interact-click="card-1" class="feature-button">1B</div>
<div interact-click="card-1" class="feature-button">2B</div>
<?php
else :
?>
<div interact-click="closed-nav" class="feature-button">Close</div>
<?php
endif;
?>
</div>
</div>
<div class="content">
<div class="content-body">
<?php
if ( $client->getFeature("DemoFeature")->isA() ) :
?>
<div interact-click="card-5" class="feature feature-a">Feature 1A</div>
<div interact-click="card-7" class="feature feature-a">Feature 2A</div>
<?php
elseif ( $client->getFeature("DemoFeature")->isB() ) :
?>
<div interact-click="card-6" class="feature feature-b">Feature 1B</div>
<div interact-click="card-8" class="feature feature-b">Feature 2B</div>
<?php
else :
?>
<div interact-click="closed" class="feature feature-b">Closed</div>
<?php
endif;
?>
<div id="test" class="feature">Other Feature</div>
<a href="http://google.co.th">Go to Google!</a>
</div>
</div>
</div>
<script>
<?php echo $client->getInitCode() ?>
</script>
<script>
$("#test").click(function(){
$.ajax({url: "testest:3000/collector/api/healthz", success: function(result){
console.log(result)
}});
});
</script>
</body>
</html>