-
Notifications
You must be signed in to change notification settings - Fork 69
/
editor.html
159 lines (141 loc) · 3.91 KB
/
editor.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
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>编辑器</title>
<link rel="stylesheet" type="text/css" href="jsoneditor/jsoneditor.min.css"/>
<script src="common/browser-polyfill.js"></script>
<script src="common/escape.js"></script>
<script src="jquery/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="jsoneditor/jsoneditor.min.js"></script>
<script src="js/JMX.js"></script>
<script src="js/editor.js"></script>
<style>
body {
margin: 0;
}
.header {
width: 100%;
height: 40px;
padding: 0 10px;
background-color: rgb(44, 42, 72);
color: rgb(245, 245, 245);
font-size: 14px;
}
.logo {
width: 40px;
height: 40px;
background-size: 40px 40px;
background-image: url("icon/favicon-w.png");
float: left;
}
.control {
position: relative;
display: inline-block;
height: 40px;
line-height: 40px;
width: calc(100% - 60px);
}
.control .left {
}
.control .status {
margin-left: 10px;
min-width: 300px;
}
.control .right {
float: right;
margin-left: 10px;
line-height: 40px;
}
.control #name {
font-size: 14px;
height: 20px;
width: 300px;
border: 1px solid #EFEFEF;
border-radius: 2px;
padding: 2px;
outline: none;
}
#json-editor .jsoneditor input[type=text] {
line-height: 20px;
}
.button {
display: inline-block;
line-height: 1;
white-space: nowrap;
cursor: pointer;
background: #fff;
border: 1px solid #dcdfe6;
color: #606266;
-webkit-appearance: none;
text-align: center;
box-sizing: border-box;
outline: none;
margin: 0;
transition: .1s;
font-weight: 500;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
padding: 6px 10px;
border-radius: 4px;
}
.button:hover {
color: #409eff;
border-color: #c6e2ff;
background-color: #ecf5ff;
}
.row {
display: flex;
flex-direction: row;
justify-content: center;
}
.col {
display: flex;
flex-direction: column;
}
#domains {
margin: 10px auto;
font-size: 14px;
}
#submit, #cancel {
padding: 12px 20px;
margin: 10px;
}
.primary {
color: #409eff;
background: #ecf5ff;
border-color: #b3d8ff;
}
.primary:hover {
background: #409eff;
border-color: #409eff;
color: #fff;
}
</style>
</head>
<body>
<div class="header">
<a class="logo"></a>
<div class="control">
<span class="left">编辑器</span>
<span class="status"></span>
<div class="right">
<label for="name">文件名:</label>
<input id="name" type="text" name="name"/>
<button id="export-jmx" class="button">导出JMX</button>
<button id="export-json" class="button">导出JSON</button>
</div>
</div>
</div>
<div id="json-editor"></div>
<div id="domains-select" class="col" style="display: none">
<div class="col" id="domains">
</div>
<div class="row">
<button id="cancel" class="button">取消</button>
<button id="submit" class="button primary">导出</button>
</div>
</div>
</body>
</html>