Skip to content

Commit

Permalink
[INLONG-11210][Dashboard] Version management removes related interfac…
Browse files Browse the repository at this point in the history
…e calls and adds default values
  • Loading branch information
wohainilaodou committed Oct 8, 2024
1 parent c60a4c4 commit 764e5e4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions inlong-dashboard/src/ui/pages/AgentModule/CreateModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ const Comp: React.FC<Props> = ({ id, type, ...modalProps }) => {
type: 'textarea',
label: i18n.t('pages.ModuleAgent.Config.CheckCommand'),
name: 'checkCommand',
initialValue: "ps aux | grep core.AgentMain | grep java | grep -v grep | awk '{print $2}'",
props: {
showCount: true,
maxLength: 1000,
Expand All @@ -100,6 +101,8 @@ const Comp: React.FC<Props> = ({ id, type, ...modalProps }) => {
type: 'textarea',
label: i18n.t('pages.ModuleAgent.Config.InstallCommand'),
name: 'installCommand',
initialValue:
'cd ~/inlong/inlong-agent/bin;sh agent.sh stop;rm -rf ~/inlong/inlong-agent-temp;mkdir -p ~/inlong/inlong-agent-temp;cp -r ~/inlong/inlong-agent/.localdb ',
props: {
showCount: true,
maxLength: 1000,
Expand All @@ -109,6 +112,7 @@ const Comp: React.FC<Props> = ({ id, type, ...modalProps }) => {
type: 'textarea',
label: i18n.t('pages.ModuleAgent.Config.StartCommand'),
name: 'startCommand',
initialValue: 'cd ~/inlong/inlong-agent/bin;sh agent.sh start',
props: {
showCount: true,
maxLength: 1000,
Expand All @@ -118,6 +122,7 @@ const Comp: React.FC<Props> = ({ id, type, ...modalProps }) => {
type: 'textarea',
label: i18n.t('pages.ModuleAgent.Config.StopCommand'),
name: 'stopCommand',
initialValue: 'cd ~/inlong/inlong-agent/bin;sh agent.sh stop',
props: {
showCount: true,
maxLength: 1000,
Expand All @@ -127,6 +132,7 @@ const Comp: React.FC<Props> = ({ id, type, ...modalProps }) => {
type: 'textarea',
label: i18n.t('pages.ModuleAgent.Config.UninstallCommand'),
name: 'uninstallCommand',
initialValue: 'echo empty uninstall cmd',
props: {
showCount: true,
maxLength: 1000,
Expand All @@ -142,12 +148,7 @@ const Comp: React.FC<Props> = ({ id, type, ...modalProps }) => {
{
manual: true,
onSuccess: result => {
if (isCreate) {
form.resetFields();
form.setFieldsValue({ ...result, name: '', version: '', packageId: '' });
} else {
form.setFieldsValue(result);
}
form.setFieldsValue(result);
},
},
);
Expand Down Expand Up @@ -177,7 +178,6 @@ const Comp: React.FC<Props> = ({ id, type, ...modalProps }) => {
} else {
setCreate(true);
// here need a data which id is 1 to init create form
getData(1);
}
} else {
form.resetFields();
Expand Down

0 comments on commit 764e5e4

Please sign in to comment.