Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
-布谷鸟-
nosqlclient
提交
233ca0bc
N
nosqlclient
项目概览
-布谷鸟-
/
nosqlclient
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
nosqlclient
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
233ca0bc
编写于
5月 06, 2017
作者:
R
rsercano
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#352
上级
75e649fe
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
38 addition
and
33 deletion
+38
-33
client/imports/views/layouts/navigation/navigation.js
client/imports/views/layouts/navigation/navigation.js
+24
-25
client/imports/views/pages/mc_shell/mc_shell.js
client/imports/views/pages/mc_shell/mc_shell.js
+4
-1
client/imports/views/pages/schema_analyzer/schema_analyzer.js
...nt/imports/views/pages/schema_analyzer/schema_analyzer.js
+5
-2
server/imports/mongodb/methods_user_management.js
server/imports/mongodb/methods_user_management.js
+3
-3
server/imports/publishers/publisher.js
server/imports/publishers/publisher.js
+2
-2
未找到文件。
client/imports/views/layouts/navigation/navigation.js
浏览文件 @
233ca0bc
...
...
@@ -339,31 +339,6 @@ Template.navigation.onRendered(function () {
toastr
.
warning
(
'
No collection selected !
'
);
}
}
},
drop_collection
:
{
name
:
"
Drop Collection
"
,
icon
:
"
fa-trash
"
,
callback
:
function
()
{
if
(
$
(
this
)
&&
$
(
this
).
context
&&
$
(
this
).
context
.
innerText
)
{
const
collectionName
=
$
(
this
).
context
.
innerText
.
substring
(
1
).
split
(
'
'
)[
0
];
swal
({
title
:
"
Are you sure?
"
,
text
:
collectionName
+
"
collection will be dropped, are you sure ?
"
,
type
:
"
warning
"
,
showCancelButton
:
true
,
confirmButtonColor
:
"
#DD6B55
"
,
confirmButtonText
:
"
Yes, drop it!
"
,
closeOnConfirm
:
true
},
function
(
isConfirm
)
{
if
(
isConfirm
)
{
dropCollection
(
collectionName
);
}
});
}
else
{
toastr
.
warning
(
'
No collection selected !
'
);
}
}
}
}
},
...
...
@@ -401,6 +376,30 @@ Template.navigation.onRendered(function () {
connect
(
true
);
}
},
drop_collection
:
{
name
:
"
Drop Collection
"
,
icon
:
"
fa-trash
"
,
callback
:
function
()
{
if
(
$
(
this
)
&&
$
(
this
).
context
&&
$
(
this
).
context
.
innerText
)
{
const
collectionName
=
$
(
this
).
context
.
innerText
.
substring
(
1
).
split
(
'
'
)[
0
];
swal
({
title
:
"
Are you sure?
"
,
text
:
collectionName
+
"
collection will be dropped, are you sure ?
"
,
type
:
"
warning
"
,
showCancelButton
:
true
,
confirmButtonColor
:
"
#DD6B55
"
,
confirmButtonText
:
"
Yes, drop it!
"
,
closeOnConfirm
:
true
},
function
(
isConfirm
)
{
if
(
isConfirm
)
{
dropCollection
(
collectionName
);
}
});
}
else
{
toastr
.
warning
(
'
No collection selected !
'
);
}
}
},
drop_collections
:
{
name
:
"
Drop All Collections
"
,
icon
:
"
fa-ban
"
,
...
...
client/imports/views/pages/mc_shell/mc_shell.js
浏览文件 @
233ca0bc
...
...
@@ -196,7 +196,10 @@ Template.mcShell.onRendered(function () {
Helper
.
initializeCodeMirror
(
divResult
,
'
txtShellResult
'
,
false
,
600
);
divResult
.
data
(
'
editor
'
).
setOption
(
"
readOnly
"
,
true
);
ShellCommands
.
find
({
connectionId
:
Session
.
get
(
Helper
.
strSessionConnection
)},
{
sort
:
{
date
:
-
1
}}).
observeChanges
({
ShellCommands
.
find
({
connectionId
:
Session
.
get
(
Helper
.
strSessionConnection
),
sessionId
:
Meteor
.
default_connection
.
_lastSessionId
},
{
sort
:
{
date
:
-
1
}}).
observeChanges
({
added
:
function
(
id
,
fields
)
{
let
previousValue
=
Helper
.
getCodeMirrorValue
(
divResult
);
if
(
previousValue
&&
!
previousValue
.
endsWith
(
'
\n
'
))
{
...
...
client/imports/views/pages/schema_analyzer/schema_analyzer.js
浏览文件 @
233ca0bc
...
...
@@ -134,7 +134,10 @@ Template.schemaAnalyzer.onRendered(function () {
if
(
connections
.
ready
()
&&
settings
.
ready
()
&&
schemaAnalyzeResult
.
ready
())
{
Helper
.
initializeCollectionsCombobox
();
SchemaAnalyzeResult
.
find
({
connectionId
:
Session
.
get
(
Helper
.
strSessionConnection
)},
{
sort
:
{
date
:
-
1
}}).
observeChanges
({
SchemaAnalyzeResult
.
find
({
connectionId
:
Session
.
get
(
Helper
.
strSessionConnection
),
sessionId
:
Meteor
.
default_connection
.
_lastSessionId
},
{
sort
:
{
date
:
-
1
}}).
observeChanges
({
added
:
function
(
id
,
fields
)
{
let
jsonData
=
Helper
.
convertAndCheckJSON
(
fields
.
message
);
if
(
jsonData
[
'
ERROR
'
])
{
...
...
@@ -173,7 +176,7 @@ Template.schemaAnalyzer.events({
Ladda
.
create
(
document
.
querySelector
(
'
#btnAnalyzeNow
'
)).
start
();
Meteor
.
call
(
"
analyzeSchema
"
,
Session
.
get
(
Helper
.
strSessionConnection
),
Meteor
.
default_connection
.
_lastSessionId
,
collection
,
(
err
)
=>
{
Meteor
.
call
(
"
analyzeSchema
"
,
Session
.
get
(
Helper
.
strSessionConnection
),
collection
,
Meteor
.
default_connection
.
_lastSessionId
,
(
err
)
=>
{
if
(
err
)
{
Helper
.
showMeteorFuncError
(
err
,
null
,
"
Couldn't analyze collection
"
);
}
...
...
server/imports/mongodb/methods_user_management.js
浏览文件 @
233ca0bc
/**
* Created by RSercan on 10.1.2016.
*/
import
{
Meteor
}
from
'
meteor/meteor
'
;
import
{
Actions
}
from
'
/lib/imports/collections/actions
'
;
import
{
Meteor
}
from
"
meteor/meteor
"
;
import
{
Actions
}
from
"
/lib/imports/collections/actions
"
;
import
LOGGER
from
"
../internal/logger
"
;
const
cheerio
=
require
(
'
cheerio
'
);
...
...
@@ -60,7 +60,7 @@ Meteor.methods({
let
loadedUrl
=
load
(
url
);
fixHrefs
(
url
,
loadedUrl
);
return
loadedUrl
(
"
dt[id='
authr.
"
+
action
+
"
']
"
).
parent
(
'
dl[class=authaction]
'
).
children
(
'
dd
'
).
html
();
return
loadedUrl
(
"
dt[id='
"
+
action
+
"
']
"
).
parent
(
'
dl[class=authaction]
'
).
children
(
'
dd
'
).
html
();
},
getRoleInfo
(
roleName
)
{
...
...
server/imports/publishers/publisher.js
浏览文件 @
233ca0bc
...
...
@@ -11,11 +11,11 @@ import ShellCommands from "/lib/imports/collections/shell";
import
SchemaAnalyzeResult
from
"
/lib/imports/collections/schema_analyze_result
"
;
Meteor
.
publish
(
'
schema_analyze_result
'
,
function
()
{
return
SchemaAnalyzeResult
.
find
({
sessionId
:
Meteor
.
default_connection
.
_lastSessionId
});
return
SchemaAnalyzeResult
.
find
({});
});
Meteor
.
publish
(
'
shell_commands
'
,
function
()
{
return
ShellCommands
.
find
({
sessionId
:
Meteor
.
default_connection
.
_lastSessionId
});
return
ShellCommands
.
find
({});
});
Meteor
.
publish
(
'
connections
'
,
function
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录