mirror of https://github.com/Aidaho12/haproxy-wi
				
				
				
			
							parent
							
								
									11aa182599
								
							
						
					
					
						commit
						ab76f83c20
					
				| 
						 | 
				
			
			@ -195,20 +195,30 @@ def default_values():
 | 
			
		|||
	data_source = [
 | 
			
		||||
		{'param': 'aws', 'name': 'AWS', 'optgroup': 'aws', 'section': 'provider', 'provider': 'aws', 'image': '/inc/images/provisioning/providers/aws.svg'},
 | 
			
		||||
		{'param': 'do', 'name': 'DigitalOcearn', 'optgroup': 'do', 'section': 'provider', 'provider': 'do', 'image': '/inc/images/provisioning/providers/do.svg'},
 | 
			
		||||
		{'param': 'gcore', 'name': 'G-Core Labs', 'optgroup': 'gcore', 'section': 'provider', 'provider': 'gcore', 'image': '/inc/images/provisioning/providers/gcore.svg'},
 | 
			
		||||
		{'param': 'us-east-1', 'name': 'N. Virginia', 'optgroup': 'US East', 'section': 'region', 'provider': 'aws', 'image': '/inc/images/provisioning/flags/us.svg'},
 | 
			
		||||
		{'param': 'gcore', 'name': 'G-Core Labs', 'optgroup': 'gcore', 'section': 'provider', 'provider': 'gcore',
 | 
			
		||||
			'image': '/inc/images/provisioning/providers/gcore.svg'},
 | 
			
		||||
		{'param': 'us-east-1', 'name': 'N. Virginia', 'optgroup': 'US East', 'section': 'region', 'provider': 'aws',
 | 
			
		||||
			'image': '/inc/images/provisioning/flags/us.svg'},
 | 
			
		||||
		{'param': 'us-east-2', 'name': 'Ohio', 'optgroup': 'US East', 'section': 'region', 'provider': 'aws', 'image': '/inc/images/provisioning/flags/us.svg'},
 | 
			
		||||
		{'param': 'us-west-1', 'name': 'N. California', 'optgroup': 'US West', 'section': 'region', 'provider': 'aws', 'image': '/inc/images/provisioning/flags/us.svg'},
 | 
			
		||||
		{'param': 'us-west-2', 'name': 'Oregon', 'optgroup': 'US West', 'section': 'region', 'provider': 'aws', 'image': '/inc/images/provisioning/flags/us.svg'},
 | 
			
		||||
		{'param': 'af-south-1', 'name': 'Cape Town', 'optgroup': 'Africa', 'section': 'region', 'provider': 'aws', 'image': '/inc/images/provisioning/flags/za.svg'},
 | 
			
		||||
		{'param': 'ap-east-1', 'name': 'Hong Kong', 'optgroup': 'Asia Pacific', 'section': 'region', 'provider': 'aws', 'image': '/inc/images/provisioning/flags/hk.svg'},
 | 
			
		||||
		{'param': 'ap-south-1', 'name': 'Mumbai', 'optgroup': 'Asia Pacific', 'section': 'region', 'provider': 'aws', 'image': '/inc/images/provisioning/flags/in.svg'},
 | 
			
		||||
		{'param': 'ap-northeast-2', 'name': 'Seoul', 'optgroup': 'Asia Pacific', 'section': 'region', 'provider': 'aws', 'image': '/inc/images/provisioning/flags/kr.svg'},
 | 
			
		||||
		{'param': 'ap-southeast-1', 'name': 'Singapore', 'optgroup': 'Asia Pacific', 'section': 'region', 'provider': 'aws', 'image': '/inc/images/provisioning/flags/sg.svg'},
 | 
			
		||||
		{'param': 'ap-southeast-2', 'name': 'Sydney', 'optgroup': 'Asia Pacific', 'section': 'region', 'provider': 'aws', 'image': '/inc/images/provisioning/flags/au.svg'},
 | 
			
		||||
		{'param': 'ap-northeast-1', 'name': 'Tokyo', 'optgroup': 'Asia Pacific', 'section': 'region', 'provider': 'aws', 'image': '/inc/images/provisioning/flags/jp.svg'},
 | 
			
		||||
		{'param': 'ca-central-1', 'name': 'Central', 'optgroup': 'Canada', 'section': 'region', 'provider': 'aws', 'image': '/inc/images/provisioning/flags/ca.svg'},
 | 
			
		||||
		{'param': 'eu-central-1', 'name': 'Frankfurt', 'optgroup': 'Europe', 'section': 'region', 'provider': 'aws', 'image': '/inc/images/provisioning/flags/de.svg'},
 | 
			
		||||
		{'param': 'ap-east-1', 'name': 'Hong Kong', 'optgroup': 'Asia Pacific', 'section': 'region', 'provider': 'aws',
 | 
			
		||||
			'image': '/inc/images/provisioning/flags/hk.svg'},
 | 
			
		||||
		{'param': 'ap-south-1', 'name': 'Mumbai', 'optgroup': 'Asia Pacific', 'section': 'region', 'provider': 'aws',
 | 
			
		||||
			'image': '/inc/images/provisioning/flags/in.svg'},
 | 
			
		||||
		{'param': 'ap-northeast-2', 'name': 'Seoul', 'optgroup': 'Asia Pacific', 'section': 'region', 'provider': 'aws',
 | 
			
		||||
			'image': '/inc/images/provisioning/flags/kr.svg'},
 | 
			
		||||
		{'param': 'ap-southeast-1', 'name': 'Singapore', 'optgroup': 'Asia Pacific', 'section': 'region', 'provider': 'aws',
 | 
			
		||||
			'image': '/inc/images/provisioning/flags/sg.svg'},
 | 
			
		||||
		{'param': 'ap-southeast-2', 'name': 'Sydney', 'optgroup': 'Asia Pacific', 'section': 'region', 'provider': 'aws',
 | 
			
		||||
			'image': '/inc/images/provisioning/flags/au.svg'},
 | 
			
		||||
		{'param': 'ap-northeast-1', 'name': 'Tokyo', 'optgroup': 'Asia Pacific', 'section': 'region', 'provider': 'aws',
 | 
			
		||||
			'image': '/inc/images/provisioning/flags/jp.svg'},
 | 
			
		||||
		{'param': 'ca-central-1', 'name': 'Central', 'optgroup': 'Canada', 'section': 'region', 'provider': 'aws',
 | 
			
		||||
			'image': '/inc/images/provisioning/flags/ca.svg'},
 | 
			
		||||
		{'param': 'eu-central-1', 'name': 'Frankfurt', 'optgroup': 'Europe', 'section': 'region', 'provider': 'aws',
 | 
			
		||||
			'image': '/inc/images/provisioning/flags/de.svg'},
 | 
			
		||||
		{'param': 'eu-west-1', 'name': 'Ireland', 'optgroup': 'Europe', 'section': 'region', 'provider': 'aws', 'image': '/inc/images/provisioning/flags/ie.svg'},
 | 
			
		||||
		{'param': 'eu-west-2', 'name': 'London', 'optgroup': 'Europe', 'section': 'region', 'provider': 'aws', 'image': '/inc/images/provisioning/flags/gb.svg'},
 | 
			
		||||
		{'param': 'eu-south-1', 'name': 'Milan', 'optgroup': 'Europe', 'section': 'region', 'provider': 'aws', 'image': '/inc/images/provisioning/flags/fr.svg'},
 | 
			
		||||
| 
						 | 
				
			
			@ -244,7 +254,7 @@ def default_values():
 | 
			
		|||
		{'param': '26', 'name': 'Amsterdam', 'optgroup': 'EMEA', 'section': 'region', 'provider': 'gcore',
 | 
			
		||||
			'image': '/inc/images/provisioning/flags/nl.svg'},
 | 
			
		||||
		{'param': '38', 'name': 'Frankfurt', 'optgroup': 'EMEA', 'section': 'region', 'provider': 'gcore',
 | 
			
		||||
		 	'image': '/inc/images/provisioning/flags/de.svg'},
 | 
			
		||||
			'image': '/inc/images/provisioning/flags/de.svg'},
 | 
			
		||||
		{'param': '50', 'name': 'Istanbul', 'optgroup': 'EMEA', 'section': 'region', 'provider': 'gcore',
 | 
			
		||||
			'image': '/inc/images/provisioning/flags/tr.svg'},
 | 
			
		||||
		{'param': '84', 'name': 'Johannesburg', 'optgroup': 'EMEA', 'section': 'region', 'provider': 'gcore', 'image': '/inc/images/provisioning/flags/za.svg'},
 | 
			
		||||
