-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdefault.cshtml
145 lines (125 loc) · 6 KB
/
default.cshtml
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
143
144
@if (IsAuthenticated)
{
<div style="width:300px">
<h3>Create Test Plan</h3>
<form id="form-createplan" action="@(new CreateTestPlan().ToPostUrl())" method="POST">
<div>
<div class="form-group">
<label for="Name">Name</label>
<input class="form-control input-sm" type="text" id="Name" name="Name" value="" placeholder="" data-keyup="generateSlug">
<span class="help-block"></span>
</div>
<div class="form-group">
<label for="Slug">Slug</label>
<input class="form-control input-sm" type="text" id="Slug" name="Slug" value="" placeholder="">
<span class="help-block"></span>
</div>
<div class="form-group">
<label> </label><br />
<button class="btn btn-sm btn-default" type="submit">Create Test Plan</button>
</div>
</div>
<div class="clearfix"></div>
</form>
<div id="testplans" style="display:none;">
<h3>My Test Plans</h3>
<div class="list-group">
</div>
</div>
</div>
<script>
refreshTestPlans();
$("#form-createplan").bindForm();
$(document).bindHandlers({
generateSlug: function() {
$("[name=Slug]").val($(this).val().toLowerCase().replace(/[^a-zA-Z\d]+/g, "-"));
},
showPlan: function(planId) {
location.href = "/testplans/" + planId + "/edit";
}
});
function refreshTestPlans() {
$.getJSON("/testplans", function (plans) {
if (plans.length == 0) return;
$("#testplans").show().find(".list-group").html(plans.map(function (p) {
return "<a class='list-group-item' data-click='showPlan:" + p.Id + "'>"
+ '<span class="badge">' + $.ss.todfmt(p.CreatedDate) + '</span>'
+ p.Name
+ "</a>";
}));
});
}
</script>
}
else
{
<div id="register" style="width: 680px; padding: 20px">
<img src="/Content/img/apache318x260.png" style="float: right; height: 70px; margin: 0 0 0 0;"/>
<img src="/Content/img/http-icon.png" style="float: left; height: 60px; margin: 0 10px 0 0;"/>
<p style="line-height: 60px;">
Sign In to upload, analyze and export your <b>Apache Benchmarks</b>.
</p>
<div class="clearfix"></div>
<div style="padding: 0 0 80px 0">
<h3 style="float: left; width: 50%">Sign In</h3>
<h3 style="float: left; width: 50%">Register</h3>
</div>
<div style="float: left; width: 250px; padding: 0 0 0 0;">
<a class="btn btn-block btn-social btn-twitter" href="/auth/twitter">
<i class="fa fa-twitter"></i>Sign in with Twitter
</a>
<a class="btn btn-block btn-social btn-facebook" href="/auth/facebook">
<i class="fa fa-facebook"></i>Sign in with Facebook
</a>
<a class="btn btn-block btn-social btn-google-plus" href="/auth/GoogleOAuth">
<i class="fa fa-google-plus"></i>Sign in with Google
</a>
<a class="btn btn-block btn-social btn-linkedin" href="/auth/LinkedIn">
<i class="fa fa-linkedin"></i>Sign in with LinkedIn
</a>
<hr />
<button class="btn btn-default" data-click="trigger:sign-in">Login with your email</button>
</div>
<h3 style="float: left; height: 300px; border-left: 1px solid #eee; margin: 0 30px">
<div style="margin: 100px 0 0 -10px; background: #fff; color: #ccc; padding: 5px 0">or</div>
</h3>
<div style="float: left">
<form id="form-register" action="@(new Register().ToPostUrl())" method="POST">
<input type="hidden" name="AutoLogin" value="true"/>
<div class="form-group">
<input class="form-control input-lg" type="text" id="FirstName" name="FirstName" value="" placeholder="First Name">
<span class="help-block"></span>
</div>
<div class="form-group">
<input class="form-control input-lg" type="text" id="LastName" name="LastName" value="" placeholder="Last Name">
<span class="help-block"></span>
</div>
<div class="form-group">
<input class="form-control input-lg" type="text" id="Email" name="Email" value="" placeholder="Email">
<span class="help-block"></span>
</div>
<div class="form-group">
<input class="form-control input-lg" type="password" id="Password" name="Password" value="" placeholder="Password">
<span class="help-block"></span>
</div>
<div class="form-group">
<button class="btn btn-lg btn-default" type="submit">Register</button>
</div>
<div class="clearfix"></div>
</form>
<script>
$("#form-register").bindForm({
success: function(r) {
localStorage["UserName"] = $("#Email").val();
$(document).trigger('signed-in');
}
});
</script>
</div>
<div class="clearfix"></div>
<p style="margin: 80px 0 0 0; line-height: 48px; text-align: center; width: 600px">
<img src="/Content/img/github-10-l.png" alt="fork on GitHub" style="margin: 0 5px 0 0;" />
view the source: <a href="https://github.com/ServiceStack/HttpBenchmarks">github.com/ServiceStack/HttpBenchmarks</a>
</p>
</div>
}