Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
* main:
  web: bump chromedriver from 122.0.5 to 122.0.6 in /tests/wdio (#8902)
  web: bump vite-tsconfig-paths from 4.3.1 to 4.3.2 in /web (#8903)
  core: bump google.golang.org/protobuf from 1.32.0 to 1.33.0 (#8901)
  web: provide InstallID on EnterpriseListPage (#8898)
  • Loading branch information
kensternberg-authentik committed Mar 14, 2024
2 parents 2d0117d + be1219a commit 22cb5b7
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 32 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ require (
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.32.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/square/go-jose.v2 v2.5.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
Expand Down
8 changes: 4 additions & 4 deletions tests/wdio/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/wdio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
"node": ">=20"
},
"dependencies": {
"chromedriver": "^122.0.5"
"chromedriver": "^122.0.6"
}
}
15 changes: 8 additions & 7 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"tslib": "^2.6.2",
"turnstile-types": "^1.2.0",
"typescript": "^5.4.2",
"vite-tsconfig-paths": "^4.3.1"
"vite-tsconfig-paths": "^4.3.2"
},
"optionalDependencies": {
"@esbuild/darwin-arm64": "^0.20.1",
Expand Down
50 changes: 34 additions & 16 deletions web/src/admin/enterprise/EnterpriseLicenseListPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,22 +158,7 @@ export class EnterpriseLicenseListPage extends TablePage<License> {
<div
class="pf-l-grid pf-m-gutter pf-m-all-6-col-on-sm pf-m-all-4-col-on-md pf-m-all-3-col-on-lg pf-m-all-3-col-on-xl"
>
<div class="pf-l-grid__item pf-c-card">
<div class="pf-c-card__title">${msg("Get a license")}</div>
<div class="pf-c-card__body">
${this.installID
? html` <a
target="_blank"
href=${`https://customers.goauthentik.io/from_authentik/purchase/?install_id=${encodeURIComponent(
this.installID,
)}&authentik_url=${encodeURI(window.location.origin)}`}
class="pf-c-button pf-m-primary pf-m-block"
>${msg("Go to Customer Portal")}</a
>`
: html`<ak-spinner></ak-spinner>`}
</div>
</div>
${this.renderGetLicenseCard()}
<ak-aggregate-card
class="pf-l-grid__item"
icon="pf-icon pf-icon-user"
Expand Down Expand Up @@ -249,6 +234,39 @@ export class EnterpriseLicenseListPage extends TablePage<License> {
];
}

renderGetLicenseCard() {
const renderSpinner = () =>
html` <div class="pf-c-card__body">
<ak-spinner></ak-spinner>
</div>`;

const installURL = (installID: string) =>
[
"https://customers.goauthentik.io/from_authentik/purchase/?install_id=",
encodeURIComponent(installID),
"&authentik_url=",
encodeURI(window.location.origin),
].join("");

const renderCard = (installID: string) => html`
<div class="pf-c-card__title">${msg("Get a license")}</div>
<div class="pf-c-card__body">
<a
target="_blank"
href="${installURL(installID)}"
class="pf-c-button pf-m-primary pf-m-block"
>${msg("Go to Customer Portal")}</a
>
</div>
<div class="pf-c-card__title">${msg("Your Install ID")}</div>
<div class="pf-c-card__body">${installID}</div>
`;

return html`<div class="pf-l-grid__item pf-c-card">
${this.installID ? renderCard(this.installID) : renderSpinner()}
</div> `;
}

renderObjectCreate(): TemplateResult {
return html`
<ak-forms-modal>
Expand Down

0 comments on commit 22cb5b7

Please sign in to comment.