Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
Questdb
提交
9314e45a
Q
Questdb
项目概览
jobily
/
Questdb
10 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
Questdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
9314e45a
编写于
4月 03, 2016
作者:
V
Vlad Ilyushchenko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
design of import detail component
上级
2ecb2dfa
变更
18
展开全部
隐藏空白更改
内联
并排
Showing
18 changed file
with
615 addition
and
119 deletion
+615
-119
core/src/main/java/com/nfsdb/net/http/handlers/ImportHandler.java
.../main/java/com/nfsdb/net/http/handlers/ImportHandler.java
+62
-34
core/src/main/java/com/nfsdb/net/http/handlers/QueryHandler.java
...c/main/java/com/nfsdb/net/http/handlers/QueryHandler.java
+11
-10
core/src/main/resources/site/public/index.html
core/src/main/resources/site/public/index.html
+95
-13
core/src/main/resources/site/public/scripts/nfsdb.js
core/src/main/resources/site/public/scripts/nfsdb.js
+1
-1
core/src/main/resources/site/public/scripts/vendor.js
core/src/main/resources/site/public/scripts/vendor.js
+6
-6
core/src/main/resources/site/public/styles/nfsdb.css
core/src/main/resources/site/public/styles/nfsdb.css
+98
-10
core/src/main/resources/site/public/styles/vendor.css
core/src/main/resources/site/public/styles/vendor.css
+1
-1
ui/app/index.html
ui/app/index.html
+92
-10
ui/app/scripts/import-detail.js
ui/app/scripts/import-detail.js
+71
-0
ui/app/scripts/import.js
ui/app/scripts/import.js
+41
-20
ui/app/styles/_base.scss
ui/app/styles/_base.scss
+2
-0
ui/app/styles/_editor.scss
ui/app/styles/_editor.scss
+1
-0
ui/app/styles/_import-detail.scss
ui/app/styles/_import-detail.scss
+120
-0
ui/app/styles/_import.scss
ui/app/styles/_import.scss
+7
-12
ui/app/styles/_variables.scss
ui/app/styles/_variables.scss
+1
-0
ui/app/styles/main.scss
ui/app/styles/main.scss
+2
-1
ui/bower.json
ui/bower.json
+3
-0
ui/gulpfile.babel.js
ui/gulpfile.babel.js
+1
-1
未找到文件。
core/src/main/java/com/nfsdb/net/http/handlers/ImportHandler.java
浏览文件 @
9314e45a
/*
/*
******************************************************************************
* _ _ ___ ___ _ _
* | \| | __/ __| __| | |__
* | .` | _|\__ \/ _` | '_ \
...
...
@@ -17,7 +17,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
*
*****************************************************************************
/
package
com.nfsdb.net.http.handlers
;
...
...
@@ -34,6 +34,7 @@ import com.nfsdb.io.parser.listener.JournalImportListener;
import
com.nfsdb.io.sink.CharSink
;
import
com.nfsdb.misc.Chars
;
import
com.nfsdb.misc.Misc
;
import
com.nfsdb.net.http.ChunkedResponse
;
import
com.nfsdb.net.http.IOContext
;
import
com.nfsdb.net.http.RequestHeaderBuffer
;
import
com.nfsdb.net.http.ResponseSink
;
...
...
@@ -122,47 +123,74 @@ public class ImportHandler extends AbstractMultipartHandler {
private
static
void
sendSummary
(
IOContext
context
,
ImportHandlerContext
h
)
throws
IOException
{
if
(
h
.
importer
!=
null
&&
h
.
textParser
!=
null
)
{
ResponseSink
r
=
context
.
responseSink
();
CharSequence
fmt
=
context
.
request
.
getUrlParam
(
"fmt"
);
if
(
fmt
!=
null
&&
Chars
.
equals
(
"json"
,
fmt
))
{
sendJsonSummary
(
context
,
h
);
}
else
{
sendTextSummary
(
context
,
h
);
}
}
}
r
.
status
(
200
,
"text/plain; charset=utf-8"
);
private
static
void
sendJsonSummary
(
IOContext
context
,
ImportHandlerContext
h
)
throws
IOException
{
ChunkedResponse
r
=
context
.
chunkedResponse
();
JournalMetadata
m
=
h
.
importer
.
getMetadata
(
);
LongList
errors
=
h
.
importer
.
getErrors
();
r
.
status
(
200
,
"application/json; charset=utf-8"
);
r
.
sendHeader
();
sep
(
r
);
r
.
put
(
'|'
);
pad
(
r
,
TO_STRING_COL1_PAD
,
"Location:"
);
pad
(
r
,
TO_STRING_COL2_PAD
,
m
.
getLocation
());
pad
(
r
,
TO_STRING_COL3_PAD
,
"Errors"
).
put
(
Misc
.
EOL
);
JournalMetadata
m
=
h
.
importer
.
getMetadata
();
LongList
errors
=
h
.
importer
.
getErrors
();
r
.
put
(
'{'
)
.
putQuoted
(
"location"
).
put
(
':'
).
putUtf8EscapedAndQuoted
(
m
.
getLocation
()).
put
(
','
)
.
putQuoted
(
"rowsProcessed"
).
put
(
':'
).
put
(
h
.
textParser
.
getLineCount
()).
put
(
','
)
.
putQuoted
(
"rowsImported"
).
put
(
':'
).
put
(
h
.
importer
.
getImportedRowCount
())
.
put
(
'}'
);
r
.
flush
();
r
.
done
();
}
r
.
put
(
'|'
);
pad
(
r
,
TO_STRING_COL1_PAD
,
"Partition by"
);
pad
(
r
,
TO_STRING_COL2_PAD
,
m
.
getPartitionType
().
name
());
pad
(
r
,
TO_STRING_COL3_PAD
,
""
).
put
(
Misc
.
EOL
);
sep
(
r
);
private
static
void
sendTextSummary
(
IOContext
context
,
ImportHandlerContext
h
)
throws
IOException
{
ResponseSink
r
=
context
.
responseSink
();
r
.
put
(
'|'
);
pad
(
r
,
TO_STRING_COL1_PAD
,
"Rows handled"
);
pad
(
r
,
TO_STRING_COL2_PAD
,
h
.
textParser
.
getLineCount
());
pad
(
r
,
TO_STRING_COL3_PAD
,
""
).
put
(
Misc
.
EOL
);
r
.
status
(
200
,
"text/plain; charset=utf-8"
);
JournalMetadata
m
=
h
.
importer
.
getMetadata
();
LongList
errors
=
h
.
importer
.
getErrors
();
sep
(
r
);
r
.
put
(
'|'
);
pad
(
r
,
TO_STRING_COL1_PAD
,
"Location:"
);
pad
(
r
,
TO_STRING_COL2_PAD
,
m
.
getLocation
());
pad
(
r
,
TO_STRING_COL3_PAD
,
"Errors"
).
put
(
Misc
.
EOL
);
r
.
put
(
'|'
);
pad
(
r
,
TO_STRING_COL1_PAD
,
"Partition by"
);
pad
(
r
,
TO_STRING_COL2_PAD
,
m
.
getPartitionType
().
name
());
pad
(
r
,
TO_STRING_COL3_PAD
,
""
).
put
(
Misc
.
EOL
);
sep
(
r
);
r
.
put
(
'|'
);
pad
(
r
,
TO_STRING_COL1_PAD
,
"Rows handled"
);
pad
(
r
,
TO_STRING_COL2_PAD
,
h
.
textParser
.
getLineCount
());
pad
(
r
,
TO_STRING_COL3_PAD
,
""
).
put
(
Misc
.
EOL
);
r
.
put
(
'|'
);
pad
(
r
,
TO_STRING_COL1_PAD
,
"Rows imported"
);
pad
(
r
,
TO_STRING_COL2_PAD
,
h
.
importer
.
getImportedRowCount
());
pad
(
r
,
TO_STRING_COL3_PAD
,
""
).
put
(
Misc
.
EOL
);
sep
(
r
);
for
(
int
i
=
0
,
n
=
m
.
getColumnCount
();
i
<
n
;
i
++)
{
r
.
put
(
'|'
);
pad
(
r
,
TO_STRING_COL1_PAD
,
"Rows imported"
);
pad
(
r
,
TO_STRING_COL2_PAD
,
h
.
importer
.
getImportedRowCount
());
pad
(
r
,
TO_STRING_COL3_PAD
,
""
).
put
(
Misc
.
EOL
);
sep
(
r
);
for
(
int
i
=
0
,
n
=
m
.
getColumnCount
();
i
<
n
;
i
++)
{
r
.
put
(
'|'
);
pad
(
r
,
TO_STRING_COL1_PAD
,
i
);
col
(
r
,
m
.
getColumnQuick
(
i
));
pad
(
r
,
TO_STRING_COL3_PAD
,
errors
.
getQuick
(
i
));
r
.
put
(
Misc
.
EOL
);
}
sep
(
r
);
r
.
flush
();
pad
(
r
,
TO_STRING_COL1_PAD
,
i
);
col
(
r
,
m
.
getColumnQuick
(
i
));
pad
(
r
,
TO_STRING_COL3_PAD
,
errors
.
getQuick
(
i
));
r
.
put
(
Misc
.
EOL
);
}
sep
(
r
);
r
.
flush
();
}
private
void
analyseFormat
(
ImportHandlerContext
context
,
long
address
,
int
len
)
{
...
...
core/src/main/java/com/nfsdb/net/http/handlers/QueryHandler.java
浏览文件 @
9314e45a
/*
/*
******************************************************************************
* _ _ ___ ___ _ _
* | \| | __/ __| __| | |__
* | .` | _|\__ \/ _` | '_ \
...
...
@@ -17,7 +17,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
*
*****************************************************************************
/
package
com.nfsdb.net.http.handlers
;
...
...
@@ -72,14 +72,6 @@ public class QueryHandler implements ContextHandler {
this
.
factoryPool
=
factoryPool
;
}
public
long
getCacheHits
()
{
return
cacheHits
.
longValue
();
}
public
long
getCacheMisses
()
{
return
cacheMisses
.
longValue
();
}
@Override
public
void
handle
(
IOContext
context
)
throws
IOException
{
JsonHandlerContext
ctx
=
localContext
.
get
(
context
);
...
...
@@ -163,6 +155,7 @@ public class QueryHandler implements ContextHandler {
switch
(
ctx
.
state
)
{
case
PREFIX:
r
.
bookmark
();
// todo: this may get stuck if query is too large, // FIXME: 31/03/2016
r
.
put
(
'{'
).
putQuoted
(
"query"
).
put
(
':'
).
putUtf8EscapedAndQuoted
(
ctx
.
query
);
r
.
put
(
','
).
putQuoted
(
"columns"
).
put
(
':'
).
put
(
'['
);
ctx
.
state
=
QueryState
.
METADATA
;
...
...
@@ -377,6 +370,14 @@ public class QueryHandler implements ContextHandler {
}
}
long
getCacheHits
()
{
return
cacheHits
.
longValue
();
}
long
getCacheMisses
()
{
return
cacheMisses
.
longValue
();
}
private
void
sendDone
(
ChunkedResponse
r
,
JsonHandlerContext
ctx
)
throws
DisconnectedChannelException
,
SlowWritableChannelException
{
if
(
ctx
.
count
>
-
1
)
{
r
.
bookmark
();
...
...
core/src/main/resources/site/public/index.html
浏览文件 @
9314e45a
...
...
@@ -107,21 +107,94 @@
<div
class=
"row wrapper border-bottom white-bg page-heading file-upload"
>
<div
class=
"col-lg-10"
><h2>
Data import
</h2></div>
</div>
<div
class=
"wrapper wrapper-content
animated fadeInRight
file-upload"
>
<div
class=
"wrapper wrapper-content file-upload"
>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"ibox"
>
<div
class=
"ibox-content"
>
<div
id=
"dragTarget"
class=
"drag-target drag-idle"
><h2>
Drag files here to import
</h2></div>
<div
class=
"m-b-sm"
>
<button
class=
"btn btn-white btn-sm m-r-sm"
data-toggle=
"tooltip"
data-placement=
"top"
title
data-original-title=
"Clear selected"
><i
class=
"fa fa-remove"
></i>
Clear
<button
id=
"btnClearSelected"
class=
"btn btn-white btn-sm m-r-sm"
data-toggle=
"tooltip"
data-placement=
"top"
title
data-original-title=
"Clear selected"
><i
class=
"fa fa-remove"
></i>
Clear
</button>
<button
class=
"btn btn-white btn-sm"
data-toggle=
"tooltip"
data-placement=
"top"
title
data-original-title=
"Import selected"
><i
class=
"fa fa-upload"
></i></button>
<button
id=
"btnRetry"
class=
"btn btn-white btn-sm"
data-toggle=
"tooltip"
data-placement=
"top"
title
data-original-title=
"Import selected"
><i
class=
"fa fa-upload"
></i></button>
</div>
<div
id=
"import-file-list"
></div>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"ibox"
>
<div
class=
"ibox-title"
>
<h5>
Import details
<small
class=
"m-l-sm"
>
Feedback, configuration and re-try options
</small>
</h5>
</div>
<div
class=
"ibox-content"
>
<div
id=
"upload-detail"
>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"stats-switcher-viewport"
>
<div
class=
"stats-switcher"
>
<div
class=
"row vertical-align import-imported-table"
>
<div
class=
"col-xs-3"
><i
class=
"fa fa-table fa-2x"
></i></div>
<div
class=
"col-xs-9 text-right"
><h3
class=
"font-bold"
>
ABCD
</h3>
</div>
</div>
<div
class=
"import-stats"
>
<div
class=
"import-imported-stats pull-right"
><i
class=
"fa fa-thumbs-o-down fa-2x"
></i>
<span
class=
"row-count"
>
1023003
</span>
rows
</div>
<div
class=
"import-imported-stats"
><i
class=
"fa fa-thumbs-o-up fa-2x"
></i>
<span
class=
"row-count"
>
15000000
</span>
rows
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"import-stats-chart"
>
<div
class=
"import-rejected pull-right"
></div>
<div
class=
"import-imported"
></div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
id=
"import-detail-grid"
class=
"grid"
>
<div
class=
"ud-header-row"
>
<div
class=
"ud-header gh-1"
>
Column name
</div>
<div
class=
"ud-header gh-2"
>
Type
</div>
<div
class=
"ud-header gh-3"
>
Size
</div>
<div
class=
"ud-header gh-4"
>
Errors
</div>
</div>
<div
class=
"ud-canvas"
>
<div
class=
"ud-row"
style=
"top: 0"
>
<div
class=
"ud-cell gc-1 g-other"
>
location
</div>
<div
class=
"ud-cell gc-2 g-type"
>
STRING
</div>
<div
class=
"ud-cell gc-3 g-other"
>
10
</div>
<div
class=
"ud-cell gc-4 g-other"
>
0
</div>
</div>
<div
class=
"ud-row"
style=
"top: 35px"
>
<div
class=
"ud-cell gc-1 g-other"
>
price
</div>
<div
class=
"ud-cell gc-2 g-type"
>
DOUBLE
</div>
<div
class=
"ud-cell gc-3 g-other"
>
8
</div>
<div
class=
"ud-cell gc-4 g-other"
>
1400
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
id=
"upload-list"
></div>
<div
id=
"upload-detail"
></div>
</div>
</div>
</div>
...
...
@@ -131,12 +204,21 @@
<div><strong>
Copyright
</strong>
Appsicle Ltd.
©
2014-2016
</div>
</div>
</div>
</div>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. --><!--<script>-->
<!--(function (b, o, i, l, e, r) {--><!--b.GoogleAnalyticsObject = l;--><!--b[l] || (b[l] =--><!--function () {-->
<!--(b[l].q = b[l].q || []).push(arguments)--><!--});--><!--b[l].l = +new Date;--><!--e = o.createElement(i);-->
<!--r = o.getElementsByTagName(i)[0];--><!--e.src = 'https://www.google-analytics.com/analytics.js';-->
<!--r.parentNode.insertBefore(e, r)--><!--}(window, document, 'script', 'ga'));--><!--ga('create', 'UA-XXXXX-X');-->
<!--ga('send', 'pageview');--><!--</script>-->
</div>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
(
function
(
b
,
o
,
i
,
l
,
e
,
r
)
{
b
.
GoogleAnalyticsObject
=
l
;
b
[
l
]
||
(
b
[
l
]
=
function
()
{
(
b
[
l
].
q
=
b
[
l
].
q
||
[]).
push
(
arguments
)
});
b
[
l
].
l
=
+
new
Date
;
e
=
o
.
createElement
(
i
);
r
=
o
.
getElementsByTagName
(
i
)[
0
];
e
.
src
=
'
https://www.google-analytics.com/analytics.js
'
;
r
.
parentNode
.
insertBefore
(
e
,
r
)
}(
window
,
document
,
'
script
'
,
'
ga
'
));
ga
(
'
create
'
,
'
UA-XXXXX-X
'
);
ga
(
'
send
'
,
'
pageview
'
);
</script>
<script
src=
"scripts/vendor.js"
></script>
<script
src=
"scripts/nfsdb.js"
></script>
</body>
...
...
core/src/main/resources/site/public/scripts/nfsdb.js
浏览文件 @
9314e45a
...
...
@@ -19,4 +19,4 @@
* limitations under the License.
******************************************************************************/
"
use strict
"
;
function
s4
(){
return
(
65536
*
(
1
+
Math
.
random
())
|
0
).
toString
(
16
).
substring
(
1
)}
function
guid
(){
return
s4
()
+
s4
()
+
"
-
"
+
s4
()
+
"
-
"
+
s4
()
+
"
-
"
+
s4
()
+
"
-
"
+
s4
()
+
s4
()
+
s4
()}
function
numberWithCommas
(
e
){
return
1024
>
e
?
e
:
1048576
>
e
?
Math
.
round
(
e
/
1024
)
+
"
KB
"
:
1073741824
>
e
?
Math
.
round
(
e
/
1024
/
1024
)
+
"
MB
"
:
Math
.
round
(
e
/
1024
/
1024
/
1024
)
+
"
GB
"
}
function
nopropagation
(
e
){
e
.
stopPropagation
(),
e
.
preventDefault
&&
e
.
preventDefault
()}
function
localStorageSupport
(){
return
"
localStorage
"
in
window
&&
null
!==
window
.
localStorage
}
function
fixHeight
(){
var
e
=
$
(
"
body > #wrapper
"
).
height
()
-
61
;
$
(
"
.sidebard-panel
"
).
css
(
"
min-height
"
,
e
+
"
px
"
);
var
a
=
$
(
"
nav.navbar-default
"
).
height
(),
i
=
$
(
"
#page-wrapper
"
),
s
=
i
.
height
();
a
>
s
&&
i
.
css
(
"
min-height
"
,
a
+
"
px
"
),
s
>
a
&&
i
.
css
(
"
min-height
"
,
$
(
window
).
height
()
+
"
px
"
),
$
(
"
body
"
).
hasClass
(
"
fixed-nav
"
)
&&
(
a
>
s
?
i
.
css
(
"
min-height
"
,
a
-
60
+
"
px
"
):
i
.
css
(
"
min-height
"
,
$
(
window
).
height
()
-
60
+
"
px
"
))}
!
function
(
e
){
e
.
fn
.
importManager
=
function
(){
function
a
(){
var
a
=
e
(
this
).
parent
().
attr
(
"
id
"
),
i
=
e
(
"
#
"
+
a
).
find
(
"
.fa
"
),
s
=
g
[
a
];
s
.
selected
=!
s
.
selected
,
s
.
selected
?(
i
.
removeClass
(
"
fa-square-o
"
),
i
.
addClass
(
"
fa-check-square-o
"
)):(
i
.
removeClass
(
"
fa-check-square-o
"
),
i
.
addClass
(
"
fa-square-o
"
))}
function
i
(
a
){
var
i
=
e
(
this
).
parent
().
attr
(
"
id
"
);
e
(
"
#upload-detail
"
).
html
(
g
[
i
].
response
),
nopropagation
(
a
)}
function
s
(
s
){
u
.
append
(
'
<div id="
'
+
s
.
id
+
'
" class="ud-row" style="top:
'
+
p
+
'
px;"><div class="ud-cell ud-c0"><i class="fa fa-square-o"></i></div><div class="ud-cell ud-c1">
'
+
s
.
name
+
'
</div><div class="ud-cell ud-c2">
'
+
s
.
sizeFmt
+
'
</div><div class="ud-cell ud-c3"><span class="label">pending</span></div></div>
'
);
var
o
=
e
(
"
#
"
+
s
.
id
);
o
.
find
(
"
.ud-c0
"
).
click
(
a
),
o
.
find
(
"
.ud-c1
"
).
click
(
i
),
o
.
find
(
"
.ud-c2
"
).
click
(
i
),
o
.
find
(
"
.ud-c3
"
).
click
(
i
),
p
+=
35
}
function
o
(
a
){
if
(
a
.
lengthComputable
){
var
i
=
a
.
loaded
||
a
.
position
;
e
(
"
#
"
+
m
.
id
).
find
(
"
> .ud-progress
"
).
css
(
"
width
"
,
100
*
i
/
m
.
size
+
"
%
"
)}}
function
n
(
a
,
i
,
s
){
var
o
=
e
(
"
#
"
+
a
.
id
);
if
(
o
.
find
(
"
> .ud-c3
"
).
html
(
i
),
o
.
find
(
"
> .ud-progress
"
).
remove
(),
s
){
var
n
=
h
.
shift
();
n
?
r
(
n
):
m
=
null
}}
function
t
(){
var
a
=
e
.
ajaxSettings
.
xhr
();
return
a
.
upload
&&
a
.
upload
.
addEventListener
(
"
progress
"
,
o
,
!
1
),
a
}
function
l
(
e
){
m
.
response
=
e
,
n
(
m
,
'
<span class="label label-success">success</span>
'
,
!
0
)}
function
d
(
e
){
m
.
response
=
e
.
responseText
,
n
(
m
,
'
<span class="label label-danger">failed</span>
'
,
!
0
)}
function
r
(
a
){
m
=
a
,
n
(
a
,
'
<span class="label label-info">importing</span>
'
,
!
1
),
e
(
"
#
"
+
a
.
id
).
append
(
'
<div class="ud-progress"></div>
'
),
v
.
data
=
new
FormData
,
v
.
data
.
append
(
"
data
"
,
a
.
file
),
e
.
ajax
(
v
)}
function
c
(
e
){
for
(
var
a
=
0
;
a
<
e
.
length
;
a
++
){
var
i
=
e
[
a
],
o
=
{
id
:
guid
(),
name
:
i
.
name
,
size
:
i
.
size
,
file
:
i
,
sizeFmt
:
numberWithCommas
(
i
.
size
),
selected
:
!
1
};
g
[
o
.
id
]
=
o
,
s
(
o
),
null
!=
m
?
h
.
push
(
o
):
r
(
o
)}}
var
u
,
g
=
{},
f
=
this
,
p
=
0
,
h
=
[],
m
=
null
,
v
=
{
xhr
:
t
,
url
:
"
/imp
"
,
type
:
"
POST
"
,
contentType
:
!
1
,
processData
:
!
1
,
cache
:
!
1
,
success
:
l
,
error
:
d
};
return
f
.
append
(
'
<div class="ud-header-row"><div class="ud-header ud-h0"> </div><div class="ud-header ud-h1">File name</div><div class="ud-header ud-h2">Size</div><div class="ud-header ud-h3">Status</div></div>
'
),
f
.
append
(
'
<div class="ud-canvas"></div>
'
),
u
=
f
.
find
(
"
> .ud-canvas
"
),
e
(
document
).
on
(
"
dropbox.files
"
,
function
(
e
,
a
){
c
(
a
.
files
)}),
this
},
e
.
fn
.
dropbox
=
function
(){
function
a
(){
n
.
addClass
(
"
drag-drop
"
).
removeClass
(
"
drag-idle
"
)}
function
i
(){
n
.
removeClass
(
"
drag-drop
"
).
addClass
(
"
drag-idle
"
)}
function
s
(){
n
.
on
(
"
drop
"
,
function
(
a
){
i
(),
o
=
e
(),
e
(
document
).
trigger
(
"
dropbox.files
"
,
a
.
originalEvent
.
dataTransfer
)}),
n
.
each
(
function
(){
var
s
=
e
(
this
);
s
.
on
(
"
dragenter
"
,
function
(
e
){
0
===
o
.
size
()
&&
(
nopropagation
(
e
),
a
()),
o
=
o
.
add
(
e
.
target
)}),
s
.
on
(
"
dragleave
"
,
function
(
e
){
setTimeout
(
function
(){
o
=
o
.
not
(
e
.
target
),
0
===
o
.
size
()
&&
i
()},
1
)})})}
var
o
=
e
(),
n
=
this
;
return
s
(),
this
}}(
jQuery
),
$
(
document
).
ready
(
function
(){
$
(
"
#dragTarget
"
).
dropbox
(),
$
(
"
#upload-list
"
).
importManager
(),
$
(
document
).
on
(
"
dragenter
"
,
nopropagation
),
$
(
document
).
on
(
"
dragover
"
,
nopropagation
),
$
(
document
).
on
(
"
drop
"
,
nopropagation
)}),
function
(
e
){
function
a
(){
function
a
(){}
function
i
(){
null
!==
r
&&
(
r
.
abort
(),
r
=
null
)}
function
s
(){
null
!==
c
&&
(
clearTimeout
(
c
),
c
=
null
)}
function
o
(){
console
.
log
(
"
success
"
)}
function
n
(
e
,
a
){
console
.
log
(
"
not so lucky:
"
+
a
)}
function
t
(){
i
(),
u
.
query
=
d
,
u
.
limit
=
"
0,100
"
,
u
.
withCount
=!
0
,
r
=
e
.
get
(
"
/js
"
,
u
,
o
,
n
)}
function
l
(
e
){
d
=
e
,
s
(),
setTimeout
(
t
,
50
)}
var
d
,
r
=
null
,
c
=
null
,
u
=
{
query
:
""
,
limit
:
""
,
withCount
:
!
1
};
return
a
(),{
sendQuery
:
l
}}
e
.
extend
(
!
0
,
window
,{
nfsdb
:{
GridController
:
a
}})}(
jQuery
),
$
(
document
).
ready
(
function
(){
function
e
(){
var
e
=
$
(
"
body
"
);
!
e
.
hasClass
(
"
mini-navbar
"
)
||
e
.
hasClass
(
"
body-small
"
)?(
$
(
"
#side-menu
"
).
hide
(),
setTimeout
(
function
(){
$
(
"
#side-menu
"
).
fadeIn
(
400
)},
200
)):
e
.
hasClass
(
"
fixed-sidebar
"
)?(
$
(
"
#side-menu
"
).
hide
(),
setTimeout
(
function
(){
$
(
"
#side-menu
"
).
fadeIn
(
400
)},
100
)):
$
(
"
#side-menu
"
).
removeAttr
(
"
style
"
)}
$
(
this
).
width
()
<
769
?
$
(
"
body
"
).
addClass
(
"
body-small
"
):
$
(
"
body
"
).
removeClass
(
"
body-small
"
),
$
(
"
#side-menu
"
).
metisMenu
(),
$
(
"
.collapse-link
"
).
click
(
function
(){
var
e
=
$
(
this
).
closest
(
"
div.ibox
"
),
a
=
$
(
this
).
find
(
"
i
"
),
i
=
e
.
find
(
"
div.ibox-content
"
);
i
.
slideToggle
(
200
),
a
.
toggleClass
(
"
fa-chevron-up
"
).
toggleClass
(
"
fa-chevron-down
"
),
e
.
toggleClass
(
""
).
toggleClass
(
"
border-bottom
"
),
setTimeout
(
function
(){
e
.
resize
(),
e
.
find
(
"
[id^=map-]
"
).
resize
()},
50
)}),
$
(
"
.close-link
"
).
click
(
function
(){
var
e
=
$
(
this
).
closest
(
"
div.ibox
"
);
e
.
remove
()}),
$
(
"
.fullscreen-link
"
).
click
(
function
(){
var
e
=
$
(
this
).
closest
(
"
div.ibox
"
),
a
=
$
(
this
).
find
(
"
i
"
);
$
(
"
body
"
).
toggleClass
(
"
fullscreen-ibox-mode
"
),
a
.
toggleClass
(
"
fa-expand
"
).
toggleClass
(
"
fa-compress
"
),
e
.
toggleClass
(
"
fullscreen
"
),
setTimeout
(
function
(){
$
(
window
).
trigger
(
"
resize
"
)},
100
)}),
$
(
"
.close-canvas-menu
"
).
click
(
function
(){
$
(
"
body
"
).
toggleClass
(
"
mini-navbar
"
),
e
()}),
$
(
"
body.canvas-menu .sidebar-collapse
"
).
slimScroll
({
height
:
"
100%
"
,
railOpacity
:.
9
}),
$
(
"
.right-sidebar-toggle
"
).
click
(
function
(){
$
(
"
#right-sidebar
"
).
toggleClass
(
"
sidebar-open
"
)}),
$
(
"
.sidebar-container
"
).
slimScroll
({
height
:
"
100%
"
,
railOpacity
:.
4
,
wheelStep
:
10
}),
$
(
"
.open-small-chat
"
).
click
(
function
(){
$
(
this
).
children
().
toggleClass
(
"
fa-comments
"
).
toggleClass
(
"
fa-remove
"
),
$
(
"
.small-chat-box
"
).
toggleClass
(
"
active
"
)}),
$
(
"
.small-chat-box .content
"
).
slimScroll
({
height
:
"
234px
"
,
railOpacity
:.
4
}),
$
(
"
.check-link
"
).
click
(
function
(){
var
e
=
$
(
this
).
find
(
"
i
"
),
a
=
$
(
this
).
next
(
"
span
"
);
return
e
.
toggleClass
(
"
fa-check-square
"
).
toggleClass
(
"
fa-square-o
"
),
a
.
toggleClass
(
"
todo-completed
"
),
!
1
}),
$
(
"
.navbar-minimalize
"
).
click
(
function
(){
$
(
"
body
"
).
toggleClass
(
"
mini-navbar
"
),
e
()}),
$
(
"
.tooltip-demo
"
).
tooltip
({
selector
:
"
[data-toggle=tooltip]
"
,
container
:
"
body
"
}),
$
(
"
.modal
"
).
appendTo
(
"
body
"
),
fixHeight
(),
$
(
window
).
bind
(
"
load
"
,
function
(){
$
(
"
body
"
).
hasClass
(
"
fixed-sidebar
"
)
&&
$
(
"
.sidebar-collapse
"
).
slimScroll
({
height
:
"
100%
"
,
railOpacity
:.
9
})}),
$
(
window
).
scroll
(
function
(){
$
(
window
).
scrollTop
()
>
0
&&!
$
(
"
body
"
).
hasClass
(
"
fixed-nav
"
)?
$
(
"
#right-sidebar
"
).
addClass
(
"
sidebar-top
"
):
$
(
"
#right-sidebar
"
).
removeClass
(
"
sidebar-top
"
)}),
$
(
window
).
bind
(
"
load resize scroll
"
,
function
(){
$
(
"
body
"
).
hasClass
(
"
body-small
"
)
||
fixHeight
()}),
$
(
"
[data-toggle=popover]
"
).
popover
(),
$
(
"
[data-toggle=tooltip]
"
).
tooltip
(),
$
(
"
.full-height-scroll
"
).
slimscroll
({
height
:
"
100%
"
})}),
$
(
window
).
bind
(
"
resize
"
,
function
(){
$
(
this
).
width
()
<
769
?
$
(
"
body
"
).
addClass
(
"
body-small
"
):
$
(
"
body
"
).
removeClass
(
"
body-small
"
)}),
$
(
document
).
ready
(
function
(){
if
(
localStorageSupport
){
var
e
=
localStorage
.
getItem
(
"
collapse_menu
"
),
a
=
localStorage
.
getItem
(
"
fixedsidebar
"
),
i
=
localStorage
.
getItem
(
"
fixednavbar
"
),
s
=
localStorage
.
getItem
(
"
boxedlayout
"
),
o
=
localStorage
.
getItem
(
"
fixedfooter
"
),
n
=
$
(
"
body
"
);
"
on
"
===
a
&&
(
n
.
addClass
(
"
fixed-sidebar
"
),
$
(
"
.sidebar-collapse
"
).
slimScroll
({
height
:
"
100%
"
,
railOpacity
:.
9
})),
"
on
"
===
e
&&
(
n
.
hasClass
(
"
fixed-sidebar
"
)?
n
.
hasClass
(
"
body-small
"
)
||
n
.
addClass
(
"
mini-navbar
"
):
n
.
hasClass
(
"
body-small
"
)
||
n
.
addClass
(
"
mini-navbar
"
)),
"
on
"
===
i
&&
(
$
(
"
.navbar-static-top
"
).
removeClass
(
"
navbar-static-top
"
).
addClass
(
"
navbar-fixed-top
"
),
n
.
addClass
(
"
fixed-nav
"
)),
"
on
"
===
s
&&
n
.
addClass
(
"
boxed-layout
"
),
"
on
"
===
o
&&
$
(
"
.footer
"
).
addClass
(
"
fixed
"
)}}),
$
(
document
).
ready
(
function
(){
var
e
=
$
(
"
.sql-editor
"
),
a
=
$
(
"
.file-upload
"
);
$
(
"
a#sql-editor
"
).
click
(
function
(){
e
.
css
(
"
display
"
,
"
block
"
),
a
.
css
(
"
display
"
,
"
none
"
),
$
(
"
#sqlEditor
"
).
css
(
"
height
"
,
"
240px
"
)}),
$
(
"
a#file-upload
"
).
click
(
function
(){
e
.
css
(
"
display
"
,
"
none
"
),
a
.
css
(
"
display
"
,
"
block
"
)});
var
i
=
ace
.
edit
(
"
sqlEditor
"
);
i
.
getSession
().
setMode
(
"
ace/mode/sql
"
),
i
.
setTheme
(
"
ace/theme/merbivore_soft
"
),
i
.
setShowPrintMargin
(
!
1
),
i
.
setDisplayIndentGuides
(
!
1
),
i
.
setHighlightActiveLine
(
!
1
),
"
undefined
"
!=
typeof
Storage
&&
localStorage
.
getItem
(
"
lastQuery
"
)
&&
i
.
setValue
(
localStorage
.
getItem
(
"
lastQuery
"
)),
i
.
focus
();
var
s
=
$
(
"
#grid
"
);
s
.
css
(
"
height
"
,
"
430px
"
);
var
o
=
new
Slick
.
Grid
(
s
,[],[],{
enableCellNavigation
:
!
0
,
enableColumnReorder
:
!
1
,
enableTextSelectionOnCells
:
!
0
});
o
.
resizeCanvas
()});
\ No newline at end of file
"
use strict
"
;
function
s4
(){
return
(
65536
*
(
1
+
Math
.
random
())
|
0
).
toString
(
16
).
substring
(
1
)}
function
guid
(){
return
s4
()
+
s4
()
+
"
-
"
+
s4
()
+
"
-
"
+
s4
()
+
"
-
"
+
s4
()
+
"
-
"
+
s4
()
+
s4
()
+
s4
()}
function
numberWithCommas
(
e
){
return
1024
>
e
?
e
:
1048576
>
e
?
Math
.
round
(
e
/
1024
)
+
"
KB
"
:
1073741824
>
e
?
Math
.
round
(
e
/
1024
/
1024
)
+
"
MB
"
:
Math
.
round
(
e
/
1024
/
1024
/
1024
)
+
"
GB
"
}
function
nopropagation
(
e
){
e
.
stopPropagation
(),
e
.
preventDefault
&&
e
.
preventDefault
()}
function
localStorageSupport
(){
return
"
localStorage
"
in
window
&&
null
!==
window
.
localStorage
}
function
fixHeight
(){
var
e
=
$
(
"
body > #wrapper
"
).
height
()
-
61
;
$
(
"
.sidebard-panel
"
).
css
(
"
min-height
"
,
e
+
"
px
"
);
var
a
=
$
(
"
nav.navbar-default
"
).
height
(),
s
=
$
(
"
#page-wrapper
"
),
i
=
s
.
height
();
a
>
i
&&
s
.
css
(
"
min-height
"
,
a
+
"
px
"
),
i
>
a
&&
s
.
css
(
"
min-height
"
,
$
(
window
).
height
()
+
"
px
"
),
$
(
"
body
"
).
hasClass
(
"
fixed-nav
"
)
&&
(
a
>
i
?
s
.
css
(
"
min-height
"
,
a
-
60
+
"
px
"
):
s
.
css
(
"
min-height
"
,
$
(
window
).
height
()
-
60
+
"
px
"
))}
!
function
(
e
){
e
.
fn
.
importManager
=
function
(){
function
a
(){
var
a
=
e
(
this
).
parent
().
attr
(
"
id
"
),
s
=
e
(
"
#
"
+
a
).
find
(
"
.fa
"
),
i
=
u
[
a
];
i
.
selected
=!
i
.
selected
,
i
.
selected
?
s
.
removeClass
(
"
fa-square-o
"
).
addClass
(
"
fa-check-square-o
"
):
s
.
removeClass
(
"
fa-check-square-o
"
).
addClass
(
"
fa-square-o
"
)}
function
s
(
a
){
var
s
=
e
(
this
).
parent
().
attr
(
"
id
"
);
e
(
"
#upload-detail
"
).
html
(
u
[
s
].
response
.
location
),
nopropagation
(
a
)}
function
i
(
i
){
c
.
append
(
'
<div id="
'
+
i
.
id
+
'
" class="ud-row" style="top:
'
+
g
+
'
px;"><div class="ud-cell ud-c0"><i class="fa fa-square-o"></i></div><div class="ud-cell ud-c1">
'
+
i
.
name
+
'
</div><div class="ud-cell ud-c2">
'
+
i
.
sizeFmt
+
'
</div><div class="ud-cell ud-c3"><span class="label">pending</span></div></div>
'
);
var
t
=
e
(
"
#
"
+
i
.
id
);
t
.
find
(
"
.ud-c0
"
).
click
(
a
),
t
.
find
(
"
.ud-c1
"
).
click
(
s
),
t
.
find
(
"
.ud-c2
"
).
click
(
s
),
t
.
find
(
"
.ud-c3
"
).
click
(
s
),
g
+=
m
}
function
t
(
a
){
if
(
a
.
lengthComputable
){
var
s
=
a
.
loaded
||
a
.
position
;
e
(
"
#
"
+
h
.
id
).
find
(
"
> .ud-progress
"
).
css
(
"
width
"
,
100
*
s
/
h
.
size
+
"
%
"
)}}
function
o
(
a
,
s
,
i
){
var
t
=
e
(
"
#
"
+
a
.
id
);
if
(
t
.
find
(
"
> .ud-c3
"
).
html
(
s
),
t
.
find
(
"
> .ud-progress
"
).
remove
(),
i
){
var
o
=
p
.
shift
();
o
?
r
(
o
):
h
=
null
}}
function
n
(){
var
a
=
e
.
ajaxSettings
.
xhr
();
return
a
.
upload
&&
a
.
upload
.
addEventListener
(
"
progress
"
,
t
,
!
1
),
a
}
function
l
(
e
){
h
.
response
=
e
,
o
(
h
,
'
<span class="label label-success">success</span>
'
,
!
0
)}
function
d
(
e
){
h
.
response
=
e
.
responseText
,
o
(
h
,
'
<span class="label label-danger">failed</span>
'
,
!
0
)}
function
r
(
a
){
h
=
a
,
o
(
a
,
'
<span class="label label-info">importing</span>
'
,
!
1
),
e
(
"
#
"
+
a
.
id
).
append
(
'
<div class="ud-progress"></div>
'
),
v
.
data
=
new
FormData
,
v
.
data
.
append
(
"
data
"
,
a
.
file
),
e
.
ajax
(
v
)}
var
c
,
u
=
{},
f
=
this
,
g
=
0
,
p
=
[],
h
=
null
,
m
=
35
,
v
=
{
xhr
:
n
,
url
:
"
/imp?fmt=json
"
,
type
:
"
POST
"
,
contentType
:
!
1
,
processData
:
!
1
,
cache
:
!
1
,
success
:
l
,
error
:
d
};
return
f
.
append
(
'
<div class="ud-header-row"><div class="ud-header ud-h0"> </div><div class="ud-header ud-h1">File name</div><div class="ud-header ud-h2">Size</div><div class="ud-header ud-h3">Status</div></div>
'
),
f
.
append
(
'
<div class="ud-canvas"></div>
'
),
c
=
f
.
find
(
"
> .ud-canvas
"
),
e
(
document
).
on
(
"
dropbox.files
"
,
function
(
e
,
a
){
for
(
var
s
=
0
;
s
<
a
.
files
.
length
;
s
++
){
var
t
=
a
.
files
[
s
],
o
=
{
id
:
guid
(),
name
:
t
.
name
,
size
:
t
.
size
,
file
:
t
,
sizeFmt
:
numberWithCommas
(
t
.
size
),
selected
:
!
1
};
u
[
o
.
id
]
=
o
,
i
(
o
),
null
!=
h
?
p
.
push
(
o
):
r
(
o
)}}),
e
(
document
).
on
(
"
import.clearSelected
"
,
function
(){
for
(
var
a
in
u
)
u
.
hasOwnProperty
(
a
)
&&
u
[
a
].
selected
&&
(
e
(
"
#
"
+
a
).
remove
(),
delete
u
[
a
]);
g
=
0
;
for
(
var
s
=
c
.
find
(
"
.ud-row
"
),
i
=
0
;
i
<
s
.
length
;
i
++
)
e
(
s
[
i
]).
css
(
"
top
"
,
g
),
g
+=
m
}),
this
},
e
.
fn
.
dropbox
=
function
(){
function
a
(){
o
.
addClass
(
"
drag-drop
"
).
removeClass
(
"
drag-idle
"
)}
function
s
(){
o
.
removeClass
(
"
drag-drop
"
).
addClass
(
"
drag-idle
"
)}
function
i
(){
o
.
on
(
"
drop
"
,
function
(
a
){
s
(),
t
=
e
(),
e
(
document
).
trigger
(
"
dropbox.files
"
,
a
.
originalEvent
.
dataTransfer
)}),
o
.
each
(
function
(){
var
i
=
e
(
this
);
i
.
on
(
"
dragenter
"
,
function
(
e
){
0
===
t
.
size
()
&&
(
nopropagation
(
e
),
a
()),
t
=
t
.
add
(
e
.
target
)}),
i
.
on
(
"
dragleave
"
,
function
(
e
){
setTimeout
(
function
(){
t
=
t
.
not
(
e
.
target
),
0
===
t
.
size
()
&&
s
()},
1
)})})}
var
t
=
e
(),
o
=
this
;
return
i
(),
this
}}(
jQuery
),
$
(
document
).
ready
(
function
(){
$
(
"
#btnClearSelected
"
).
click
(
function
(){
$
(
document
).
trigger
(
"
import.clearSelected
"
)}),
$
(
"
#btnRetry
"
).
click
(
function
(){
$
(
document
).
trigger
(
"
import.retry
"
)}),
$
(
"
#dragTarget
"
).
dropbox
(),
$
(
"
#import-file-list
"
).
importManager
(),
$
(
document
).
on
(
"
dragenter
"
,
nopropagation
),
$
(
document
).
on
(
"
dragover
"
,
nopropagation
),
$
(
document
).
on
(
"
drop
"
,
nopropagation
)}),
$
(
document
).
ready
(
function
(){
for
(
var
e
=
[
"
INT
"
,
"
STRING
"
,
"
DOUBLE
"
],
a
=
$
(
'
<select class="g-dynamic-select form-control m-b"/>
'
),
s
=
0
;
s
<
e
.
length
;
s
++
){
var
i
=
e
[
s
];
$
(
"
<option />
"
,{
value
:
i
,
text
:
i
}).
appendTo
(
a
)}
$
(
"
.g-type
"
).
click
(
function
(){
var
e
=
$
(
this
);
a
.
appendTo
(
e
.
parent
()),
a
.
css
(
"
display
"
,
"
block
"
),
a
.
css
(
"
left
"
,
e
.
css
(
"
left
"
)),
a
.
css
(
"
width
"
,
e
.
css
(
"
width
"
)),
a
.
val
(
e
.
text
()),
a
.
changeTarget
=
e
,
a
.
focus
()}),
$
(
"
.g-other
"
).
click
(
function
(){
a
.
css
(
"
display
"
,
"
none
"
)}),
a
.
change
(
function
(){
a
.
changeTarget
.
html
(
$
(
this
).
find
(
"
option:selected
"
).
text
()),
a
.
css
(
"
display
"
,
"
none
"
)});
var
t
=
$
(
"
.stats-switcher
"
);
$
(
"
.import-stats-chart
"
).
click
(
function
(){
t
.
hasClass
(
"
stats-visible
"
)?
t
.
removeClass
(
"
stats-visible
"
):
t
.
addClass
(
"
stats-visible
"
)})}),
function
(
e
){
function
a
(){
function
a
(){}
function
s
(){
null
!==
r
&&
(
r
.
abort
(),
r
=
null
)}
function
i
(){
null
!==
c
&&
(
clearTimeout
(
c
),
c
=
null
)}
function
t
(){
console
.
log
(
"
success
"
)}
function
o
(
e
,
a
){
console
.
log
(
"
not so lucky:
"
+
a
)}
function
n
(){
s
(),
u
.
query
=
d
,
u
.
limit
=
"
0,100
"
,
u
.
withCount
=!
0
,
r
=
e
.
get
(
"
/js
"
,
u
,
t
,
o
)}
function
l
(
e
){
d
=
e
,
i
(),
setTimeout
(
n
,
50
)}
var
d
,
r
=
null
,
c
=
null
,
u
=
{
query
:
""
,
limit
:
""
,
withCount
:
!
1
};
return
a
(),{
sendQuery
:
l
}}
e
.
extend
(
!
0
,
window
,{
nfsdb
:{
GridController
:
a
}})}(
jQuery
),
$
(
document
).
ready
(
function
(){
function
e
(){
var
e
=
$
(
"
body
"
);
!
e
.
hasClass
(
"
mini-navbar
"
)
||
e
.
hasClass
(
"
body-small
"
)?(
$
(
"
#side-menu
"
).
hide
(),
setTimeout
(
function
(){
$
(
"
#side-menu
"
).
fadeIn
(
400
)},
200
)):
e
.
hasClass
(
"
fixed-sidebar
"
)?(
$
(
"
#side-menu
"
).
hide
(),
setTimeout
(
function
(){
$
(
"
#side-menu
"
).
fadeIn
(
400
)},
100
)):
$
(
"
#side-menu
"
).
removeAttr
(
"
style
"
)}
$
(
this
).
width
()
<
769
?
$
(
"
body
"
).
addClass
(
"
body-small
"
):
$
(
"
body
"
).
removeClass
(
"
body-small
"
),
$
(
"
#side-menu
"
).
metisMenu
(),
$
(
"
.collapse-link
"
).
click
(
function
(){
var
e
=
$
(
this
).
closest
(
"
div.ibox
"
),
a
=
$
(
this
).
find
(
"
i
"
),
s
=
e
.
find
(
"
div.ibox-content
"
);
s
.
slideToggle
(
200
),
a
.
toggleClass
(
"
fa-chevron-up
"
).
toggleClass
(
"
fa-chevron-down
"
),
e
.
toggleClass
(
""
).
toggleClass
(
"
border-bottom
"
),
setTimeout
(
function
(){
e
.
resize
(),
e
.
find
(
"
[id^=map-]
"
).
resize
()},
50
)}),
$
(
"
.close-link
"
).
click
(
function
(){
var
e
=
$
(
this
).
closest
(
"
div.ibox
"
);
e
.
remove
()}),
$
(
"
.fullscreen-link
"
).
click
(
function
(){
var
e
=
$
(
this
).
closest
(
"
div.ibox
"
),
a
=
$
(
this
).
find
(
"
i
"
);
$
(
"
body
"
).
toggleClass
(
"
fullscreen-ibox-mode
"
),
a
.
toggleClass
(
"
fa-expand
"
).
toggleClass
(
"
fa-compress
"
),
e
.
toggleClass
(
"
fullscreen
"
),
setTimeout
(
function
(){
$
(
window
).
trigger
(
"
resize
"
)},
100
)}),
$
(
"
.close-canvas-menu
"
).
click
(
function
(){
$
(
"
body
"
).
toggleClass
(
"
mini-navbar
"
),
e
()}),
$
(
"
body.canvas-menu .sidebar-collapse
"
).
slimScroll
({
height
:
"
100%
"
,
railOpacity
:.
9
}),
$
(
"
.right-sidebar-toggle
"
).
click
(
function
(){
$
(
"
#right-sidebar
"
).
toggleClass
(
"
sidebar-open
"
)}),
$
(
"
.sidebar-container
"
).
slimScroll
({
height
:
"
100%
"
,
railOpacity
:.
4
,
wheelStep
:
10
}),
$
(
"
.open-small-chat
"
).
click
(
function
(){
$
(
this
).
children
().
toggleClass
(
"
fa-comments
"
).
toggleClass
(
"
fa-remove
"
),
$
(
"
.small-chat-box
"
).
toggleClass
(
"
active
"
)}),
$
(
"
.small-chat-box .content
"
).
slimScroll
({
height
:
"
234px
"
,
railOpacity
:.
4
}),
$
(
"
.check-link
"
).
click
(
function
(){
var
e
=
$
(
this
).
find
(
"
i
"
),
a
=
$
(
this
).
next
(
"
span
"
);
return
e
.
toggleClass
(
"
fa-check-square
"
).
toggleClass
(
"
fa-square-o
"
),
a
.
toggleClass
(
"
todo-completed
"
),
!
1
}),
$
(
"
.navbar-minimalize
"
).
click
(
function
(){
$
(
"
body
"
).
toggleClass
(
"
mini-navbar
"
),
e
()}),
$
(
"
.tooltip-demo
"
).
tooltip
({
selector
:
"
[data-toggle=tooltip]
"
,
container
:
"
body
"
}),
$
(
"
.modal
"
).
appendTo
(
"
body
"
),
fixHeight
(),
$
(
window
).
bind
(
"
load
"
,
function
(){
$
(
"
body
"
).
hasClass
(
"
fixed-sidebar
"
)
&&
$
(
"
.sidebar-collapse
"
).
slimScroll
({
height
:
"
100%
"
,
railOpacity
:.
9
})}),
$
(
window
).
scroll
(
function
(){
$
(
window
).
scrollTop
()
>
0
&&!
$
(
"
body
"
).
hasClass
(
"
fixed-nav
"
)?
$
(
"
#right-sidebar
"
).
addClass
(
"
sidebar-top
"
):
$
(
"
#right-sidebar
"
).
removeClass
(
"
sidebar-top
"
)}),
$
(
window
).
bind
(
"
load resize scroll
"
,
function
(){
$
(
"
body
"
).
hasClass
(
"
body-small
"
)
||
fixHeight
()}),
$
(
"
[data-toggle=popover]
"
).
popover
(),
$
(
"
[data-toggle=tooltip]
"
).
tooltip
(),
$
(
"
.full-height-scroll
"
).
slimscroll
({
height
:
"
100%
"
})}),
$
(
window
).
bind
(
"
resize
"
,
function
(){
$
(
this
).
width
()
<
769
?
$
(
"
body
"
).
addClass
(
"
body-small
"
):
$
(
"
body
"
).
removeClass
(
"
body-small
"
)}),
$
(
document
).
ready
(
function
(){
if
(
localStorageSupport
){
var
e
=
localStorage
.
getItem
(
"
collapse_menu
"
),
a
=
localStorage
.
getItem
(
"
fixedsidebar
"
),
s
=
localStorage
.
getItem
(
"
fixednavbar
"
),
i
=
localStorage
.
getItem
(
"
boxedlayout
"
),
t
=
localStorage
.
getItem
(
"
fixedfooter
"
),
o
=
$
(
"
body
"
);
"
on
"
===
a
&&
(
o
.
addClass
(
"
fixed-sidebar
"
),
$
(
"
.sidebar-collapse
"
).
slimScroll
({
height
:
"
100%
"
,
railOpacity
:.
9
})),
"
on
"
===
e
&&
(
o
.
hasClass
(
"
fixed-sidebar
"
)?
o
.
hasClass
(
"
body-small
"
)
||
o
.
addClass
(
"
mini-navbar
"
):
o
.
hasClass
(
"
body-small
"
)
||
o
.
addClass
(
"
mini-navbar
"
)),
"
on
"
===
s
&&
(
$
(
"
.navbar-static-top
"
).
removeClass
(
"
navbar-static-top
"
).
addClass
(
"
navbar-fixed-top
"
),
o
.
addClass
(
"
fixed-nav
"
)),
"
on
"
===
i
&&
o
.
addClass
(
"
boxed-layout
"
),
"
on
"
===
t
&&
$
(
"
.footer
"
).
addClass
(
"
fixed
"
)}}),
$
(
document
).
ready
(
function
(){
var
e
=
$
(
"
.sql-editor
"
),
a
=
$
(
"
.file-upload
"
);
$
(
"
a#sql-editor
"
).
click
(
function
(){
e
.
css
(
"
display
"
,
"
block
"
),
a
.
css
(
"
display
"
,
"
none
"
),
$
(
"
#sqlEditor
"
).
css
(
"
height
"
,
"
240px
"
)}),
$
(
"
a#file-upload
"
).
click
(
function
(){
e
.
css
(
"
display
"
,
"
none
"
),
a
.
css
(
"
display
"
,
"
block
"
)});
var
s
=
ace
.
edit
(
"
sqlEditor
"
);
s
.
getSession
().
setMode
(
"
ace/mode/sql
"
),
s
.
setTheme
(
"
ace/theme/merbivore_soft
"
),
s
.
setShowPrintMargin
(
!
1
),
s
.
setDisplayIndentGuides
(
!
1
),
s
.
setHighlightActiveLine
(
!
1
),
"
undefined
"
!=
typeof
Storage
&&
localStorage
.
getItem
(
"
lastQuery
"
)
&&
s
.
setValue
(
localStorage
.
getItem
(
"
lastQuery
"
)),
s
.
focus
();
var
i
=
$
(
"
#grid
"
);
i
.
css
(
"
height
"
,
"
430px
"
);
var
t
=
new
Slick
.
Grid
(
i
,[],[],{
enableCellNavigation
:
!
0
,
enableColumnReorder
:
!
1
,
enableTextSelectionOnCells
:
!
0
});
t
.
resizeCanvas
()});
\ No newline at end of file
core/src/main/resources/site/public/scripts/vendor.js
浏览文件 @
9314e45a
此差异已折叠。
点击以展开。
core/src/main/resources/site/public/styles/nfsdb.css
浏览文件 @
9314e45a
...
...
@@ -11003,6 +11003,7 @@ code {
border-image
:
none
;
border-style
:
solid
solid
none
;
border-width
:
3px
0
0
;
border-radius
:
3px
;
margin-bottom
:
0
;
padding
:
14px
15px
7px
;
min-height
:
48px
...
...
@@ -11019,7 +11020,8 @@ code {
border-color
:
#e7eaec
;
border-image
:
none
;
border-style
:
solid
solid
none
;
border-width
:
1px
0
border-width
:
1px
0
;
border-radius
:
3px
}
.ibox-footer
{
...
...
@@ -15902,13 +15904,15 @@ body.md-skin {
}
#sqlEditor
{
height
:
240px
height
:
240px
;
border-radius
:
3px
}
.drag-target
{
background-color
:
#e8e8e8
;
text-align
:
center
;
margin-bottom
:
30px
margin-bottom
:
30px
;
border-radius
:
3px
}
.drag-idle
{
...
...
@@ -15923,7 +15927,7 @@ body.md-skin {
.ud-canvas
{
position
:
relative
;
height
:
2
4
0px
;
height
:
2
0
0px
;
overflow
:
auto
}
...
...
@@ -15960,26 +15964,22 @@ body.md-skin {
}
.ud-c0
{
right
:
100%
;
left
:
0
;
width
:
5%
}
.ud-c1
{
right
:
95%
;
left
:
5%
;
width
:
65%
;
cursor
:
pointer
}
.ud-c2
{
right
:
30%
;
left
:
70%
;
width
:
20%
}
.ud-c3
{
right
:
10%
;
left
:
90%
;
width
:
10%
}
...
...
@@ -16013,6 +16013,94 @@ body.md-skin {
cursor
:
pointer
}
#upload-detail
{
height
:
400px
.stats-switcher-viewport
{
height
:
35px
;
overflow
:
hidden
}
.stats-switcher
{
position
:
relative
;
top
:
0
;
-webkit-transition
:
top
.25s
ease-in-out
;
transition
:
top
.25s
ease-in-out
}
.stats-visible
{
top
:
-35px
}
.import-stats-chart
{
border-radius
:
3px
}
.import-imported-stats
,
.import-imported-table
,
.import-stats
{
height
:
35px
}
.import-imported-stats
{
width
:
50%
;
text-align
:
center
;
padding
:
5px
0
}
.import-imported
,
.import-rejected
{
height
:
8px
;
cursor
:
pointer
}
.import-rejected
{
width
:
10%
;
background-color
:
#ed5565
}
.import-imported
{
width
:
90%
;
background-color
:
#1c84c6
}
.grid
{
height
:
400px
;
padding-top
:
15px
}
.gh-1
,
.gh-2
{
width
:
25%
}
.gh-3
{
width
:
20%
}
.gh-4
{
width
:
30%
}
.gc-1
{
left
:
0
;
width
:
25%
}
.gc-2
{
left
:
25%
;
width
:
25%
}
.gc-3
{
left
:
50%
;
width
:
20%
}
.gc-4
{
left
:
70%
;
width
:
30%
}
.g-dynamic-select
{
position
:
absolute
;
display
:
none
;
padding
:
0
}
.g-type
{
cursor
:
pointer
}
\ No newline at end of file
core/src/main/resources/site/public/styles/vendor.css
浏览文件 @
9314e45a
此差异已折叠。
点击以展开。
ui/app/index.html
浏览文件 @
9314e45a
...
...
@@ -32,6 +32,9 @@
<!-- build:css styles/vendor.css -->
<!-- bower:css -->
<link
rel=
"stylesheet"
href=
"../bower_components/fontawesome/css/font-awesome.css"
>
<link
rel=
"stylesheet"
href=
"../bower_components/morris.js/morris.css"
>
<link
rel=
"stylesheet"
href=
"../bower_components/animate.css/animate.css"
>
<link
rel=
"stylesheet"
href=
"../bower_components/slickgrid/slick.grid.css"
>
<!-- endbower -->
<!-- endbuild -->
...
...
@@ -153,7 +156,7 @@
<h2>
Data import
</h2>
</div>
</div>
<div
class=
"wrapper wrapper-content
animated fadeInRight
file-upload"
>
<div
class=
"wrapper wrapper-content file-upload"
>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"ibox"
>
...
...
@@ -162,14 +165,92 @@
<h2>
Drag files here to import
</h2>
</div>
<div
class=
"m-b-sm"
>
<button
class=
"btn btn-white btn-sm m-r-sm"
data-toggle=
"tooltip"
data-placement=
"top"
<button
id=
"btnClearSelected"
class=
"btn btn-white btn-sm m-r-sm"
data-toggle=
"tooltip"
data-placement=
"top"
title
data-original-title=
"Clear selected"
><i
class=
"fa fa-remove"
></i>
Clear
</button>
<button
class=
"btn btn-white btn-sm"
data-toggle=
"tooltip"
data-placement=
"top"
title
<button
id=
"btnRetry"
class=
"btn btn-white btn-sm"
data-toggle=
"tooltip"
data-placement=
"top"
title
data-original-title=
"Import selected"
><i
class=
"fa fa-upload"
></i></button>
</div>
<div
id=
"upload-list"
></div>
<div
id=
"upload-detail"
></div>
<div
id=
"import-file-list"
></div>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"ibox"
>
<div
class=
"ibox-title"
>
<h5>
Import details
<small
class=
"m-l-sm"
>
Feedback, configuration and re-try options
</small>
</h5>
</div>
<div
class=
"ibox-content"
>
<div
id=
"upload-detail"
>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"stats-switcher-viewport"
>
<div
class=
"stats-switcher"
>
<div
class=
"row vertical-align import-imported-table"
>
<div
class=
"col-xs-3"
>
<i
class=
"fa fa-table fa-2x"
></i>
</div>
<div
class=
"col-xs-9 text-right"
>
<h3
class=
"font-bold"
>
ABCD
</h3>
</div>
</div>
<div
class=
"import-stats"
>
<div
class=
"import-imported-stats pull-right"
><i
class=
"fa fa-thumbs-o-down fa-2x"
></i>
<span
class=
"row-count"
>
1023003
</span>
rows
</div>
<div
class=
"import-imported-stats"
><i
class=
"fa fa-thumbs-o-up fa-2x"
></i>
<span
class=
"row-count"
>
15000000
</span>
rows
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"import-stats-chart"
>
<div
class=
"import-rejected pull-right"
></div>
<div
class=
"import-imported"
></div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
id=
"import-detail-grid"
class=
"grid"
>
<div
class=
"ud-header-row"
>
<div
class=
"ud-header gh-1"
>
Column name
</div>
<div
class=
"ud-header gh-2"
>
Type
</div>
<div
class=
"ud-header gh-3"
>
Size
</div>
<div
class=
"ud-header gh-4"
>
Errors
</div>
</div>
<div
class=
"ud-canvas"
>
<div
class=
"ud-row"
style=
"top: 0"
>
<div
class=
"ud-cell gc-1 g-other"
>
location
</div>
<div
class=
"ud-cell gc-2 g-type"
>
STRING
</div>
<div
class=
"ud-cell gc-3 g-other"
>
10
</div>
<div
class=
"ud-cell gc-4 g-other"
>
0
</div>
</div>
<div
class=
"ud-row"
style=
"top: 35px"
>
<div
class=
"ud-cell gc-1 g-other"
>
price
</div>
<div
class=
"ud-cell gc-2 g-type"
>
DOUBLE
</div>
<div
class=
"ud-cell gc-3 g-other"
>
8
</div>
<div
class=
"ud-cell gc-4 g-other"
>
1400
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
@@ -205,10 +286,10 @@
<!-- build:js scripts/vendor.js -->
<!-- bower:js -->
<script
src=
"/bower_components/jquery/dist/jquery.js"
></script>
<script
src=
"/bower_components/metisMenu/dist/metisMenu.js"
></script>
<script
src=
"/bower_components/jquery-slimscroll/jquery.slimscroll.js"
></script>
<script
src=
"/bower_components/PACE/pace.js"
></script>
<script
src=
"/bower_components/jquery/dist/jquery.
min.
js"
></script>
<script
src=
"/bower_components/metisMenu/dist/metisMenu.
min.
js"
></script>
<script
src=
"/bower_components/jquery-slimscroll/jquery.slimscroll.
min.
js"
></script>
<script
src=
"/bower_components/PACE/pace.
min.
js"
></script>
<script
src=
"/bower_components/ace-builds/src-noconflict/ace.js"
></script>
<script
src=
"/bower_components/ace-builds/src-noconflict/mode-sql.js"
></script>
<script
src=
"/bower_components/ace-builds/src-noconflict/theme-merbivore_soft.js"
></script>
...
...
@@ -221,7 +302,8 @@
<!-- endbuild -->
<!-- build:js scripts/nfsdb.js -->
<script
src=
"scripts/upload.js"
></script>
<script
src=
"scripts/import.js"
></script>
<script
src=
"scripts/import-detail.js"
></script>
<script
src=
"scripts/GridController.js"
></script>
<script
src=
"scripts/main.js"
></script>
<!-- endbuild -->
...
...
ui/app/scripts/import-detail.js
0 → 100644
浏览文件 @
9314e45a
/*******************************************************************************
* _ _ ___ ___ _ _
* | \| | __/ __| __| | |__
* | .` | _|\__ \/ _` | '_ \
* |_|\_|_| |___/\__,_|_.__/
*
* Copyright (c) 2014-2016. The NFSdb project and its contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
/*globals $:false */
$
(
document
).
ready
(
function
()
{
'
use strict
'
;
var
data
=
[
'
INT
'
,
'
STRING
'
,
'
DOUBLE
'
];
var
select
=
$
(
'
<select class="g-dynamic-select form-control m-b"/>
'
);
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
var
val
=
data
[
i
];
$
(
'
<option />
'
,
{
value
:
val
,
text
:
val
}).
appendTo
(
select
);
}
$
(
'
.g-type
'
).
click
(
function
()
{
var
div
=
$
(
this
);
select
.
appendTo
(
div
.
parent
());
select
.
css
(
'
display
'
,
'
block
'
);
select
.
css
(
'
left
'
,
div
.
css
(
'
left
'
));
select
.
css
(
'
width
'
,
div
.
css
(
'
width
'
));
select
.
val
(
div
.
text
());
select
.
changeTarget
=
div
;
select
.
focus
();
});
$
(
'
.g-other
'
).
click
(
function
()
{
select
.
css
(
'
display
'
,
'
none
'
);
});
select
.
change
(
function
()
{
select
.
changeTarget
.
html
(
$
(
this
).
find
(
'
option:selected
'
).
text
());
select
.
css
(
'
display
'
,
'
none
'
);
});
var
statsSwitcher
=
$
(
'
.stats-switcher
'
);
$
(
'
.import-stats-chart
'
).
click
(
function
()
{
if
(
statsSwitcher
.
hasClass
(
'
stats-visible
'
))
{
statsSwitcher
.
removeClass
(
'
stats-visible
'
);
}
else
{
statsSwitcher
.
addClass
(
'
stats-visible
'
);
}
});
});
ui/app/scripts/
upload
.js
→
ui/app/scripts/
import
.js
浏览文件 @
9314e45a
...
...
@@ -71,6 +71,7 @@ function nopropagation(e) {
var
top
=
0
;
var
uploadQueue
=
[];
var
uploaded
=
null
;
var
rowHeight
=
35
;
function
toggleRow
()
{
var
id
=
$
(
this
).
parent
().
attr
(
'
id
'
);
...
...
@@ -80,17 +81,15 @@ function nopropagation(e) {
e
.
selected
=
!
e
.
selected
;
if
(
e
.
selected
)
{
btn
.
removeClass
(
'
fa-square-o
'
);
btn
.
addClass
(
'
fa-check-square-o
'
);
btn
.
removeClass
(
'
fa-square-o
'
).
addClass
(
'
fa-check-square-o
'
);
}
else
{
btn
.
removeClass
(
'
fa-check-square-o
'
);
btn
.
addClass
(
'
fa-square-o
'
);
btn
.
removeClass
(
'
fa-check-square-o
'
).
addClass
(
'
fa-square-o
'
);
}
}
function
showDetail
(
e
)
{
var
id
=
$
(
this
).
parent
().
attr
(
'
id
'
);
$
(
'
#upload-detail
'
).
html
(
dict
[
id
].
response
);
$
(
'
#upload-detail
'
).
html
(
dict
[
id
].
response
.
location
);
nopropagation
(
e
);
}
...
...
@@ -101,7 +100,7 @@ function nopropagation(e) {
row
.
find
(
'
.ud-c1
'
).
click
(
showDetail
);
row
.
find
(
'
.ud-c2
'
).
click
(
showDetail
);
row
.
find
(
'
.ud-c3
'
).
click
(
showDetail
);
top
+=
35
;
top
+=
rowHeight
;
}
function
updateProgress
(
event
)
{
...
...
@@ -134,8 +133,8 @@ function nopropagation(e) {
return
xhrobj
;
}
function
success
(
r
)
{
uploaded
.
response
=
r
;
function
success
(
data
)
{
uploaded
.
response
=
data
;
status
(
uploaded
,
'
<span class="label label-success">success</span>
'
,
true
);
}
...
...
@@ -146,7 +145,7 @@ function nopropagation(e) {
var
request
=
{
xhr
:
setupUploadProgressCallback
,
url
:
'
/imp
'
,
url
:
'
/imp
?fmt=json
'
,
type
:
'
POST
'
,
contentType
:
false
,
processData
:
false
,
...
...
@@ -164,9 +163,14 @@ function nopropagation(e) {
$
.
ajax
(
request
);
}
function
add
(
files
)
{
for
(
var
i
=
0
;
i
<
files
.
length
;
i
++
)
{
var
f
=
files
[
i
];
container
.
append
(
'
<div class="ud-header-row"><div class="ud-header ud-h0"> </div><div class="ud-header ud-h1">File name</div><div class="ud-header ud-h2">Size</div><div class="ud-header ud-h3">Status</div></div>
'
);
container
.
append
(
'
<div class="ud-canvas"></div>
'
);
canvas
=
container
.
find
(
'
> .ud-canvas
'
);
// subscribe to document event
$
(
document
).
on
(
'
dropbox.files
'
,
function
(
x
,
dataTransfer
)
{
for
(
var
i
=
0
;
i
<
dataTransfer
.
files
.
length
;
i
++
)
{
var
f
=
dataTransfer
.
files
[
i
];
var
e
=
{
id
:
guid
(),
name
:
f
.
name
,
...
...
@@ -183,14 +187,23 @@ function nopropagation(e) {
upload
(
e
);
}
}
}
}
);
container
.
append
(
'
<div class="ud-header-row"><div class="ud-header ud-h0"> </div><div class="ud-header ud-h1">File name</div><div class="ud-header ud-h2">Size</div><div class="ud-header ud-h3">Status</div></div>
'
);
container
.
append
(
'
<div class="ud-canvas"></div>
'
);
canvas
=
container
.
find
(
'
> .ud-canvas
'
);
// subscribe to document event
$
(
document
).
on
(
'
dropbox.files
'
,
function
(
x
,
dataTransfer
)
{
add
(
dataTransfer
.
files
);
$
(
document
).
on
(
'
import.clearSelected
'
,
function
()
{
for
(
var
id
in
dict
)
{
if
(
dict
.
hasOwnProperty
(
id
)
&&
dict
[
id
].
selected
)
{
$
(
'
#
'
+
id
).
remove
();
delete
dict
[
id
];
}
}
// rejig remaining rows
top
=
0
;
var
rows
=
canvas
.
find
(
'
.ud-row
'
);
for
(
var
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
$
(
rows
[
i
]).
css
(
'
top
'
,
top
);
top
+=
rowHeight
;
}
});
return
this
;
...
...
@@ -258,8 +271,16 @@ function nopropagation(e) {
$
(
document
).
ready
(
function
()
{
'
use strict
'
;
$
(
'
#btnClearSelected
'
).
click
(
function
()
{
$
(
document
).
trigger
(
'
import.clearSelected
'
);
});
$
(
'
#btnRetry
'
).
click
(
function
()
{
$
(
document
).
trigger
(
'
import.retry
'
);
});
$
(
'
#dragTarget
'
).
dropbox
();
$
(
'
#
upload
-list
'
).
importManager
();
$
(
'
#
import-file
-list
'
).
importManager
();
//
// prevent dropping files into rest of document
...
...
ui/app/styles/_base.scss
浏览文件 @
9314e45a
...
...
@@ -542,6 +542,7 @@ code {
border-image
:
none
;
border-style
:
solid
solid
none
;
border-width
:
3px
0
0
;
border-radius
:
$boder-radius
;
color
:
inherit
;
margin-bottom
:
0
;
padding
:
14px
15px
7px
;
...
...
@@ -557,6 +558,7 @@ code {
border-image
:
none
;
border-style
:
solid
solid
none
;
border-width
:
1px
0
;
border-radius
:
$boder-radius
;
}
.ibox-footer
{
...
...
ui/app/styles/_editor.scss
浏览文件 @
9314e45a
...
...
@@ -29,4 +29,5 @@
#sqlEditor
{
height
:
240px
;
border-radius
:
$boder-radius
;
}
ui/app/styles/_import-detail.scss
0 → 100644
浏览文件 @
9314e45a
/*******************************************************************************
* _ _ ___ ___ _ _
* | \| | __/ __| __| | |__
* | .` | _|\__ \/ _` | '_ \
* |_|\_|_| |___/\__,_|_.__/
*
* Copyright (c) 2014-2016. The NFSdb project and its contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
$stats-height
:
35px
;
.stats-switcher-viewport
{
height
:
$stats-height
;
overflow
:
hidden
;
}
.stats-switcher
{
position
:
relative
;
top
:
0
;
-webkit-transition
:
top
0
.25s
ease-in-out
;
transition
:
top
0
.25s
ease-in-out
;
}
.stats-visible
{
top
:
-
$stats-height
;
}
.import-stats-chart
{
border-radius
:
$boder-radius
;
}
.import-stats
,
.import-imported-table
,
.import-imported-stats
{
height
:
$stats-height
;
}
.import-imported-stats
{
width
:
50%
;
text-align
:
center
;
padding
:
5px
0
;
}
.import-imported
,
.import-rejected
{
height
:
8px
;
cursor
:
pointer
;
}
.import-rejected
{
width
:
10%
;
background-color
:
$red
;
}
.import-imported
{
width
:
90%
;
background-color
:
$blue
;
}
// grid
.grid
{
height
:
400px
;
padding-top
:
15px
;
}
.gh-1
{
width
:
25%
;
}
.gh-2
{
width
:
25%
;
}
.gh-3
{
width
:
20%
;
}
.gh-4
{
width
:
30%
;
}
.gc-1
{
left
:
0
;
width
:
25%
;
}
.gc-2
{
left
:
25%
;
width
:
25%
;
}
.gc-3
{
left
:
50%
;
width
:
20%
;
}
.gc-4
{
left
:
70%
;
width
:
30%
;
}
.g-dynamic-select
{
position
:
absolute
;
display
:
none
;
padding
:
0
;
}
.g-type
{
cursor
:
pointer
;
}
\ No newline at end of file
ui/app/styles/_
upload
.scss
→
ui/app/styles/_
import
.scss
浏览文件 @
9314e45a
...
...
@@ -19,13 +19,14 @@
* limitations under the License.
******************************************************************************/
$
detail
-border
:
1px
solid
#e6e6e6
;
$
grid
-border
:
1px
solid
#e6e6e6
;
$drag-drop-border
:
#c6c6c6
;
.drag-target
{
background-color
:
#e8e8e8
;
text-align
:
center
;
margin-bottom
:
30px
;
border-radius
:
$boder-radius
;
}
.drag-idle
{
...
...
@@ -38,9 +39,11 @@ $drag-drop-border: #c6c6c6;
padding
:
27px
;
}
// file list
.ud-canvas
{
position
:
relative
;
height
:
2
4
0px
;
height
:
2
0
0px
;
overflow
:
auto
;
}
...
...
@@ -49,7 +52,7 @@ $drag-drop-border: #c6c6c6;
width
:
100%
;
line-height
:
31px
;
height
:
35px
;
border-bottom
:
$
detail
-border
;
border-bottom
:
$
grid
-border
;
}
.ud-row
:hover
{
...
...
@@ -79,26 +82,22 @@ $transparent-border: 1px solid transparent;
}
.ud-c0
{
right
:
100%
;
left
:
0
;
width
:
5%
;
}
.ud-c1
{
right
:
95%
;
left
:
5%
;
width
:
65%
;
cursor
:
pointer
;
}
.ud-c2
{
right
:
30%
;
left
:
70%
;
width
:
20%
;
}
.ud-c3
{
right
:
10%
;
left
:
90%
;
width
:
10%
;
}
...
...
@@ -107,7 +106,7 @@ $transparent-border: 1px solid transparent;
display
:
inline-block
;
padding
:
5px
4px
7px
4px
;
font-weight
:
bold
;
border-bottom
:
$
detail
-border
;
border-bottom
:
$
grid
-border
;
}
.ud-h0
{
...
...
@@ -131,7 +130,3 @@ $transparent-border: 1px solid transparent;
vertical-align
:
middle
;
cursor
:
pointer
;
}
#upload-detail
{
height
:
400px
;
}
\ No newline at end of file
ui/app/styles/_variables.scss
浏览文件 @
9314e45a
...
...
@@ -42,6 +42,7 @@ $spin-margin: 0 auto;
$border-color
:
#e7eaec
;
// IBox border
$ibox-title-bg
:
#ffffff
;
// IBox Background header
$ibox-content-bg
:
#ffffff
;
// IBox Background content
$boder-radius
:
3px
;
// IBox boder radius
//Sidebar width
$sidebar-width
:
220px
;
...
...
ui/app/styles/main.scss
浏览文件 @
9314e45a
...
...
@@ -27,4 +27,5 @@ $icon-font-path: '../fonts/';
@import
"style"
;
@import
"_editor"
;
@import
"_upload"
;
@import
"import"
;
@import
"import-detail"
;
ui/bower.json
浏览文件 @
9314e45a
...
...
@@ -54,5 +54,8 @@
"devDependencies"
:
{
"chai"
:
"^3.5.0"
,
"mocha"
:
"^2.4.5"
},
"resolutions"
:
{
"mocha"
:
"^2.4.5"
}
}
ui/gulpfile.babel.js
浏览文件 @
9314e45a
...
...
@@ -111,7 +111,7 @@ gulp.task('fonts', () => {
return
gulp
.
src
(
require
(
'
main-bower-files
'
)(
'
**/*.{eot,svg,ttf,woff,woff2}
'
,
function
(
err
)
{
})
.
concat
(
'
app/fonts/**/*
'
))
.
pipe
(
gulp
.
dest
(
'
.tmp/fonts
'
))
//
.pipe(gulp.dest('.tmp/fonts'))
.
pipe
(
gulp
.
dest
(
path
.
join
(
dist
,
'
fonts
'
)));
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录