/
index.pug
64 lines (60 loc) · 2.72 KB
/
index.pug
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
.ui.segments
.ui.segment
ack-button.green(on-click="listDesignDocuments") Get List
radio-buttons(
on-select="getDesignDocument"
true-color="orange")
+each('designDocuments as ddoc')
radio-button(value="{{ddoc}}") {{ddoc.split('/')[1]}}
//-
ack-button(on-click="getDesignDocument")
code {{ ddoc.split('/')[1] }}
.ui.form
.field
async(fetched="{{@shared.deps}}")
ace-editor(code="{{ designDocument.livescript }}" mode="livescript" theme="xcode")
.field
checkbox(checked="{{autoCompile}}") Autocompile
+unless('autoCompile')
ack-button.teal(on-click="compileDesignDocument") Compile
+unless('autoCompile')
.field
async(fetched="{{@shared.deps}}")
ace-editor(code="{{ designDocument.javascript }}" mode="javascript" theme="xcode")
.field
.ui.action.input
input(value="{{ documentId }}" placeholder="_design/myDesignDocument")
ack-button.red(on-click="putDesignDocument") Save
.ui.segment
h2.ui.header Get View
.ui.form
.fields
.field
label View
input(value="{{getView_view}}" placeholder="mydesigndoc/myview")
.field
label Params
json-edit(value="{{getView_params}}" style="height: 100px")
.field
label Get
ack-button(on-click="getView") Get View
.field
label Result (also in the console)
pre(style="overflow-x: scroll; min-height: 300px; border: 1px solid black") {{getView_result}}
.ui.segment
h3.ui.top.attached.header
//- Dump all design documents
checkbox.blue(checked="{{dumpAllSection}}") Show
| Dump All Design Documents
+if('dumpAllSection')
.ui.buttons
ack-button.green(on-click="downloadBlueprints") Get All Documents
file-button.red(on-read="restoreDesignDocs" type="text") Restore
h3 Notes for Creating a New Database From Scratch
ol
li Use Fauxton to create a new database
li Create a user different from #[code admin]
li.
Create appropriate #[code _security] file in the new database
and add the user as #[code admin]
li Upload your #[code _design/*] files