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
617ed697
authored
Apr 26, 2017
by
xueli.xue
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
GLUE示例代码初始化
parent
7a781ad3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
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/WEB-INF/template/jobinfo/jobinfo.index.ftl
View file @
617ed697
...
@@ -169,7 +169,8 @@
...
@@ -169,7 +169,8 @@
</div>
</div>
<input
type=
"hidden"
name=
"glueRemark"
value=
"GLUE代码初始化"
>
<input
type=
"hidden"
name=
"glueRemark"
value=
"GLUE代码初始化"
>
<textarea
name=
"glueSource"
style=
"display:none;"
>
<textarea
name=
"glueSource"
style=
"display:none;"
></textarea>
<textarea
class=
"glueSource_java"
style=
"display:none;"
>
package com.xxl.job.service.handler;
package com.xxl.job.service.handler;
import org.slf4j.Logger;
import org.slf4j.Logger;
...
@@ -189,7 +190,7 @@ public class DemoGlueJobHandler extends IJobHandler {
...
@@ -189,7 +190,7 @@ public class DemoGlueJobHandler extends IJobHandler {
}
}
</textarea>
</textarea>
<textarea
name
=
"glueSource_shell"
style=
"display:none;"
>
<textarea
class
=
"glueSource_shell"
style=
"display:none;"
>
#!/bin/bash
#!/bin/bash
echo hello shell
echo hello shell
...
@@ -204,7 +205,7 @@ echo1 111
...
@@ -204,7 +205,7 @@ echo1 111
printf 666
printf 666
echo2 222
echo2 222
</textarea>
</textarea>
<textarea
name
=
"glueSource_python"
style=
"display:none;"
>
<textarea
class
=
"glueSource_python"
style=
"display:none;"
>
#!/usr/bin/python
#!/usr/bin/python
# -*- coding: UTF-8 -*-
# -*- coding: UTF-8 -*-
...
...
xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js
View file @
617ed697
...
@@ -297,9 +297,9 @@ $(function() {
...
@@ -297,9 +297,9 @@ $(function() {
// GLUE模式开启
// GLUE模式开启
$
(
".glueType"
).
change
(
function
(){
$
(
".glueType"
).
change
(
function
(){
// executorHandler
var
$executorHandler
=
$
(
this
).
parents
(
"form"
).
find
(
"input[name='executorHandler']"
);
var
$executorHandler
=
$
(
this
).
parents
(
"form"
).
find
(
"input[name='executorHandler']"
);
var
glueType
=
$
(
this
).
val
();
var
glueType
=
$
(
this
).
val
();
console
.
log
(
glueType
);
if
(
'BEAN'
!=
glueType
)
{
if
(
'BEAN'
!=
glueType
)
{
$executorHandler
.
val
(
""
);
$executorHandler
.
val
(
""
);
$executorHandler
.
attr
(
"readonly"
,
"readonly"
);
$executorHandler
.
attr
(
"readonly"
,
"readonly"
);
...
@@ -308,6 +308,18 @@ $(function() {
...
@@ -308,6 +308,18 @@ $(function() {
}
}
});
});
$
(
"#addModal .glueType"
).
change
(
function
(){
// glueSource
var
glueType
=
$
(
this
).
val
();
if
(
'GLUE_GROOVY'
==
glueType
){
$
(
"#addModal .form textarea[name='glueSource']"
).
val
(
$
(
"#addModal .form .glueSource_java"
).
val
()
);
}
else
if
(
'GLUE_SHELL'
==
glueType
){
$
(
"#addModal .form textarea[name='glueSource']"
).
val
(
$
(
"#addModal .form .glueSource_shell"
).
val
()
);
}
else
if
(
'GLUE_PYTHON'
==
glueType
){
$
(
"#addModal .form textarea[name='glueSource']"
).
val
(
$
(
"#addModal .form .glueSource_python"
).
val
()
);
}
});
// 更新
// 更新
$
(
"#job_list"
).
on
(
'click'
,
'.update'
,
function
()
{
$
(
"#job_list"
).
on
(
'click'
,
'.update'
,
function
()
{
...
...
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