Skip to content

Commit

Permalink
[INLONG-11548][Dashboard] The Installer Module modify thedefaults
Browse files Browse the repository at this point in the history
  • Loading branch information
wohainilaodou committed Dec 5, 2024
1 parent 7ccbd97 commit b36943c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions inlong-dashboard/src/ui/pages/AgentModule/CreateModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit b36943c

Please sign in to comment.