Skip to content

Commit

Permalink
(fix) uniq tmp file name and show container name on the table head
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincobain2000 committed Jun 19, 2024
1 parent a7a1463 commit 261d573
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/partials/viewer/Inputs.astro
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
x-text="`(${formatBytes(filepath.file_size)})`"></span>
</label>
<span
class="text-gray-400 pr-2 text-right w-1/12"
class="text-gray-600 pr-2 text-sm text-right w-1/12"
x-text="`${numberToK(filepath.lines_count)}`"></span>
</div>
</li>
Expand Down
15 changes: 14 additions & 1 deletion frontend/src/components/partials/viewer/Table.astro
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,20 @@
>Level</th
>
<th scope="col" class="px-3 py-3">
<span class="font-mono" x-text="results.result.file_path"></span>
<template x-if="results.result.type == 'file'" >
<span class="font-mono" x-text="results.result.file_path"></span>
</template>
<template x-if="results.result.type == 'docker'" >
<span class="font-mono" x-text="results.result.host"></span>
</template>
<template x-if="results.result.type == 'docker' && !results.result.file_path.startsWith('/tmp/GOL-')" >
<span class="font-mono" x-text="results.result.file_path"></span>
</template>
<template x-if="results.result.type == 'stdin'" >
<span class="font-mono">STDIN</span>
</template>


</th>
</tr>
</thead>
Expand Down
2 changes: 1 addition & 1 deletion pkg/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func GetTmpFileNameForSTDIN() string {
func GetTmpFileNameForContainer() string {
gen, _ := g.NewGenerator([]g.Option{
func(opt *g.Options) error {
opt.Length = 2
opt.Length = 6
return nil
},
}...)
Expand Down

0 comments on commit 261d573

Please sign in to comment.