| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- #!/usr/bin/env bash
- # 票 67 —— 只读探针(2):geometry 端点是否收 district;industry 入参在各端点是否真的生效。
- set -u
- BASE='http://192.168.110.96:8301/api/cockpit/v1'
- OUT='.scratch/cockpit-real-data-wayfinding/verify/artifacts/t67'
- mkdir -p "$OUT"
- START=$(date -u -d '-7 days' +%Y-%m-%dT%H:%M:%SZ)
- END=$(date -u +%Y-%m-%dT%H:%M:%SZ)
- W="&range=LAST_7_DAYS&startTime=$START&endTime=$END"
- p() {
- local name="$1" path="$2" variant="$3"
- local q=''
- if [ $# -ge 4 ]; then q="$4"; fi
- local sep='?'
- case "$path" in *'?'*) sep='&' ;; esac
- local url="$BASE$path"
- if [ -n "$q" ]; then url="$url$sep$q"; fi
- local body="$OUT/geo-$name-$variant.json"
- local code
- code=$(curl -s --max-time 90 -o "$body" -w '%{http_code}' "$url")
- local size
- size=$(wc -c < "$body" | tr -d ' ')
- printf '%-24s %-5s %-4s %s\n' "$name" "$variant" "$code" "$size"
- }
- echo '--- geometry(管线/构件几何)对 district 的反应 ---'
- p geometry none ""
- p geometry d0 "district=0"
- p geometry d99 "district=99"
- echo
- echo '--- industry 是否真的生效(GAS vs DRAINAGE vs 非法) ---'
- p map-snapshot "/map-snapshot?page=1&pageSize=500" none ""
- p map-snapshot "/map-snapshot?page=1&pageSize=500" gas "industry=GAS"
- p map-snapshot "/map-snapshot?page=1&pageSize=500" drn "industry=DRAINAGE"
- p map-snapshot "/map-snapshot?page=1&pageSize=500" bad "industry=NOT_A_REAL_INDUSTRY"
- echo
- p infra-base-archives "/infrastructure/base-archives" none ""
- p infra-base-archives "/infrastructure/base-archives" gas "industry=GAS"
- p infra-base-archives "/infrastructure/base-archives" drn "industry=DRAINAGE"
- p infra-base-archives "/infrastructure/base-archives" bad "industry=NOT_A_REAL_INDUSTRY"
- echo
- p infra-operating "/infrastructure/operating-information" none ""
- p infra-operating "/infrastructure/operating-information" gas "industry=GAS"
- p infra-operating "/infrastructure/operating-information" drn "industry=DRAINAGE"
- p infra-operating "/infrastructure/operating-information" bad "industry=NOT_A_REAL_INDUSTRY"
- echo
- p infra-management "/infrastructure/management-information" none ""
- p infra-management "/infrastructure/management-information" gas "industry=GAS"
- p infra-management "/infrastructure/management-information" drn "industry=DRAINAGE"
- p infra-management "/infrastructure/management-information" bad "industry=NOT_A_REAL_INDUSTRY"
- echo
- p infra-emergency "/infrastructure/emergency-support" none ""
- p infra-emergency "/infrastructure/emergency-support" gas "industry=GAS"
- p infra-emergency "/infrastructure/emergency-support" drn "industry=DRAINAGE"
- p infra-emergency "/infrastructure/emergency-support" bad "industry=NOT_A_REAL_INDUSTRY"
- echo
- p mon-overview "/monitoring/overview" none ""
- p mon-overview "/monitoring/overview" gas "industry=GAS"
- p mon-overview "/monitoring/overview" drn "industry=DRAINAGE"
- p mon-overview "/monitoring/overview" bad "industry=NOT_A_REAL_INDUSTRY"
- echo
- p mon-distribution "/monitoring/distribution?page=1&pageSize=10" none ""
- p mon-distribution "/monitoring/distribution?page=1&pageSize=10" gas "industry=GAS"
- p mon-distribution "/monitoring/distribution?page=1&pageSize=10" drn "industry=DRAINAGE"
- p mon-distribution "/monitoring/distribution?page=1&pageSize=10" bad "industry=NOT_A_REAL_INDUSTRY"
- echo
- p mon-situation "/monitoring/situation?page=1&pageSize=10" none ""
- p mon-situation "/monitoring/situation?page=1&pageSize=10" gas "industry=GAS"
- p mon-situation "/monitoring/situation?page=1&pageSize=10" drn "industry=DRAINAGE"
- p mon-situation "/monitoring/situation?page=1&pageSize=10" bad "industry=NOT_A_REAL_INDUSTRY"
- echo
- p ev-current "/events/current?mode=WARNING&page=1&pageSize=10" none ""
- p ev-current "/events/current?mode=WARNING&page=1&pageSize=10" gas "industry=GAS"
- p ev-current "/events/current?mode=WARNING&page=1&pageSize=10" drn "industry=DRAINAGE"
- p ev-current "/events/current?mode=WARNING&page=1&pageSize=10" bad "industry=NOT_A_REAL_INDUSTRY"
- echo
- p ev-history "/events/history-analysis?eventFamily=WARNING$W&page=1&pageSize=10" none ""
- p ev-history "/events/history-analysis?eventFamily=WARNING$W&page=1&pageSize=10" gas "industry=GAS"
- p ev-history "/events/history-analysis?eventFamily=WARNING$W&page=1&pageSize=10" drn "industry=DRAINAGE"
- p ev-history "/events/history-analysis?eventFamily=WARNING$W&page=1&pageSize=10" bad "industry=NOT_A_REAL_INDUSTRY"
- echo
- p ev-efficiency "/events/handling-efficiency?eventFamily=WARNING$W" none ""
- p ev-efficiency "/events/handling-efficiency?eventFamily=WARNING$W" gas "industry=GAS"
- p ev-efficiency "/events/handling-efficiency?eventFamily=WARNING$W" drn "industry=DRAINAGE"
- p ev-efficiency "/events/handling-efficiency?eventFamily=WARNING$W" bad "industry=NOT_A_REAL_INDUSTRY"
- echo
- p ev-analysis "/events/multidimensional-analysis?eventFamily=WARNING$W" none ""
- p ev-analysis "/events/multidimensional-analysis?eventFamily=WARNING$W" gas "industry=GAS"
- p ev-analysis "/events/multidimensional-analysis?eventFamily=WARNING$W" drn "industry=DRAINAGE"
- p ev-analysis "/events/multidimensional-analysis?eventFamily=WARNING$W" bad "industry=NOT_A_REAL_INDUSTRY"
- echo
- p ov-monitoring "/overview/monitoring" none ""
- p ov-monitoring "/overview/monitoring" gas "industry=GAS"
- p ov-monitoring "/overview/monitoring" drn "industry=DRAINAGE"
- p ov-monitoring "/overview/monitoring" bad "industry=NOT_A_REAL_INDUSTRY"
- echo
- p ov-warning-settings "/overview/warning-settings?range=LAST_7_DAYS" none ""
- p ov-warning-settings "/overview/warning-settings?range=LAST_7_DAYS" gas "industry=GAS"
- p ov-warning-settings "/overview/warning-settings?range=LAST_7_DAYS" drn "industry=DRAINAGE"
- p ov-warning-settings "/overview/warning-settings?range=LAST_7_DAYS" bad "industry=NOT_A_REAL_INDUSTRY"
- echo
- p work-orders "/work-orders?page=1&pageSize=5" none ""
- p work-orders "/work-orders?page=1&pageSize=5" gas "industry=GAS"
- p work-orders "/work-orders?page=1&pageSize=5" drn "industry=DRAINAGE"
- p work-orders "/work-orders?page=1&pageSize=5" bad "industry=NOT_A_REAL_INDUSTRY"
|