| 
						 | 
				
			
			@ -321,14 +331,10 @@ def default_values():
 | 
			
		|||
		{'param': 's-2vcpu-4gb-intel', 'name': 's-2vcpu-4gb-intel', 'optgroup': 'Premium Intel', 'section': 'size', 'provider': 'do'},
 | 
			
		||||
		{'param': 's-4vcpu-8gb-intel', 'name': 's-4vcpu-8gb-intel', 'optgroup': 'Premium Intel', 'section': 'size', 'provider': 'do'},
 | 
			
		||||
		{'param': 's-8vcpu-16gb-intel', 'name': 's-8vcpu-16gb-intel', 'optgroup': 'Premium Intel', 'section': 'size', 'provider': 'do'},
 | 
			
		||||
		{'param': 's-1vcpu-1gb-amd', 'name': 's-1vcpu-1gb-amd', 'optgroup': 'Premium AMD', 'section': 'size',
 | 
			
		||||
		 'provider': 'do'},
 | 
			
		||||
		{'param': 's-2vcpu-2gb-amd', 'name': 's-2vcpu-2gb-amd', 'optgroup': 'Premium AMD', 'section': 'size',
 | 
			
		||||
		 'provider': 'do'},
 | 
			
		||||
		{'param': 's-2vcpu-4gb-amd', 'name': 's-2vcpu-4gb-amd', 'optgroup': 'Premium AMD', 'section': 'size',
 | 
			
		||||
		 'provider': 'do'},
 | 
			
		||||
		{'param': 's-4vcpu-8gb-amd', 'name': 's-4vcpu-8gb-amd', 'optgroup': 'Premium AMD', 'section': 'size',
 | 
			
		||||
		 'provider': 'do'},
 | 
			
		||||
		{'param': 's-1vcpu-1gb-amd', 'name': 's-1vcpu-1gb-amd', 'optgroup': 'Premium AMD', 'section': 'size', 'provider': 'do'},
 | 
			
		||||
		{'param': 's-2vcpu-2gb-amd', 'name': 's-2vcpu-2gb-amd', 'optgroup': 'Premium AMD', 'section': 'size', 'provider': 'do'},
 | 
			
		||||
		{'param': 's-2vcpu-4gb-amd', 'name': 's-2vcpu-4gb-amd', 'optgroup': 'Premium AMD', 'section': 'size', 'provider': 'do'},
 | 
			
		||||
		{'param': 's-4vcpu-8gb-amd', 'name': 's-4vcpu-8gb-amd', 'optgroup': 'Premium AMD', 'section': 'size', 'provider': 'do'},
 | 
			
		||||
		{'param': 's-8vcpu-16gb-amd', 'name': 's-8vcpu-16gb-amd', 'optgroup': 'Premium AMD', 'section': 'size', 'provider': 'do'},
 | 
			
		||||
		{'param': 'g-2vcpu-8gb', 'name': 'g-2vcpu-8gb', 'optgroup': 'General Purpose', 'section': 'size', 'provider': 'do'},
 | 
			
		||||
		{'param': 'g-4vcpu-16gb', 'name': 'g-4vcpu-16gb', 'optgroup': 'General Purpose', 'section': 'size', 'provider': 'do'},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,6 +2,7 @@
 | 
			
		|||
# -*- coding: utf-8 -*-
 | 
			
		||||
import traceback
 | 
			
		||||
import sys
 | 
			
		||||
import os
 | 
			
		||||
 | 
			
		||||
import funct
 | 
			
		||||
from db_model import *
 | 
			
		||||
| 
						 | 
				
			
			@ -2640,7 +2641,7 @@ def select_providers(user_group, **kwargs):
 | 
			
		|||
		if kwargs.get('key'):
 | 
			
		||||
			query = ProvidersCreds.select().where(
 | 
			
		||||
				(ProvidersCreds.key == kwargs.get('key'))
 | 
			
		||||
				& (ProvidersCreds.group ==  user_group)
 | 
			
		||||
				& (ProvidersCreds.group == user_group)
 | 
			
		||||
			)
 | 
			
		||||
		else:
 | 
			
		||||
			query = ProvidersCreds.select().where(ProvidersCreds.group == user_group)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue