8 Commits

Author SHA1 Message Date
tex
9ca75af03c fix overflow in chromium
Some checks failed
Publish Image / build (push) Has been cancelled
2024-05-22 10:40:37 +08:00
Tex
56f710e056 Merge pull request #15 from STEAM-Center-NYC/github-org-sync-pagination
Pagination for GitHub User Sync
2024-03-18 13:55:34 +08:00
Justin
ce2f365c56 added pagination to github user sync 2024-02-26 14:16:07 +00:00
Tex
69b2ae6514 Merge pull request #8 from allburov/patch-1
Some checks failed
Publish Image / build (push) Has been cancelled
Use "bash bootstrap.sh"
2024-01-22 17:37:54 +08:00
Tex
50bdfa73bc Merge pull request #10 from allburov/patch-2
Increase appName and processName max limits
2024-01-22 17:37:22 +08:00
Alex
37a9e55061 Increase appName and processName max limits
fix #9
2024-01-18 19:58:38 +07:00
Alex
42d6985dab Use "bash bootstrap.sh" 2024-01-18 15:21:01 +07:00
Tex
ec8f853c84 fix docs link 2023-07-18 07:59:21 +08:00
13 changed files with 37 additions and 20 deletions

View File

@@ -8,7 +8,7 @@ A friendly interface for [Dokku](https://github.com/dokku/dokku), the open-sourc
![](https://raw.githubusercontent.com/texm/shokku/main/web/static/images/app-overview.webp) ![](https://raw.githubusercontent.com/texm/shokku/main/web/static/images/app-overview.webp)
## Usage ## Usage
Read the [docs](https://shokku.app) Read the [docs](https://shokku.dev/docs)
## Support ## Support
Shokku is provided 'as-is' - no support is available. Shokku is provided 'as-is' - no support is available.

View File

@@ -42,8 +42,8 @@ func NewRequestValidator() *requestValidator {
if err != nil { if err != nil {
log.Fatal().Err(err).Msg("failed to register validator") log.Fatal().Err(err).Msg("failed to register validator")
} }
v.RegisterAlias("appName", "appNameChars,min=4,max=16") v.RegisterAlias("appName", "appNameChars,min=4,max=32")
v.RegisterAlias("processName", "appNameChars,min=2,max=16") v.RegisterAlias("processName", "appNameChars,min=2,max=32")
return &requestValidator{validator: v} return &requestValidator{validator: v}
} }

View File

@@ -4,14 +4,15 @@ import (
"context" "context"
"encoding/json" "encoding/json"
"fmt" "fmt"
"io"
"net/http"
"time"
gh "github.com/google/go-github/v48/github" gh "github.com/google/go-github/v48/github"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gitlab.com/texm/shokku/internal/env" "gitlab.com/texm/shokku/internal/env"
"gitlab.com/texm/shokku/internal/models" "gitlab.com/texm/shokku/internal/models"
"gorm.io/gorm/clause" "gorm.io/gorm/clause"
"io"
"net/http"
"time"
) )
type githubUser struct { type githubUser struct {
@@ -49,10 +50,26 @@ func SyncUsersToDB(e *env.Env) error {
for _, install := range installs { for _, install := range installs {
var members []*gh.User var members []*gh.User
var err error var err error
var response *gh.Response
var options *gh.ListMembersOptions
if install.GetAccount().GetType() == "Organization" { if install.GetAccount().GetType() == "Organization" {
var temp_members []*gh.User
insClient := client.GetInstallationClient(install.GetID()) insClient := client.GetInstallationClient(install.GetID())
org := install.GetAccount().GetLogin() org := install.GetAccount().GetLogin()
members, _, err = insClient.Organizations.ListMembers(ctx, org, nil) temp_members, response, err = insClient.Organizations.ListMembers(ctx, org, options)
members = append(members, temp_members...)
for response.NextPage != 0 {
options := &gh.ListMembersOptions{
ListOptions: gh.ListOptions{
Page: response.NextPage,
},
}
temp_members, response, err = insClient.Organizations.ListMembers(ctx, org, options)
members = append(members, temp_members...)
}
} else { } else {
members = append(members, install.GetAccount()) members = append(members, install.GetAccount())
} }

View File

@@ -23,7 +23,7 @@
} }
</script> </script>
<div class="max-w-80 max-h-96 overflow-x-scroll" bind:this={msgContainer}> <div class="max-w-80 max-h-96 overflow-x-auto" bind:this={msgContainer}>
{#each output as line, i} {#each output as line, i}
<pre data-prefix={i} class:text-warning={line["type"] === "stderr"}><code <pre data-prefix={i} class:text-warning={line["type"] === "stderr"}><code
>{line["message"]}</code >{line["message"]}</code

View File

@@ -47,7 +47,7 @@
</div> </div>
<div <div
class="flex-grow max-w-80 h-80 overflow-x-scroll bg-base-content p-2" class="flex-grow max-w-80 h-80 overflow-x-auto bg-base-content p-2"
bind:this={scrollDiv} bind:this={scrollDiv}
> >
<div class="whitespace-pre-wrap flex flex-col"> <div class="whitespace-pre-wrap flex flex-col">

View File

@@ -1,6 +1,6 @@
<div class="flex flex-row max-h-full justify-center"> <div class="flex flex-row max-h-full justify-center">
<div class="card flex-shrink-0 w-full max-w-xl max-h-full"> <div class="card flex-shrink-0 w-full max-w-xl max-h-full">
<div class="card-body overflow-scroll"> <div class="card-body overflow-auto">
<slot /> <slot />
</div> </div>
</div> </div>

View File

@@ -2,12 +2,12 @@
<div class="hidden sm:flex rounded-lg flex-row w-full max-h-full"> <div class="hidden sm:flex rounded-lg flex-row w-full max-h-full">
<slot name="sidebar" /> <slot name="sidebar" />
<div class="pl-3 h-full w-full flex flex-col overflow-x-scroll"> <div class="pl-3 h-full w-full flex flex-col overflow-x-auto">
<div class="w-full"> <div class="w-full">
<slot name="header" /> <slot name="header" />
</div> </div>
<div class="overflow-scroll w-full h-full rounded-lg"> <div class="overflow-auto w-full h-full rounded-lg">
<slot name="content" /> <slot name="content" />
</div> </div>
</div> </div>
@@ -18,8 +18,8 @@
<slot name="header" /> <slot name="header" />
<slot name="sidebar" /> <slot name="sidebar" />
<div class="overflow-scroll h-full"> <div class="overflow-auto h-full">
<div class="rounded-lg w-full h-full overflow-scroll pb-6"> <div class="rounded-lg w-full h-full overflow-auto pb-6">
<slot name="content" /> <slot name="content" />
</div> </div>
</div> </div>

View File

@@ -2,7 +2,7 @@
export let logs; export let logs;
</script> </script>
<div class="overflow-x-scroll h-full bg-neutral px-4 rounded-lg"> <div class="overflow-x-auto h-full bg-neutral px-4 rounded-lg">
<div class="py-4 h-full text-neutral-content"> <div class="py-4 h-full text-neutral-content">
{#each logs as line, i} {#each logs as line, i}
<pre data-prefix={i}><code>{line.trim()}</code></pre> <pre data-prefix={i}><code>{line.trim()}</code></pre>

View File

@@ -22,7 +22,7 @@
</script> </script>
<div <div
class="menu rounded-box hidden sm:inline-block min-w-fit max-h-full bg-base-200 overflow-y-scroll shadow-lg h-fit" class="menu rounded-box hidden sm:inline-block min-w-fit max-h-full bg-base-200 overflow-y-auto shadow-lg h-fit"
> >
{#each pages as info, i} {#each pages as info, i}
<li class=""> <li class="">

View File

@@ -50,7 +50,7 @@
<div <div
class="flex flex-col bg-base-200 p-4 rounded-lg shadow-xl flex-grow max-h-full" class="flex flex-col bg-base-200 p-4 rounded-lg shadow-xl flex-grow max-h-full"
> >
<div class="overflow-scroll" in:fly={{ y: 100, duration: 250 }}> <div class="overflow-auto" in:fly={{ y: 100, duration: 250 }}>
<svelte:component <svelte:component
this={steps[currentStep].component} this={steps[currentStep].component}
{props} {props}

View File

@@ -17,7 +17,7 @@
const serviceStates = {}; const serviceStates = {};
</script> </script>
<div class="flex flex-col md:flex-row gap-8 p-4 h-full overflow-y-scroll"> <div class="flex flex-col md:flex-row gap-8 p-4 h-full overflow-y-auto">
<div class="hidden md:inline flex-grow" /> <div class="hidden md:inline flex-grow" />
<div class="max-w-full md:max-w-lg md:flex-grow"> <div class="max-w-full md:max-w-lg md:flex-grow">
<DashboardCardList <DashboardCardList

View File

@@ -18,7 +18,7 @@
</script> </script>
<div <div
class="flex gap-2 max-w-full overflow-scroll text-center items-center bg-base-100 p-4 rounded-lg" class="flex gap-2 max-w-full overflow-auto text-center items-center bg-base-100 p-4 rounded-lg"
> >
<span class="text-lg">{name}</span> <span class="text-lg">{name}</span>
<div class="tooltip tooltip-left flex-grow" data-tip={tooltipText}> <div class="tooltip tooltip-left flex-grow" data-tip={tooltipText}>

View File

@@ -3,7 +3,7 @@
const scriptInstallCommands = [ const scriptInstallCommands = [
`wget "${bootstrapLink}"`, `wget "${bootstrapLink}"`,
`export SHOKKU_LETSENCRYPT_EMAIL="foo@example.com"`, `export SHOKKU_LETSENCRYPT_EMAIL="foo@example.com"`,
`bash install.sh`, `bash bootstrap.sh`,
]; ];
</script> </script>