-
-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
14,939 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
import wrap from './wrap'; | ||
|
||
function listen() { | ||
} | ||
|
||
function run(scheduler, name) { | ||
return new Promise((resolve, reject) => { | ||
setTimeout(() => { | ||
resolve({ | ||
"status": "ok", | ||
})}, | ||
1000 | ||
); | ||
}); | ||
} | ||
|
||
function stop(scheduler, name) { | ||
return new Promise((resolve, reject) => { | ||
setTimeout(() => { | ||
resolve({ | ||
"status": "ok", | ||
})}, | ||
1000 | ||
); | ||
}); | ||
} | ||
|
||
function deleteJob(name) { | ||
return new Promise((resolve, reject) => { | ||
setTimeout(() => { | ||
resolve({ | ||
"status": "ok", | ||
})}, | ||
500 | ||
); | ||
}); | ||
} | ||
|
||
function list() { | ||
return new Promise((resolve, reject) => { | ||
setTimeout(() => { | ||
resolve({ | ||
"data": { | ||
"Custom": { | ||
"Long Job": { | ||
"Disabled": false, | ||
"Scheduler": "Custom", | ||
"Name": "Long Job", | ||
"Cancellable": true, | ||
"Crontab": "0 1/2 * * * *", | ||
"Running": true, | ||
"LastStarted": "2024-01-01T00:00:00Z", | ||
"LastRun": "0001-01-01T00:00:00Z", | ||
"LastRunSuccess": false, | ||
"Logs": [ | ||
"2024-01-01T00:00:00Z: Started", | ||
"2024-01-01T20:00:00Z: Some stuff happening...", | ||
"2024-01-01T30:00:00Z: Some stuff happening...", | ||
], | ||
"Container": "" | ||
}, | ||
"Short job": { | ||
"Disabled": false, | ||
"Scheduler": "Custom", | ||
"Name": "Short job", | ||
"Cancellable": true, | ||
"Crontab": "0 1 * * * *", | ||
"Running": false, | ||
"LastStarted": "2024-01-01T00:00:00Z", | ||
"LastRun": "2024-01-01T00:01:10Z", | ||
"LastRunSuccess": true, | ||
"Logs": [ | ||
"2024-01-01T00:01:10Z: Started", | ||
"2024-01-01T00:01:10Z: Finished" | ||
], | ||
"Container": "" | ||
} | ||
}, | ||
"SnapRAID": { | ||
"SnapRAID scrub Storage Parity": { | ||
"Disabled": false, | ||
"Scheduler": "SnapRAID", | ||
"Name": "SnapRAID scrub Storage Parity", | ||
"Cancellable": true, | ||
"Crontab": "* 0 4 */2 * *", | ||
"Running": false, | ||
"LastStarted": "0001-01-01T00:00:00Z", | ||
"LastRun": "0001-01-01T00:00:00Z", | ||
"LastRunSuccess": false, | ||
"Logs": null, | ||
"Container": "" | ||
}, | ||
"SnapRAID sync Storage Parity": { | ||
"Disabled": false, | ||
"Scheduler": "SnapRAID", | ||
"Name": "SnapRAID sync Storage Parity", | ||
"Cancellable": true, | ||
"Crontab": "* 0 2 * * *", | ||
"Running": false, | ||
"LastStarted": "0001-01-01T00:00:00Z", | ||
"LastRun": "0001-01-01T00:00:00Z", | ||
"LastRunSuccess": false, | ||
"Logs": null, | ||
"Container": "" | ||
} | ||
} | ||
}, | ||
"status": "OK" | ||
})}, | ||
500 | ||
); | ||
}); | ||
} | ||
|
||
function get(scheduler, name) { | ||
return new Promise((resolve, reject) => { | ||
setTimeout(() => { | ||
resolve({ | ||
"data": { | ||
"Disabled": false, | ||
"Scheduler": "Custom", | ||
"Name": "Long Job", | ||
"Cancellable": true, | ||
"Crontab": "0 1/2 * * * *", | ||
"Running": true, | ||
"LastStarted": "2024-01-01T00:00:00Z", | ||
"LastRun": "0001-01-01T00:00:00Z", | ||
"LastRunSuccess": false, | ||
"Logs": [ | ||
"2024-01-01T00:00:00Z: Started", | ||
"2024-01-01T20:00:00Z: Some stuff happening...", | ||
"2024-01-01T30:00:00Z: Some stuff happening...", | ||
], | ||
"Container": "" | ||
}, | ||
"status": "ok", | ||
})}, | ||
500 | ||
); | ||
}); | ||
} | ||
|
||
export { | ||
listen, | ||
list, | ||
run, | ||
stop, | ||
get, | ||
deleteJob, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -312,6 +312,18 @@ | |
"Hostname": "xxxxxxxxxxxxx", | ||
"SSLEmail": "[email protected]" | ||
}, | ||
"MarketConfig": { | ||
"Sources": [ | ||
{ | ||
"Name": "CasaOS", | ||
"Url": "https://azukaar.github.io/cosmos-casaos-store/index.json" | ||
}, | ||
{ | ||
"Name": "TinyActive", | ||
"Url": "https://cosmos.manhtuong.net" | ||
} | ||
] | ||
}, | ||
"MonitoringAlerts": { | ||
"Anti Crypto-Miner": { | ||
"Name": "Anti Crypto-Miner", | ||
|
@@ -505,6 +517,40 @@ | |
} | ||
}, | ||
"ConstellationHostname": "vpn.domain.com" | ||
}, | ||
"Storage": { | ||
"SnapRAIDs": [ | ||
{ | ||
"Name": "Storage Parity", | ||
"Enabled": true, | ||
"Data": { | ||
"disk0": "/var/mnt/sdc1", | ||
"disk1": "/var/mnt/sdd1" | ||
}, | ||
"Parity": [ | ||
"/var/mnt/sda1" | ||
], | ||
"SyncCrontab": "* 0 2 * * *", | ||
"ScrubCrontab": "* 0 4 */2 * *", | ||
"CheckOnFix": false | ||
} | ||
] | ||
}, | ||
"CRON": { | ||
"Long Job": { | ||
"Enabled": true, | ||
"Name": "Long Job", | ||
"Crontab": "0 1/2 * * * *", | ||
"Command": "sleep 5 \u0026\u0026 echo \"hello world 2\"", | ||
"Container": "" | ||
}, | ||
"Short job": { | ||
"Enabled": true, | ||
"Name": "Short job", | ||
"Crontab": "0 1 * * * *", | ||
"Command": "ls", | ||
"Container": "memos" | ||
} | ||
} | ||
}, | ||
"updates": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.