MCPcopy Create free account
hub / github.com/Tong89/smartNode / activateScenario

Function activateScenario

frontend/app.js:1312–1326  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

1310 },
1311
1312 async activateScenario(name) {
1313 this.scenarioLoadingName = name;
1314 try {
1315 await this.fetchJson(`/api/scenarios/${encodeURIComponent(name)}/activate`, {
1316 method: 'POST',
1317 });
1318 this.setNotice(`已切换到场景 "${name}"`);
1319 this.resourceFormReady = false;
1320 await this.refreshAll();
1321 } catch (e) {
1322 this.setNotice('场景切换失败: ' + (e.message || e), 'error');
1323 } finally {
1324 this.scenarioLoadingName = '';
1325 }
1326 },
1327
1328 async setBaseline(name) {
1329 try {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected