Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Forever310
druid
提交
019be5c3
D
druid
项目概览
Forever310
/
druid
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
druid
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
019be5c3
编写于
1月 31, 2014
作者:
F
fjy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update jquery
上级
e6d4121c
变更
17
展开全部
隐藏空白更改
内联
并排
Showing
17 changed file
with
70 addition
and
9509 deletion
+70
-9509
indexing-service/src/main/resources/indexer_static/console.html
...ng-service/src/main/resources/indexer_static/console.html
+1
-1
server/src/main/java/io/druid/db/DatabaseRuleManager.java
server/src/main/java/io/druid/db/DatabaseRuleManager.java
+2
-1
server/src/main/java/io/druid/server/http/DatasourcesResource.java
...c/main/java/io/druid/server/http/DatasourcesResource.java
+16
-7
server/src/main/java/io/druid/server/http/RulesResource.java
server/src/main/java/io/druid/server/http/RulesResource.java
+18
-0
server/src/main/resources/static/cluster.html
server/src/main/resources/static/cluster.html
+1
-1
server/src/main/resources/static/config.html
server/src/main/resources/static/config.html
+2
-2
server/src/main/resources/static/enable.html
server/src/main/resources/static/enable.html
+1
-1
server/src/main/resources/static/js/config-0.0.2.js
server/src/main/resources/static/js/config-0.0.2.js
+3
-3
server/src/main/resources/static/js/enable-0.0.1.js
server/src/main/resources/static/js/enable-0.0.1.js
+3
-4
server/src/main/resources/static/js/handlers-0.0.2.js
server/src/main/resources/static/js/handlers-0.0.2.js
+6
-4
server/src/main/resources/static/js/jquery-1.11.0.min.js
server/src/main/resources/static/js/jquery-1.11.0.min.js
+4
-0
server/src/main/resources/static/js/jquery-1.8.3.js
server/src/main/resources/static/js/jquery-1.8.3.js
+0
-9472
server/src/main/resources/static/js/kill-0.0.1.js
server/src/main/resources/static/js/kill-0.0.1.js
+2
-2
server/src/main/resources/static/js/rules-0.0.2.js
server/src/main/resources/static/js/rules-0.0.2.js
+6
-6
server/src/main/resources/static/kill.html
server/src/main/resources/static/kill.html
+1
-1
server/src/main/resources/static/rules.html
server/src/main/resources/static/rules.html
+2
-2
server/src/main/resources/static/view.html
server/src/main/resources/static/view.html
+2
-2
未找到文件。
indexing-service/src/main/resources/indexer_static/console.html
浏览文件 @
019be5c3
...
...
@@ -29,7 +29,7 @@
<style
type=
"text/css"
>
@import
"css/demo_table.css"
;
</style>
<script
type=
"text/javascript"
src=
"js/underscore-1.2.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-1.
8.3
.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-1.
11.0.min
.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery.dataTables-1.8.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/druidTable-0.0.1.js"
></script>
<script
type=
"text/javascript"
src=
"js/tablehelper-0.0.2.js"
></script>
...
...
server/src/main/java/io/druid/db/DatabaseRuleManager.java
浏览文件 @
019be5c3
...
...
@@ -263,7 +263,8 @@ public class DatabaseRuleManager
public
List
<
Rule
>
getRules
(
final
String
dataSource
)
{
return
rules
.
get
().
get
(
dataSource
);
List
<
Rule
>
retVal
=
rules
.
get
().
get
(
dataSource
);
return
retVal
==
null
?
Lists
.<
Rule
>
newArrayList
()
:
retVal
;
}
public
List
<
Rule
>
getRulesWithDefault
(
final
String
dataSource
)
...
...
server/src/main/java/io/druid/server/http/DatasourcesResource.java
浏览文件 @
019be5c3
...
...
@@ -84,8 +84,7 @@ public class DatasourcesResource
@Produces
(
"application/json"
)
public
Response
getQueryableDataSources
(
@QueryParam
(
"full"
)
String
full
,
@QueryParam
(
"simple"
)
String
simple
,
@QueryParam
(
"gran"
)
String
gran
@QueryParam
(
"simple"
)
String
simple
)
{
Response
.
ResponseBuilder
builder
=
Response
.
status
(
Response
.
Status
.
OK
);
...
...
@@ -107,9 +106,6 @@ public class DatasourcesResource
)
)
).
build
();
}
else
if
(
gran
!=
null
)
{
IndexGranularity
granularity
=
IndexGranularity
.
fromString
(
gran
);
// TODO
}
return
builder
.
entity
(
...
...
@@ -131,6 +127,7 @@ public class DatasourcesResource
@DELETE
@Path
(
"/{dataSourceName}"
)
@Produces
(
"application/json"
)
public
Response
deleteDataSource
(
@PathParam
(
"dataSourceName"
)
final
String
dataSourceName
,
@QueryParam
(
"kill"
)
final
String
kill
,
...
...
@@ -138,10 +135,22 @@ public class DatasourcesResource
)
{
if
(
indexingServiceClient
==
null
)
{
return
Response
.
status
(
Response
.
Status
.
OK
).
entity
(
ImmutableMap
.
of
(
"error"
,
"no indexing service found"
)).
build
();
return
Response
.
ok
(
).
entity
(
ImmutableMap
.
of
(
"error"
,
"no indexing service found"
)).
build
();
}
if
(
kill
!=
null
&&
Boolean
.
valueOf
(
kill
))
{
indexingServiceClient
.
killSegments
(
dataSourceName
,
new
Interval
(
interval
));
try
{
indexingServiceClient
.
killSegments
(
dataSourceName
,
new
Interval
(
interval
));
}
catch
(
Exception
e
)
{
return
Response
.
status
(
Response
.
Status
.
NOT_FOUND
)
.
entity
(
ImmutableMap
.
of
(
"error"
,
"Exception occurred. Are you sure you have an indexing service?"
)
)
.
build
();
}
}
else
{
if
(!
databaseSegmentManager
.
removeDatasource
(
dataSourceName
))
{
return
Response
.
status
(
Response
.
Status
.
NOT_FOUND
).
build
();
...
...
server/src/main/java/io/druid/server/http/RulesResource.java
浏览文件 @
019be5c3
...
...
@@ -21,13 +21,17 @@ package io.druid.server.http;
import
com.google.inject.Inject
;
import
io.druid.db.DatabaseRuleManager
;
import
io.druid.server.coordinator.rules.Rule
;
import
javax.ws.rs.Consumes
;
import
javax.ws.rs.GET
;
import
javax.ws.rs.POST
;
import
javax.ws.rs.Path
;
import
javax.ws.rs.PathParam
;
import
javax.ws.rs.Produces
;
import
javax.ws.rs.QueryParam
;
import
javax.ws.rs.core.Response
;
import
java.util.List
;
/**
*/
...
...
@@ -67,4 +71,18 @@ public class RulesResource
return
Response
.
ok
(
databaseRuleManager
.
getRules
(
dataSourceName
))
.
build
();
}
@POST
@Path
(
"/{dataSourceName}"
)
@Consumes
(
"application/json"
)
public
Response
setDatasourceRules
(
@PathParam
(
"dataSourceName"
)
final
String
dataSourceName
,
final
List
<
Rule
>
rules
)
{
if
(
databaseRuleManager
.
overrideRule
(
dataSourceName
,
rules
))
{
return
Response
.
ok
().
build
();
}
return
Response
.
status
(
Response
.
Status
.
INTERNAL_SERVER_ERROR
).
build
();
}
}
server/src/main/resources/static/cluster.html
浏览文件 @
019be5c3
...
...
@@ -29,7 +29,7 @@
<style
type=
"text/css"
>
@import
"css/demo_table.css"
;
</style>
<script
type=
"text/javascript"
src=
"js/underscore-1.2.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-1.
8.3
.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-1.
11.0.min
.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery.dataTables-1.8.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/druidTable-0.0.1.js"
></script>
<script
type=
"text/javascript"
src=
"js/init-0.0.2.js"
></script>
...
...
server/src/main/resources/static/config.html
浏览文件 @
019be5c3
...
...
@@ -30,9 +30,9 @@
<style
type=
"text/css"
>
@import
"css/config.css"
;
</style>
<script
type=
"text/javascript"
src=
"js/underscore-1.2.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-1.
8.3
.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-1.
11.0.min
.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-ui-1.9.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/config-0.0.
1
.js"
></script>
<script
type=
"text/javascript"
src=
"js/config-0.0.
2
.js"
></script>
</head>
<body>
<div
class=
"container"
>
...
...
server/src/main/resources/static/enable.html
浏览文件 @
019be5c3
...
...
@@ -30,7 +30,7 @@
<style
type=
"text/css"
>
@import
"css/enable.css"
;
</style>
<script
type=
"text/javascript"
src=
"js/underscore-1.2.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-1.
8.3
.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-1.
11.0.min
.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-ui-1.9.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/enable-0.0.1.js"
></script>
</head>
...
...
server/src/main/resources/static/js/config-0.0.
1
.js
→
server/src/main/resources/static/js/config-0.0.
2
.js
浏览文件 @
019be5c3
...
...
@@ -20,7 +20,7 @@ function domToConfig(configDiv) {
}
function
getConfigs
()
{
$
.
getJSON
(
"
/
coordinator
/config
"
,
function
(
data
)
{
$
.
getJSON
(
"
/
druid/coordinator/v1
/config
"
,
function
(
data
)
{
$
(
'
#config_list
'
).
empty
();
$
.
each
(
data
,
function
(
key
,
value
)
{
...
...
@@ -72,10 +72,10 @@ $(document).ready(function() {
$
.
ajax
({
type
:
'
POST
'
,
url
:
'
/
coordinator
/config
'
,
url
:
'
/
druid/coordinator/v1
/config
'
,
data
:
JSON
.
stringify
(
configs
),
contentType
:
"
application/json; charset=utf-8
"
,
dataType
:
"
json
"
,
dataType
:
"
text
"
,
error
:
function
(
xhr
,
status
,
error
)
{
$
(
"
#update_dialog
"
).
dialog
(
"
close
"
);
$
(
"
#error_dialog
"
).
html
(
xhr
.
responseText
);
...
...
server/src/main/resources/static/js/enable-0.0.1.js
浏览文件 @
019be5c3
...
...
@@ -24,7 +24,7 @@ $(document).ready(function() {
url
:
'
/druid/coordinator/v1/datasources/
'
+
selected
,
data
:
JSON
.
stringify
(
selected
),
contentType
:
"
application/json; charset=utf-8
"
,
dataType
:
"
json
"
,
dataType
:
"
text
"
,
error
:
function
(
xhr
,
status
,
error
)
{
$
(
"
#enable_dialog
"
).
dialog
(
"
close
"
);
$
(
"
#error_dialog
"
).
html
(
xhr
.
responseText
);
...
...
@@ -53,7 +53,7 @@ $(document).ready(function() {
url
:
'
/druid/coordinator/v1/datasources/
'
+
selected
,
data
:
JSON
.
stringify
(
selected
),
contentType
:
"
application/json; charset=utf-8
"
,
dataType
:
"
json
"
,
dataType
:
"
text
"
,
error
:
function
(
xhr
,
status
,
error
)
{
$
(
"
#disable_dialog
"
).
dialog
(
"
close
"
);
$
(
"
#error_dialog
"
).
html
(
xhr
.
responseText
);
...
...
@@ -81,12 +81,11 @@ $(document).ready(function() {
$
(
'
#disabled_datasources
'
).
append
(
$
(
'
<li>
'
+
datasource
+
'
</li>
'
));
});
$
.
each
(
db_datasources
,
function
(
index
,
datasource
)
{
$
(
'
#datasources
'
).
append
(
$
(
'
<option></option>
'
).
attr
(
"
value
"
,
datasource
).
text
(
datasource
));
$
(
'
#datasources
'
).
append
(
$
(
'
<option></option>
'
).
val
(
datasource
).
text
(
datasource
));
});
});
});
$
(
"
#enable
"
).
click
(
function
()
{
$
(
"
#enable_dialog
"
).
dialog
(
"
open
"
);
});
...
...
server/src/main/resources/static/js/handlers-0.0.
1
.js
→
server/src/main/resources/static/js/handlers-0.0.
2
.js
浏览文件 @
019be5c3
...
...
@@ -3,11 +3,12 @@
$
(
document
).
ready
(
function
()
{
var
basePath
=
"
/druid/coordinator/v1/
"
;
var
type
=
$
(
'
#select_type
'
).
attr
(
'
value
'
)
+
''
;
var
view
=
$
(
'
#select_view
'
).
attr
(
'
value
'
)
+
''
;
var
type
=
$
(
'
#select_type
'
).
val
(
)
+
''
;
var
view
=
$
(
'
#select_view
'
).
val
(
)
+
''
;
function
handleTable
(
dontDisplay
)
{
console
.
log
(
type
);
$
.
get
(
basePath
+
type
+
'
?full
'
,
function
(
data
)
{
buildTable
(
data
,
$
(
'
#result_table
'
),
dontDisplay
);
...
...
@@ -75,8 +76,9 @@ $(document).ready(function() {
}
$
(
'
#view_button
'
).
click
(
function
()
{
type
=
$
(
'
#select_type
'
).
attr
(
'
value
'
)
+
''
;
view
=
$
(
'
#select_view
'
).
attr
(
'
value
'
)
+
''
;
console
.
log
(
"
here
"
);
type
=
$
(
'
#select_type
'
).
val
()
+
''
;
view
=
$
(
'
#select_view
'
).
val
()
+
''
;
resetViews
();
...
...
server/src/main/resources/static/js/jquery-1.11.0.min.js
0 → 100644
浏览文件 @
019be5c3
此差异已折叠。
点击以展开。
server/src/main/resources/static/js/jquery-1.8.3.js
已删除
100644 → 0
浏览文件 @
e6d4121c
此差异已折叠。
点击以展开。
server/src/main/resources/static/js/kill-0.0.1.js
浏览文件 @
019be5c3
...
...
@@ -24,7 +24,7 @@ $(document).ready(function() {
type
:
'
DELETE
'
,
url
:
'
/druid/coordinator/v1/datasources/
'
+
selected
+
'
?kill=true&interval=
'
+
interval
,
contentType
:
"
application/json; charset=utf-8
"
,
dataType
:
"
json
"
,
dataType
:
"
text
"
,
error
:
function
(
xhr
,
status
,
error
)
{
$
(
"
#confirm_dialog
"
).
dialog
(
"
close
"
);
$
(
"
#error_dialog
"
).
html
(
xhr
.
responseText
);
...
...
@@ -43,7 +43,7 @@ $(document).ready(function() {
$
.
getJSON
(
"
/druid/coordinator/v1/db/datasources?includeDisabled
"
,
function
(
data
)
{
$
.
each
(
data
,
function
(
index
,
datasource
)
{
$
(
'
#datasources
'
).
append
(
$
(
'
<option></option>
'
).
attr
(
"
value
"
,
datasource
).
text
(
datasource
));
$
(
'
#datasources
'
).
append
(
$
(
'
<option></option>
'
).
val
(
datasource
).
text
(
datasource
));
});
});
...
...
server/src/main/resources/static/js/rules-0.0.
1
.js
→
server/src/main/resources/static/js/rules-0.0.
2
.js
浏览文件 @
019be5c3
...
...
@@ -243,7 +243,7 @@ $(document).ready(function() {
url
:
'
/druid/coordinator/v1/rules/
'
+
selected
,
data
:
JSON
.
stringify
(
rules
),
contentType
:
"
application/json; charset=utf-8
"
,
dataType
:
"
json
"
,
dataType
:
"
text
"
,
error
:
function
(
xhr
,
status
,
error
)
{
$
(
"
#update_dialog
"
).
dialog
(
"
close
"
);
$
(
"
#error_dialog
"
).
html
(
xhr
.
responseText
);
...
...
@@ -266,9 +266,9 @@ $(document).ready(function() {
$
.
getJSON
(
"
/druid/coordinator/v1/db/datasources
"
,
function
(
data
)
{
$
.
each
(
data
,
function
(
index
,
datasource
)
{
$
(
'
#datasources
'
).
append
(
$
(
'
<option></option>
'
).
attr
(
"
value
"
,
datasource
).
text
(
datasource
));
$
(
'
#datasources
'
).
append
(
$
(
'
<option></option>
'
).
val
(
datasource
).
text
(
datasource
));
});
$
(
'
#datasources
'
).
append
(
$
(
'
<option></option>
'
).
attr
(
"
value
"
,
defaultDatasource
).
text
(
defaultDatasource
));
$
(
'
#datasources
'
).
append
(
$
(
'
<option></option>
'
).
val
(
defaultDatasource
).
text
(
defaultDatasource
));
});
$
(
"
#datasources
"
).
change
(
function
(
event
)
{
...
...
@@ -276,7 +276,7 @@ $(document).ready(function() {
$
(
"
#rules
"
).
show
();
});
$
(
"
.rule_dropdown_types
"
).
live
(
"
change
"
,
function
(
event
)
{
$
(
document
).
on
(
"
change
"
,
'
.rule_dropdown_types
'
,
null
,
function
(
event
)
{
var
newRule
=
{
"
type
"
:
$
(
event
.
target
).
val
()
};
...
...
@@ -284,11 +284,11 @@ $(document).ready(function() {
ruleBody
.
replaceWith
(
makeRuleBody
(
newRule
));
});
$
(
"
.delete_rule
"
).
live
(
"
click
"
,
function
(
event
)
{
$
(
document
).
on
(
"
click
"
,
'
.delete_rule
'
,
null
,
function
(
event
)
{
$
(
event
.
target
).
parent
(
"
.rule
"
).
remove
();
});
$
(
"
.add_tier
"
).
live
(
"
click
"
,
function
(
event
)
{
$
(
document
).
on
(
"
click
"
,
'
.add_tier
'
,
null
,
function
(
event
)
{
$
(
event
.
target
).
parent
().
append
(
makeTierLoad
(
null
,
0
));
});
...
...
server/src/main/resources/static/kill.html
浏览文件 @
019be5c3
...
...
@@ -29,7 +29,7 @@
<style
type=
"text/css"
>
@import
"css/jquery-ui-1.9.2.css"
;
</style>
<script
type=
"text/javascript"
src=
"js/underscore-1.2.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-1.
8.3
.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-1.
11.0.min
.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-ui-1.9.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/kill-0.0.1.js"
></script>
</head>
...
...
server/src/main/resources/static/rules.html
浏览文件 @
019be5c3
...
...
@@ -30,9 +30,9 @@
<style
type=
"text/css"
>
@import
"css/rules.css"
;
</style>
<script
type=
"text/javascript"
src=
"js/underscore-1.2.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-1.
8.3
.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-1.
11.0.min
.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-ui-1.9.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/rules-0.0.
1
.js"
></script>
<script
type=
"text/javascript"
src=
"js/rules-0.0.
2
.js"
></script>
</head>
<body>
<div
class=
"container"
>
...
...
server/src/main/resources/static/view.html
浏览文件 @
019be5c3
...
...
@@ -30,11 +30,11 @@
<style
type=
"text/css"
>
@import
"css/index.css"
;
</style>
<script
type=
"text/javascript"
src=
"js/underscore-1.2.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-1.
8.3
.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-1.
11.0.min
.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery.dataTables-1.8.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/druidTable-0.0.1.js"
></script>
<script
type=
"text/javascript"
src=
"js/tablehelper-0.0.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/handlers-0.0.
1
.js"
></script>
<script
type=
"text/javascript"
src=
"js/handlers-0.0.
2
.js"
></script>
</head>
<body>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录