Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bobimicroweber committed Oct 1, 2024
1 parent 5d2f2c0 commit 6218b9f
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 41 deletions.
82 changes: 41 additions & 41 deletions web/Modules/Customer/App/Filament/Pages/CloneGitRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,47 +79,47 @@ public function form(Form $form): Form
->columnSpanFull()
->placeholder('Enter the name of the repository'),

Radio::make('clone_from')
->label('Clone from')
->options([
'branch' => 'Branch',
'tag' => 'Tag',
])
->live()
->columnSpanFull(),

Select::make('branch')
->label('Branch')
->required()
->hidden(function (Get $get) {
return $get('clone_from') !== 'branch';
})
->options(function (Get $get) {
$url = $get('url');
$repoDetails = GitClient::getRepoDetailsByUrl($url);
if (isset($repoDetails['name'])) {
return $repoDetails['branches'];
}
})
->live()
->columnSpanFull()
->placeholder('Enter the branch of the repository'),

Select::make('tag')
->label('Tag')
->live()
->hidden(function (Get $get) {
return $get('clone_from') !== 'tag';
})
->options(function (Get $get) {
$url = $get('url');
$repoDetails = GitClient::getRepoDetailsByUrl($url);
if (isset($repoDetails['name'])) {
return $repoDetails['tags'];
}
})
->columnSpanFull()
->placeholder('Enter the tag of the repository'),
// Radio::make('clone_from')
// ->label('Clone from')
// ->options([
// 'branch' => 'Branch',
// 'tag' => 'Tag',
// ])
// ->live()
// ->columnSpanFull(),

// Select::make('branch')
// ->label('Branch')
// ->required()
// ->hidden(function (Get $get) {
// return $get('clone_from') !== 'branch';
// })
// ->options(function (Get $get) {
// $url = $get('url');
// $repoDetails = GitClient::getRepoDetailsByUrl($url);
// if (isset($repoDetails['name'])) {
// return $repoDetails['branches'];
// }
// })
// ->live()
// ->columnSpanFull()
// ->placeholder('Enter the branch of the repository'),
//
// Select::make('tag')
// ->label('Tag')
// ->live()
// ->hidden(function (Get $get) {
// return $get('clone_from') !== 'tag';
// })
// ->options(function (Get $get) {
// $url = $get('url');
// $repoDetails = GitClient::getRepoDetailsByUrl($url);
// if (isset($repoDetails['name'])) {
// return $repoDetails['tags'];
// }
// })
// ->columnSpanFull()
// ->placeholder('Enter the tag of the repository'),

]),
Wizard\Step::make('Clone to')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,22 @@ public static function table(Table $table): Table
$gitRepository->pull();

}),

Tables\Actions\EditAction::make('deploy')
->label('Deploy')
->icon('heroicon-o-command-line')
->form([
Forms\Components\Textarea::make('deployment_script')
->label('Deployment script')
->required()
->rows(15)
->columnSpanFull(),
Forms\Components\Toggle::make('quick_deploy')
->label('Quick deploy')
->columnSpanFull(),
]),


Tables\Actions\DeleteAction::make(),
])
->bulkActions([
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('git_repositories', function (Blueprint $table) {

$table->longText('deployment_script')->nullable();
$table->tinyInteger('quick_deploy')->nullable();

});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('git_repositories', function (Blueprint $table) {
$table->dropColumn('deployment_script');
});
}
};

0 comments on commit 6218b9f

Please sign in to comment.