Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
-布谷鸟-
nosqlclient
提交
510ec1c7
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,体验更适合开发者的 AI 搜索 >>
提交
510ec1c7
编写于
4月 27, 2016
作者:
S
Sercan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
under heavy development #50
上级
9427e3ee
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
75 addition
and
8 deletion
+75
-8
client/views/layouts/top_navbar/top_navbar.html
client/views/layouts/top_navbar/top_navbar.html
+1
-1
client/views/layouts/top_navbar/top_navbar.js
client/views/layouts/top_navbar/top_navbar.js
+60
-4
lib/collections/connections.js
lib/collections/connections.js
+14
-3
未找到文件。
client/views/layouts/top_navbar/top_navbar.html
浏览文件 @
510ec1c7
...
...
@@ -60,7 +60,7 @@
<tr>
<th>
_id
</th>
<th>
Connection Name
</th>
<th>
Url
</th>
<th>
U
se U
rl
</th>
<th>
Use Ssl
</th>
<th>
Hostname
</th>
<th>
Port
</th>
...
...
client/views/layouts/top_navbar/top_navbar.js
浏览文件 @
510ec1c7
...
...
@@ -39,11 +39,20 @@ Template.topNavbar.events({
'
click #btnCreateNewConnection
'
:
function
()
{
$
(
'
#inputConnectionName
'
).
val
(
''
);
$
(
'
#inputConnectionNameForUrl
'
).
val
(
''
);
$
(
'
#inputUrl
'
).
val
(
''
);
$
(
'
#inputHost
'
).
val
(
''
);
$
(
'
#inputPort
'
).
val
(
'
27017
'
);
$
(
'
#inputDatabaseName
'
).
val
(
''
);
$
(
'
#inputUser
'
).
val
(
''
);
$
(
'
#inputPassword
'
).
val
(
''
);
$
(
'
#inputAuthenticationDB
'
).
val
(
''
);
$
(
'
#inputPassphrase
'
).
val
(
''
);
$
(
"
:file
"
).
filestyle
(
'
clear
'
);
$
(
'
#inputUseUrl
'
).
iCheck
(
'
uncheck
'
);
$
(
'
#inputUseSSL
'
).
iCheck
(
'
uncheck
'
);
$
(
'
#inputAuthStandard
'
).
iCheck
(
'
check
'
);
},
'
click #btnConnectionList
'
:
function
()
{
...
...
@@ -68,8 +77,45 @@ Template.topNavbar.events({
'
click .editor_edit
'
:
function
(
e
)
{
e
.
preventDefault
();
$
(
'
#connectionEditModal
'
).
modal
(
'
show
'
);
var
connection
=
Connections
.
findOne
({
_id
:
Session
.
get
(
Template
.
strSessionConnection
)});
$
(
'
#inputConnectionName
'
).
val
(
connection
.
name
);
$
(
'
#inputHost
'
).
val
(
connection
.
host
);
$
(
'
#inputPort
'
).
val
(
connection
.
port
);
$
(
'
#inputDatabaseName
'
).
val
(
connection
.
databaseName
);
$
(
'
#inputUser
'
).
val
(
connection
.
user
);
$
(
'
#inputPassword
'
).
val
(
connection
.
password
);
$
(
'
#inputAuthenticationDB
'
).
val
(
connection
.
authDatabaseName
);
$
(
'
#inputPassphrase
'
).
val
(
connection
.
passphrase
);
if
(
connection
.
useSsl
)
{
$
(
'
#inputUseSSL
'
).
iCheck
(
'
check
'
);
}
else
{
$
(
'
#inputUseSSL
'
).
iCheck
(
'
uncheck
'
);
}
if
(
connection
.
sslCertificatePath
)
{
$
(
'
#inputAuthStandard
'
).
iCheck
(
'
uncheck
'
);
$
(
'
#inputAuthCertificate
'
).
iCheck
(
'
check
'
);
$
(
"
#inputCertificatePath
"
).
find
(
"
:file
"
).
filestyle
(
'
input
'
,
connection
.
sslCertificatePath
);
$
(
"
#inputRootCa :file
"
).
filestyle
(
'
input
'
,
connection
.
rootCACertificatePath
);
}
else
{
$
(
'
#inputAuthStandard
'
).
iCheck
(
'
check
'
);
$
(
'
#inputAuthCertificate
'
).
iCheck
(
'
uncheck
'
);
$
(
"
:file
"
).
filestyle
(
'
clear
'
);
}
if
(
connection
.
url
)
{
$
(
'
#inputUseUrl
'
).
iCheck
(
'
check
'
);
$
(
'
#inputUrl
'
).
val
(
connection
.
url
);
$
(
'
#inputConnectionNameForUrl
'
).
val
(
connection
.
name
);
}
else
{
$
(
'
#inputUseUrl
'
).
iCheck
(
'
uncheck
'
);
$
(
'
#inputUrl
'
).
val
(
''
);
$
(
'
#inputConnectionNameForUrl
'
).
val
(
''
);
}
$
(
'
#connectionModal
'
).
modal
(
'
show
'
);
},
// Toggle left navigation
...
...
@@ -172,7 +218,7 @@ Template.topNavbar.events({
}
},
'
click #anchorTab2
'
:
function
(
e
)
{
'
click #anchorTab2
'
:
function
()
{
if
(
!
$
(
'
#anchorTab2
'
).
attr
(
'
data-toggle
'
))
{
toastr
.
warning
(
'
Disable URI connection to use this tab
'
);
}
...
...
@@ -250,12 +296,12 @@ Template.topNavbar.initIChecks = function () {
checkboxClass
:
'
icheckbox_square-green
'
});
inputAuthStandardSelector
.
on
(
'
ifChecked
'
,
function
(
event
)
{
inputAuthStandardSelector
.
on
(
'
ifChecked
'
,
function
()
{
formStandardAuthSelector
.
show
();
formCertificateAuthSelector
.
hide
();
});
$
(
'
#inputAuthCertificate
'
).
on
(
'
ifChecked
'
,
function
(
event
)
{
$
(
'
#inputAuthCertificate
'
).
on
(
'
ifChecked
'
,
function
()
{
formStandardAuthSelector
.
hide
();
formCertificateAuthSelector
.
show
();
});
...
...
@@ -287,6 +333,7 @@ Template.topNavbar.populateConnectionsTable = function () {
if
(
$
.
fn
.
dataTable
.
isDataTable
(
'
#tblConnection
'
))
{
tblConnections
.
DataTable
().
destroy
();
}
tblConnections
.
DataTable
({
data
:
Connections
.
find
().
fetch
(),
columns
:
[
...
...
@@ -298,6 +345,15 @@ Template.topNavbar.populateConnectionsTable = function () {
{
data
:
"
port
"
}
],
columnDefs
:
[
{
targets
:
[
2
],
render
:
function
(
data
)
{
if
(
!
data
)
{
return
'
false
'
;
}
return
'
true
'
;
}
},
{
targets
:
[
6
],
data
:
null
,
...
...
lib/collections/connections.js
浏览文件 @
510ec1c7
...
...
@@ -15,17 +15,28 @@ Connections.attachSchema(new SimpleSchema({
type
:
"
String
"
,
optional
:
true
},
rootCACertificatePath
:
{
type
:
"
String
"
,
optional
:
true
},
passphrase
:
{
type
:
"
String
"
,
optional
:
true
},
name
:
{
type
:
"
String
"
},
host
:
{
type
:
"
String
"
type
:
"
String
"
,
optional
:
true
},
port
:
{
type
:
"
Number
"
type
:
"
Number
"
,
optional
:
true
},
databaseName
:
{
type
:
"
String
"
type
:
"
String
"
,
optional
:
true
},
authDatabaseName
:
{
type
:
"
String
"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录