generated-scene: add scheduled monitoring runtime and helper lifecycle hardening
This commit is contained in:
73
tests/fixtures/generated_scene/g7_multi_endpoint_inventory/index.html
vendored
Normal file
73
tests/fixtures/generated_scene/g7_multi_endpoint_inventory/index.html
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="sgclaw-scene-kind" content="report_collection" />
|
||||
<meta name="sgclaw-target-url" content="http://yx.gscc.com.cn/" />
|
||||
<meta name="sgclaw-expected-domain" content="yx.gscc.com.cn" />
|
||||
<title>Multi Endpoint Inventory Fixture</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
const sourceUrl = "http://yx.gscc.com.cn/asset";
|
||||
|
||||
async function runAssetInventory() {
|
||||
const meter = await assetStatsQueryMeter("04");
|
||||
const it = await assetStatsQueryIt("04");
|
||||
const terminal = await assetStatsQueryAcqTrml("04");
|
||||
const common = await assetStatsQueryMeterCommonModule("04");
|
||||
const module = await assetStatsQueryJlGnModule("04");
|
||||
return aggregateInventory([meter, it, terminal, common, module]);
|
||||
}
|
||||
|
||||
async function assetStatsQueryMeter(month) {
|
||||
return $.ajax({
|
||||
url: "http://yx.gscc.com.cn/asset/assetStatsQueryMeter",
|
||||
type: "POST",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify({ month, assetType: "meter" })
|
||||
});
|
||||
}
|
||||
|
||||
async function assetStatsQueryIt(month) {
|
||||
return $.ajax({
|
||||
url: "http://yx.gscc.com.cn/asset/assetStatsQueryIt",
|
||||
type: "POST",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify({ month, assetType: "it" })
|
||||
});
|
||||
}
|
||||
|
||||
async function assetStatsQueryAcqTrml(month) {
|
||||
return $.ajax({
|
||||
url: "http://yx.gscc.com.cn/asset/assetStatsQueryAcqTrml",
|
||||
type: "POST",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify({ month, assetType: "terminal" })
|
||||
});
|
||||
}
|
||||
|
||||
async function assetStatsQueryMeterCommonModule(month) {
|
||||
return $.ajax({
|
||||
url: "http://yx.gscc.com.cn/asset/assetStatsQueryMeterCommonModule",
|
||||
type: "POST",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify({ month, assetType: "common_module" })
|
||||
});
|
||||
}
|
||||
|
||||
async function assetStatsQueryJlGnModule(month) {
|
||||
return $.ajax({
|
||||
url: "http://yx.gscc.com.cn/asset/assetStatsQueryJlGnModule",
|
||||
type: "POST",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify({ month, assetType: "function_module" })
|
||||
});
|
||||
}
|
||||
|
||||
function aggregateInventory(parts) {
|
||||
return parts.flatMap(part => part.rows || []);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user