mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 07:26:52 +01:00 
			
		
		
		
	Wip
This commit is contained in:
		
							parent
							
								
									551175862e
								
							
						
					
					
						commit
						be6f79521e
					
				| @ -50,6 +50,8 @@ class CreateServer extends CreateRecord | ||||
|                         $this->egg = Egg::query()->find($state); | ||||
|                         $set('startup', $this->egg->startup); | ||||
|                         $set('image', ''); | ||||
|                         // $set('assignments', null);
 | ||||
|                         $this->eggDefaultPorts = []; | ||||
| 
 | ||||
|                         $variables = $this->egg->variables ?? []; | ||||
|                         $serverVariables = collect(); | ||||
| @ -58,16 +60,10 @@ class CreateServer extends CreateRecord | ||||
|                         foreach ($variables as $variable) { | ||||
|                             $serverVariables->add($variable->toArray()); | ||||
|                             if (str_contains($variable->rules, 'port')) { | ||||
|                                 $path = 'assignments'; | ||||
|                                 $this->eggDefaultPorts[$variable->default_value] = $variable->env_variable; | ||||
|                                 $this->ports[] = (int) $variable->default_value; | ||||
| 
 | ||||
|                                 $set("$path.$i", ['port' => $i]); | ||||
| 
 | ||||
|                                 // $set("$path.$i", (int) $variable->default_value);
 | ||||
|                                 // $set("$path.$i.port", (int) $variable->default_value);
 | ||||
|                                 $i++; | ||||
|                                 // $variables[$serverVariables[$i]['env_variable']] = $serverVariables[$i]['default_value'];
 | ||||
|                                 $set("assignments.$i", ['port' => $i++]); | ||||
|                             } | ||||
|                         } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Lance Pioch
						Lance Pioch