refactor a lot of things
fix: postgres_passwords could be longer feat: able to define postgresql databases from the ui
This commit is contained in:
@@ -19,7 +19,7 @@ class Controller extends BaseController
|
||||
|
||||
public function subscription()
|
||||
{
|
||||
if (!isCloud()) {
|
||||
if (!is_cloud()) {
|
||||
abort(404);
|
||||
}
|
||||
return view('subscription', [
|
||||
@@ -29,7 +29,7 @@ class Controller extends BaseController
|
||||
|
||||
public function license()
|
||||
{
|
||||
if (!isCloud()) {
|
||||
if (!is_cloud()) {
|
||||
abort(404);
|
||||
}
|
||||
return view('settings.license', [
|
||||
|
||||
@@ -41,6 +41,9 @@ class ProjectController extends Controller
|
||||
|
||||
public function new()
|
||||
{
|
||||
$type = request()->query('type');
|
||||
$destination_uuid = request()->query('destination');
|
||||
|
||||
$project = session('currentTeam')->load(['projects'])->projects->where('uuid', request()->route('project_uuid'))->first();
|
||||
if (!$project) {
|
||||
return redirect()->route('dashboard');
|
||||
@@ -49,9 +52,14 @@ class ProjectController extends Controller
|
||||
if (!$environment) {
|
||||
return redirect()->route('dashboard');
|
||||
}
|
||||
|
||||
$type = request()->query('type');
|
||||
|
||||
if (in_array($type, DATABASE_TYPES)) {
|
||||
$standalone_postgresql = create_standalone_postgresql($environment->id, $destination_uuid);
|
||||
return redirect()->route('project.database.configuration', [
|
||||
'project_uuid' => $project->uuid,
|
||||
'environment_name' => $environment->name,
|
||||
'database_uuid' => $standalone_postgresql->uuid,
|
||||
]);
|
||||
}
|
||||
return view('project.new', [
|
||||
'type' => $type
|
||||
]);
|
||||
|
||||
@@ -17,7 +17,7 @@ class Heading extends Component
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->parameters = getRouteParameters();
|
||||
$this->parameters = get_route_parameters();
|
||||
}
|
||||
|
||||
public function check_status()
|
||||
|
||||
@@ -20,7 +20,7 @@ class Previews extends Component
|
||||
public function mount()
|
||||
{
|
||||
$this->pull_requests = collect();
|
||||
$this->parameters = getRouteParameters();
|
||||
$this->parameters = get_route_parameters();
|
||||
}
|
||||
|
||||
public function loadStatus($pull_request_id)
|
||||
|
||||
@@ -16,7 +16,7 @@ class Rollback extends Component
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->parameters = getRouteParameters();
|
||||
$this->parameters = get_route_parameters();
|
||||
}
|
||||
|
||||
public function rollbackImage($commit)
|
||||
|
||||
@@ -34,7 +34,7 @@ class Heading extends Component
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->parameters = getRouteParameters();
|
||||
$this->parameters = get_route_parameters();
|
||||
}
|
||||
|
||||
public function stop()
|
||||
|
||||
@@ -12,7 +12,7 @@ class DeleteEnvironment extends Component
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->parameters = getRouteParameters();
|
||||
$this->parameters = get_route_parameters();
|
||||
}
|
||||
|
||||
public function delete()
|
||||
|
||||
@@ -12,7 +12,7 @@ class DeleteProject extends Component
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->parameters = getRouteParameters();
|
||||
$this->parameters = get_route_parameters();
|
||||
}
|
||||
|
||||
public function delete()
|
||||
|
||||
@@ -38,7 +38,7 @@ class GithubPrivateRepository extends Component
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->parameters = getRouteParameters();
|
||||
$this->parameters = get_route_parameters();
|
||||
$this->query = request()->query();
|
||||
$this->repositories = $this->branches = collect();
|
||||
$this->github_apps = GithubApp::private();
|
||||
|
||||
@@ -50,10 +50,10 @@ class GithubPrivateRepositoryDeployKey extends Component
|
||||
|
||||
public function mount()
|
||||
{
|
||||
if (isDev()) {
|
||||
if (is_dev()) {
|
||||
$this->repository_url = 'https://github.com/coollabsio/coolify-examples';
|
||||
}
|
||||
$this->parameters = getRouteParameters();
|
||||
$this->parameters = get_route_parameters();
|
||||
$this->query = request()->query();
|
||||
$this->private_keys = PrivateKey::where('team_id', session('currentTeam')->id)->where('id', '!=', 0)->get();
|
||||
}
|
||||
|
||||
@@ -45,11 +45,11 @@ class PublicGitRepository extends Component
|
||||
|
||||
public function mount()
|
||||
{
|
||||
if (isDev()) {
|
||||
if (is_dev()) {
|
||||
$this->repository_url = 'https://github.com/coollabsio/coolify-examples';
|
||||
$this->port = 3000;
|
||||
}
|
||||
$this->parameters = getRouteParameters();
|
||||
$this->parameters = get_route_parameters();
|
||||
$this->query = request()->query();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class Select extends Component
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->parameters = getRouteParameters();
|
||||
$this->parameters = get_route_parameters();
|
||||
}
|
||||
|
||||
public function set_type(string $type)
|
||||
|
||||
@@ -14,7 +14,7 @@ class Danger extends Component
|
||||
public function mount()
|
||||
{
|
||||
$this->modalId = new Cuid2(7);
|
||||
$this->parameters = getRouteParameters();
|
||||
$this->parameters = get_route_parameters();
|
||||
}
|
||||
|
||||
public function delete()
|
||||
|
||||
@@ -26,7 +26,7 @@ class Add extends Component
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->parameters = getRouteParameters();
|
||||
$this->parameters = get_route_parameters();
|
||||
}
|
||||
|
||||
public function submit()
|
||||
|
||||
@@ -25,7 +25,7 @@ class Show extends Component
|
||||
public function mount()
|
||||
{
|
||||
$this->modalId = new Cuid2(7);
|
||||
$this->parameters = getRouteParameters();
|
||||
$this->parameters = get_route_parameters();
|
||||
}
|
||||
|
||||
public function submit()
|
||||
|
||||
@@ -25,7 +25,7 @@ class Add extends Component
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->parameters = getRouteParameters();
|
||||
$this->parameters = get_route_parameters();
|
||||
}
|
||||
|
||||
public function submit()
|
||||
|
||||
@@ -39,6 +39,6 @@ class PrivateKey extends Component
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->parameters = getRouteParameters();
|
||||
$this->parameters = get_route_parameters();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ class Change extends Component
|
||||
public function mount()
|
||||
{
|
||||
$this->webhook_endpoint = $this->ipv4;
|
||||
$this->parameters = getRouteParameters();
|
||||
$this->parameters = get_route_parameters();
|
||||
$this->is_system_wide = $this->github_app->is_system_wide;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class InviteLink extends Component
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->email = isDev() ? 'test3@example.com' : '';
|
||||
$this->email = is_dev() ? 'test3@example.com' : '';
|
||||
}
|
||||
|
||||
public function viaEmail()
|
||||
|
||||
@@ -36,7 +36,7 @@ class Create extends Component
|
||||
|
||||
public function mount()
|
||||
{
|
||||
if (isDev()) {
|
||||
if (is_dev()) {
|
||||
$this->name = 'Local MinIO';
|
||||
$this->description = 'Local MinIO';
|
||||
$this->key = 'minioadmin';
|
||||
|
||||
@@ -18,7 +18,7 @@ class Upgrade extends Component
|
||||
$this->latestVersion = get_latest_version_of_coolify();
|
||||
$currentVersion = config('version');
|
||||
version_compare($currentVersion, $this->latestVersion, '<') ? $this->isUpgradeAvailable = true : $this->isUpgradeAvailable = false;
|
||||
if (isDev()) {
|
||||
if (is_dev()) {
|
||||
$this->isUpgradeAvailable = true;
|
||||
}
|
||||
$settings = InstanceSettings::get();
|
||||
|
||||
@@ -12,7 +12,7 @@ class SubscriptionValid
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
if (auth()->user()) {
|
||||
if (isCloud() && !isSubscribed()) {
|
||||
if (is_cloud() && !isSubscribed()) {
|
||||
ray('SubscriptionValid Middleware');
|
||||
|
||||
$allowed_paths = [
|
||||
|
||||
Reference in New Issue
Block a user