feat: implement free/pro plan system with monitor and interval limits
This commit is contained in:
@@ -4,10 +4,13 @@
|
||||
const prefix = it._form?.prefix || '';
|
||||
const bg = it._form?.bg || 'bg-gray-900';
|
||||
const border = it._form?.border || 'border-gray-800';
|
||||
const plan = it.plan || 'free';
|
||||
const minInterval = { free: 30, pro: 2, lifetime: 2 }[plan] || 30;
|
||||
const btnText = isEdit ? 'Save Changes' : 'Create Monitor';
|
||||
const formId = prefix + 'form';
|
||||
const methods = ['GET','POST','PUT','PATCH','DELETE','HEAD','OPTIONS'];
|
||||
const intervals = [['2','2 seconds'],['5','5 seconds'],['10','10 seconds'],['20','20 seconds'],['30','30 seconds'],['60','1 minute'],['300','5 minutes'],['600','10 minutes'],['1800','30 minutes'],['3600','1 hour']];
|
||||
const allIntervals = [['2','2 seconds'],['5','5 seconds'],['10','10 seconds'],['20','20 seconds'],['30','30 seconds'],['60','1 minute'],['300','5 minutes'],['600','10 minutes'],['1800','30 minutes'],['3600','1 hour']];
|
||||
const intervals = allIntervals.filter(([val]) => Number(val) >= minInterval);
|
||||
const timeouts = [['5000','5 seconds'],['10000','10 seconds'],['20000','20 seconds'],['30000','30 seconds'],['40000','40 seconds'],['50000','50 seconds'],['60000','60 seconds']];
|
||||
const regions = [['eu-central','🇩🇪 EU Central'],['us-west','🇺🇸 US West']];
|
||||
const curMethod = monitor.method || 'GET';
|
||||
|
||||
Reference in New Issue
Block a user