diff --git a/inlong-dashboard/src/ui/pages/AgentModule/CreateModal.tsx b/inlong-dashboard/src/ui/pages/AgentModule/CreateModal.tsx index 68adb5d06c..09d5b77e8d 100644 --- a/inlong-dashboard/src/ui/pages/AgentModule/CreateModal.tsx +++ b/inlong-dashboard/src/ui/pages/AgentModule/CreateModal.tsx @@ -91,7 +91,10 @@ const Comp: React.FC = ({ 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}'", + initialValue: + type === 'INSTALLER' + ? 'echo "installer"' + : "ps aux | grep core.AgentMain | grep java | grep -v grep | awk '{print $2}'", props: { showCount: true, maxLength: 1000, @@ -102,7 +105,9 @@ const Comp: React.FC = ({ id, type, ...modalProps }) => { 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 ', + type === 'INSTALLER' + ? 'echo ""' + : '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, @@ -112,7 +117,8 @@ const Comp: React.FC = ({ id, type, ...modalProps }) => { type: 'textarea', label: i18n.t('pages.ModuleAgent.Config.StartCommand'), name: 'startCommand', - initialValue: 'cd ~/inlong/inlong-agent/bin;sh agent.sh start', + initialValue: + type === 'INSTALLER' ? 'echo ""' : 'cd ~/inlong/inlong-agent/bin;sh agent.sh start', props: { showCount: true, maxLength: 1000, @@ -122,7 +128,8 @@ const Comp: React.FC = ({ id, type, ...modalProps }) => { type: 'textarea', label: i18n.t('pages.ModuleAgent.Config.StopCommand'), name: 'stopCommand', - initialValue: 'cd ~/inlong/inlong-agent/bin;sh agent.sh stop', + initialValue: + type === 'INSTALLER' ? 'echo ""' : 'cd ~/inlong/inlong-agent/bin;sh agent.sh stop', props: { showCount: true, maxLength: 1000, @@ -132,7 +139,7 @@ const Comp: React.FC = ({ id, type, ...modalProps }) => { type: 'textarea', label: i18n.t('pages.ModuleAgent.Config.UninstallCommand'), name: 'uninstallCommand', - initialValue: 'echo empty uninstall cmd', + initialValue: type === 'INSTALLER' ? 'echo ""' : 'echo empty uninstall cmd', props: { showCount: true, maxLength: 1000,