Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
862e281d
authored
Aug 16, 2018
by
许雪里
Committed by
GitHub
Aug 16, 2018
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge pull request #427 from clipperL/master
运行模式中,新增 GLUE模式(php)
parents
f0575f29
11082cd1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
1 deletions
xxl-job-admin/src/main/webapp/WEB-INF/template/jobcode/jobcode.index.ftl
xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl
xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js
xxl-job-admin/src/main/webapp/static/plugins/codemirror/mode/php/php.js
xxl-job-core/src/main/java/com/xxl/job/core/glue/GlueTypeEnum.java
xxl-job-admin/src/main/webapp/WEB-INF/template/jobcode/jobcode.index.ftl
View file @
862e281d
...
@@ -127,6 +127,9 @@
...
@@ -127,6 +127,9 @@
<
#
elseif
jobInfo
.
glueType =
=
"
GLUE_PYTHON
"
>
<
#
elseif
jobInfo
.
glueType =
=
"
GLUE_PYTHON
"
>
<
#
assign
glueTypeModeSrc =
"${request.contextPath}/static/plugins/codemirror/mode/python/python.js"
/>
<
#
assign
glueTypeModeSrc =
"${request.contextPath}/static/plugins/codemirror/mode/python/python.js"
/>
<
#
assign
glueTypeIdeMode =
"text/x-python"
/>
<
#
assign
glueTypeIdeMode =
"text/x-python"
/>
<
#
elseif
jobInfo
.
glueType =
=
"
GLUE_PHP
"
>
<
#
assign
glueTypeModeSrc =
"${request.contextPath}/static/plugins/codemirror/mode/php/php.js"
/>
<
#
assign
glueTypeIdeMode =
"text/x-php"
/>
<
#
elseif
jobInfo
.
glueType =
=
"
GLUE_NODEJS
"
>
<
#
elseif
jobInfo
.
glueType =
=
"
GLUE_NODEJS
"
>
<
#
assign
glueTypeModeSrc =
"${request.contextPath}/static/plugins/codemirror/mode/javascript/javascript.js"
/>
<
#
assign
glueTypeModeSrc =
"${request.contextPath}/static/plugins/codemirror/mode/javascript/javascript.js"
/>
<
#
assign
glueTypeIdeMode =
"text/javascript"
/>
<
#
assign
glueTypeIdeMode =
"text/javascript"
/>
...
...
xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl
View file @
862e281d
...
@@ -242,6 +242,13 @@ logging.basicConfig(level=logging.DEBUG)
...
@@ -242,6 +242,13 @@ logging.basicConfig(level=logging.DEBUG)
logging
.
info
("脚本文件:"
+
sys
.
argv
[
0
])
logging
.
info
("脚本文件:"
+
sys
.
argv
[
0
])
--
>
--
>
</textarea>
</textarea>
<
#
--
这里有问题,新建一个运行模式为
php
的任务后,
GLUE
中没有下边的
php
代码
--
>
<textarea
class=
"glueSource_php"
style=
"display:none;"
>
<?php
echo "hello php";
echo "\n"
?>
</textarea>
<textarea
class=
"glueSource_nodejs"
style=
"display:none;"
>
<textarea
class=
"glueSource_nodejs"
style=
"display:none;"
>
#!/usr/bin/env node
#!/usr/bin/env node
console.log("xxl-job: hello nodejs")
console.log("xxl-job: hello nodejs")
...
...
xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js
View file @
862e281d
...
@@ -355,7 +355,9 @@ $(function() {
...
@@ -355,7 +355,9 @@ $(function() {
$
(
"#addModal .form textarea[name='glueSource']"
).
val
(
$
(
"#addModal .form .glueSource_shell"
).
val
()
);
$
(
"#addModal .form textarea[name='glueSource']"
).
val
(
$
(
"#addModal .form .glueSource_shell"
).
val
()
);
}
else
if
(
'GLUE_PYTHON'
==
glueType
){
}
else
if
(
'GLUE_PYTHON'
==
glueType
){
$
(
"#addModal .form textarea[name='glueSource']"
).
val
(
$
(
"#addModal .form .glueSource_python"
).
val
()
);
$
(
"#addModal .form textarea[name='glueSource']"
).
val
(
$
(
"#addModal .form .glueSource_python"
).
val
()
);
}
else
if
(
'GLUE_NODEJS'
==
glueType
){
}
else
if
(
'GLUE_PHP'
==
glueType
){
$
(
"#addModal .form textarea[name='glueSource']"
).
val
(
$
(
"#addModal .form .glueSource_php"
).
val
()
);
}
else
if
(
'GLUE_NODEJS'
==
glueType
){
$
(
"#addModal .form textarea[name='glueSource']"
).
val
(
$
(
"#addModal .form .glueSource_nodejs"
).
val
()
);
$
(
"#addModal .form textarea[name='glueSource']"
).
val
(
$
(
"#addModal .form .glueSource_nodejs"
).
val
()
);
}
}
});
});
...
...
xxl-job-admin/src/main/webapp/static/plugins/codemirror/mode/php/php.js
0 → 100644
View file @
862e281d
This diff is collapsed.
Click to expand it.
xxl-job-core/src/main/java/com/xxl/job/core/glue/GlueTypeEnum.java
View file @
862e281d
...
@@ -9,6 +9,7 @@ public enum GlueTypeEnum {
...
@@ -9,6 +9,7 @@ public enum GlueTypeEnum {
GLUE_GROOVY
(
"GLUE(Java)"
,
false
,
null
,
null
),
GLUE_GROOVY
(
"GLUE(Java)"
,
false
,
null
,
null
),
GLUE_SHELL
(
"GLUE(Shell)"
,
true
,
"bash"
,
".sh"
),
GLUE_SHELL
(
"GLUE(Shell)"
,
true
,
"bash"
,
".sh"
),
GLUE_PYTHON
(
"GLUE(Python)"
,
true
,
"python"
,
".py"
),
GLUE_PYTHON
(
"GLUE(Python)"
,
true
,
"python"
,
".py"
),
GLUE_PHP
(
"GLUE模式(Php)"
,
true
,
"php"
,
".php"
),
GLUE_NODEJS
(
"GLUE(Nodejs)"
,
true
,
"node"
,
".js"
);
GLUE_NODEJS
(
"GLUE(Nodejs)"
,
true
,
"node"
,
".js"
);
private
String
desc
;
private
String
desc
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment