You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
COMMAND_RESULT="${COMMAND_RESULT}\nTo execute a action, provide a namespace and a command, e.g. \"dbmon list\" to list all database collectors.\nFinally the following commands in the global namespace can be called directly:\n"
115
115
local NAMESPACE=""
116
-
local SORTED=`echo -en "$GLOBAL_HELP"| sort`
116
+
local SORTED
117
+
SORTED=`echo -en "$GLOBAL_HELP"| sort`
117
118
OLD_IFS=$IFS
118
119
IFS=$'\n'
119
120
forLINEin$SORTED;do
@@ -128,7 +129,7 @@ function _help {
128
129
done
129
130
IFS=$OLD_IFS
130
131
}
131
-
register _help Display the global usage information
132
+
register _help Display the global usage information
132
133
CONTROLLER_LOGIN_STATUS=0
133
134
functioncontroller_login {
134
135
debug "Login at $CONFIG_CONTROLLER_HOST with $CONFIG_CONTROLLER_CREDENTIALS"
@@ -159,11 +160,9 @@ function controller_call {
159
160
;;
160
161
esac
161
162
done
162
-
163
163
shiftOptInd
164
164
shift$SHIFTS
165
-
ENDPOINT=$@
166
-
165
+
ENDPOINT=$*
167
166
controller_login
168
167
# Debug the COMMAND_RESULT from controller_login
169
168
debug $COMMAND_RESULT
@@ -179,7 +178,7 @@ function controller_call {
179
178
COMMAND_RESULT="Controller Login Error! Please check hostname and credentials"
180
179
fi
181
180
}
182
-
register controller_call Send a custom HTTP call to a controller
181
+
register controller_call Send a custom HTTP call to a controller
183
182
functiondbmon_create {
184
183
echo"Stub"
185
184
}
@@ -202,20 +201,20 @@ function timerange_create {
202
201
DURATION_IN_MINUTES=${OPTARG}
203
202
TYPE="BEFORE_NOW"
204
203
;;
205
-
esac
204
+
esac
206
205
done;
207
206
shiftOptInd
208
207
shift$SHIFTS
209
-
TIMERANGE_NAME=$@
208
+
TIMERANGE_NAME=$*
210
209
controller_call -X POST -d "{\"name\":\"$TIMERANGE_NAME\",\"timeRange\":{\"type\":\"$TYPE\",\"durationInMinutes\":$DURATION_IN_MINUTES,\"startTime\":$START_TIME,\"endTime\":$END_TIME}}" /controller/restui/user/createCustomRange
211
210
}
212
-
register timerange_create Create a custom time range
211
+
register timerange_create Create a custom time range
213
212
functiontimerange_list {
214
213
controller_call -X GET /controller/restui/user/getAllCustomTimeRanges
215
214
}
216
215
register timerange_list List all custom timeranges available on the controller
217
216
functiontimerange_delete {
218
-
local TIMERANGE_ID=$@
217
+
local TIMERANGE_ID=$*
219
218
if [[ $TIMERANGE_ID=~ ^[0-9]+$ ]];then
220
219
controller_call -X POST -d "$TIMERANGE_ID" /controller/restui/user/deleteCustomRange
COMMAND_RESULT="${COMMAND_RESULT}\nTo execute a action, provide a namespace and a command, e.g. \"dbmon list\" to list all database collectors.\nFinally the following commands in the global namespace can be called directly:\n"
6
6
local NAMESPACE=""
7
-
local SORTED=`echo -en "$GLOBAL_HELP"| sort`
7
+
local SORTED
8
+
SORTED=`echo -en "$GLOBAL_HELP"| sort`
8
9
OLD_IFS=$IFS
9
10
IFS=$'\n'
10
11
forLINEin$SORTED;do
@@ -20,4 +21,4 @@ function _help {
20
21
IFS=$OLD_IFS
21
22
}
22
23
23
-
register _help Display the global usage information
24
+
register _help Display the global usage information
0 commit comments