-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathquery.html
49 lines (48 loc) · 2.4 KB
/
query.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
{{template "page_top" .}}
{{template "nav_cat_bar" .}}
{{$Uname := .Uname}}
{{if and (eq .Auth 1) (eq .Uname "netop")}}
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-content">
{{if eq .Error 1}}
<div class="alert alert-warning text-center">{{.Msg}}</div>
{{end}}
{{if .IsAffected}}
<div class="alert alert-success text-center">{{.AffectRows}} rows affected.</div>
{{end}}
<div>
{{$schema := .Schema}}
<form id="search_form" method="get" target="_parent" action="/db/query">
<input type="hidden" name="role" value="{{.Role}}"></input>
<div class="input-group pull-left" >
<div class="form-group">
<select name="schema" class="form-control">
{{range .Schemas}}
<option value="{{.Name}}"{{if eq $schema .Name}}selected{{end}}>{{.Name}}</option>
{{end}}
</select>
</div>
<div class="input-group-btn">
<button id='search_btn' type="submit" class="btn btn-success">
-执行-
</button>
</div>
</div>
<div>
<input type="hidden" name="flag" value="result"></input>
<textarea name="sql" class="form-control" rows="15">{{.Sqltext}}</textarea>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
{{else}}
<div><span style="font-size:18px;color:red;">没有相关权限!</span></div>
{{end}}
{{template "page_buttom"}}