This is an automated email from the ASF dual-hosted git repository.

aloyszhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new 0abf31d80b [INLONG-11548][Dashboard] The Installer Module modify 
thedefaults (#11578)
0abf31d80b is described below

commit 0abf31d80b9c244254898af9cf4747a590249838
Author: kamianlaida <165994047+wohainilao...@users.noreply.github.com>
AuthorDate: Thu Dec 5 21:59:02 2024 +0800

    [INLONG-11548][Dashboard] The Installer Module modify thedefaults (#11578)
---
 .../src/ui/pages/AgentModule/CreateModal.tsx            | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

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<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}'",
+        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<Props> = ({ 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<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',
+        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<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',
+        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<Props> = ({ 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,

Reply via email to