@powerhousedao/ph-cli 0.40.85-dev.12 → 0.40.85-dev.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/package.json
CHANGED
|
@@ -138,16 +138,46 @@ else
|
|
|
138
138
|
|
|
139
139
|
"status")
|
|
140
140
|
check_setup "$PROJECT_NAME"
|
|
141
|
-
echo "
|
|
142
|
-
echo "
|
|
141
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
142
|
+
echo " Service Status for $PROJECT_NAME"
|
|
143
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
144
|
+
|
|
145
|
+
# Create table header
|
|
146
|
+
printf "%-15s %-10s %-15s %-10s %-10s\n" "Service" "Status" "Memory" "Uptime" "Health"
|
|
147
|
+
echo "────────────────────────────────────────────────────────────────────"
|
|
148
|
+
|
|
149
|
+
# Check Connect status
|
|
150
|
+
connect_status="Disabled"
|
|
151
|
+
connect_health="❌"
|
|
152
|
+
connect_memory="N/A"
|
|
153
|
+
connect_uptime="N/A"
|
|
143
154
|
if [ -L "/etc/nginx/sites-enabled/$PROJECT_NAME" ]; then
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
155
|
+
connect_status="Enabled"
|
|
156
|
+
# Check if Connect is reachable
|
|
157
|
+
if curl -s -f "http://localhost/$PROJECT_NAME" > /dev/null; then
|
|
158
|
+
connect_health="✅"
|
|
159
|
+
fi
|
|
160
|
+
# Get Nginx memory usage for the site
|
|
161
|
+
nginx_pid=$(pgrep -f "nginx.*$PROJECT_NAME" | head -n 1)
|
|
162
|
+
if [ -n "$nginx_pid" ]; then
|
|
163
|
+
connect_memory=$(ps -o rss= -p "$nginx_pid" 2>/dev/null | awk '{printf "%.1fmb", $1/1024}')
|
|
164
|
+
connect_uptime=$(ps -o etime= -p "$nginx_pid" 2>/dev/null)
|
|
165
|
+
fi
|
|
147
166
|
fi
|
|
167
|
+
printf "%-15s %-10s %-15s %-10s %-10s\n" "Connect" "$connect_status" "$connect_memory" "$connect_uptime" "$connect_health"
|
|
148
168
|
|
|
149
|
-
|
|
150
|
-
pm2 list | grep "switchboard_${PROJECT_NAME}"
|
|
169
|
+
# Check Switchboard status
|
|
170
|
+
switchboard_info=$(pm2 list | grep "switchboard_${PROJECT_NAME}")
|
|
171
|
+
if [ -n "$switchboard_info" ]; then
|
|
172
|
+
switchboard_status="Enabled"
|
|
173
|
+
switchboard_memory=$(echo "$switchboard_info" | awk '{print $12}')
|
|
174
|
+
switchboard_uptime=$(echo "$switchboard_info" | awk '{print $7}')
|
|
175
|
+
switchboard_health="✅"
|
|
176
|
+
printf "%-15s %-10s %-15s %-10s %-10s\n" "Switchboard" "$switchboard_status" "$switchboard_memory" "$switchboard_uptime" "$switchboard_health"
|
|
177
|
+
else
|
|
178
|
+
printf "%-15s %-10s %-15s %-10s %-10s\n" "Switchboard" "Disabled" "N/A" "N/A" "❌"
|
|
179
|
+
fi
|
|
180
|
+
echo "────────────────────────────────────────────────────────────────────"
|
|
151
181
|
;;
|
|
152
182
|
|
|
153
183
|
*)
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "0.40.85-dev.
|
|
1
|
+
export declare const version = "0.40.85-dev.14";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/src/version.js
CHANGED