Compare commits
9 Commits
website/do
...
import-org
Author | SHA1 | Date | |
---|---|---|---|
0b96a98183 | |||
d948345096 | |||
ecfd1b077d | |||
3e67e358ce | |||
c1032386c6 | |||
55cb7f3f2c | |||
0c4e5bfc22 | |||
69e5b1dfbe | |||
ccc2a5bdfe |
@ -2,8 +2,11 @@
|
|||||||
* @file Prettier configuration for authentik.
|
* @file Prettier configuration for authentik.
|
||||||
*
|
*
|
||||||
* @import { Config as PrettierConfig } from "prettier";
|
* @import { Config as PrettierConfig } from "prettier";
|
||||||
* @import { PluginConfig as SortPluginConfig } from "@trivago/prettier-plugin-sort-imports";
|
*/
|
||||||
*
|
|
||||||
|
import { importsPlugin } from "./imports.js";
|
||||||
|
|
||||||
|
/**
|
||||||
* @typedef {object} PackageJSONPluginConfig
|
* @typedef {object} PackageJSONPluginConfig
|
||||||
* @property {string[]} [packageSortOrder] Custom ordering array.
|
* @property {string[]} [packageSortOrder] Custom ordering array.
|
||||||
*/
|
*/
|
||||||
@ -11,7 +14,7 @@
|
|||||||
/**
|
/**
|
||||||
* authentik Prettier configuration.
|
* authentik Prettier configuration.
|
||||||
*
|
*
|
||||||
* @type {PrettierConfig & SortPluginConfig & PackageJSONPluginConfig}
|
* @type {PrettierConfig & PackageJSONPluginConfig}
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
export const AuthentikPrettierConfig = {
|
export const AuthentikPrettierConfig = {
|
||||||
@ -34,32 +37,8 @@ export const AuthentikPrettierConfig = {
|
|||||||
plugins: [
|
plugins: [
|
||||||
// ---
|
// ---
|
||||||
"prettier-plugin-packagejson",
|
"prettier-plugin-packagejson",
|
||||||
"@trivago/prettier-plugin-sort-imports",
|
importsPlugin(),
|
||||||
],
|
],
|
||||||
importOrder: [
|
|
||||||
// ---
|
|
||||||
|
|
||||||
"^(@goauthentik/|#)common.+",
|
|
||||||
"^(@goauthentik/|#)elements.+",
|
|
||||||
"^(@goauthentik/|#)components.+",
|
|
||||||
"^(@goauthentik/|#)user.+",
|
|
||||||
"^(@goauthentik/|#)admin.+",
|
|
||||||
"^(@goauthentik/|#)flow.+",
|
|
||||||
|
|
||||||
"^#.+",
|
|
||||||
"^@goauthentik.+",
|
|
||||||
|
|
||||||
"<THIRD_PARTY_MODULES>",
|
|
||||||
|
|
||||||
"^(@?)lit(.*)$",
|
|
||||||
"\\.css$",
|
|
||||||
"^@goauthentik/api$",
|
|
||||||
"^[./]",
|
|
||||||
],
|
|
||||||
importOrderSideEffects: false,
|
|
||||||
importOrderSeparation: true,
|
|
||||||
importOrderSortSpecifiers: true,
|
|
||||||
importOrderParserPlugins: ["typescript", "jsx", "classProperties", "decorators-legacy"],
|
|
||||||
overrides: [
|
overrides: [
|
||||||
{
|
{
|
||||||
files: "schemas/**/*.json",
|
files: "schemas/**/*.json",
|
||||||
|
172
packages/prettier-config/lib/imports.js
Normal file
172
packages/prettier-config/lib/imports.js
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
import { createRequire } from "node:module";
|
||||||
|
|
||||||
|
import { formatSourceFromFile } from "format-imports";
|
||||||
|
import { parsers as babelParsers } from "prettier/plugins/babel";
|
||||||
|
/**
|
||||||
|
* @file Prettier import plugin.
|
||||||
|
*
|
||||||
|
* @import { Plugin, ParserOptions } from "prettier";
|
||||||
|
*/
|
||||||
|
import { parsers as typescriptParsers } from "prettier/plugins/typescript";
|
||||||
|
|
||||||
|
const require = createRequire(process.cwd() + "/");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} name
|
||||||
|
* @returns {string | null}
|
||||||
|
*/
|
||||||
|
function resolveModule(name) {
|
||||||
|
try {
|
||||||
|
return require.resolve(name);
|
||||||
|
} catch (error) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const webSubmodules = [
|
||||||
|
// ---
|
||||||
|
"common",
|
||||||
|
"elements",
|
||||||
|
"components",
|
||||||
|
"user",
|
||||||
|
"admin",
|
||||||
|
"flow",
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ensure that every import without an extension adds one.
|
||||||
|
* @param {string} input
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function normalizeExtensions(input) {
|
||||||
|
return input.replace(/(?:import|from)\s*["']((?:\.\.?\/).*?)(?<!\.\w+)["']/gm, (line, path) => {
|
||||||
|
return line.replace(path, `${path}.js`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} filepath
|
||||||
|
* @param {string} input
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function normalizeImports(filepath, input) {
|
||||||
|
let output = input;
|
||||||
|
|
||||||
|
// Replace all TypeScript imports with the paths resolved by Node/Browser import maps.
|
||||||
|
|
||||||
|
for (const submodule of webSubmodules) {
|
||||||
|
const legacyPattern = new RegExp(
|
||||||
|
[
|
||||||
|
// ---
|
||||||
|
`(?:import|from)`,
|
||||||
|
`\\\(?\\n?\\s*`,
|
||||||
|
`"(?<suffix>@goauthentik\/${submodule}\/)`,
|
||||||
|
|
||||||
|
`(?<path>[^"'.]+)`,
|
||||||
|
`(?:\.[^"']+)?["']`,
|
||||||
|
`\\n?\\s*\\\)?;`,
|
||||||
|
].join(""),
|
||||||
|
"gm",
|
||||||
|
);
|
||||||
|
|
||||||
|
output = output.replace(
|
||||||
|
legacyPattern,
|
||||||
|
/**
|
||||||
|
* @param {string} line
|
||||||
|
* @param {string} suffix
|
||||||
|
* @param {string} path
|
||||||
|
*/
|
||||||
|
(line, suffix, path) => {
|
||||||
|
const exported = `@goauthentik/web/${submodule}/${path}`;
|
||||||
|
let imported = `#${submodule}/${path}`;
|
||||||
|
|
||||||
|
let module = resolveModule(`${exported}.ts`);
|
||||||
|
|
||||||
|
if (!module) {
|
||||||
|
module = resolveModule(`${exported}/index.ts`);
|
||||||
|
imported += "/index";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (imported.endsWith(".css")) {
|
||||||
|
imported += ".js";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!module) {
|
||||||
|
console.warn(`\nCannot resolve module ${exported} from ${filepath}`, {
|
||||||
|
line,
|
||||||
|
path,
|
||||||
|
exported,
|
||||||
|
imported,
|
||||||
|
module,
|
||||||
|
});
|
||||||
|
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
line
|
||||||
|
// ---
|
||||||
|
.replace(suffix + path, imported)
|
||||||
|
.replace(`${imported}.js`, imported)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns {Plugin}
|
||||||
|
*/
|
||||||
|
export function importsPlugin({
|
||||||
|
useLegacyCleanup = process.env.AK_FIX_LEGACY_IMPORTS === "true",
|
||||||
|
} = {}) {
|
||||||
|
/**
|
||||||
|
* @param {string} input
|
||||||
|
* @param {ParserOptions} options
|
||||||
|
*/
|
||||||
|
const preprocess = (input, { filepath, printWidth }) => {
|
||||||
|
let output = input;
|
||||||
|
|
||||||
|
if (useLegacyCleanup) {
|
||||||
|
output = normalizeExtensions(input);
|
||||||
|
output = normalizeImports(filepath, output);
|
||||||
|
}
|
||||||
|
|
||||||
|
const value = formatSourceFromFile.sync(output, filepath, {
|
||||||
|
nodeProtocol: "always",
|
||||||
|
maxLineLength: printWidth,
|
||||||
|
wrappingStyle: "prettier",
|
||||||
|
groupRules: [
|
||||||
|
"^node:",
|
||||||
|
...webSubmodules.map((submodule) => `^(@goauthentik/|#)${submodule}.+`),
|
||||||
|
|
||||||
|
"^#.+",
|
||||||
|
"^@goauthentik.+",
|
||||||
|
|
||||||
|
{}, // Other imports.
|
||||||
|
|
||||||
|
"^(@?)lit(.*)$",
|
||||||
|
"\\.css$",
|
||||||
|
"^@goauthentik/api$",
|
||||||
|
"^[./]",
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
return value || input;
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
parsers: {
|
||||||
|
typescript: {
|
||||||
|
...typescriptParsers.typescript,
|
||||||
|
preprocess,
|
||||||
|
},
|
||||||
|
babel: {
|
||||||
|
...babelParsers.babel,
|
||||||
|
preprocess,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
1846
packages/prettier-config/package-lock.json
generated
1846
packages/prettier-config/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@goauthentik/prettier-config",
|
"name": "@goauthentik/prettier-config",
|
||||||
"version": "2.0.1",
|
"version": "3.0.0",
|
||||||
"description": "authentik's Prettier config",
|
"description": "authentik's Prettier config",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -10,19 +10,19 @@
|
|||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": "./index.js",
|
"exports": "./index.js",
|
||||||
|
"dependencies": {
|
||||||
|
"format-imports": "^4.0.7"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@goauthentik/tsconfig": "^1.0.1",
|
"@goauthentik/tsconfig": "^1.0.1",
|
||||||
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
"@types/node": "^24.0.4",
|
||||||
"prettier": "^3.5.3",
|
"prettier": "^3.6.1",
|
||||||
"prettier-plugin-organize-imports": "^4.1.0",
|
"prettier-plugin-packagejson": "^2.5.16",
|
||||||
"prettier-plugin-packagejson": "^2.5.15",
|
|
||||||
"typescript": "^5.8.3"
|
"typescript": "^5.8.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
"prettier": "^3.6.1",
|
||||||
"prettier": "^3.5.3",
|
"prettier-plugin-packagejson": "^2.5.16"
|
||||||
"prettier-plugin-organize-imports": "^4.1.0",
|
|
||||||
"prettier-plugin-packagejson": "^2.5.15"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=22"
|
"node": ">=22"
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
* @import { InlineConfig, Plugin } from "vite";
|
* @import { InlineConfig, Plugin } from "vite";
|
||||||
*/
|
*/
|
||||||
import postcssLit from "rollup-plugin-postcss-lit";
|
import postcssLit from "rollup-plugin-postcss-lit";
|
||||||
import tsconfigPaths from "vite-tsconfig-paths";
|
|
||||||
|
|
||||||
const CSSImportPattern = /import [\w$]+ from .+\.(css)/g;
|
const CSSImportPattern = /import [\w$]+ from .+\.(css)/g;
|
||||||
const JavaScriptFilePattern = /\.m?(js|ts|tsx)$/;
|
const JavaScriptFilePattern = /\.m?(js|ts|tsx)$/;
|
||||||
@ -61,7 +60,7 @@ const config = {
|
|||||||
*/
|
*/
|
||||||
const overrides = {
|
const overrides = {
|
||||||
define: createBundleDefinitions(),
|
define: createBundleDefinitions(),
|
||||||
plugins: [inlineCSSPlugin, postcssLit(), tsconfigPaths()],
|
plugins: [inlineCSSPlugin, postcssLit()],
|
||||||
};
|
};
|
||||||
|
|
||||||
return mergeConfig(config, overrides);
|
return mergeConfig(config, overrides);
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
* @import { ThemeVarsPartial } from "storybook/internal/theming";
|
* @import { ThemeVarsPartial } from "storybook/internal/theming";
|
||||||
*/
|
*/
|
||||||
import { createUIThemeEffect, resolveUITheme } from "@goauthentik/web/common/theme.ts";
|
import { createUIThemeEffect, resolveUITheme } from "@goauthentik/web/common/theme.ts";
|
||||||
|
|
||||||
import { addons } from "@storybook/manager-api";
|
import { addons } from "@storybook/manager-api";
|
||||||
import { create } from "@storybook/theming/create";
|
import { create } from "@storybook/theming/create";
|
||||||
|
|
||||||
|
@ -10,10 +10,11 @@
|
|||||||
* PluginBuild
|
* PluginBuild
|
||||||
* } from "esbuild"
|
* } from "esbuild"
|
||||||
*/
|
*/
|
||||||
import { MonoRepoRoot } from "@goauthentik/core/paths/node";
|
|
||||||
import * as fs from "node:fs/promises";
|
import * as fs from "node:fs/promises";
|
||||||
import * as path from "node:path";
|
import * as path from "node:path";
|
||||||
|
|
||||||
|
import { MonoRepoRoot } from "@goauthentik/core/paths/node";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Omit<OnLoadArgs, 'pluginData'> & LoadDataFields} LoadData Data passed to `onload`.
|
* @typedef {Omit<OnLoadArgs, 'pluginData'> & LoadDataFields} LoadData Data passed to `onload`.
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { createESLintPackageConfig } from "@goauthentik/eslint-config";
|
import { createESLintPackageConfig } from "@goauthentik/eslint-config";
|
||||||
|
|
||||||
import tseslint from "typescript-eslint";
|
import tseslint from "typescript-eslint";
|
||||||
|
|
||||||
// @ts-check
|
// @ts-check
|
||||||
|
46
web/package-lock.json
generated
46
web/package-lock.json
generated
@ -128,7 +128,6 @@
|
|||||||
"typescript": "^5.8.3",
|
"typescript": "^5.8.3",
|
||||||
"typescript-eslint": "^8.35.0",
|
"typescript-eslint": "^8.35.0",
|
||||||
"vite-plugin-lit-css": "^2.0.0",
|
"vite-plugin-lit-css": "^2.0.0",
|
||||||
"vite-tsconfig-paths": "^5.0.1",
|
|
||||||
"wireit": "^0.14.12"
|
"wireit": "^0.14.12"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -16314,12 +16313,6 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/globrex": {
|
|
||||||
"version": "0.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz",
|
|
||||||
"integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"node_modules/gopd": {
|
"node_modules/gopd": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
|
||||||
@ -26430,26 +26423,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz",
|
||||||
"integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w=="
|
"integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w=="
|
||||||
},
|
},
|
||||||
"node_modules/tsconfck": {
|
|
||||||
"version": "3.1.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.1.3.tgz",
|
|
||||||
"integrity": "sha512-ulNZP1SVpRDesxeMLON/LtWM8HIgAJEIVpVVhBM6gsmvQ8+Rh+ZG7FWGvHh7Ah3pRABwVJWklWCr/BTZSv0xnQ==",
|
|
||||||
"dev": true,
|
|
||||||
"bin": {
|
|
||||||
"tsconfck": "bin/tsconfck.js"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^18 || >=20"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"typescript": "^5.0.0"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"typescript": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/tsconfig-paths": {
|
"node_modules/tsconfig-paths": {
|
||||||
"version": "3.15.0",
|
"version": "3.15.0",
|
||||||
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
|
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
|
||||||
@ -27772,25 +27745,6 @@
|
|||||||
"uuid": "dist/bin/uuid"
|
"uuid": "dist/bin/uuid"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vite-tsconfig-paths": {
|
|
||||||
"version": "5.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-5.0.1.tgz",
|
|
||||||
"integrity": "sha512-yqwv+LstU7NwPeNqajZzLEBVpUFU6Dugtb2P84FXuvaoYA+/70l9MHE+GYfYAycVyPSDYZ7mjOFuYBRqlEpTig==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"debug": "^4.1.1",
|
|
||||||
"globrex": "^0.1.2",
|
|
||||||
"tsconfck": "^3.0.3"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"vite": "*"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"vite": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/vite/node_modules/@esbuild/aix-ppc64": {
|
"node_modules/vite/node_modules/@esbuild/aix-ppc64": {
|
||||||
"version": "0.21.5",
|
"version": "0.21.5",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
|
||||||
|
@ -148,7 +148,7 @@
|
|||||||
"@goauthentik/core": "^1.0.0",
|
"@goauthentik/core": "^1.0.0",
|
||||||
"@goauthentik/esbuild-plugin-live-reload": "^1.0.5",
|
"@goauthentik/esbuild-plugin-live-reload": "^1.0.5",
|
||||||
"@goauthentik/eslint-config": "^1.0.5",
|
"@goauthentik/eslint-config": "^1.0.5",
|
||||||
"@goauthentik/prettier-config": "^1.0.5",
|
"@goauthentik/prettier-config": "^3.0.0",
|
||||||
"@goauthentik/tsconfig": "^1.0.4",
|
"@goauthentik/tsconfig": "^1.0.4",
|
||||||
"@hcaptcha/types": "^1.0.4",
|
"@hcaptcha/types": "^1.0.4",
|
||||||
"@lit/localize-tools": "^0.8.0",
|
"@lit/localize-tools": "^0.8.0",
|
||||||
@ -199,7 +199,6 @@
|
|||||||
"typescript": "^5.8.3",
|
"typescript": "^5.8.3",
|
||||||
"typescript-eslint": "^8.35.0",
|
"typescript-eslint": "^8.35.0",
|
||||||
"vite-plugin-lit-css": "^2.0.0",
|
"vite-plugin-lit-css": "^2.0.0",
|
||||||
"vite-tsconfig-paths": "^5.0.1",
|
|
||||||
"wireit": "^0.14.12"
|
"wireit": "^0.14.12"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
|
@ -7,6 +7,4 @@
|
|||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export {};
|
|
||||||
|
|
||||||
export default {};
|
export default {};
|
||||||
|
@ -3,9 +3,12 @@
|
|||||||
*
|
*
|
||||||
* @runtime node
|
* @runtime node
|
||||||
*/
|
*/
|
||||||
import { MonoRepoRoot } from "#paths/node";
|
|
||||||
import { execSync } from "node:child_process";
|
import { execSync } from "node:child_process";
|
||||||
|
|
||||||
|
import { MonoRepoRoot } from "#paths/node";
|
||||||
|
|
||||||
|
// ts-import-sorter: disable
|
||||||
import PackageJSON from "../../../../package.json" with { type: "json" };
|
import PackageJSON from "../../../../package.json" with { type: "json" };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* @file Rollup configuration for the SFE package.
|
* @file Rollup configuration for the SFE package.
|
||||||
*/
|
*/
|
||||||
|
import { resolve as resolvePath } from "node:path";
|
||||||
|
|
||||||
import commonjs from "@rollup/plugin-commonjs";
|
import commonjs from "@rollup/plugin-commonjs";
|
||||||
import resolve from "@rollup/plugin-node-resolve";
|
import resolve from "@rollup/plugin-node-resolve";
|
||||||
import swc from "@rollup/plugin-swc";
|
import swc from "@rollup/plugin-swc";
|
||||||
import { resolve as resolvePath } from "node:path";
|
|
||||||
import copy from "rollup-plugin-copy";
|
import copy from "rollup-plugin-copy";
|
||||||
|
|
||||||
export async function createConfig() {
|
export async function createConfig() {
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
import { fromByteArray } from "base64-js";
|
|
||||||
import "formdata-polyfill";
|
import "formdata-polyfill";
|
||||||
import $ from "jquery";
|
|
||||||
import "weakmap-polyfill";
|
import "weakmap-polyfill";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@ -16,6 +14,9 @@ import {
|
|||||||
type RedirectChallenge,
|
type RedirectChallenge,
|
||||||
} from "@goauthentik/api";
|
} from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { fromByteArray } from "base64-js";
|
||||||
|
import $ from "jquery";
|
||||||
|
|
||||||
interface GlobalAuthentik {
|
interface GlobalAuthentik {
|
||||||
brand: {
|
brand: {
|
||||||
branding_logo: string;
|
branding_logo: string;
|
||||||
|
@ -3,10 +3,12 @@
|
|||||||
*
|
*
|
||||||
* @runtime node
|
* @runtime node
|
||||||
*/
|
*/
|
||||||
import { DistDirectoryName } from "#paths";
|
|
||||||
import { dirname, resolve } from "node:path";
|
import { dirname, resolve } from "node:path";
|
||||||
import { fileURLToPath } from "node:url";
|
import { fileURLToPath } from "node:url";
|
||||||
|
|
||||||
|
import { DistDirectoryName } from "#paths";
|
||||||
|
|
||||||
const relativeDirname = dirname(fileURLToPath(import.meta.url));
|
const relativeDirname = dirname(fileURLToPath(import.meta.url));
|
||||||
|
|
||||||
//#region Base paths
|
//#region Base paths
|
||||||
|
@ -9,14 +9,15 @@
|
|||||||
* long spew of "this string is not translated" and replacing it with a
|
* long spew of "this string is not translated" and replacing it with a
|
||||||
* summary of how many strings are missing with respect to the source locale.
|
* summary of how many strings are missing with respect to the source locale.
|
||||||
*
|
*
|
||||||
* @import { ConfigFile } from "@lit/localize-tools/lib/types/config"
|
* @import { ConfigFile } from "@lit/localize-tools/lib/types/config.js"
|
||||||
* @import { Stats } from "fs";
|
* @import { Stats } from "node:fs";
|
||||||
*/
|
*/
|
||||||
import { PackageRoot } from "#paths/node";
|
|
||||||
import { spawnSync } from "node:child_process";
|
import { spawnSync } from "node:child_process";
|
||||||
import { readFileSync, statSync } from "node:fs";
|
import { readFileSync, statSync } from "node:fs";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
|
|
||||||
|
import { PackageRoot } from "#paths/node";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {ConfigFile}
|
* @type {ConfigFile}
|
||||||
*/
|
*/
|
||||||
|
@ -1,21 +1,25 @@
|
|||||||
/// <reference types="../types/esbuild.js" />
|
|
||||||
/**
|
/**
|
||||||
* @file ESBuild script for building the authentik web UI.
|
* @file ESBuild script for building the authentik web UI.
|
||||||
*
|
*
|
||||||
* @import { BuildOptions } from "esbuild";
|
* @import { BuildOptions } from "esbuild";
|
||||||
*/
|
*/
|
||||||
|
import * as fs from "node:fs/promises";
|
||||||
|
import * as path from "node:path";
|
||||||
|
|
||||||
import { mdxPlugin } from "#bundler/mdx-plugin/node";
|
import { mdxPlugin } from "#bundler/mdx-plugin/node";
|
||||||
import { createBundleDefinitions } from "#bundler/utils/node";
|
import { createBundleDefinitions } from "#bundler/utils/node";
|
||||||
import { DistDirectory, EntryPoint, PackageRoot } from "#paths/node";
|
import { DistDirectory, EntryPoint, PackageRoot } from "#paths/node";
|
||||||
|
|
||||||
import { NodeEnvironment } from "@goauthentik/core/environment/node";
|
import { NodeEnvironment } from "@goauthentik/core/environment/node";
|
||||||
import { MonoRepoRoot, resolvePackage } from "@goauthentik/core/paths/node";
|
import { MonoRepoRoot, resolvePackage } from "@goauthentik/core/paths/node";
|
||||||
import { readBuildIdentifier } from "@goauthentik/core/version/node";
|
import { readBuildIdentifier } from "@goauthentik/core/version/node";
|
||||||
|
|
||||||
import { deepmerge } from "deepmerge-ts";
|
import { deepmerge } from "deepmerge-ts";
|
||||||
import esbuild from "esbuild";
|
import esbuild from "esbuild";
|
||||||
import copy from "esbuild-plugin-copy";
|
import { copy } from "esbuild-plugin-copy";
|
||||||
import { polyfillNode } from "esbuild-plugin-polyfill-node";
|
import { polyfillNode } from "esbuild-plugin-polyfill-node";
|
||||||
import * as fs from "node:fs/promises";
|
|
||||||
import * as path from "node:path";
|
/// <reference types="../types/esbuild.js" />
|
||||||
|
|
||||||
const logPrefix = "[Build]";
|
const logPrefix = "[Build]";
|
||||||
|
|
||||||
|
@ -6,9 +6,12 @@
|
|||||||
* @import { ProgramMessage } from "@lit/localize-tools/src/messages.js"
|
* @import { ProgramMessage } from "@lit/localize-tools/src/messages.js"
|
||||||
* @import { Locale } from "@lit/localize-tools/src/types/locale.js"
|
* @import { Locale } from "@lit/localize-tools/src/types/locale.js"
|
||||||
*/
|
*/
|
||||||
import { PackageRoot } from "#paths/node";
|
|
||||||
import { readFileSync } from "node:fs";
|
import { readFileSync } from "node:fs";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
|
|
||||||
|
import { PackageRoot } from "#paths/node";
|
||||||
|
|
||||||
import pseudolocale from "pseudolocale";
|
import pseudolocale from "pseudolocale";
|
||||||
|
|
||||||
import { makeFormatter } from "@lit/localize-tools/lib/formatters/index.js";
|
import { makeFormatter } from "@lit/localize-tools/lib/formatters/index.js";
|
||||||
|
@ -1,19 +1,21 @@
|
|||||||
|
import "#elements/EmptyState";
|
||||||
|
|
||||||
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
|
import { globalAK } from "#common/global";
|
||||||
|
|
||||||
|
import { ModalButton } from "#elements/buttons/ModalButton";
|
||||||
import { WithBrandConfig } from "#elements/mixins/branding";
|
import { WithBrandConfig } from "#elements/mixins/branding";
|
||||||
import { WithLicenseSummary } from "#elements/mixins/license";
|
import { WithLicenseSummary } from "#elements/mixins/license";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
|
||||||
import { globalAK } from "@goauthentik/common/global";
|
import { AdminApi, CapabilitiesEnum, LicenseSummaryStatusEnum } from "@goauthentik/api";
|
||||||
import "@goauthentik/elements/EmptyState";
|
|
||||||
import { ModalButton } from "@goauthentik/elements/buttons/ModalButton";
|
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { TemplateResult, css, html } from "lit";
|
import { css, html, TemplateResult } from "lit";
|
||||||
import { customElement } from "lit/decorators.js";
|
import { customElement } from "lit/decorators.js";
|
||||||
import { until } from "lit/directives/until.js";
|
import { until } from "lit/directives/until.js";
|
||||||
|
|
||||||
import PFAbout from "@patternfly/patternfly/components/AboutModalBox/about-modal-box.css";
|
import PFAbout from "@patternfly/patternfly/components/AboutModalBox/about-modal-box.css";
|
||||||
|
|
||||||
import { AdminApi, CapabilitiesEnum, LicenseSummaryStatusEnum } from "@goauthentik/api";
|
|
||||||
|
|
||||||
@customElement("ak-about-modal")
|
@customElement("ak-about-modal")
|
||||||
export class AboutModal extends WithLicenseSummary(WithBrandConfig(ModalButton)) {
|
export class AboutModal extends WithLicenseSummary(WithBrandConfig(ModalButton)) {
|
||||||
static get styles() {
|
static get styles() {
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import { ID_REGEX, SLUG_REGEX, UUID_REGEX } from "@goauthentik/elements/router/Route";
|
import { ID_REGEX, SLUG_REGEX, UUID_REGEX } from "#elements/router/Route";
|
||||||
|
|
||||||
import { spread } from "@open-wc/lit-helpers";
|
import { spread } from "@open-wc/lit-helpers";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { TemplateResult, html, nothing } from "lit";
|
import { html, nothing, TemplateResult } from "lit";
|
||||||
import { repeat } from "lit/directives/repeat.js";
|
import { repeat } from "lit/directives/repeat.js";
|
||||||
|
|
||||||
// The second attribute type is of string[] to help with the 'activeWhen' control, which was
|
// The second attribute type is of string[] to help with the 'activeWhen' control, which was
|
||||||
|
@ -1,28 +1,31 @@
|
|||||||
import "#admin/AdminInterface/AboutModal";
|
import "#admin/AdminInterface/AboutModal";
|
||||||
import type { AboutModal } from "#admin/AdminInterface/AboutModal";
|
|
||||||
import { ROUTES } from "#admin/Routes";
|
|
||||||
import { EVENT_API_DRAWER_TOGGLE, EVENT_NOTIFICATION_DRAWER_TOGGLE } from "#common/constants";
|
|
||||||
import { configureSentry } from "#common/sentry/index";
|
|
||||||
import { me } from "#common/users";
|
|
||||||
import { WebsocketClient } from "#common/ws";
|
|
||||||
import { SidebarToggleEventDetail } from "#components/ak-page-header";
|
|
||||||
import { AuthenticatedInterface } from "#elements/AuthenticatedInterface";
|
|
||||||
import "#elements/ak-locale-context/ak-locale-context";
|
import "#elements/ak-locale-context/ak-locale-context";
|
||||||
import "#elements/banner/EnterpriseStatusBanner";
|
import "#elements/banner/EnterpriseStatusBanner";
|
||||||
import "#elements/banner/EnterpriseStatusBanner";
|
|
||||||
import "#elements/banner/VersionBanner";
|
|
||||||
import "#elements/banner/VersionBanner";
|
import "#elements/banner/VersionBanner";
|
||||||
import "#elements/messages/MessageContainer";
|
import "#elements/messages/MessageContainer";
|
||||||
import "#elements/messages/MessageContainer";
|
|
||||||
import { WithCapabilitiesConfig } from "#elements/mixins/capabilities";
|
|
||||||
import "#elements/notifications/APIDrawer";
|
import "#elements/notifications/APIDrawer";
|
||||||
import "#elements/notifications/NotificationDrawer";
|
import "#elements/notifications/NotificationDrawer";
|
||||||
import { getURLParam, updateURLParams } from "#elements/router/RouteMatch";
|
|
||||||
import "#elements/router/RouterOutlet";
|
import "#elements/router/RouterOutlet";
|
||||||
import "#elements/sidebar/Sidebar";
|
import "#elements/sidebar/Sidebar";
|
||||||
import "#elements/sidebar/SidebarItem";
|
import "#elements/sidebar/SidebarItem";
|
||||||
|
|
||||||
import { CSSResult, TemplateResult, css, html, nothing } from "lit";
|
import { EVENT_API_DRAWER_TOGGLE, EVENT_NOTIFICATION_DRAWER_TOGGLE } from "#common/constants";
|
||||||
|
import { configureSentry } from "#common/sentry/index";
|
||||||
|
import { me } from "#common/users";
|
||||||
|
import { WebsocketClient } from "#common/ws";
|
||||||
|
|
||||||
|
import { AuthenticatedInterface } from "#elements/AuthenticatedInterface";
|
||||||
|
import { WithCapabilitiesConfig } from "#elements/mixins/capabilities";
|
||||||
|
import { getURLParam, updateURLParams } from "#elements/router/RouteMatch";
|
||||||
|
|
||||||
|
import { SidebarToggleEventDetail } from "#components/ak-page-header";
|
||||||
|
|
||||||
|
import type { AboutModal } from "#admin/AdminInterface/AboutModal";
|
||||||
|
import { ROUTES } from "#admin/Routes";
|
||||||
|
|
||||||
|
import { CapabilitiesEnum, SessionUser, UiThemeEnum } from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { css, CSSResult, html, nothing, TemplateResult } from "lit";
|
||||||
import { customElement, eventOptions, property, query } from "lit/decorators.js";
|
import { customElement, eventOptions, property, query } from "lit/decorators.js";
|
||||||
import { classMap } from "lit/directives/class-map.js";
|
import { classMap } from "lit/directives/class-map.js";
|
||||||
|
|
||||||
@ -32,8 +35,6 @@ import PFNav from "@patternfly/patternfly/components/Nav/nav.css";
|
|||||||
import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
||||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||||
|
|
||||||
import { CapabilitiesEnum, SessionUser, UiThemeEnum } from "@goauthentik/api";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AdminSidebarEnterpriseEntries,
|
AdminSidebarEnterpriseEntries,
|
||||||
AdminSidebarEntries,
|
AdminSidebarEntries,
|
||||||
|
@ -1,12 +1,17 @@
|
|||||||
|
import "#components/ak-page-header";
|
||||||
|
|
||||||
import { DEFAULT_CONFIG } from "#common/api/config";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { parseAPIResponseError, pluckErrorDetail } from "#common/errors/network";
|
import { parseAPIResponseError, pluckErrorDetail } from "#common/errors/network";
|
||||||
import { MessageLevel } from "#common/messages";
|
import { MessageLevel } from "#common/messages";
|
||||||
import "#components/ak-page-header";
|
|
||||||
import { AKElement } from "#elements/Base";
|
import { AKElement } from "#elements/Base";
|
||||||
import { showMessage } from "#elements/messages/MessageContainer";
|
import { showMessage } from "#elements/messages/MessageContainer";
|
||||||
|
|
||||||
|
import { AdminApi } from "@goauthentik/api";
|
||||||
|
|
||||||
import * as Sentry from "@sentry/browser";
|
import * as Sentry from "@sentry/browser";
|
||||||
|
|
||||||
import { CSSResult, TemplateResult, html } from "lit";
|
import { CSSResult, html, TemplateResult } from "lit";
|
||||||
import { customElement } from "lit/decorators.js";
|
import { customElement } from "lit/decorators.js";
|
||||||
|
|
||||||
import PFButton from "@patternfly/patternfly/components/Button/button.css";
|
import PFButton from "@patternfly/patternfly/components/Button/button.css";
|
||||||
@ -15,8 +20,6 @@ import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
|||||||
import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";
|
import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";
|
||||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||||
|
|
||||||
import { AdminApi } from "@goauthentik/api";
|
|
||||||
|
|
||||||
@customElement("ak-admin-debug-page")
|
@customElement("ak-admin-debug-page")
|
||||||
export class DebugPage extends AKElement {
|
export class DebugPage extends AKElement {
|
||||||
static get styles(): CSSResult[] {
|
static get styles(): CSSResult[] {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import "@goauthentik/admin/admin-overview/AdminOverviewPage";
|
import "#admin/admin-overview/AdminOverviewPage";
|
||||||
import { ID_REGEX, Route, SLUG_REGEX, UUID_REGEX } from "@goauthentik/elements/router/Route";
|
|
||||||
|
import { ID_REGEX, Route, SLUG_REGEX, UUID_REGEX } from "#elements/router/Route";
|
||||||
|
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
|
|
||||||
@ -13,147 +14,147 @@ export const ROUTES: Route[] = [
|
|||||||
return html`<ak-admin-overview></ak-admin-overview>`;
|
return html`<ak-admin-overview></ak-admin-overview>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/administration/dashboard/users$"), async () => {
|
new Route(new RegExp("^/administration/dashboard/users$"), async () => {
|
||||||
await import("@goauthentik/admin/admin-overview/DashboardUserPage");
|
await import("#admin/admin-overview/DashboardUserPage");
|
||||||
return html`<ak-admin-dashboard-users></ak-admin-dashboard-users>`;
|
return html`<ak-admin-dashboard-users></ak-admin-dashboard-users>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/administration/system-tasks$"), async () => {
|
new Route(new RegExp("^/administration/system-tasks$"), async () => {
|
||||||
await import("@goauthentik/admin/system-tasks/SystemTaskListPage");
|
await import("#admin/system-tasks/SystemTaskListPage");
|
||||||
return html`<ak-system-task-list></ak-system-task-list>`;
|
return html`<ak-system-task-list></ak-system-task-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/core/providers$"), async () => {
|
new Route(new RegExp("^/core/providers$"), async () => {
|
||||||
await import("@goauthentik/admin/providers/ProviderListPage");
|
await import("#admin/providers/ProviderListPage");
|
||||||
return html`<ak-provider-list></ak-provider-list>`;
|
return html`<ak-provider-list></ak-provider-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp(`^/core/providers/(?<id>${ID_REGEX})$`), async (args) => {
|
new Route(new RegExp(`^/core/providers/(?<id>${ID_REGEX})$`), async (args) => {
|
||||||
await import("@goauthentik/admin/providers/ProviderViewPage");
|
await import("#admin/providers/ProviderViewPage");
|
||||||
return html`<ak-provider-view .providerID=${parseInt(args.id, 10)}></ak-provider-view>`;
|
return html`<ak-provider-view .providerID=${parseInt(args.id, 10)}></ak-provider-view>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/core/applications$"), async () => {
|
new Route(new RegExp("^/core/applications$"), async () => {
|
||||||
await import("@goauthentik/admin/applications/ApplicationListPage");
|
await import("#admin/applications/ApplicationListPage");
|
||||||
return html`<ak-application-list></ak-application-list>`;
|
return html`<ak-application-list></ak-application-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp(`^/core/applications/(?<slug>${SLUG_REGEX})$`), async (args) => {
|
new Route(new RegExp(`^/core/applications/(?<slug>${SLUG_REGEX})$`), async (args) => {
|
||||||
await import("@goauthentik/admin/applications/ApplicationViewPage");
|
await import("#admin/applications/ApplicationViewPage");
|
||||||
return html`<ak-application-view .applicationSlug=${args.slug}></ak-application-view>`;
|
return html`<ak-application-view .applicationSlug=${args.slug}></ak-application-view>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/core/sources$"), async () => {
|
new Route(new RegExp("^/core/sources$"), async () => {
|
||||||
await import("@goauthentik/admin/sources/SourceListPage");
|
await import("#admin/sources/SourceListPage");
|
||||||
return html`<ak-source-list></ak-source-list>`;
|
return html`<ak-source-list></ak-source-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp(`^/core/sources/(?<slug>${SLUG_REGEX})$`), async (args) => {
|
new Route(new RegExp(`^/core/sources/(?<slug>${SLUG_REGEX})$`), async (args) => {
|
||||||
await import("@goauthentik/admin/sources/SourceViewPage");
|
await import("#admin/sources/SourceViewPage");
|
||||||
return html`<ak-source-view .sourceSlug=${args.slug}></ak-source-view>`;
|
return html`<ak-source-view .sourceSlug=${args.slug}></ak-source-view>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/core/property-mappings$"), async () => {
|
new Route(new RegExp("^/core/property-mappings$"), async () => {
|
||||||
await import("@goauthentik/admin/property-mappings/PropertyMappingListPage");
|
await import("#admin/property-mappings/PropertyMappingListPage");
|
||||||
return html`<ak-property-mapping-list></ak-property-mapping-list>`;
|
return html`<ak-property-mapping-list></ak-property-mapping-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/core/tokens$"), async () => {
|
new Route(new RegExp("^/core/tokens$"), async () => {
|
||||||
await import("@goauthentik/admin/tokens/TokenListPage");
|
await import("#admin/tokens/TokenListPage");
|
||||||
return html`<ak-token-list></ak-token-list>`;
|
return html`<ak-token-list></ak-token-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/core/brands"), async () => {
|
new Route(new RegExp("^/core/brands"), async () => {
|
||||||
await import("@goauthentik/admin/brands/BrandListPage");
|
await import("#admin/brands/BrandListPage");
|
||||||
return html`<ak-brand-list></ak-brand-list>`;
|
return html`<ak-brand-list></ak-brand-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/policy/policies$"), async () => {
|
new Route(new RegExp("^/policy/policies$"), async () => {
|
||||||
await import("@goauthentik/admin/policies/PolicyListPage");
|
await import("#admin/policies/PolicyListPage");
|
||||||
return html`<ak-policy-list></ak-policy-list>`;
|
return html`<ak-policy-list></ak-policy-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/policy/reputation$"), async () => {
|
new Route(new RegExp("^/policy/reputation$"), async () => {
|
||||||
await import("@goauthentik/admin/policies/reputation/ReputationListPage");
|
await import("#admin/policies/reputation/ReputationListPage");
|
||||||
return html`<ak-policy-reputation-list></ak-policy-reputation-list>`;
|
return html`<ak-policy-reputation-list></ak-policy-reputation-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/identity/groups$"), async () => {
|
new Route(new RegExp("^/identity/groups$"), async () => {
|
||||||
await import("@goauthentik/admin/groups/GroupListPage");
|
await import("#admin/groups/GroupListPage");
|
||||||
return html`<ak-group-list></ak-group-list>`;
|
return html`<ak-group-list></ak-group-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp(`^/identity/groups/(?<uuid>${UUID_REGEX})$`), async (args) => {
|
new Route(new RegExp(`^/identity/groups/(?<uuid>${UUID_REGEX})$`), async (args) => {
|
||||||
await import("@goauthentik/admin/groups/GroupViewPage");
|
await import("#admin/groups/GroupViewPage");
|
||||||
return html`<ak-group-view .groupId=${args.uuid}></ak-group-view>`;
|
return html`<ak-group-view .groupId=${args.uuid}></ak-group-view>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/identity/users$"), async () => {
|
new Route(new RegExp("^/identity/users$"), async () => {
|
||||||
await import("@goauthentik/admin/users/UserListPage");
|
await import("#admin/users/UserListPage");
|
||||||
return html`<ak-user-list></ak-user-list>`;
|
return html`<ak-user-list></ak-user-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp(`^/identity/users/(?<id>${ID_REGEX})$`), async (args) => {
|
new Route(new RegExp(`^/identity/users/(?<id>${ID_REGEX})$`), async (args) => {
|
||||||
await import("@goauthentik/admin/users/UserViewPage");
|
await import("#admin/users/UserViewPage");
|
||||||
return html`<ak-user-view .userId=${parseInt(args.id, 10)}></ak-user-view>`;
|
return html`<ak-user-view .userId=${parseInt(args.id, 10)}></ak-user-view>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/identity/roles$"), async () => {
|
new Route(new RegExp("^/identity/roles$"), async () => {
|
||||||
await import("@goauthentik/admin/roles/RoleListPage");
|
await import("#admin/roles/RoleListPage");
|
||||||
return html`<ak-role-list></ak-role-list>`;
|
return html`<ak-role-list></ak-role-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/identity/initial-permissions$"), async () => {
|
new Route(new RegExp("^/identity/initial-permissions$"), async () => {
|
||||||
await import("@goauthentik/admin/rbac/InitialPermissionsListPage");
|
await import("#admin/rbac/InitialPermissionsListPage");
|
||||||
return html`<ak-initial-permissions-list></ak-initial-permissions-list>`;
|
return html`<ak-initial-permissions-list></ak-initial-permissions-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp(`^/identity/roles/(?<id>${UUID_REGEX})$`), async (args) => {
|
new Route(new RegExp(`^/identity/roles/(?<id>${UUID_REGEX})$`), async (args) => {
|
||||||
await import("@goauthentik/admin/roles/RoleViewPage");
|
await import("#admin/roles/RoleViewPage");
|
||||||
return html`<ak-role-view roleId=${args.id}></ak-role-view>`;
|
return html`<ak-role-view roleId=${args.id}></ak-role-view>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/flow/stages/invitations$"), async () => {
|
new Route(new RegExp("^/flow/stages/invitations$"), async () => {
|
||||||
await import("@goauthentik/admin/stages/invitation/InvitationListPage");
|
await import("#admin/stages/invitation/InvitationListPage");
|
||||||
return html`<ak-stage-invitation-list></ak-stage-invitation-list>`;
|
return html`<ak-stage-invitation-list></ak-stage-invitation-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/flow/stages/prompts$"), async () => {
|
new Route(new RegExp("^/flow/stages/prompts$"), async () => {
|
||||||
await import("@goauthentik/admin/stages/prompt/PromptListPage");
|
await import("#admin/stages/prompt/PromptListPage");
|
||||||
return html`<ak-stage-prompt-list></ak-stage-prompt-list>`;
|
return html`<ak-stage-prompt-list></ak-stage-prompt-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/flow/stages$"), async () => {
|
new Route(new RegExp("^/flow/stages$"), async () => {
|
||||||
await import("@goauthentik/admin/stages/StageListPage");
|
await import("#admin/stages/StageListPage");
|
||||||
return html`<ak-stage-list></ak-stage-list>`;
|
return html`<ak-stage-list></ak-stage-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/flow/flows$"), async () => {
|
new Route(new RegExp("^/flow/flows$"), async () => {
|
||||||
await import("@goauthentik/admin/flows/FlowListPage");
|
await import("#admin/flows/FlowListPage");
|
||||||
return html`<ak-flow-list></ak-flow-list>`;
|
return html`<ak-flow-list></ak-flow-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp(`^/flow/flows/(?<slug>${SLUG_REGEX})$`), async (args) => {
|
new Route(new RegExp(`^/flow/flows/(?<slug>${SLUG_REGEX})$`), async (args) => {
|
||||||
await import("@goauthentik/admin/flows/FlowViewPage");
|
await import("#admin/flows/FlowViewPage");
|
||||||
return html`<ak-flow-view .flowSlug=${args.slug}></ak-flow-view>`;
|
return html`<ak-flow-view .flowSlug=${args.slug}></ak-flow-view>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/events/log$"), async () => {
|
new Route(new RegExp("^/events/log$"), async () => {
|
||||||
await import("@goauthentik/admin/events/EventListPage");
|
await import("#admin/events/EventListPage");
|
||||||
return html`<ak-event-list></ak-event-list>`;
|
return html`<ak-event-list></ak-event-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp(`^/events/log/(?<id>${UUID_REGEX})$`), async (args) => {
|
new Route(new RegExp(`^/events/log/(?<id>${UUID_REGEX})$`), async (args) => {
|
||||||
await import("@goauthentik/admin/events/EventViewPage");
|
await import("#admin/events/EventViewPage");
|
||||||
return html`<ak-event-view .eventID=${args.id}></ak-event-view>`;
|
return html`<ak-event-view .eventID=${args.id}></ak-event-view>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/events/transports$"), async () => {
|
new Route(new RegExp("^/events/transports$"), async () => {
|
||||||
await import("@goauthentik/admin/events/TransportListPage");
|
await import("#admin/events/TransportListPage");
|
||||||
return html`<ak-event-transport-list></ak-event-transport-list>`;
|
return html`<ak-event-transport-list></ak-event-transport-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/events/rules$"), async () => {
|
new Route(new RegExp("^/events/rules$"), async () => {
|
||||||
await import("@goauthentik/admin/events/RuleListPage");
|
await import("#admin/events/RuleListPage");
|
||||||
return html`<ak-event-rule-list></ak-event-rule-list>`;
|
return html`<ak-event-rule-list></ak-event-rule-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/outpost/outposts$"), async () => {
|
new Route(new RegExp("^/outpost/outposts$"), async () => {
|
||||||
await import("@goauthentik/admin/outposts/OutpostListPage");
|
await import("#admin/outposts/OutpostListPage");
|
||||||
return html`<ak-outpost-list></ak-outpost-list>`;
|
return html`<ak-outpost-list></ak-outpost-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/outpost/integrations$"), async () => {
|
new Route(new RegExp("^/outpost/integrations$"), async () => {
|
||||||
await import("@goauthentik/admin/outposts/ServiceConnectionListPage");
|
await import("#admin/outposts/ServiceConnectionListPage");
|
||||||
return html`<ak-outpost-service-connection-list></ak-outpost-service-connection-list>`;
|
return html`<ak-outpost-service-connection-list></ak-outpost-service-connection-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/crypto/certificates$"), async () => {
|
new Route(new RegExp("^/crypto/certificates$"), async () => {
|
||||||
await import("@goauthentik/admin/crypto/CertificateKeyPairListPage");
|
await import("#admin/crypto/CertificateKeyPairListPage");
|
||||||
return html`<ak-crypto-certificate-list></ak-crypto-certificate-list>`;
|
return html`<ak-crypto-certificate-list></ak-crypto-certificate-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/admin/settings$"), async () => {
|
new Route(new RegExp("^/admin/settings$"), async () => {
|
||||||
await import("@goauthentik/admin/admin-settings/AdminSettingsPage");
|
await import("#admin/admin-settings/AdminSettingsPage");
|
||||||
return html`<ak-admin-settings></ak-admin-settings>`;
|
return html`<ak-admin-settings></ak-admin-settings>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/blueprints/instances$"), async () => {
|
new Route(new RegExp("^/blueprints/instances$"), async () => {
|
||||||
await import("@goauthentik/admin/blueprints/BlueprintListPage");
|
await import("#admin/blueprints/BlueprintListPage");
|
||||||
return html`<ak-blueprint-list></ak-blueprint-list>`;
|
return html`<ak-blueprint-list></ak-blueprint-list>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/debug$"), async () => {
|
new Route(new RegExp("^/debug$"), async () => {
|
||||||
await import("@goauthentik/admin/DebugPage");
|
await import("#admin/DebugPage");
|
||||||
return html`<ak-admin-debug-page></ak-admin-debug-page>`;
|
return html`<ak-admin-debug-page></ak-admin-debug-page>`;
|
||||||
}),
|
}),
|
||||||
new Route(new RegExp("^/enterprise/licenses$"), async () => {
|
new Route(new RegExp("^/enterprise/licenses$"), async () => {
|
||||||
await import("@goauthentik/admin/enterprise/EnterpriseLicenseListPage");
|
await import("#admin/enterprise/EnterpriseLicenseListPage");
|
||||||
return html`<ak-enterprise-license-list></ak-enterprise-license-list>`;
|
return html`<ak-enterprise-license-list></ak-enterprise-license-list>`;
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
|
@ -8,18 +8,22 @@ import "#admin/admin-overview/cards/WorkerStatusCard";
|
|||||||
import "#admin/admin-overview/charts/AdminLoginAuthorizeChart";
|
import "#admin/admin-overview/charts/AdminLoginAuthorizeChart";
|
||||||
import "#admin/admin-overview/charts/OutpostStatusChart";
|
import "#admin/admin-overview/charts/OutpostStatusChart";
|
||||||
import "#admin/admin-overview/charts/SyncStatusChart";
|
import "#admin/admin-overview/charts/SyncStatusChart";
|
||||||
import { me } from "#common/users";
|
|
||||||
import "#components/ak-page-header";
|
import "#components/ak-page-header";
|
||||||
import { AKElement } from "#elements/Base";
|
|
||||||
import "#elements/cards/AggregatePromiseCard";
|
import "#elements/cards/AggregatePromiseCard";
|
||||||
import type { QuickAction } from "#elements/cards/QuickActionsCard";
|
|
||||||
import "#elements/cards/QuickActionsCard";
|
import "#elements/cards/QuickActionsCard";
|
||||||
|
|
||||||
|
import { me } from "#common/users";
|
||||||
|
|
||||||
|
import { AKElement } from "#elements/Base";
|
||||||
|
import type { QuickAction } from "#elements/cards/QuickActionsCard";
|
||||||
import { WithLicenseSummary } from "#elements/mixins/license";
|
import { WithLicenseSummary } from "#elements/mixins/license";
|
||||||
import { paramURL } from "#elements/router/RouterOutlet";
|
import { paramURL } from "#elements/router/RouterOutlet";
|
||||||
|
|
||||||
|
import { SessionUser } from "@goauthentik/api";
|
||||||
import { createReleaseNotesURL } from "@goauthentik/core/version";
|
import { createReleaseNotesURL } from "@goauthentik/core/version";
|
||||||
|
|
||||||
import { msg, str } from "@lit/localize";
|
import { msg, str } from "@lit/localize";
|
||||||
import { CSSResult, TemplateResult, css, html, nothing } from "lit";
|
import { css, CSSResult, html, nothing, TemplateResult } from "lit";
|
||||||
import { customElement, state } from "lit/decorators.js";
|
import { customElement, state } from "lit/decorators.js";
|
||||||
import { classMap } from "lit/directives/class-map.js";
|
import { classMap } from "lit/directives/class-map.js";
|
||||||
|
|
||||||
@ -29,8 +33,6 @@ import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
|||||||
import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";
|
import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";
|
||||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||||
|
|
||||||
import { SessionUser } from "@goauthentik/api";
|
|
||||||
|
|
||||||
const AdminOverviewBase = WithLicenseSummary(AKElement);
|
const AdminOverviewBase = WithLicenseSummary(AKElement);
|
||||||
|
|
||||||
@customElement("ak-admin-overview")
|
@customElement("ak-admin-overview")
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
import "#admin/admin-overview/charts/AdminModelPerDay";
|
import "#admin/admin-overview/charts/AdminModelPerDay";
|
||||||
import "#components/ak-page-header";
|
import "#components/ak-page-header";
|
||||||
import { AKElement } from "#elements/Base";
|
|
||||||
import "#elements/cards/AggregatePromiseCard";
|
import "#elements/cards/AggregatePromiseCard";
|
||||||
|
|
||||||
|
import { AKElement } from "#elements/Base";
|
||||||
|
|
||||||
|
import { EventActions, EventsEventsVolumeListRequest } from "@goauthentik/api";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { CSSResult, TemplateResult, css, html } from "lit";
|
import { css, CSSResult, html, TemplateResult } from "lit";
|
||||||
import { customElement } from "lit/decorators.js";
|
import { customElement } from "lit/decorators.js";
|
||||||
|
|
||||||
import PFContent from "@patternfly/patternfly/components/Content/content.css";
|
import PFContent from "@patternfly/patternfly/components/Content/content.css";
|
||||||
@ -13,8 +16,6 @@ import PFList from "@patternfly/patternfly/components/List/list.css";
|
|||||||
import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
||||||
import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";
|
import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";
|
||||||
|
|
||||||
import { EventActions, EventsEventsVolumeListRequest } from "@goauthentik/api";
|
|
||||||
|
|
||||||
@customElement("ak-admin-dashboard-users")
|
@customElement("ak-admin-dashboard-users")
|
||||||
export class DashboardUserPage extends AKElement {
|
export class DashboardUserPage extends AKElement {
|
||||||
static get styles(): CSSResult[] {
|
static get styles(): CSSResult[] {
|
||||||
|
@ -1,15 +1,17 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#elements/Spinner";
|
||||||
import { AKElement } from "@goauthentik/elements/Base";
|
|
||||||
import "@goauthentik/elements/Spinner";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
|
|
||||||
|
import { AKElement } from "#elements/Base";
|
||||||
|
|
||||||
|
import { EventsApi, EventTopPerUser } from "@goauthentik/api";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { CSSResult, TemplateResult, html } from "lit";
|
import { CSSResult, html, TemplateResult } from "lit";
|
||||||
import { customElement, property } from "lit/decorators.js";
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
|
||||||
import PFTable from "@patternfly/patternfly/components/Table/table.css";
|
import PFTable from "@patternfly/patternfly/components/Table/table.css";
|
||||||
|
|
||||||
import { EventTopPerUser, EventsApi } from "@goauthentik/api";
|
|
||||||
|
|
||||||
@customElement("ak-top-applications-table")
|
@customElement("ak-top-applications-table")
|
||||||
export class TopApplicationsTable extends AKElement {
|
export class TopApplicationsTable extends AKElement {
|
||||||
@property({ attribute: false })
|
@property({ attribute: false })
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
import { EVENT_REFRESH } from "@goauthentik/common/constants";
|
import { EVENT_REFRESH } from "#common/constants";
|
||||||
import { PFSize } from "@goauthentik/common/enums.js";
|
import { PFSize } from "#common/enums";
|
||||||
import {
|
import { APIError, parseAPIResponseError, pluckErrorDetail } from "#common/errors/network";
|
||||||
APIError,
|
|
||||||
parseAPIResponseError,
|
import { AggregateCard } from "#elements/cards/AggregateCard";
|
||||||
pluckErrorDetail,
|
|
||||||
} from "@goauthentik/common/errors/network";
|
|
||||||
import { AggregateCard } from "@goauthentik/elements/cards/AggregateCard";
|
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { PropertyValues, TemplateResult, html, nothing } from "lit";
|
import { html, nothing, PropertyValues, TemplateResult } from "lit";
|
||||||
import { state } from "lit/decorators.js";
|
import { state } from "lit/decorators.js";
|
||||||
|
|
||||||
export interface AdminStatus {
|
export interface AdminStatus {
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
import {
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
AdminStatus,
|
|
||||||
AdminStatusCard,
|
|
||||||
} from "@goauthentik/admin/admin-overview/cards/AdminStatusCard";
|
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { AdminStatus, AdminStatusCard } from "#admin/admin-overview/cards/AdminStatusCard";
|
||||||
import { TemplateResult, html } from "lit";
|
|
||||||
import { customElement, state } from "lit/decorators.js";
|
|
||||||
|
|
||||||
import { AdminApi, SystemInfo } from "@goauthentik/api";
|
import { AdminApi, SystemInfo } from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { msg } from "@lit/localize";
|
||||||
|
import { html, TemplateResult } from "lit";
|
||||||
|
import { customElement, state } from "lit/decorators.js";
|
||||||
|
|
||||||
type StatusContent = { icon: string; message: TemplateResult };
|
type StatusContent = { icon: string; message: TemplateResult };
|
||||||
|
|
||||||
@customElement("ak-admin-fips-status-system")
|
@customElement("ak-admin-fips-status-system")
|
||||||
|
@ -1,25 +1,27 @@
|
|||||||
import { EventGeo, renderEventUser } from "@goauthentik/admin/events/utils";
|
import "#components/ak-event-info";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#elements/Tabs";
|
||||||
import { EventWithContext } from "@goauthentik/common/events";
|
import "#elements/buttons/Dropdown";
|
||||||
import { actionToLabel } from "@goauthentik/common/labels";
|
import "#elements/buttons/ModalButton";
|
||||||
import { formatElapsedTime } from "@goauthentik/common/temporal";
|
import "#elements/buttons/SpinnerButton/index";
|
||||||
import "@goauthentik/components/ak-event-info";
|
|
||||||
import "@goauthentik/elements/Tabs";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import "@goauthentik/elements/buttons/Dropdown";
|
import { EventWithContext } from "#common/events";
|
||||||
import "@goauthentik/elements/buttons/ModalButton";
|
import { actionToLabel } from "#common/labels";
|
||||||
import "@goauthentik/elements/buttons/SpinnerButton";
|
import { formatElapsedTime } from "#common/temporal";
|
||||||
import { PaginatedResponse } from "@goauthentik/elements/table/Table";
|
|
||||||
import { Table, TableColumn } from "@goauthentik/elements/table/Table";
|
import { PaginatedResponse, Table, TableColumn } from "#elements/table/Table";
|
||||||
import { SlottedTemplateResult } from "@goauthentik/elements/types";
|
import { SlottedTemplateResult } from "#elements/types";
|
||||||
|
|
||||||
|
import { EventGeo, renderEventUser } from "#admin/events/utils";
|
||||||
|
|
||||||
|
import { Event, EventsApi } from "@goauthentik/api";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { CSSResult, TemplateResult, css, html } from "lit";
|
import { css, CSSResult, html, TemplateResult } from "lit";
|
||||||
import { customElement, property } from "lit/decorators.js";
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
|
||||||
import PFCard from "@patternfly/patternfly/components/Card/card.css";
|
import PFCard from "@patternfly/patternfly/components/Card/card.css";
|
||||||
|
|
||||||
import { Event, EventsApi } from "@goauthentik/api";
|
|
||||||
|
|
||||||
@customElement("ak-recent-events")
|
@customElement("ak-recent-events")
|
||||||
export class RecentEventsCard extends Table<Event> {
|
export class RecentEventsCard extends Table<Event> {
|
||||||
@property()
|
@property()
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
import {
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
AdminStatus,
|
|
||||||
AdminStatusCard,
|
|
||||||
} from "@goauthentik/admin/admin-overview/cards/AdminStatusCard";
|
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { AdminStatus, AdminStatusCard } from "#admin/admin-overview/cards/AdminStatusCard";
|
||||||
import { TemplateResult, html } from "lit";
|
|
||||||
import { customElement, state } from "lit/decorators.js";
|
|
||||||
|
|
||||||
import { AdminApi, OutpostsApi, SystemInfo } from "@goauthentik/api";
|
import { AdminApi, OutpostsApi, SystemInfo } from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { msg } from "@lit/localize";
|
||||||
|
import { html, TemplateResult } from "lit";
|
||||||
|
import { customElement, state } from "lit/decorators.js";
|
||||||
|
|
||||||
@customElement("ak-admin-status-system")
|
@customElement("ak-admin-status-system")
|
||||||
export class SystemStatusCard extends AdminStatusCard<SystemInfo> {
|
export class SystemStatusCard extends AdminStatusCard<SystemInfo> {
|
||||||
now?: Date;
|
now?: Date;
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
import {
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
AdminStatus,
|
|
||||||
AdminStatusCard,
|
|
||||||
} from "@goauthentik/admin/admin-overview/cards/AdminStatusCard";
|
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
|
||||||
|
|
||||||
import { msg, str } from "@lit/localize";
|
import { AdminStatus, AdminStatusCard } from "#admin/admin-overview/cards/AdminStatusCard";
|
||||||
import { TemplateResult, html } from "lit";
|
|
||||||
import { customElement } from "lit/decorators.js";
|
|
||||||
|
|
||||||
import { AdminApi, Version } from "@goauthentik/api";
|
import { AdminApi, Version } from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { msg, str } from "@lit/localize";
|
||||||
|
import { html, TemplateResult } from "lit";
|
||||||
|
import { customElement } from "lit/decorators.js";
|
||||||
|
|
||||||
@customElement("ak-admin-status-version")
|
@customElement("ak-admin-status-version")
|
||||||
export class VersionStatusCard extends AdminStatusCard<Version> {
|
export class VersionStatusCard extends AdminStatusCard<Version> {
|
||||||
icon = "pf-icon pf-icon-bundle";
|
icon = "pf-icon pf-icon-bundle";
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
import {
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
AdminStatus,
|
|
||||||
AdminStatusCard,
|
|
||||||
} from "@goauthentik/admin/admin-overview/cards/AdminStatusCard";
|
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { AdminStatus, AdminStatusCard } from "#admin/admin-overview/cards/AdminStatusCard";
|
||||||
import { TemplateResult, html } from "lit";
|
|
||||||
import { customElement } from "lit/decorators.js";
|
|
||||||
|
|
||||||
import { AdminApi, Worker } from "@goauthentik/api";
|
import { AdminApi, Worker } from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { msg } from "@lit/localize";
|
||||||
|
import { html, TemplateResult } from "lit";
|
||||||
|
import { customElement } from "lit/decorators.js";
|
||||||
|
|
||||||
@customElement("ak-admin-status-card-workers")
|
@customElement("ak-admin-status-card-workers")
|
||||||
export class WorkersStatusCard extends AdminStatusCard<Worker[]> {
|
export class WorkersStatusCard extends AdminStatusCard<Worker[]> {
|
||||||
icon = "pf-icon pf-icon-server";
|
icon = "pf-icon pf-icon-server";
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
|
|
||||||
import { EventChart } from "#elements/charts/EventChart";
|
import { EventChart } from "#elements/charts/EventChart";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
|
||||||
|
import { EventActions, EventsApi, EventVolume } from "@goauthentik/api";
|
||||||
|
|
||||||
import { ChartData, ChartDataset } from "chart.js";
|
import { ChartData, ChartDataset } from "chart.js";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { customElement } from "lit/decorators.js";
|
import { customElement } from "lit/decorators.js";
|
||||||
|
|
||||||
import { EventActions, EventVolume, EventsApi } from "@goauthentik/api";
|
|
||||||
|
|
||||||
@customElement("ak-charts-admin-login-authorization")
|
@customElement("ak-charts-admin-login-authorization")
|
||||||
export class AdminLoginAuthorizeChart extends EventChart {
|
export class AdminLoginAuthorizeChart extends EventChart {
|
||||||
async apiRequest(): Promise<EventVolume[]> {
|
async apiRequest(): Promise<EventVolume[]> {
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
|
|
||||||
import { EventChart } from "#elements/charts/EventChart";
|
import { EventChart } from "#elements/charts/EventChart";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
|
||||||
|
import {
|
||||||
|
EventActions,
|
||||||
|
EventsApi,
|
||||||
|
EventsEventsVolumeListRequest,
|
||||||
|
EventVolume,
|
||||||
|
} from "@goauthentik/api";
|
||||||
|
|
||||||
import { ChartData } from "chart.js";
|
import { ChartData } from "chart.js";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { customElement, property } from "lit/decorators.js";
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
|
||||||
import {
|
|
||||||
EventActions,
|
|
||||||
EventVolume,
|
|
||||||
EventsApi,
|
|
||||||
EventsEventsVolumeListRequest,
|
|
||||||
} from "@goauthentik/api";
|
|
||||||
|
|
||||||
@customElement("ak-charts-admin-model-per-day")
|
@customElement("ak-charts-admin-model-per-day")
|
||||||
export class AdminModelPerDay extends EventChart {
|
export class AdminModelPerDay extends EventChart {
|
||||||
@property()
|
@property()
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
|
import "#elements/forms/ConfirmationForm";
|
||||||
|
|
||||||
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
|
|
||||||
|
import { AKChart } from "#elements/charts/Chart";
|
||||||
import { actionToColor } from "#elements/charts/EventChart";
|
import { actionToColor } from "#elements/charts/EventChart";
|
||||||
import { SummarizedSyncStatus } from "@goauthentik/admin/admin-overview/charts/SyncStatusChart";
|
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { SummarizedSyncStatus } from "#admin/admin-overview/charts/SyncStatusChart";
|
||||||
import { AKChart } from "@goauthentik/elements/charts/Chart";
|
|
||||||
import "@goauthentik/elements/forms/ConfirmationForm";
|
import { EventActions, OutpostsApi } from "@goauthentik/api";
|
||||||
|
|
||||||
import { ChartData, ChartOptions } from "chart.js";
|
import { ChartData, ChartOptions } from "chart.js";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { customElement } from "lit/decorators.js";
|
import { customElement } from "lit/decorators.js";
|
||||||
|
|
||||||
import { EventActions, OutpostsApi } from "@goauthentik/api";
|
|
||||||
|
|
||||||
@customElement("ak-admin-status-chart-outpost")
|
@customElement("ak-admin-status-chart-outpost")
|
||||||
export class OutpostStatusChart extends AKChart<SummarizedSyncStatus[]> {
|
export class OutpostStatusChart extends AKChart<SummarizedSyncStatus[]> {
|
||||||
getChartType(): string {
|
getChartType(): string {
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
import { actionToColor } from "#elements/charts/EventChart";
|
import "#elements/forms/ConfirmationForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
|
||||||
import { AKChart } from "@goauthentik/elements/charts/Chart";
|
|
||||||
import "@goauthentik/elements/forms/ConfirmationForm";
|
|
||||||
import { PaginatedResponse } from "@goauthentik/elements/table/Table";
|
|
||||||
import { ChartData, ChartOptions } from "chart.js";
|
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { customElement } from "lit/decorators.js";
|
|
||||||
|
import { AKChart } from "#elements/charts/Chart";
|
||||||
|
import { actionToColor } from "#elements/charts/EventChart";
|
||||||
|
import { PaginatedResponse } from "#elements/table/Table";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
EventActions,
|
EventActions,
|
||||||
@ -16,6 +14,11 @@ import {
|
|||||||
SystemTaskStatusEnum,
|
SystemTaskStatusEnum,
|
||||||
} from "@goauthentik/api";
|
} from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { ChartData, ChartOptions } from "chart.js";
|
||||||
|
|
||||||
|
import { msg } from "@lit/localize";
|
||||||
|
import { customElement } from "lit/decorators.js";
|
||||||
|
|
||||||
export interface SummarizedSyncStatus {
|
export interface SummarizedSyncStatus {
|
||||||
healthy: number;
|
healthy: number;
|
||||||
failed: number;
|
failed: number;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
import { AkControlElement } from "@goauthentik/elements/AkControlElement.js";
|
import { AkControlElement } from "#elements/AkControlElement";
|
||||||
import { type Spread } from "@goauthentik/elements/types";
|
import { type Spread } from "#elements/types";
|
||||||
|
|
||||||
|
import { FooterLink } from "@goauthentik/api";
|
||||||
|
|
||||||
import { spread } from "@open-wc/lit-helpers";
|
import { spread } from "@open-wc/lit-helpers";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
@ -11,8 +14,6 @@ import PFFormControl from "@patternfly/patternfly/components/FormControl/form-co
|
|||||||
import PFInputGroup from "@patternfly/patternfly/components/InputGroup/input-group.css";
|
import PFInputGroup from "@patternfly/patternfly/components/InputGroup/input-group.css";
|
||||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||||
|
|
||||||
import { FooterLink } from "@goauthentik/api";
|
|
||||||
|
|
||||||
export interface IFooterLinkInput {
|
export interface IFooterLinkInput {
|
||||||
footerLink: FooterLink;
|
footerLink: FooterLink;
|
||||||
}
|
}
|
||||||
|
@ -1,26 +1,28 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#components/ak-number-input";
|
||||||
import "@goauthentik/components/ak-number-input";
|
import "#components/ak-switch-input";
|
||||||
import "@goauthentik/components/ak-switch-input";
|
import "#components/ak-text-input";
|
||||||
import "@goauthentik/components/ak-text-input";
|
import "#elements/ak-array-input";
|
||||||
import "@goauthentik/elements/ak-array-input.js";
|
import "#elements/forms/FormGroup";
|
||||||
import { Form } from "@goauthentik/elements/forms/Form";
|
import "#elements/forms/HorizontalFormElement";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "#elements/forms/Radio";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "#elements/forms/SearchSelect/index";
|
||||||
import "@goauthentik/elements/forms/Radio";
|
import "#elements/utils/TimeDeltaHelp";
|
||||||
import "@goauthentik/elements/forms/SearchSelect";
|
import "./AdminSettingsFooterLinks.js";
|
||||||
import "@goauthentik/elements/utils/TimeDeltaHelp";
|
|
||||||
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
|
|
||||||
|
import { Form } from "#elements/forms/Form";
|
||||||
|
|
||||||
|
import { AdminApi, FooterLink, Settings, SettingsRequest } from "@goauthentik/api";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { CSSResult, TemplateResult, css, html } from "lit";
|
import { css, CSSResult, html, TemplateResult } from "lit";
|
||||||
import { customElement, property } from "lit/decorators.js";
|
import { customElement, property } from "lit/decorators.js";
|
||||||
import { ifDefined } from "lit/directives/if-defined.js";
|
import { ifDefined } from "lit/directives/if-defined.js";
|
||||||
|
|
||||||
import PFList from "@patternfly/patternfly/components/List/list.css";
|
import PFList from "@patternfly/patternfly/components/List/list.css";
|
||||||
|
|
||||||
import { AdminApi, FooterLink, Settings, SettingsRequest } from "@goauthentik/api";
|
import { akFooterLinkInput, IFooterLinkInput } from "./AdminSettingsFooterLinks.js";
|
||||||
|
|
||||||
import "./AdminSettingsFooterLinks.js";
|
|
||||||
import { IFooterLinkInput, akFooterLinkInput } from "./AdminSettingsFooterLinks.js";
|
|
||||||
|
|
||||||
const DEFAULT_REPUTATION_LOWER_LIMIT = -5;
|
const DEFAULT_REPUTATION_LOWER_LIMIT = -5;
|
||||||
const DEFAULT_REPUTATION_UPPER_LIMIT = 5;
|
const DEFAULT_REPUTATION_UPPER_LIMIT = 5;
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
import "#admin/admin-settings/AdminSettingsForm";
|
import "#admin/admin-settings/AdminSettingsForm";
|
||||||
import { AdminSettingsForm } from "#admin/admin-settings/AdminSettingsForm";
|
|
||||||
import { DEFAULT_CONFIG } from "#common/api/config";
|
|
||||||
import "#components/ak-page-header";
|
import "#components/ak-page-header";
|
||||||
import "#components/events/ObjectChangelog";
|
import "#components/events/ObjectChangelog";
|
||||||
import { AKElement } from "#elements/Base";
|
|
||||||
import "#elements/CodeMirror";
|
import "#elements/CodeMirror";
|
||||||
import "#elements/EmptyState";
|
import "#elements/EmptyState";
|
||||||
import "#elements/Tabs";
|
import "#elements/Tabs";
|
||||||
@ -11,6 +8,14 @@ import "#elements/buttons/ModalButton";
|
|||||||
import "#elements/buttons/SpinnerButton/ak-spinner-button";
|
import "#elements/buttons/SpinnerButton/ak-spinner-button";
|
||||||
import "#elements/forms/ModalForm";
|
import "#elements/forms/ModalForm";
|
||||||
|
|
||||||
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
|
|
||||||
|
import { AKElement } from "#elements/Base";
|
||||||
|
|
||||||
|
import { AdminSettingsForm } from "#admin/admin-settings/AdminSettingsForm";
|
||||||
|
|
||||||
|
import { AdminApi, Settings } from "@goauthentik/api";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { html, nothing } from "lit";
|
import { html, nothing } from "lit";
|
||||||
import { customElement, query, state } from "lit/decorators.js";
|
import { customElement, query, state } from "lit/decorators.js";
|
||||||
@ -26,8 +31,6 @@ import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
|||||||
import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";
|
import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";
|
||||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||||
|
|
||||||
import { AdminApi, Settings } from "@goauthentik/api";
|
|
||||||
|
|
||||||
@customElement("ak-admin-settings")
|
@customElement("ak-admin-settings")
|
||||||
export class AdminSettingsPage extends AKElement {
|
export class AdminSettingsPage extends AKElement {
|
||||||
static get styles() {
|
static get styles() {
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import "@goauthentik/elements/messages/MessageContainer";
|
import "#elements/messages/MessageContainer";
|
||||||
|
import "../AdminSettingsFooterLinks.js";
|
||||||
|
|
||||||
import { Meta, StoryObj, WebComponentsRenderer } from "@storybook/web-components";
|
import { Meta, StoryObj, WebComponentsRenderer } from "@storybook/web-components";
|
||||||
import { DecoratorFunction } from "storybook/internal/types";
|
import { DecoratorFunction } from "storybook/internal/types";
|
||||||
|
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
|
|
||||||
import { FooterLinkInput } from "../AdminSettingsFooterLinks.js";
|
import { FooterLinkInput } from "../AdminSettingsFooterLinks.js";
|
||||||
import "../AdminSettingsFooterLinks.js";
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
type Decorator = DecoratorFunction<WebComponentsRenderer, any>;
|
type Decorator = DecoratorFunction<WebComponentsRenderer, any>;
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import { render } from "@goauthentik/elements/tests/utils.js";
|
import "../AdminSettingsFooterLinks.js";
|
||||||
|
|
||||||
|
import { render } from "#elements/tests/utils";
|
||||||
|
|
||||||
import { $, expect } from "@wdio/globals";
|
import { $, expect } from "@wdio/globals";
|
||||||
|
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
|
|
||||||
import "../AdminSettingsFooterLinks.js";
|
|
||||||
|
|
||||||
describe("ak-admin-settings-footer-link", () => {
|
describe("ak-admin-settings-footer-link", () => {
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
await browser.execute(async () => {
|
await browser.execute(async () => {
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
|
|
||||||
import { EventChart } from "#elements/charts/EventChart";
|
import { EventChart } from "#elements/charts/EventChart";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
|
||||||
|
import { EventActions, EventsApi, EventVolume } from "@goauthentik/api";
|
||||||
|
|
||||||
import { ChartData } from "chart.js";
|
import { ChartData } from "chart.js";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { customElement, property } from "lit/decorators.js";
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
|
||||||
import { EventActions, EventVolume, EventsApi } from "@goauthentik/api";
|
|
||||||
|
|
||||||
@customElement("ak-charts-application-authorize")
|
@customElement("ak-charts-application-authorize")
|
||||||
export class ApplicationAuthorizeChart extends EventChart {
|
export class ApplicationAuthorizeChart extends EventChart {
|
||||||
@property({ attribute: "application-id" })
|
@property({ attribute: "application-id" })
|
||||||
|
@ -1,15 +1,11 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#components/ak-status-label";
|
||||||
import "@goauthentik/components/ak-status-label";
|
import "#elements/events/LogViewer";
|
||||||
import "@goauthentik/elements/events/LogViewer";
|
import "#elements/forms/HorizontalFormElement";
|
||||||
import { Form } from "@goauthentik/elements/forms/Form";
|
import "#elements/forms/SearchSelect/index";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
|
||||||
import "@goauthentik/elements/forms/SearchSelect";
|
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { CSSResult, TemplateResult, html } from "lit";
|
|
||||||
import { customElement, property } from "lit/decorators.js";
|
|
||||||
|
|
||||||
import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList/description-list.css";
|
import { Form } from "#elements/forms/Form";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Application,
|
Application,
|
||||||
@ -19,6 +15,12 @@ import {
|
|||||||
User,
|
User,
|
||||||
} from "@goauthentik/api";
|
} from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { msg } from "@lit/localize";
|
||||||
|
import { CSSResult, html, TemplateResult } from "lit";
|
||||||
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
|
||||||
|
import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList/description-list.css";
|
||||||
|
|
||||||
@customElement("ak-application-check-access-form")
|
@customElement("ak-application-check-access-form")
|
||||||
export class ApplicationCheckAccessForm extends Form<{ forUser: number }> {
|
export class ApplicationCheckAccessForm extends Form<{ forUser: number }> {
|
||||||
@property({ attribute: false })
|
@property({ attribute: false })
|
||||||
|
@ -1,33 +1,35 @@
|
|||||||
import { CapabilitiesEnum, WithCapabilitiesConfig } from "#elements/mixins/capabilities";
|
import "#admin/applications/ProviderSelectModal";
|
||||||
import "@goauthentik/admin/applications/ProviderSelectModal";
|
import "#components/ak-file-input";
|
||||||
import { iconHelperText } from "@goauthentik/admin/helperText";
|
import "#components/ak-radio-input";
|
||||||
import { policyEngineModes } from "@goauthentik/admin/policies/PolicyEngineModes";
|
import "#components/ak-slug-input";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#components/ak-switch-input";
|
||||||
import "@goauthentik/components/ak-file-input";
|
import "#components/ak-text-input";
|
||||||
import "@goauthentik/components/ak-radio-input";
|
import "#components/ak-textarea-input";
|
||||||
import "@goauthentik/components/ak-slug-input";
|
import "#elements/Alert";
|
||||||
import "@goauthentik/components/ak-switch-input";
|
import "#elements/forms/FormGroup";
|
||||||
import "@goauthentik/components/ak-text-input";
|
import "#elements/forms/HorizontalFormElement";
|
||||||
import "@goauthentik/components/ak-textarea-input";
|
import "#elements/forms/ModalForm";
|
||||||
import "@goauthentik/elements/Alert";
|
import "#elements/forms/ProxyForm";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "#elements/forms/Radio";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "#elements/forms/SearchSelect/ak-search-select";
|
||||||
import "@goauthentik/elements/forms/ModalForm";
|
|
||||||
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
|
|
||||||
import "@goauthentik/elements/forms/ProxyForm";
|
|
||||||
import "@goauthentik/elements/forms/Radio";
|
|
||||||
import "@goauthentik/elements/forms/SearchSelect/ak-search-select";
|
|
||||||
import "@patternfly/elements/pf-tooltip/pf-tooltip.js";
|
import "@patternfly/elements/pf-tooltip/pf-tooltip.js";
|
||||||
|
import "./components/ak-backchannel-input.js";
|
||||||
|
import "./components/ak-provider-search-input.js";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { TemplateResult, html, nothing } from "lit";
|
|
||||||
import { customElement, property, state } from "lit/decorators.js";
|
import { ModelForm } from "#elements/forms/ModelForm";
|
||||||
import { ifDefined } from "lit/directives/if-defined.js";
|
import { CapabilitiesEnum, WithCapabilitiesConfig } from "#elements/mixins/capabilities";
|
||||||
|
|
||||||
|
import { iconHelperText } from "#admin/helperText";
|
||||||
|
import { policyEngineModes } from "#admin/policies/PolicyEngineModes";
|
||||||
|
|
||||||
import { Application, CoreApi, Provider } from "@goauthentik/api";
|
import { Application, CoreApi, Provider } from "@goauthentik/api";
|
||||||
|
|
||||||
import "./components/ak-backchannel-input";
|
import { msg } from "@lit/localize";
|
||||||
import "./components/ak-provider-search-input";
|
import { html, nothing, TemplateResult } from "lit";
|
||||||
|
import { customElement, property, state } from "lit/decorators.js";
|
||||||
|
import { ifDefined } from "lit/directives/if-defined.js";
|
||||||
|
|
||||||
@customElement("ak-application-form")
|
@customElement("ak-application-form")
|
||||||
export class ApplicationForm extends WithCapabilitiesConfig(ModelForm<Application, string>) {
|
export class ApplicationForm extends WithCapabilitiesConfig(ModelForm<Application, string>) {
|
||||||
|
@ -1,29 +1,30 @@
|
|||||||
import "#admin/applications/ApplicationForm";
|
import "#admin/applications/ApplicationForm";
|
||||||
import { DEFAULT_CONFIG } from "#common/api/config";
|
|
||||||
import "#elements/AppIcon";
|
import "#elements/AppIcon";
|
||||||
import "#elements/ak-mdx/ak-mdx";
|
import "#elements/ak-mdx/ak-mdx";
|
||||||
import "#elements/buttons/SpinnerButton/ak-spinner-button";
|
import "#elements/buttons/SpinnerButton/ak-spinner-button";
|
||||||
import "#elements/forms/DeleteBulkForm";
|
import "#elements/forms/DeleteBulkForm";
|
||||||
import "#elements/forms/ModalForm";
|
import "#elements/forms/ModalForm";
|
||||||
|
import "@patternfly/elements/pf-tooltip/pf-tooltip.js";
|
||||||
|
import "./ApplicationWizardHint.js";
|
||||||
|
|
||||||
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
|
|
||||||
import { WithBrandConfig } from "#elements/mixins/branding";
|
import { WithBrandConfig } from "#elements/mixins/branding";
|
||||||
import { getURLParam } from "#elements/router/RouteMatch";
|
import { getURLParam } from "#elements/router/RouteMatch";
|
||||||
import { PaginatedResponse } from "#elements/table/Table";
|
import { PaginatedResponse, TableColumn } from "#elements/table/Table";
|
||||||
import { TableColumn } from "#elements/table/Table";
|
|
||||||
import { TablePage } from "#elements/table/TablePage";
|
import { TablePage } from "#elements/table/TablePage";
|
||||||
import "@patternfly/elements/pf-tooltip/pf-tooltip.js";
|
|
||||||
|
import { Application, CoreApi, PoliciesApi } from "@goauthentik/api";
|
||||||
|
|
||||||
import MDApplication from "~docs/add-secure-apps/applications/index.md";
|
import MDApplication from "~docs/add-secure-apps/applications/index.md";
|
||||||
|
|
||||||
import { msg, str } from "@lit/localize";
|
import { msg, str } from "@lit/localize";
|
||||||
import { CSSResult, TemplateResult, css, html } from "lit";
|
import { css, CSSResult, html, TemplateResult } from "lit";
|
||||||
import { customElement, property } from "lit/decorators.js";
|
import { customElement, property } from "lit/decorators.js";
|
||||||
import { ifDefined } from "lit/directives/if-defined.js";
|
import { ifDefined } from "lit/directives/if-defined.js";
|
||||||
|
|
||||||
import PFCard from "@patternfly/patternfly/components/Card/card.css";
|
import PFCard from "@patternfly/patternfly/components/Card/card.css";
|
||||||
|
|
||||||
import { Application, CoreApi, PoliciesApi } from "@goauthentik/api";
|
|
||||||
|
|
||||||
import "./ApplicationWizardHint.js";
|
|
||||||
|
|
||||||
export const applicationListStyle = css`
|
export const applicationListStyle = css`
|
||||||
/* Fix alignment issues with images in tables */
|
/* Fix alignment issues with images in tables */
|
||||||
.pf-c-table tbody > tr > * {
|
.pf-c-table tbody > tr > * {
|
||||||
|
@ -4,18 +4,27 @@ import "#admin/applications/ApplicationForm";
|
|||||||
import "#admin/applications/entitlements/ApplicationEntitlementPage";
|
import "#admin/applications/entitlements/ApplicationEntitlementPage";
|
||||||
import "#admin/policies/BoundPoliciesList";
|
import "#admin/policies/BoundPoliciesList";
|
||||||
import "#admin/rbac/ObjectPermissionsPage";
|
import "#admin/rbac/ObjectPermissionsPage";
|
||||||
import { DEFAULT_CONFIG } from "#common/api/config";
|
|
||||||
import { PFSize } from "#common/enums";
|
|
||||||
import "#components/ak-page-header";
|
import "#components/ak-page-header";
|
||||||
import "#components/events/ObjectChangelog";
|
import "#components/events/ObjectChangelog";
|
||||||
import "#elements/AppIcon";
|
import "#elements/AppIcon";
|
||||||
import { AKElement } from "#elements/Base";
|
|
||||||
import "#elements/EmptyState";
|
import "#elements/EmptyState";
|
||||||
import "#elements/Tabs";
|
import "#elements/Tabs";
|
||||||
import "#elements/buttons/SpinnerButton/ak-spinner-button";
|
import "#elements/buttons/SpinnerButton/ak-spinner-button";
|
||||||
|
|
||||||
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
|
import { PFSize } from "#common/enums";
|
||||||
|
|
||||||
|
import { AKElement } from "#elements/Base";
|
||||||
|
|
||||||
|
import {
|
||||||
|
Application,
|
||||||
|
CoreApi,
|
||||||
|
OutpostsApi,
|
||||||
|
RbacPermissionsAssignedByUsersListModelEnum,
|
||||||
|
} from "@goauthentik/api";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { CSSResult, PropertyValues, TemplateResult, html } from "lit";
|
import { CSSResult, html, PropertyValues, TemplateResult } from "lit";
|
||||||
import { customElement, property, state } from "lit/decorators.js";
|
import { customElement, property, state } from "lit/decorators.js";
|
||||||
import { ifDefined } from "lit/directives/if-defined.js";
|
import { ifDefined } from "lit/directives/if-defined.js";
|
||||||
|
|
||||||
@ -29,13 +38,6 @@ import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
|||||||
import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";
|
import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";
|
||||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||||
|
|
||||||
import {
|
|
||||||
Application,
|
|
||||||
CoreApi,
|
|
||||||
OutpostsApi,
|
|
||||||
RbacPermissionsAssignedByUsersListModelEnum,
|
|
||||||
} from "@goauthentik/api";
|
|
||||||
|
|
||||||
@customElement("ak-application-view")
|
@customElement("ak-application-view")
|
||||||
export class ApplicationViewPage extends AKElement {
|
export class ApplicationViewPage extends AKElement {
|
||||||
@property({ type: String })
|
@property({ type: String })
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
import "@goauthentik/admin/applications/wizard/ak-application-wizard";
|
import "#admin/applications/wizard/ak-application-wizard";
|
||||||
import {
|
import "#components/ak-hint/ak-hint";
|
||||||
ShowHintController,
|
import "#components/ak-hint/ak-hint-body";
|
||||||
ShowHintControllerHost,
|
import "#elements/Label";
|
||||||
} from "@goauthentik/components/ak-hint/ShowHintController";
|
import "#elements/buttons/ActionButton/ak-action-button";
|
||||||
import "@goauthentik/components/ak-hint/ak-hint";
|
|
||||||
import "@goauthentik/components/ak-hint/ak-hint-body";
|
import { AKElement } from "#elements/Base";
|
||||||
import { AKElement } from "@goauthentik/elements/Base";
|
import { getURLParam } from "#elements/router/RouteMatch";
|
||||||
import "@goauthentik/elements/Label";
|
|
||||||
import "@goauthentik/elements/buttons/ActionButton/ak-action-button";
|
import { ShowHintController, ShowHintControllerHost } from "#components/ak-hint/ShowHintController";
|
||||||
import { getURLParam } from "@goauthentik/elements/router/RouteMatch";
|
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { css, html } from "lit";
|
import { css, html } from "lit";
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#elements/buttons/SpinnerButton/index";
|
||||||
import "@goauthentik/elements/buttons/SpinnerButton";
|
|
||||||
import { PaginatedResponse } from "@goauthentik/elements/table/Table";
|
|
||||||
import { TableColumn } from "@goauthentik/elements/table/Table";
|
|
||||||
import { TableModal } from "@goauthentik/elements/table/TableModal";
|
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { TemplateResult, html } from "lit";
|
|
||||||
import { customElement, property } from "lit/decorators.js";
|
import { PaginatedResponse, TableColumn } from "#elements/table/Table";
|
||||||
|
import { TableModal } from "#elements/table/TableModal";
|
||||||
|
|
||||||
import { Provider, ProvidersApi } from "@goauthentik/api";
|
import { Provider, ProvidersApi } from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { msg } from "@lit/localize";
|
||||||
|
import { html, TemplateResult } from "lit";
|
||||||
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
|
||||||
@customElement("ak-provider-select-table")
|
@customElement("ak-provider-select-table")
|
||||||
export class ProviderSelectModal extends TableModal<Provider> {
|
export class ProviderSelectModal extends TableModal<Provider> {
|
||||||
checkbox = true;
|
checkbox = true;
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
import "@goauthentik/admin/applications/ProviderSelectModal";
|
import "#admin/applications/ProviderSelectModal";
|
||||||
import { AKElement } from "@goauthentik/elements/Base";
|
import "#elements/chips/Chip";
|
||||||
import "@goauthentik/elements/chips/Chip";
|
import "#elements/chips/ChipGroup";
|
||||||
import "@goauthentik/elements/chips/ChipGroup";
|
|
||||||
|
|
||||||
import { TemplateResult, html, nothing } from "lit";
|
import { AKElement } from "#elements/Base";
|
||||||
|
|
||||||
|
import { Provider } from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { html, nothing, TemplateResult } from "lit";
|
||||||
import { customElement, property } from "lit/decorators.js";
|
import { customElement, property } from "lit/decorators.js";
|
||||||
import { ifDefined } from "lit/directives/if-defined.js";
|
import { ifDefined } from "lit/directives/if-defined.js";
|
||||||
import { map } from "lit/directives/map.js";
|
import { map } from "lit/directives/map.js";
|
||||||
|
|
||||||
import { Provider } from "@goauthentik/api";
|
|
||||||
|
|
||||||
@customElement("ak-backchannel-providers-input")
|
@customElement("ak-backchannel-providers-input")
|
||||||
export class AkBackchannelProvidersInput extends AKElement {
|
export class AkBackchannelProvidersInput extends AKElement {
|
||||||
// Render into the lightDOM. This effectively erases the shadowDOM nature of this component, but
|
// Render into the lightDOM. This effectively erases the shadowDOM nature of this component, but
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#elements/forms/SearchSelect/index";
|
||||||
import { groupBy } from "@goauthentik/common/utils";
|
|
||||||
import { AKElement } from "@goauthentik/elements/Base";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import "@goauthentik/elements/forms/SearchSelect";
|
import { groupBy } from "#common/utils";
|
||||||
|
|
||||||
|
import { AKElement } from "#elements/Base";
|
||||||
|
|
||||||
|
import { Provider, ProvidersAllListRequest, ProvidersApi } from "@goauthentik/api";
|
||||||
|
|
||||||
import { html, nothing } from "lit";
|
import { html, nothing } from "lit";
|
||||||
import { customElement, property } from "lit/decorators.js";
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
|
||||||
import { Provider, ProvidersAllListRequest, ProvidersApi } from "@goauthentik/api";
|
|
||||||
|
|
||||||
const renderElement = (item: Provider) => item.name;
|
const renderElement = (item: Provider) => item.name;
|
||||||
const renderValue = (item: Provider | undefined) => item?.pk;
|
const renderValue = (item: Provider | undefined) => item?.pk;
|
||||||
const doGroupBy = (items: Provider[]) => groupBy(items, (item) => item.verboseName);
|
const doGroupBy = (items: Provider[]) => groupBy(items, (item) => item.verboseName);
|
||||||
|
@ -1,21 +1,23 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#elements/CodeMirror";
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "#elements/forms/HorizontalFormElement";
|
||||||
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
import "#elements/forms/Radio";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "#elements/forms/SearchSelect/index";
|
||||||
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
|
|
||||||
import "@goauthentik/elements/forms/Radio";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import "@goauthentik/elements/forms/SearchSelect";
|
|
||||||
|
import { CodeMirrorMode } from "#elements/CodeMirror";
|
||||||
|
import { ModelForm } from "#elements/forms/ModelForm";
|
||||||
|
|
||||||
|
import { ApplicationEntitlement, CoreApi } from "@goauthentik/api";
|
||||||
|
|
||||||
import YAML from "yaml";
|
import YAML from "yaml";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { CSSResult } from "lit";
|
import { CSSResult, html, TemplateResult } from "lit";
|
||||||
import { TemplateResult, html } from "lit";
|
|
||||||
import { customElement, property } from "lit/decorators.js";
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
|
||||||
import PFContent from "@patternfly/patternfly/components/Content/content.css";
|
import PFContent from "@patternfly/patternfly/components/Content/content.css";
|
||||||
|
|
||||||
import { ApplicationEntitlement, CoreApi } from "@goauthentik/api";
|
|
||||||
|
|
||||||
@customElement("ak-application-entitlement-form")
|
@customElement("ak-application-entitlement-form")
|
||||||
export class ApplicationEntitlementForm extends ModelForm<ApplicationEntitlement, string> {
|
export class ApplicationEntitlementForm extends ModelForm<ApplicationEntitlement, string> {
|
||||||
async loadInstance(pk: string): Promise<ApplicationEntitlement> {
|
async loadInstance(pk: string): Promise<ApplicationEntitlement> {
|
||||||
|
@ -1,21 +1,18 @@
|
|||||||
import "@goauthentik/admin/applications/entitlements/ApplicationEntitlementForm";
|
import "#admin/applications/entitlements/ApplicationEntitlementForm";
|
||||||
import "@goauthentik/admin/policies/BoundPoliciesList";
|
import "#admin/policies/BoundPoliciesList";
|
||||||
import { PolicyBindingCheckTarget } from "@goauthentik/admin/policies/utils";
|
import "#admin/rbac/ObjectPermissionModal";
|
||||||
import "@goauthentik/admin/rbac/ObjectPermissionModal";
|
import "#components/ak-status-label";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#elements/Tabs";
|
||||||
import { PFSize } from "@goauthentik/common/enums";
|
import "#elements/forms/DeleteBulkForm";
|
||||||
import "@goauthentik/components/ak-status-label";
|
import "#elements/forms/ModalForm";
|
||||||
import "@goauthentik/elements/Tabs";
|
import "#elements/forms/ProxyForm";
|
||||||
import "@goauthentik/elements/forms/DeleteBulkForm";
|
|
||||||
import "@goauthentik/elements/forms/ModalForm";
|
|
||||||
import "@goauthentik/elements/forms/ProxyForm";
|
|
||||||
import { PaginatedResponse } from "@goauthentik/elements/table/Table";
|
|
||||||
import { Table, TableColumn } from "@goauthentik/elements/table/Table";
|
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { TemplateResult, html } from "lit";
|
import { PFSize } from "#common/enums";
|
||||||
import { customElement, property } from "lit/decorators.js";
|
|
||||||
import { ifDefined } from "lit/directives/if-defined.js";
|
import { PaginatedResponse, Table, TableColumn } from "#elements/table/Table";
|
||||||
|
|
||||||
|
import { PolicyBindingCheckTarget } from "#admin/policies/utils";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ApplicationEntitlement,
|
ApplicationEntitlement,
|
||||||
@ -23,6 +20,11 @@ import {
|
|||||||
RbacPermissionsAssignedByUsersListModelEnum,
|
RbacPermissionsAssignedByUsersListModelEnum,
|
||||||
} from "@goauthentik/api";
|
} from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { msg } from "@lit/localize";
|
||||||
|
import { html, TemplateResult } from "lit";
|
||||||
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
import { ifDefined } from "lit/directives/if-defined.js";
|
||||||
|
|
||||||
@customElement("ak-application-entitlements-list")
|
@customElement("ak-application-entitlements-list")
|
||||||
export class ApplicationEntitlementsPage extends Table<ApplicationEntitlement> {
|
export class ApplicationEntitlementsPage extends Table<ApplicationEntitlement> {
|
||||||
@property()
|
@property()
|
||||||
|
@ -1,23 +1,25 @@
|
|||||||
import { styles } from "@goauthentik/admin/applications/wizard/ApplicationWizardFormStepStyles.css.js";
|
import { KeyUnknown, serializeForm } from "#elements/forms/Form";
|
||||||
import { WizardStep } from "@goauthentik/components/ak-wizard/WizardStep.js";
|
import { HorizontalFormElement } from "#elements/forms/HorizontalFormElement";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
NavigationEventInit,
|
NavigationEventInit,
|
||||||
WizardNavigationEvent,
|
WizardNavigationEvent,
|
||||||
WizardUpdateEvent,
|
WizardUpdateEvent,
|
||||||
} from "@goauthentik/components/ak-wizard/events";
|
} from "#components/ak-wizard/events";
|
||||||
import { KeyUnknown, serializeForm } from "@goauthentik/elements/forms/Form";
|
import { WizardStep } from "#components/ak-wizard/WizardStep";
|
||||||
import { HorizontalFormElement } from "@goauthentik/elements/forms/HorizontalFormElement";
|
|
||||||
|
import { styles } from "#admin/applications/wizard/ApplicationWizardFormStepStyles.styles";
|
||||||
|
|
||||||
|
import { ValidationError } from "@goauthentik/api";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { property, query } from "lit/decorators.js";
|
import { property, query } from "lit/decorators.js";
|
||||||
|
|
||||||
import { ValidationError } from "@goauthentik/api";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ApplicationTransactionValidationError,
|
ApplicationTransactionValidationError,
|
||||||
type ApplicationWizardState,
|
type ApplicationWizardState,
|
||||||
type ApplicationWizardStateUpdate,
|
type ApplicationWizardStateUpdate,
|
||||||
} from "./types";
|
} from "./types.js";
|
||||||
|
|
||||||
export class ApplicationWizardStep extends WizardStep {
|
export class ApplicationWizardStep extends WizardStep {
|
||||||
static get styles() {
|
static get styles() {
|
||||||
|
@ -1,23 +1,26 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#components/ak-wizard/ak-wizard-steps";
|
||||||
import "@goauthentik/components/ak-wizard/ak-wizard-steps.js";
|
|
||||||
import { WizardUpdateEvent } from "@goauthentik/components/ak-wizard/events";
|
|
||||||
import { AKElement } from "@goauthentik/elements/Base.js";
|
|
||||||
|
|
||||||
import { ContextProvider } from "@lit/context";
|
|
||||||
import { html } from "lit";
|
|
||||||
import { customElement, state } from "lit/decorators.js";
|
|
||||||
|
|
||||||
import { ProvidersApi, ProxyMode } from "@goauthentik/api";
|
|
||||||
|
|
||||||
import { applicationWizardProvidersContext } from "./ContextIdentity";
|
|
||||||
import { providerTypeRenderers } from "./steps/ProviderChoices.js";
|
|
||||||
import "./steps/ak-application-wizard-application-step.js";
|
import "./steps/ak-application-wizard-application-step.js";
|
||||||
import "./steps/ak-application-wizard-bindings-step.js";
|
import "./steps/ak-application-wizard-bindings-step.js";
|
||||||
import "./steps/ak-application-wizard-edit-binding-step.js";
|
import "./steps/ak-application-wizard-edit-binding-step.js";
|
||||||
import "./steps/ak-application-wizard-provider-choice-step.js";
|
import "./steps/ak-application-wizard-provider-choice-step.js";
|
||||||
import "./steps/ak-application-wizard-provider-step.js";
|
import "./steps/ak-application-wizard-provider-step.js";
|
||||||
import "./steps/ak-application-wizard-submit-step.js";
|
import "./steps/ak-application-wizard-submit-step.js";
|
||||||
import { type ApplicationWizardState, type ApplicationWizardStateUpdate } from "./types";
|
|
||||||
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
|
|
||||||
|
import { AKElement } from "#elements/Base";
|
||||||
|
|
||||||
|
import { WizardUpdateEvent } from "#components/ak-wizard/events";
|
||||||
|
|
||||||
|
import { ProvidersApi, ProxyMode } from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { ContextProvider } from "@lit/context";
|
||||||
|
import { html } from "lit";
|
||||||
|
import { customElement, state } from "lit/decorators.js";
|
||||||
|
|
||||||
|
import { applicationWizardProvidersContext } from "./ContextIdentity.js";
|
||||||
|
import { providerTypeRenderers } from "./steps/ProviderChoices.js";
|
||||||
|
import { type ApplicationWizardState, type ApplicationWizardStateUpdate } from "./types.js";
|
||||||
|
|
||||||
const freshWizardState = (): ApplicationWizardState => ({
|
const freshWizardState = (): ApplicationWizardState => ({
|
||||||
providerModel: "",
|
providerModel: "",
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import { WizardCloseEvent } from "@goauthentik/components/ak-wizard/events.js";
|
import "./ak-application-wizard-main.js";
|
||||||
import { ModalButton } from "@goauthentik/elements/buttons/ModalButton";
|
|
||||||
import { bound } from "@goauthentik/elements/decorators/bound.js";
|
import { ModalButton } from "#elements/buttons/ModalButton";
|
||||||
|
import { bound } from "#elements/decorators/bound";
|
||||||
|
|
||||||
|
import { WizardCloseEvent } from "#components/ak-wizard/events";
|
||||||
|
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
import { customElement } from "lit/decorators.js";
|
import { customElement } from "lit/decorators.js";
|
||||||
|
|
||||||
import "./ak-application-wizard-main.js";
|
|
||||||
|
|
||||||
@customElement("ak-application-wizard")
|
@customElement("ak-application-wizard")
|
||||||
export class AkApplicationWizard extends ModalButton {
|
export class AkApplicationWizard extends ModalButton {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { AKElement } from "@goauthentik/elements/Base";
|
import { AKElement } from "#elements/Base";
|
||||||
|
|
||||||
import { css, html } from "lit";
|
import { css, html } from "lit";
|
||||||
import { customElement } from "lit/decorators.js";
|
import { customElement } from "lit/decorators.js";
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import "@goauthentik/admin/common/ak-license-notice";
|
import "#admin/common/ak-license-notice";
|
||||||
|
|
||||||
import { TemplateResult, html } from "lit";
|
|
||||||
|
|
||||||
import type { TypeCreate } from "@goauthentik/api";
|
import type { TypeCreate } from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { html, TemplateResult } from "lit";
|
||||||
|
|
||||||
type ProviderRenderer = () => TemplateResult;
|
type ProviderRenderer = () => TemplateResult;
|
||||||
|
|
||||||
export type LocalTypeCreate = TypeCreate & {
|
export type LocalTypeCreate = TypeCreate & {
|
||||||
|
@ -1,11 +1,4 @@
|
|||||||
import {
|
import { type DescriptionPair, renderDescriptionList } from "#components/DescriptionList";
|
||||||
type DescriptionPair,
|
|
||||||
renderDescriptionList,
|
|
||||||
} from "@goauthentik/components/DescriptionList.js";
|
|
||||||
import { match } from "ts-pattern";
|
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
|
||||||
import { html } from "lit";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ClientTypeEnum,
|
ClientTypeEnum,
|
||||||
@ -22,6 +15,11 @@ import {
|
|||||||
SCIMProvider,
|
SCIMProvider,
|
||||||
} from "@goauthentik/api";
|
} from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { match } from "ts-pattern";
|
||||||
|
|
||||||
|
import { msg } from "@lit/localize";
|
||||||
|
import { html } from "lit";
|
||||||
|
|
||||||
import { OneOfProvider } from "../types.js";
|
import { OneOfProvider } from "../types.js";
|
||||||
|
|
||||||
const renderSummary = (type: string, name: string, fields: DescriptionPair[]) =>
|
const renderSummary = (type: string, name: string, fields: DescriptionPair[]) =>
|
||||||
|
@ -1,25 +1,29 @@
|
|||||||
import { ApplicationWizardStep } from "@goauthentik/admin/applications/wizard/ApplicationWizardStep.js";
|
import "#admin/applications/wizard/ak-wizard-title";
|
||||||
import "@goauthentik/admin/applications/wizard/ak-wizard-title.js";
|
import "#components/ak-radio-input";
|
||||||
import { policyEngineModes } from "@goauthentik/admin/policies/PolicyEngineModes";
|
import "#components/ak-slug-input";
|
||||||
import { camelToSnake } from "@goauthentik/common/utils.js";
|
import "#components/ak-switch-input";
|
||||||
import "@goauthentik/components/ak-radio-input";
|
import "#components/ak-text-input";
|
||||||
import "@goauthentik/components/ak-slug-input";
|
import "#elements/forms/FormGroup";
|
||||||
import "@goauthentik/components/ak-switch-input";
|
import "#elements/forms/HorizontalFormElement";
|
||||||
import "@goauthentik/components/ak-text-input";
|
|
||||||
import { type NavigableButton, type WizardButton } from "@goauthentik/components/ak-wizard/types";
|
import { camelToSnake } from "#common/utils";
|
||||||
import { type KeyUnknown } from "@goauthentik/elements/forms/Form";
|
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import { type KeyUnknown } from "#elements/forms/Form";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import { isSlug } from "#elements/router/utils";
|
||||||
import { isSlug } from "@goauthentik/elements/router/utils.js";
|
|
||||||
|
import { type NavigableButton, type WizardButton } from "#components/ak-wizard/types";
|
||||||
|
|
||||||
|
import { ApplicationWizardStep } from "#admin/applications/wizard/ApplicationWizardStep";
|
||||||
|
import { policyEngineModes } from "#admin/policies/PolicyEngineModes";
|
||||||
|
|
||||||
|
import { type ApplicationRequest } from "@goauthentik/api";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
import { customElement, query, state } from "lit/decorators.js";
|
import { customElement, query, state } from "lit/decorators.js";
|
||||||
import { ifDefined } from "lit/directives/if-defined.js";
|
import { ifDefined } from "lit/directives/if-defined.js";
|
||||||
|
|
||||||
import { type ApplicationRequest } from "@goauthentik/api";
|
import { ApplicationWizardStateUpdate, ValidationRecord } from "../types.js";
|
||||||
|
|
||||||
import { ApplicationWizardStateUpdate, ValidationRecord } from "../types";
|
|
||||||
|
|
||||||
const autoTrim = (v: unknown) => (typeof v === "string" ? v.trim() : v);
|
const autoTrim = (v: unknown) => (typeof v === "string" ? v.trim() : v);
|
||||||
|
|
||||||
|
@ -1,16 +1,21 @@
|
|||||||
import { ApplicationWizardStep } from "@goauthentik/admin/applications/wizard/ApplicationWizardStep.js";
|
import "#admin/applications/wizard/ak-wizard-title";
|
||||||
import "@goauthentik/admin/applications/wizard/ak-wizard-title.js";
|
import "#components/ak-radio-input";
|
||||||
import "@goauthentik/components/ak-radio-input";
|
import "#components/ak-slug-input";
|
||||||
import "@goauthentik/components/ak-slug-input";
|
import "#components/ak-status-label";
|
||||||
import "@goauthentik/components/ak-status-label";
|
import "#components/ak-switch-input";
|
||||||
import "@goauthentik/components/ak-switch-input";
|
import "#components/ak-text-input";
|
||||||
import "@goauthentik/components/ak-text-input";
|
import "#elements/ak-table/ak-select-table";
|
||||||
import { type WizardButton } from "@goauthentik/components/ak-wizard/types";
|
import "#elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/ak-table/ak-select-table.js";
|
import "#elements/forms/HorizontalFormElement";
|
||||||
import { SelectTable } from "@goauthentik/elements/ak-table/ak-select-table.js";
|
import "./bindings/ak-application-wizard-bindings-toolbar.js";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import { SelectTable } from "#elements/ak-table/ak-select-table";
|
||||||
import { P, match } from "ts-pattern";
|
|
||||||
|
import { type WizardButton } from "#components/ak-wizard/types";
|
||||||
|
|
||||||
|
import { ApplicationWizardStep } from "#admin/applications/wizard/ApplicationWizardStep";
|
||||||
|
|
||||||
|
import { match, P } from "ts-pattern";
|
||||||
|
|
||||||
import { msg, str } from "@lit/localize";
|
import { msg, str } from "@lit/localize";
|
||||||
import { css, html } from "lit";
|
import { css, html } from "lit";
|
||||||
@ -19,7 +24,6 @@ import { customElement, query } from "lit/decorators.js";
|
|||||||
import PFCard from "@patternfly/patternfly/components/Card/card.css";
|
import PFCard from "@patternfly/patternfly/components/Card/card.css";
|
||||||
|
|
||||||
import { makeEditButton } from "./bindings/ak-application-wizard-bindings-edit-button.js";
|
import { makeEditButton } from "./bindings/ak-application-wizard-bindings-edit-button.js";
|
||||||
import "./bindings/ak-application-wizard-bindings-toolbar.js";
|
|
||||||
|
|
||||||
const COLUMNS = [
|
const COLUMNS = [
|
||||||
[msg("Order"), "order"],
|
[msg("Order"), "order"],
|
||||||
|
@ -1,24 +1,28 @@
|
|||||||
import { ApplicationWizardStep } from "@goauthentik/admin/applications/wizard/ApplicationWizardStep.js";
|
import "#admin/applications/wizard/ak-wizard-title";
|
||||||
import "@goauthentik/admin/applications/wizard/ak-wizard-title.js";
|
import "#components/ak-radio-input";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#components/ak-switch-input";
|
||||||
import { groupBy } from "@goauthentik/common/utils";
|
import "#components/ak-text-input";
|
||||||
import "@goauthentik/components/ak-radio-input";
|
import "#components/ak-toggle-group";
|
||||||
import "@goauthentik/components/ak-switch-input";
|
import "#elements/forms/FormGroup";
|
||||||
import "@goauthentik/components/ak-text-input";
|
import "#elements/forms/HorizontalFormElement";
|
||||||
import "@goauthentik/components/ak-toggle-group";
|
import "#elements/forms/SearchSelect/index";
|
||||||
import { type NavigableButton, type WizardButton } from "@goauthentik/components/ak-wizard/types";
|
import "#elements/forms/SearchSelect/ak-search-select-ez";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import "@goauthentik/elements/forms/SearchSelect";
|
import { groupBy } from "#common/utils";
|
||||||
import { type SearchSelectBase } from "@goauthentik/elements/forms/SearchSelect/SearchSelect.js";
|
|
||||||
import "@goauthentik/elements/forms/SearchSelect/ak-search-select-ez.js";
|
import { type SearchSelectBase } from "#elements/forms/SearchSelect/SearchSelect";
|
||||||
|
|
||||||
|
import { type NavigableButton, type WizardButton } from "#components/ak-wizard/types";
|
||||||
|
|
||||||
|
import { ApplicationWizardStep } from "#admin/applications/wizard/ApplicationWizardStep";
|
||||||
|
|
||||||
|
import { CoreApi, Group, PoliciesApi, Policy, PolicyBinding, User } from "@goauthentik/api";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { html, nothing } from "lit";
|
import { html, nothing } from "lit";
|
||||||
import { customElement, query, state } from "lit/decorators.js";
|
import { customElement, query, state } from "lit/decorators.js";
|
||||||
|
|
||||||
import { CoreApi, Group, PoliciesApi, Policy, PolicyBinding, User } from "@goauthentik/api";
|
|
||||||
|
|
||||||
const withQuery = <T>(search: string | undefined, args: T) => (search ? { ...args, search } : args);
|
const withQuery = <T>(search: string | undefined, args: T) => (search ? { ...args, search } : args);
|
||||||
|
|
||||||
enum target {
|
enum target {
|
||||||
|
@ -1,22 +1,25 @@
|
|||||||
|
import "#admin/applications/wizard/ak-wizard-title";
|
||||||
|
import "#elements/EmptyState";
|
||||||
|
import "#elements/forms/FormGroup";
|
||||||
|
import "#elements/forms/HorizontalFormElement";
|
||||||
|
import "#elements/wizard/TypeCreateWizardPage";
|
||||||
|
|
||||||
|
import { bound } from "#elements/decorators/bound";
|
||||||
import { WithLicenseSummary } from "#elements/mixins/license";
|
import { WithLicenseSummary } from "#elements/mixins/license";
|
||||||
import { ApplicationWizardStep } from "@goauthentik/admin/applications/wizard/ApplicationWizardStep.js";
|
import { TypeCreateWizardPageLayouts } from "#elements/wizard/TypeCreateWizardPage";
|
||||||
import "@goauthentik/admin/applications/wizard/ak-wizard-title.js";
|
|
||||||
import type { NavigableButton, WizardButton } from "@goauthentik/components/ak-wizard/types";
|
import type { NavigableButton, WizardButton } from "#components/ak-wizard/types";
|
||||||
import "@goauthentik/elements/EmptyState.js";
|
|
||||||
import { bound } from "@goauthentik/elements/decorators/bound.js";
|
import { ApplicationWizardStep } from "#admin/applications/wizard/ApplicationWizardStep";
|
||||||
import "@goauthentik/elements/forms/FormGroup.js";
|
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement.js";
|
import { TypeCreate } from "@goauthentik/api";
|
||||||
import { TypeCreateWizardPageLayouts } from "@goauthentik/elements/wizard/TypeCreateWizardPage.js";
|
|
||||||
import "@goauthentik/elements/wizard/TypeCreateWizardPage.js";
|
|
||||||
|
|
||||||
import { consume } from "@lit/context";
|
import { consume } from "@lit/context";
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
import { customElement, state } from "lit/decorators.js";
|
import { customElement, state } from "lit/decorators.js";
|
||||||
|
|
||||||
import { TypeCreate } from "@goauthentik/api";
|
import { applicationWizardProvidersContext } from "../ContextIdentity.js";
|
||||||
|
|
||||||
import { applicationWizardProvidersContext } from "../ContextIdentity";
|
|
||||||
import { type LocalTypeCreate } from "./ProviderChoices.js";
|
import { type LocalTypeCreate } from "./ProviderChoices.js";
|
||||||
|
|
||||||
@customElement("ak-application-wizard-provider-choice-step")
|
@customElement("ak-application-wizard-provider-choice-step")
|
||||||
|
@ -1,13 +1,3 @@
|
|||||||
import { type NavigableButton, type WizardButton } from "@goauthentik/components/ak-wizard/types";
|
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
|
||||||
import { PropertyValues, nothing } from "lit";
|
|
||||||
import { customElement, query, state } from "lit/decorators.js";
|
|
||||||
import { html, unsafeStatic } from "lit/static-html.js";
|
|
||||||
|
|
||||||
import { ApplicationWizardStep } from "../ApplicationWizardStep.js";
|
|
||||||
import { OneOfProvider } from "../types.js";
|
|
||||||
import { ApplicationWizardProviderForm } from "./providers/ApplicationWizardProviderForm.js";
|
|
||||||
import "./providers/ak-application-wizard-provider-for-ldap.js";
|
import "./providers/ak-application-wizard-provider-for-ldap.js";
|
||||||
import "./providers/ak-application-wizard-provider-for-oauth.js";
|
import "./providers/ak-application-wizard-provider-for-oauth.js";
|
||||||
import "./providers/ak-application-wizard-provider-for-proxy.js";
|
import "./providers/ak-application-wizard-provider-for-proxy.js";
|
||||||
@ -16,6 +6,17 @@ import "./providers/ak-application-wizard-provider-for-radius.js";
|
|||||||
import "./providers/ak-application-wizard-provider-for-saml.js";
|
import "./providers/ak-application-wizard-provider-for-saml.js";
|
||||||
import "./providers/ak-application-wizard-provider-for-scim.js";
|
import "./providers/ak-application-wizard-provider-for-scim.js";
|
||||||
|
|
||||||
|
import { type NavigableButton, type WizardButton } from "#components/ak-wizard/types";
|
||||||
|
|
||||||
|
import { msg } from "@lit/localize";
|
||||||
|
import { nothing, PropertyValues } from "lit";
|
||||||
|
import { customElement, query, state } from "lit/decorators.js";
|
||||||
|
import { html, unsafeStatic } from "lit/static-html.js";
|
||||||
|
|
||||||
|
import { ApplicationWizardStep } from "../ApplicationWizardStep.js";
|
||||||
|
import { OneOfProvider } from "../types.js";
|
||||||
|
import { ApplicationWizardProviderForm } from "./providers/ApplicationWizardProviderForm.js";
|
||||||
|
|
||||||
const providerToTag = new Map([
|
const providerToTag = new Map([
|
||||||
["ldapprovider", "ak-application-wizard-provider-for-ldap"],
|
["ldapprovider", "ak-application-wizard-provider-for-ldap"],
|
||||||
["oauth2provider", "ak-application-wizard-provider-for-oauth"],
|
["oauth2provider", "ak-application-wizard-provider-for-oauth"],
|
||||||
|
@ -1,15 +1,33 @@
|
|||||||
import "@goauthentik/admin/applications/wizard/ak-wizard-title.js";
|
import "#admin/applications/wizard/ak-wizard-title";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
|
||||||
import { EVENT_REFRESH } from "@goauthentik/common/constants";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { parseAPIResponseError } from "@goauthentik/common/errors/network";
|
import { EVENT_REFRESH } from "#common/constants";
|
||||||
import { WizardNavigationEvent } from "@goauthentik/components/ak-wizard/events.js";
|
import { parseAPIResponseError } from "#common/errors/network";
|
||||||
import { type WizardButton } from "@goauthentik/components/ak-wizard/types";
|
|
||||||
import { showAPIErrorMessage } from "@goauthentik/elements/messages/MessageContainer";
|
import { showAPIErrorMessage } from "#elements/messages/MessageContainer";
|
||||||
import { CustomEmitterElement } from "@goauthentik/elements/utils/eventEmitter";
|
import { CustomEmitterElement } from "#elements/utils/eventEmitter";
|
||||||
import { P, match } from "ts-pattern";
|
|
||||||
|
import { WizardNavigationEvent } from "#components/ak-wizard/events";
|
||||||
|
import { type WizardButton } from "#components/ak-wizard/types";
|
||||||
|
|
||||||
|
import {
|
||||||
|
type ApplicationRequest,
|
||||||
|
CoreApi,
|
||||||
|
instanceOfValidationError,
|
||||||
|
type ModelRequest,
|
||||||
|
type PolicyBinding,
|
||||||
|
ProviderModelEnum,
|
||||||
|
ProxyMode,
|
||||||
|
type ProxyProviderRequest,
|
||||||
|
type TransactionApplicationRequest,
|
||||||
|
type TransactionApplicationResponse,
|
||||||
|
type TransactionPolicyBindingRequest,
|
||||||
|
} from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { match, P } from "ts-pattern";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { TemplateResult, css, html, nothing } from "lit";
|
import { css, html, nothing, TemplateResult } from "lit";
|
||||||
import { customElement, state } from "lit/decorators.js";
|
import { customElement, state } from "lit/decorators.js";
|
||||||
import { classMap } from "lit/directives/class-map.js";
|
import { classMap } from "lit/directives/class-map.js";
|
||||||
|
|
||||||
@ -20,22 +38,8 @@ import PFProgressStepper from "@patternfly/patternfly/components/ProgressStepper
|
|||||||
import PFTitle from "@patternfly/patternfly/components/Title/title.css";
|
import PFTitle from "@patternfly/patternfly/components/Title/title.css";
|
||||||
import PFBullseye from "@patternfly/patternfly/layouts/Bullseye/bullseye.css";
|
import PFBullseye from "@patternfly/patternfly/layouts/Bullseye/bullseye.css";
|
||||||
|
|
||||||
import {
|
|
||||||
type ApplicationRequest,
|
|
||||||
CoreApi,
|
|
||||||
type ModelRequest,
|
|
||||||
type PolicyBinding,
|
|
||||||
ProviderModelEnum,
|
|
||||||
ProxyMode,
|
|
||||||
type ProxyProviderRequest,
|
|
||||||
type TransactionApplicationRequest,
|
|
||||||
type TransactionApplicationResponse,
|
|
||||||
type TransactionPolicyBindingRequest,
|
|
||||||
instanceOfValidationError,
|
|
||||||
} from "@goauthentik/api";
|
|
||||||
|
|
||||||
import { ApplicationWizardStep } from "../ApplicationWizardStep.js";
|
import { ApplicationWizardStep } from "../ApplicationWizardStep.js";
|
||||||
import { OneOfProvider, isApplicationTransactionValidationError } from "../types.js";
|
import { isApplicationTransactionValidationError, OneOfProvider } from "../types.js";
|
||||||
import { providerRenderers } from "./SubmitStepOverviewRenderers.js";
|
import { providerRenderers } from "./SubmitStepOverviewRenderers.js";
|
||||||
|
|
||||||
const _submitStates = ["reviewing", "running", "submitted"] as const;
|
const _submitStates = ["reviewing", "running", "submitted"] as const;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { AKElement } from "@goauthentik/elements/Base.js";
|
import { AKElement } from "#elements/Base";
|
||||||
import { bound } from "@goauthentik/elements/decorators/bound.js";
|
import { bound } from "#elements/decorators/bound";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { AKElement } from "@goauthentik/elements/Base";
|
import { AKElement } from "#elements/Base";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
import { camelToSnake } from "@goauthentik/common/utils.js";
|
import "#components/ak-number-input";
|
||||||
import "@goauthentik/components/ak-number-input";
|
import "#components/ak-radio-input";
|
||||||
import "@goauthentik/components/ak-radio-input";
|
import "#components/ak-switch-input";
|
||||||
import "@goauthentik/components/ak-switch-input";
|
import "#components/ak-text-input";
|
||||||
import "@goauthentik/components/ak-text-input";
|
import "#elements/forms/FormGroup";
|
||||||
import { AKElement } from "@goauthentik/elements/Base.js";
|
import "#elements/forms/HorizontalFormElement";
|
||||||
import { KeyUnknown, serializeForm } from "@goauthentik/elements/forms/Form";
|
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import { camelToSnake } from "#common/utils";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
|
||||||
import { HorizontalFormElement } from "@goauthentik/elements/forms/HorizontalFormElement";
|
import { AKElement } from "#elements/Base";
|
||||||
|
import { KeyUnknown, serializeForm } from "#elements/forms/Form";
|
||||||
|
import { HorizontalFormElement } from "#elements/forms/HorizontalFormElement";
|
||||||
|
|
||||||
import { property, query } from "lit/decorators.js";
|
import { property, query } from "lit/decorators.js";
|
||||||
|
|
||||||
import { styles as AwadStyles } from "../../ApplicationWizardFormStepStyles.css.js";
|
import { styles as AwadStyles } from "../../ApplicationWizardFormStepStyles.styles.js";
|
||||||
import { type ApplicationWizardState, type OneOfProvider } from "../../types";
|
import { type ApplicationWizardState, type OneOfProvider } from "../../types.js";
|
||||||
|
|
||||||
export class ApplicationWizardProviderForm<T extends OneOfProvider> extends AKElement {
|
export class ApplicationWizardProviderForm<T extends OneOfProvider> extends AKElement {
|
||||||
static get styles() {
|
static get styles() {
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
|
import "#admin/applications/wizard/ak-wizard-title";
|
||||||
|
|
||||||
import { WithBrandConfig } from "#elements/mixins/branding";
|
import { WithBrandConfig } from "#elements/mixins/branding";
|
||||||
import "@goauthentik/admin/applications/wizard/ak-wizard-title.js";
|
|
||||||
import { ValidationRecord } from "@goauthentik/admin/applications/wizard/types";
|
import { ValidationRecord } from "#admin/applications/wizard/types";
|
||||||
import { renderForm } from "@goauthentik/admin/providers/ldap/LDAPProviderFormForm.js";
|
import { renderForm } from "#admin/providers/ldap/LDAPProviderFormForm";
|
||||||
|
|
||||||
|
import type { LDAPProvider } from "@goauthentik/api";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
import { customElement } from "lit/decorators.js";
|
import { customElement } from "lit/decorators.js";
|
||||||
|
|
||||||
import type { LDAPProvider } from "@goauthentik/api";
|
|
||||||
|
|
||||||
import { ApplicationWizardProviderForm } from "./ApplicationWizardProviderForm.js";
|
import { ApplicationWizardProviderForm } from "./ApplicationWizardProviderForm.js";
|
||||||
|
|
||||||
@customElement("ak-application-wizard-provider-for-ldap")
|
@customElement("ak-application-wizard-provider-for-ldap")
|
||||||
|
@ -1,14 +1,20 @@
|
|||||||
import "@goauthentik/admin/applications/wizard/ak-wizard-title.js";
|
import "#admin/applications/wizard/ak-wizard-title";
|
||||||
import { renderForm } from "@goauthentik/admin/providers/oauth2/OAuth2ProviderFormForm.js";
|
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
|
|
||||||
|
import { renderForm } from "#admin/providers/oauth2/OAuth2ProviderFormForm";
|
||||||
|
|
||||||
|
import {
|
||||||
|
type OAuth2Provider,
|
||||||
|
OAuth2ProviderRequest,
|
||||||
|
type PaginatedOAuthSourceList,
|
||||||
|
SourcesApi,
|
||||||
|
} from "@goauthentik/api";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
import { customElement, state } from "lit/decorators.js";
|
import { customElement, state } from "lit/decorators.js";
|
||||||
|
|
||||||
import { OAuth2ProviderRequest, SourcesApi } from "@goauthentik/api";
|
|
||||||
import { type OAuth2Provider, type PaginatedOAuthSourceList } from "@goauthentik/api";
|
|
||||||
|
|
||||||
import { ApplicationTransactionValidationError } from "../../types.js";
|
import { ApplicationTransactionValidationError } from "../../types.js";
|
||||||
import { ApplicationWizardProviderForm } from "./ApplicationWizardProviderForm.js";
|
import { ApplicationWizardProviderForm } from "./ApplicationWizardProviderForm.js";
|
||||||
|
|
||||||
|
@ -1,20 +1,22 @@
|
|||||||
import "@goauthentik/admin/applications/wizard/ak-wizard-title.js";
|
import "#admin/applications/wizard/ak-wizard-title";
|
||||||
import { ValidationRecord } from "@goauthentik/admin/applications/wizard/types";
|
|
||||||
|
import { WizardUpdateEvent } from "#components/ak-wizard/events";
|
||||||
|
|
||||||
|
import { ValidationRecord } from "#admin/applications/wizard/types";
|
||||||
import {
|
import {
|
||||||
ProxyModeValue,
|
ProxyModeValue,
|
||||||
|
renderForm,
|
||||||
type SetMode,
|
type SetMode,
|
||||||
type SetShowHttpBasic,
|
type SetShowHttpBasic,
|
||||||
renderForm,
|
} from "#admin/providers/proxy/ProxyProviderFormForm";
|
||||||
} from "@goauthentik/admin/providers/proxy/ProxyProviderFormForm.js";
|
|
||||||
import { WizardUpdateEvent } from "@goauthentik/components/ak-wizard/events.js";
|
import { ProxyMode, ProxyProvider } from "@goauthentik/api";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
import { customElement, state } from "lit/decorators.js";
|
import { customElement, state } from "lit/decorators.js";
|
||||||
|
|
||||||
import { ProxyMode, ProxyProvider } from "@goauthentik/api";
|
import { ApplicationWizardProviderForm } from "./ApplicationWizardProviderForm.js";
|
||||||
|
|
||||||
import { ApplicationWizardProviderForm } from "./ApplicationWizardProviderForm";
|
|
||||||
|
|
||||||
@customElement("ak-application-wizard-provider-for-proxy")
|
@customElement("ak-application-wizard-provider-for-proxy")
|
||||||
export class ApplicationWizardProxyProviderForm extends ApplicationWizardProviderForm<ProxyProvider> {
|
export class ApplicationWizardProxyProviderForm extends ApplicationWizardProviderForm<ProxyProvider> {
|
||||||
|
@ -1,21 +1,22 @@
|
|||||||
import "@goauthentik/admin/applications/wizard/ak-wizard-title.js";
|
import "#admin/applications/wizard/ak-wizard-title";
|
||||||
import "@goauthentik/admin/common/ak-crypto-certificate-search.js";
|
import "#admin/common/ak-crypto-certificate-search";
|
||||||
import "@goauthentik/admin/common/ak-flow-search/ak-flow-search";
|
import "#admin/common/ak-flow-search/ak-flow-search";
|
||||||
|
import "#components/ak-text-input";
|
||||||
|
import "#elements/CodeMirror";
|
||||||
|
import "#elements/ak-dual-select/ak-dual-select-dynamic-selected-provider";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
propertyMappingsProvider,
|
propertyMappingsProvider,
|
||||||
propertyMappingsSelector,
|
propertyMappingsSelector,
|
||||||
} from "@goauthentik/admin/providers/rac/RACProviderFormHelpers.js";
|
} from "#admin/providers/rac/RACProviderFormHelpers";
|
||||||
import "@goauthentik/components/ak-text-input";
|
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import { FlowsInstancesListDesignationEnum, type RACProvider } from "@goauthentik/api";
|
||||||
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
import { customElement } from "lit/decorators.js";
|
import { customElement } from "lit/decorators.js";
|
||||||
import { ifDefined } from "lit/directives/if-defined.js";
|
import { ifDefined } from "lit/directives/if-defined.js";
|
||||||
|
|
||||||
import { FlowsInstancesListDesignationEnum, type RACProvider } from "@goauthentik/api";
|
|
||||||
|
|
||||||
import { ApplicationWizardProviderForm } from "./ApplicationWizardProviderForm.js";
|
import { ApplicationWizardProviderForm } from "./ApplicationWizardProviderForm.js";
|
||||||
|
|
||||||
@customElement("ak-application-wizard-provider-for-rac")
|
@customElement("ak-application-wizard-provider-for-rac")
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
|
import "#admin/applications/wizard/ak-wizard-title";
|
||||||
|
|
||||||
import { WithBrandConfig } from "#elements/mixins/branding";
|
import { WithBrandConfig } from "#elements/mixins/branding";
|
||||||
import "@goauthentik/admin/applications/wizard/ak-wizard-title.js";
|
|
||||||
import { ValidationRecord } from "@goauthentik/admin/applications/wizard/types";
|
import { ValidationRecord } from "#admin/applications/wizard/types";
|
||||||
import { renderForm } from "@goauthentik/admin/providers/radius/RadiusProviderFormForm.js";
|
import { renderForm } from "#admin/providers/radius/RadiusProviderFormForm";
|
||||||
|
|
||||||
|
import { RadiusProvider } from "@goauthentik/api";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { customElement } from "@lit/reactive-element/decorators.js";
|
import { customElement } from "@lit/reactive-element/decorators.js";
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
|
|
||||||
import { RadiusProvider } from "@goauthentik/api";
|
|
||||||
|
|
||||||
import { ApplicationWizardProviderForm } from "./ApplicationWizardProviderForm.js";
|
import { ApplicationWizardProviderForm } from "./ApplicationWizardProviderForm.js";
|
||||||
|
|
||||||
@customElement("ak-application-wizard-provider-for-radius")
|
@customElement("ak-application-wizard-provider-for-radius")
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
import "@goauthentik/admin/applications/wizard/ak-wizard-title.js";
|
import "#admin/applications/wizard/ak-wizard-title";
|
||||||
import { type AkCryptoCertificateSearch } from "@goauthentik/admin/common/ak-crypto-certificate-search";
|
import "#elements/forms/FormGroup";
|
||||||
import { renderForm } from "@goauthentik/admin/providers/saml/SAMLProviderFormForm.js";
|
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import { type AkCryptoCertificateSearch } from "#admin/common/ak-crypto-certificate-search";
|
||||||
|
import { renderForm } from "#admin/providers/saml/SAMLProviderFormForm";
|
||||||
|
|
||||||
|
import { SAMLProvider } from "@goauthentik/api";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { customElement, state } from "@lit/reactive-element/decorators.js";
|
import { customElement, state } from "@lit/reactive-element/decorators.js";
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
|
|
||||||
import { SAMLProvider } from "@goauthentik/api";
|
import { ApplicationWizardProviderForm } from "./ApplicationWizardProviderForm.js";
|
||||||
|
|
||||||
import { ApplicationWizardProviderForm } from "./ApplicationWizardProviderForm";
|
|
||||||
|
|
||||||
@customElement("ak-application-wizard-provider-for-saml")
|
@customElement("ak-application-wizard-provider-for-saml")
|
||||||
export class ApplicationWizardProviderSamlForm extends ApplicationWizardProviderForm<SAMLProvider> {
|
export class ApplicationWizardProviderSamlForm extends ApplicationWizardProviderForm<SAMLProvider> {
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
import "@goauthentik/admin/applications/wizard/ak-wizard-title.js";
|
import "#admin/applications/wizard/ak-wizard-title";
|
||||||
import { renderForm } from "@goauthentik/admin/providers/scim/SCIMProviderFormForm.js";
|
import "#elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
|
||||||
|
import { renderForm } from "#admin/providers/scim/SCIMProviderFormForm";
|
||||||
|
|
||||||
|
import { PaginatedSCIMMappingList, type SCIMProvider } from "@goauthentik/api";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { customElement, state } from "@lit/reactive-element/decorators.js";
|
import { customElement, state } from "@lit/reactive-element/decorators.js";
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
|
|
||||||
import { PaginatedSCIMMappingList, type SCIMProvider } from "@goauthentik/api";
|
import { ApplicationWizardProviderForm } from "./ApplicationWizardProviderForm.js";
|
||||||
|
|
||||||
import { ApplicationWizardProviderForm } from "./ApplicationWizardProviderForm";
|
|
||||||
|
|
||||||
@customElement("ak-application-wizard-provider-for-scim")
|
@customElement("ak-application-wizard-provider-for-scim")
|
||||||
export class ApplicationWizardSCIMProvider extends ApplicationWizardProviderForm<SCIMProvider> {
|
export class ApplicationWizardSCIMProvider extends ApplicationWizardProviderForm<SCIMProvider> {
|
||||||
|
@ -1,23 +1,26 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#components/ak-toggle-group";
|
||||||
import { docLink } from "@goauthentik/common/global";
|
import "#elements/CodeMirror";
|
||||||
import "@goauthentik/components/ak-toggle-group";
|
import "#elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "#elements/forms/HorizontalFormElement";
|
||||||
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
import "#elements/forms/SearchSelect/index";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
|
import { docLink } from "#common/global";
|
||||||
import "@goauthentik/elements/forms/SearchSelect";
|
|
||||||
|
import { CodeMirrorMode } from "#elements/CodeMirror";
|
||||||
|
import { ModelForm } from "#elements/forms/ModelForm";
|
||||||
|
|
||||||
|
import { BlueprintFile, BlueprintInstance, ManagedApi } from "@goauthentik/api";
|
||||||
|
|
||||||
import YAML from "yaml";
|
import YAML from "yaml";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { CSSResult, TemplateResult, html } from "lit";
|
import { CSSResult, html, TemplateResult } from "lit";
|
||||||
import { customElement, state } from "lit/decorators.js";
|
import { customElement, state } from "lit/decorators.js";
|
||||||
import { ifDefined } from "lit/directives/if-defined.js";
|
import { ifDefined } from "lit/directives/if-defined.js";
|
||||||
|
|
||||||
import PFContent from "@patternfly/patternfly/components/Content/content.css";
|
import PFContent from "@patternfly/patternfly/components/Content/content.css";
|
||||||
|
|
||||||
import { BlueprintFile, BlueprintInstance, ManagedApi } from "@goauthentik/api";
|
|
||||||
|
|
||||||
enum blueprintSource {
|
enum blueprintSource {
|
||||||
file = "file",
|
file = "file",
|
||||||
oci = "oci",
|
oci = "oci",
|
||||||
|
@ -1,23 +1,18 @@
|
|||||||
import "@goauthentik/admin/blueprints/BlueprintForm";
|
import "#admin/blueprints/BlueprintForm";
|
||||||
import "@goauthentik/admin/rbac/ObjectPermissionModal";
|
import "#admin/rbac/ObjectPermissionModal";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#components/ak-status-label";
|
||||||
import { EVENT_REFRESH } from "@goauthentik/common/constants";
|
import "#elements/buttons/ActionButton/index";
|
||||||
import { formatElapsedTime } from "@goauthentik/common/temporal";
|
import "#elements/buttons/SpinnerButton/index";
|
||||||
import "@goauthentik/components/ak-status-label";
|
import "#elements/forms/DeleteBulkForm";
|
||||||
import "@goauthentik/elements/buttons/ActionButton";
|
import "#elements/forms/ModalForm";
|
||||||
import "@goauthentik/elements/buttons/SpinnerButton";
|
|
||||||
import "@goauthentik/elements/forms/DeleteBulkForm";
|
|
||||||
import "@goauthentik/elements/forms/ModalForm";
|
|
||||||
import { PaginatedResponse } from "@goauthentik/elements/table/Table";
|
|
||||||
import { TableColumn } from "@goauthentik/elements/table/Table";
|
|
||||||
import { TablePage } from "@goauthentik/elements/table/TablePage";
|
|
||||||
import "@patternfly/elements/pf-tooltip/pf-tooltip.js";
|
import "@patternfly/elements/pf-tooltip/pf-tooltip.js";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { CSSResult, TemplateResult, html } from "lit";
|
import { EVENT_REFRESH } from "#common/constants";
|
||||||
import { customElement, property } from "lit/decorators.js";
|
import { formatElapsedTime } from "#common/temporal";
|
||||||
|
|
||||||
import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList/description-list.css";
|
import { PaginatedResponse, TableColumn } from "#elements/table/Table";
|
||||||
|
import { TablePage } from "#elements/table/TablePage";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
BlueprintInstance,
|
BlueprintInstance,
|
||||||
@ -26,6 +21,12 @@ import {
|
|||||||
RbacPermissionsAssignedByUsersListModelEnum,
|
RbacPermissionsAssignedByUsersListModelEnum,
|
||||||
} from "@goauthentik/api";
|
} from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { msg } from "@lit/localize";
|
||||||
|
import { CSSResult, html, TemplateResult } from "lit";
|
||||||
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
|
||||||
|
import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList/description-list.css";
|
||||||
|
|
||||||
export function BlueprintStatus(blueprint?: BlueprintInstance): string {
|
export function BlueprintStatus(blueprint?: BlueprintInstance): string {
|
||||||
if (!blueprint) return "";
|
if (!blueprint) return "";
|
||||||
switch (blueprint.status) {
|
switch (blueprint.status) {
|
||||||
|
@ -1,21 +1,19 @@
|
|||||||
import { certificateProvider, certificateSelector } from "@goauthentik/admin/brands/Certificates";
|
import "#admin/common/ak-crypto-certificate-search";
|
||||||
import "@goauthentik/admin/common/ak-crypto-certificate-search";
|
import "#admin/common/ak-flow-search/ak-flow-search";
|
||||||
import "@goauthentik/admin/common/ak-flow-search/ak-flow-search";
|
import "#elements/CodeMirror";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#elements/ak-dual-select/ak-dual-select-dynamic-selected-provider";
|
||||||
import { DefaultBrand } from "@goauthentik/common/ui/config";
|
import "#elements/ak-dual-select/ak-dual-select-provider";
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "#elements/forms/FormGroup";
|
||||||
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
import "#elements/forms/HorizontalFormElement";
|
||||||
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
import "#elements/forms/SearchSelect/index";
|
||||||
import "@goauthentik/elements/ak-dual-select/ak-dual-select-provider.js";
|
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
|
||||||
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
|
|
||||||
import "@goauthentik/elements/forms/SearchSelect";
|
|
||||||
import YAML from "yaml";
|
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { TemplateResult, html } from "lit";
|
import { DefaultBrand } from "#common/ui/config";
|
||||||
import { customElement } from "lit/decorators.js";
|
|
||||||
|
import { CodeMirrorMode } from "#elements/CodeMirror";
|
||||||
|
import { ModelForm } from "#elements/forms/ModelForm";
|
||||||
|
|
||||||
|
import { certificateProvider, certificateSelector } from "#admin/brands/Certificates";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Application,
|
Application,
|
||||||
@ -25,6 +23,12 @@ import {
|
|||||||
FlowsInstancesListDesignationEnum,
|
FlowsInstancesListDesignationEnum,
|
||||||
} from "@goauthentik/api";
|
} from "@goauthentik/api";
|
||||||
|
|
||||||
|
import YAML from "yaml";
|
||||||
|
|
||||||
|
import { msg } from "@lit/localize";
|
||||||
|
import { html, TemplateResult } from "lit";
|
||||||
|
import { customElement } from "lit/decorators.js";
|
||||||
|
|
||||||
@customElement("ak-brand-form")
|
@customElement("ak-brand-form")
|
||||||
export class BrandForm extends ModelForm<Brand, string> {
|
export class BrandForm extends ModelForm<Brand, string> {
|
||||||
loadInstance(pk: string): Promise<Brand> {
|
loadInstance(pk: string): Promise<Brand> {
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
import "@goauthentik/admin/brands/BrandForm";
|
import "#admin/brands/BrandForm";
|
||||||
import "@goauthentik/admin/rbac/ObjectPermissionModal";
|
import "#admin/rbac/ObjectPermissionModal";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#components/ak-status-label";
|
||||||
import "@goauthentik/components/ak-status-label";
|
import "#elements/buttons/SpinnerButton/index";
|
||||||
import "@goauthentik/components/ak-status-label";
|
import "#elements/forms/DeleteBulkForm";
|
||||||
import "@goauthentik/elements/buttons/SpinnerButton";
|
import "#elements/forms/ModalForm";
|
||||||
import "@goauthentik/elements/forms/DeleteBulkForm";
|
|
||||||
import "@goauthentik/elements/forms/ModalForm";
|
|
||||||
import { PaginatedResponse } from "@goauthentik/elements/table/Table";
|
|
||||||
import { TableColumn } from "@goauthentik/elements/table/Table";
|
|
||||||
import { TablePage } from "@goauthentik/elements/table/TablePage";
|
|
||||||
import "@patternfly/elements/pf-tooltip/pf-tooltip.js";
|
import "@patternfly/elements/pf-tooltip/pf-tooltip.js";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { TemplateResult, html } from "lit";
|
|
||||||
import { customElement, property } from "lit/decorators.js";
|
import { PaginatedResponse, TableColumn } from "#elements/table/Table";
|
||||||
|
import { TablePage } from "#elements/table/TablePage";
|
||||||
|
|
||||||
import { Brand, CoreApi, RbacPermissionsAssignedByUsersListModelEnum } from "@goauthentik/api";
|
import { Brand, CoreApi, RbacPermissionsAssignedByUsersListModelEnum } from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { msg } from "@lit/localize";
|
||||||
|
import { html, TemplateResult } from "lit";
|
||||||
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
|
||||||
@customElement("ak-brand-list")
|
@customElement("ak-brand-list")
|
||||||
export class BrandListPage extends TablePage<Brand> {
|
export class BrandListPage extends TablePage<Brand> {
|
||||||
searchEnabled(): boolean {
|
searchEnabled(): boolean {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { DEFAULT_CONFIG } from "#common/api/config";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
DataProvision,
|
DataProvision,
|
||||||
DualSelectPair,
|
DualSelectPair,
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { AKElement } from "@goauthentik/elements/Base";
|
|
||||||
import { SearchSelect } from "@goauthentik/elements/forms/SearchSelect";
|
|
||||||
import { CustomListenerElement } from "@goauthentik/elements/utils/eventEmitter";
|
|
||||||
|
|
||||||
import { html } from "lit";
|
import { AKElement } from "#elements/Base";
|
||||||
import { customElement } from "lit/decorators.js";
|
import { SearchSelect } from "#elements/forms/SearchSelect/index";
|
||||||
import { property, query } from "lit/decorators.js";
|
import { CustomListenerElement } from "#elements/utils/eventEmitter";
|
||||||
|
|
||||||
import { CoreApi, CoreGroupsListRequest, Group } from "@goauthentik/api";
|
import { CoreApi, CoreGroupsListRequest, Group } from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { html } from "lit";
|
||||||
|
import { customElement, property, query } from "lit/decorators.js";
|
||||||
|
|
||||||
async function fetchObjects(query?: string): Promise<Group[]> {
|
async function fetchObjects(query?: string): Promise<Group[]> {
|
||||||
const args: CoreGroupsListRequest = {
|
const args: CoreGroupsListRequest = {
|
||||||
ordering: "name",
|
ordering: "name",
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#elements/forms/SearchSelect/index";
|
||||||
import { AKElement } from "@goauthentik/elements/Base";
|
|
||||||
import { SearchSelect } from "@goauthentik/elements/forms/SearchSelect";
|
|
||||||
import "@goauthentik/elements/forms/SearchSelect";
|
|
||||||
import { CustomListenerElement } from "@goauthentik/elements/utils/eventEmitter";
|
|
||||||
|
|
||||||
import { html } from "lit";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { customElement, property, query } from "lit/decorators.js";
|
|
||||||
import { ifDefined } from "lit/directives/if-defined.js";
|
import { AKElement } from "#elements/Base";
|
||||||
|
import { SearchSelect } from "#elements/forms/SearchSelect/index";
|
||||||
|
import { CustomListenerElement } from "#elements/utils/eventEmitter";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
CertificateKeyPair,
|
CertificateKeyPair,
|
||||||
@ -14,6 +12,10 @@ import {
|
|||||||
CryptoCertificatekeypairsListRequest,
|
CryptoCertificatekeypairsListRequest,
|
||||||
} from "@goauthentik/api";
|
} from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { html } from "lit";
|
||||||
|
import { customElement, property, query } from "lit/decorators.js";
|
||||||
|
import { ifDefined } from "lit/directives/if-defined.js";
|
||||||
|
|
||||||
const renderElement = (item: CertificateKeyPair): string => item.name;
|
const renderElement = (item: CertificateKeyPair): string => item.name;
|
||||||
|
|
||||||
const renderValue = (item: CertificateKeyPair | undefined): string | undefined => item?.pk;
|
const renderValue = (item: CertificateKeyPair | undefined): string | undefined => item?.pk;
|
||||||
|
@ -1,17 +1,20 @@
|
|||||||
import { RenderFlowOption } from "@goauthentik/admin/flows/utils";
|
import "#elements/forms/SearchSelect/index";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
|
||||||
import { AKElement } from "@goauthentik/elements/Base";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { SearchSelect } from "@goauthentik/elements/forms/SearchSelect";
|
|
||||||
import "@goauthentik/elements/forms/SearchSelect";
|
import { AKElement } from "#elements/Base";
|
||||||
import { CustomListenerElement } from "@goauthentik/elements/utils/eventEmitter";
|
import { SearchSelect } from "#elements/forms/SearchSelect/index";
|
||||||
|
import { CustomListenerElement } from "#elements/utils/eventEmitter";
|
||||||
|
|
||||||
|
import { RenderFlowOption } from "#admin/flows/utils";
|
||||||
|
|
||||||
|
import type { Flow, FlowsInstancesListRequest } from "@goauthentik/api";
|
||||||
|
import { FlowsApi, FlowsInstancesListDesignationEnum } from "@goauthentik/api";
|
||||||
|
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
import { property, query } from "lit/decorators.js";
|
import { property, query } from "lit/decorators.js";
|
||||||
import { ifDefined } from "lit/directives/if-defined.js";
|
import { ifDefined } from "lit/directives/if-defined.js";
|
||||||
|
|
||||||
import { FlowsApi, FlowsInstancesListDesignationEnum } from "@goauthentik/api";
|
|
||||||
import type { Flow, FlowsInstancesListRequest } from "@goauthentik/api";
|
|
||||||
|
|
||||||
export function renderElement(flow: Flow) {
|
export function renderElement(flow: Flow) {
|
||||||
return RenderFlowOption(flow);
|
return RenderFlowOption(flow);
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { customElement, property } from "lit/decorators.js";
|
|
||||||
|
|
||||||
import type { Flow } from "@goauthentik/api";
|
import type { Flow } from "@goauthentik/api";
|
||||||
|
|
||||||
import FlowSearch from "./FlowSearch";
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
|
||||||
|
import FlowSearch from "./FlowSearch.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search for flows that may have a fallback specified by the brand settings
|
* Search for flows that may have a fallback specified by the brand settings
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import "@goauthentik/elements/forms/SearchSelect";
|
import "#elements/forms/SearchSelect/index";
|
||||||
|
|
||||||
|
import type { Flow } from "@goauthentik/api";
|
||||||
|
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
import { customElement } from "lit/decorators.js";
|
import { customElement } from "lit/decorators.js";
|
||||||
|
|
||||||
import type { Flow } from "@goauthentik/api";
|
import { FlowSearch, getFlowValue, renderDescription, renderElement } from "./FlowSearch.js";
|
||||||
|
|
||||||
import { FlowSearch, getFlowValue, renderDescription, renderElement } from "./FlowSearch";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @element ak-flow-search-no-default
|
* @element ak-flow-search-no-default
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
import "@goauthentik/admin/common/ak-flow-search/ak-flow-search";
|
import "#admin/common/ak-flow-search/ak-flow-search";
|
||||||
import { AkFlowSearch } from "@goauthentik/admin/common/ak-flow-search/ak-flow-search";
|
import "#elements/forms/HorizontalFormElement";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
|
||||||
|
import { AkFlowSearch } from "#admin/common/ak-flow-search/ak-flow-search";
|
||||||
|
|
||||||
|
import { Flow, FlowsInstancesListDesignationEnum } from "@goauthentik/api";
|
||||||
|
|
||||||
import { Meta } from "@storybook/web-components";
|
import { Meta } from "@storybook/web-components";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { TemplateResult, html } from "lit";
|
import { html, TemplateResult } from "lit";
|
||||||
|
|
||||||
import { Flow, FlowsInstancesListDesignationEnum } from "@goauthentik/api";
|
|
||||||
|
|
||||||
const mockData = {
|
const mockData = {
|
||||||
pagination: {
|
pagination: {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { customElement } from "lit/decorators.js";
|
|
||||||
|
|
||||||
import type { Flow } from "@goauthentik/api";
|
import type { Flow } from "@goauthentik/api";
|
||||||
|
|
||||||
import FlowSearch from "./FlowSearch";
|
import { customElement } from "lit/decorators.js";
|
||||||
|
|
||||||
|
import FlowSearch from "./FlowSearch.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @element ak-flow-search
|
* @element ak-flow-search
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
import { customElement } from "lit/decorators.js";
|
|
||||||
import { property } from "lit/decorators.js";
|
|
||||||
|
|
||||||
import type { Flow } from "@goauthentik/api";
|
import type { Flow } from "@goauthentik/api";
|
||||||
|
|
||||||
import FlowSearch from "./FlowSearch";
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
|
||||||
|
import FlowSearch from "./FlowSearch.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search for flows that connect to user sources
|
* Search for flows that connect to user sources
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
|
import "#elements/Alert";
|
||||||
|
|
||||||
import { $PFBase } from "#common/theme";
|
import { $PFBase } from "#common/theme";
|
||||||
|
|
||||||
|
import { AKElement } from "#elements/Base";
|
||||||
import { WithLicenseSummary } from "#elements/mixins/license";
|
import { WithLicenseSummary } from "#elements/mixins/license";
|
||||||
import "@goauthentik/elements/Alert";
|
|
||||||
import { AKElement } from "@goauthentik/elements/Base";
|
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { html, nothing } from "lit";
|
import { html, nothing } from "lit";
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "#elements/forms/HorizontalFormElement";
|
||||||
import "@goauthentik/elements/messages/MessageContainer";
|
import "#elements/messages/MessageContainer";
|
||||||
|
import "../ak-crypto-certificate-search.js";
|
||||||
|
|
||||||
import { Meta } from "@storybook/web-components";
|
import { Meta } from "@storybook/web-components";
|
||||||
|
|
||||||
import { TemplateResult, html } from "lit";
|
import { html, TemplateResult } from "lit";
|
||||||
|
|
||||||
import "../ak-crypto-certificate-search";
|
import AkCryptoCertificateSearch from "../ak-crypto-certificate-search.js";
|
||||||
import AkCryptoCertificateSearch from "../ak-crypto-certificate-search";
|
import { dummyCryptoCertsSearch } from "./samples.js";
|
||||||
import { dummyCryptoCertsSearch } from "./samples";
|
|
||||||
|
|
||||||
const metadata: Meta<AkCryptoCertificateSearch> = {
|
const metadata: Meta<AkCryptoCertificateSearch> = {
|
||||||
title: "Components / Searches / CryptoCertificateKeyPair",
|
title: "Components / Searches / CryptoCertificateKeyPair",
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#elements/forms/HorizontalFormElement";
|
||||||
import { Form } from "@goauthentik/elements/forms/Form";
|
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { TemplateResult, html } from "lit";
|
|
||||||
import { customElement } from "lit/decorators.js";
|
import { Form } from "#elements/forms/Form";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AlgEnum,
|
AlgEnum,
|
||||||
@ -13,6 +11,10 @@ import {
|
|||||||
CryptoApi,
|
CryptoApi,
|
||||||
} from "@goauthentik/api";
|
} from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { msg } from "@lit/localize";
|
||||||
|
import { html, TemplateResult } from "lit";
|
||||||
|
import { customElement } from "lit/decorators.js";
|
||||||
|
|
||||||
@customElement("ak-crypto-certificate-generate-form")
|
@customElement("ak-crypto-certificate-generate-form")
|
||||||
export class CertificateKeyPairForm extends Form<CertificateGenerationRequest> {
|
export class CertificateKeyPairForm extends Form<CertificateGenerationRequest> {
|
||||||
getSuccessMessage(): string {
|
getSuccessMessage(): string {
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#components/ak-secret-textarea-input";
|
||||||
import "@goauthentik/components/ak-secret-textarea-input.js";
|
import "#elements/CodeMirror";
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "#elements/forms/HorizontalFormElement";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
|
||||||
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
|
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { TemplateResult, html } from "lit";
|
|
||||||
import { customElement } from "lit/decorators.js";
|
import { ModelForm } from "#elements/forms/ModelForm";
|
||||||
import { ifDefined } from "lit/directives/if-defined.js";
|
|
||||||
|
|
||||||
import { CertificateKeyPair, CertificateKeyPairRequest, CryptoApi } from "@goauthentik/api";
|
import { CertificateKeyPair, CertificateKeyPairRequest, CryptoApi } from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { msg } from "@lit/localize";
|
||||||
|
import { html, TemplateResult } from "lit";
|
||||||
|
import { customElement } from "lit/decorators.js";
|
||||||
|
import { ifDefined } from "lit/directives/if-defined.js";
|
||||||
|
|
||||||
@customElement("ak-crypto-certificate-form")
|
@customElement("ak-crypto-certificate-form")
|
||||||
export class CertificateKeyPairForm extends ModelForm<CertificateKeyPair, string> {
|
export class CertificateKeyPairForm extends ModelForm<CertificateKeyPair, string> {
|
||||||
loadInstance(pk: string): Promise<CertificateKeyPair> {
|
loadInstance(pk: string): Promise<CertificateKeyPair> {
|
||||||
|
@ -1,22 +1,17 @@
|
|||||||
import "@goauthentik/admin/crypto/CertificateGenerateForm";
|
import "#admin/crypto/CertificateGenerateForm";
|
||||||
import "@goauthentik/admin/crypto/CertificateKeyPairForm";
|
import "#admin/crypto/CertificateKeyPairForm";
|
||||||
import "@goauthentik/admin/rbac/ObjectPermissionModal";
|
import "#admin/rbac/ObjectPermissionModal";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#components/ak-status-label";
|
||||||
import "@goauthentik/components/ak-status-label";
|
import "#elements/buttons/SpinnerButton/index";
|
||||||
import { PFColor } from "@goauthentik/elements/Label";
|
import "#elements/forms/DeleteBulkForm";
|
||||||
import "@goauthentik/elements/buttons/SpinnerButton";
|
import "#elements/forms/ModalForm";
|
||||||
import "@goauthentik/elements/forms/DeleteBulkForm";
|
|
||||||
import "@goauthentik/elements/forms/ModalForm";
|
|
||||||
import { PaginatedResponse } from "@goauthentik/elements/table/Table";
|
|
||||||
import { TableColumn } from "@goauthentik/elements/table/Table";
|
|
||||||
import { TablePage } from "@goauthentik/elements/table/TablePage";
|
|
||||||
import "@patternfly/elements/pf-tooltip/pf-tooltip.js";
|
import "@patternfly/elements/pf-tooltip/pf-tooltip.js";
|
||||||
|
|
||||||
import { msg, str } from "@lit/localize";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { CSSResult, TemplateResult, html } from "lit";
|
|
||||||
import { customElement, property } from "lit/decorators.js";
|
|
||||||
|
|
||||||
import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList/description-list.css";
|
import { PFColor } from "#elements/Label";
|
||||||
|
import { PaginatedResponse, TableColumn } from "#elements/table/Table";
|
||||||
|
import { TablePage } from "#elements/table/TablePage";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
CertificateKeyPair,
|
CertificateKeyPair,
|
||||||
@ -24,6 +19,12 @@ import {
|
|||||||
RbacPermissionsAssignedByUsersListModelEnum,
|
RbacPermissionsAssignedByUsersListModelEnum,
|
||||||
} from "@goauthentik/api";
|
} from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { msg, str } from "@lit/localize";
|
||||||
|
import { CSSResult, html, TemplateResult } from "lit";
|
||||||
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
|
||||||
|
import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList/description-list.css";
|
||||||
|
|
||||||
@customElement("ak-crypto-certificate-list")
|
@customElement("ak-crypto-certificate-list")
|
||||||
export class CertificateKeyPairListPage extends TablePage<CertificateKeyPair> {
|
export class CertificateKeyPairListPage extends TablePage<CertificateKeyPair> {
|
||||||
expandable = true;
|
expandable = true;
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#components/ak-secret-textarea-input";
|
||||||
import { EVENT_REFRESH_ENTERPRISE } from "@goauthentik/common/constants";
|
import "#elements/CodeMirror";
|
||||||
import "@goauthentik/components/ak-secret-textarea-input.js";
|
import "#elements/forms/HorizontalFormElement";
|
||||||
import "@goauthentik/elements/CodeMirror";
|
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
|
||||||
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
|
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { TemplateResult, html } from "lit";
|
import { EVENT_REFRESH_ENTERPRISE } from "#common/constants";
|
||||||
import { customElement, state } from "lit/decorators.js";
|
|
||||||
import { ifDefined } from "lit/directives/if-defined.js";
|
import { ModelForm } from "#elements/forms/ModelForm";
|
||||||
|
|
||||||
import { EnterpriseApi, License } from "@goauthentik/api";
|
import { EnterpriseApi, License } from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { msg } from "@lit/localize";
|
||||||
|
import { html, TemplateResult } from "lit";
|
||||||
|
import { customElement, state } from "lit/decorators.js";
|
||||||
|
import { ifDefined } from "lit/directives/if-defined.js";
|
||||||
|
|
||||||
@customElement("ak-enterprise-license-form")
|
@customElement("ak-enterprise-license-form")
|
||||||
export class EnterpriseLicenseForm extends ModelForm<License, string> {
|
export class EnterpriseLicenseForm extends ModelForm<License, string> {
|
||||||
@state()
|
@state()
|
||||||
|
@ -1,28 +1,19 @@
|
|||||||
import "@goauthentik/admin/enterprise/EnterpriseLicenseForm";
|
import "#admin/enterprise/EnterpriseLicenseForm";
|
||||||
import "@goauthentik/admin/enterprise/EnterpriseStatusCard";
|
import "#admin/enterprise/EnterpriseStatusCard";
|
||||||
import "@goauthentik/admin/rbac/ObjectPermissionModal";
|
import "#admin/rbac/ObjectPermissionModal";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import "#elements/Spinner";
|
||||||
import { formatElapsedTime } from "@goauthentik/common/temporal";
|
import "#elements/buttons/SpinnerButton/index";
|
||||||
import { PFColor } from "@goauthentik/elements/Label";
|
import "#elements/cards/AggregateCard";
|
||||||
import "@goauthentik/elements/Spinner";
|
import "#elements/forms/DeleteBulkForm";
|
||||||
import "@goauthentik/elements/buttons/SpinnerButton";
|
import "#elements/forms/ModalForm";
|
||||||
import "@goauthentik/elements/cards/AggregateCard";
|
|
||||||
import "@goauthentik/elements/forms/DeleteBulkForm";
|
|
||||||
import "@goauthentik/elements/forms/ModalForm";
|
|
||||||
import { PaginatedResponse } from "@goauthentik/elements/table/Table";
|
|
||||||
import { TableColumn } from "@goauthentik/elements/table/Table";
|
|
||||||
import { TablePage } from "@goauthentik/elements/table/TablePage";
|
|
||||||
import "@patternfly/elements/pf-tooltip/pf-tooltip.js";
|
import "@patternfly/elements/pf-tooltip/pf-tooltip.js";
|
||||||
|
|
||||||
import { msg, str } from "@lit/localize";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { CSSResult, TemplateResult, css, html } from "lit";
|
import { formatElapsedTime } from "#common/temporal";
|
||||||
import { customElement, property, state } from "lit/decorators.js";
|
|
||||||
|
|
||||||
import PFBanner from "@patternfly/patternfly/components/Banner/banner.css";
|
import { PFColor } from "#elements/Label";
|
||||||
import PFButton from "@patternfly/patternfly/components/Button/button.css";
|
import { PaginatedResponse, TableColumn } from "#elements/table/Table";
|
||||||
import PFCard from "@patternfly/patternfly/components/Card/card.css";
|
import { TablePage } from "#elements/table/TablePage";
|
||||||
import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css";
|
|
||||||
import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
EnterpriseApi,
|
EnterpriseApi,
|
||||||
@ -33,6 +24,16 @@ import {
|
|||||||
RbacPermissionsAssignedByUsersListModelEnum,
|
RbacPermissionsAssignedByUsersListModelEnum,
|
||||||
} from "@goauthentik/api";
|
} from "@goauthentik/api";
|
||||||
|
|
||||||
|
import { msg, str } from "@lit/localize";
|
||||||
|
import { css, CSSResult, html, TemplateResult } from "lit";
|
||||||
|
import { customElement, property, state } from "lit/decorators.js";
|
||||||
|
|
||||||
|
import PFBanner from "@patternfly/patternfly/components/Banner/banner.css";
|
||||||
|
import PFButton from "@patternfly/patternfly/components/Button/button.css";
|
||||||
|
import PFCard from "@patternfly/patternfly/components/Card/card.css";
|
||||||
|
import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css";
|
||||||
|
import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";
|
||||||
|
|
||||||
@customElement("ak-enterprise-license-list")
|
@customElement("ak-enterprise-license-list")
|
||||||
export class EnterpriseLicenseListPage extends TablePage<License> {
|
export class EnterpriseLicenseListPage extends TablePage<License> {
|
||||||
checkbox = true;
|
checkbox = true;
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
import { render } from "@goauthentik/elements/tests/utils.js";
|
import "./EnterpriseStatusCard.js";
|
||||||
|
|
||||||
|
import { render } from "#elements/tests/utils";
|
||||||
|
|
||||||
|
import { LicenseForecast, LicenseSummary, LicenseSummaryStatusEnum } from "@goauthentik/api";
|
||||||
|
|
||||||
import { $, expect } from "@wdio/globals";
|
import { $, expect } from "@wdio/globals";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
|
|
||||||
import { LicenseForecast, LicenseSummary, LicenseSummaryStatusEnum } from "@goauthentik/api";
|
|
||||||
|
|
||||||
import "./EnterpriseStatusCard.js";
|
|
||||||
|
|
||||||
describe("ak-enterprise-status-card", () => {
|
describe("ak-enterprise-status-card", () => {
|
||||||
it("should not error when no data is loaded", async () => {
|
it("should not error when no data is loaded", async () => {
|
||||||
render(html`<ak-enterprise-status-card></ak-enterprise-status-card>`);
|
render(html`<ak-enterprise-status-card></ak-enterprise-status-card>`);
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
import { AKElement } from "@goauthentik/elements/Base";
|
import { AKElement } from "#elements/Base";
|
||||||
import { PFColor } from "@goauthentik/elements/Label";
|
import { PFColor } from "#elements/Label";
|
||||||
|
|
||||||
|
import { LicenseForecast, LicenseSummary, LicenseSummaryStatusEnum } from "@goauthentik/api";
|
||||||
|
|
||||||
import { msg, str } from "@lit/localize";
|
import { msg, str } from "@lit/localize";
|
||||||
import { CSSResult, html, nothing } from "lit";
|
import { CSSResult, html, nothing } from "lit";
|
||||||
@ -11,8 +13,6 @@ import PFProgress from "@patternfly/patternfly/components/Progress/progress.css"
|
|||||||
import PFSplit from "@patternfly/patternfly/layouts/Split/split.css";
|
import PFSplit from "@patternfly/patternfly/layouts/Split/split.css";
|
||||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||||
|
|
||||||
import { LicenseForecast, LicenseSummary, LicenseSummaryStatusEnum } from "@goauthentik/api";
|
|
||||||
|
|
||||||
@customElement("ak-enterprise-status-card")
|
@customElement("ak-enterprise-status-card")
|
||||||
export class EnterpriseStatusCard extends AKElement {
|
export class EnterpriseStatusCard extends AKElement {
|
||||||
@state()
|
@state()
|
||||||
|
@ -1,28 +1,30 @@
|
|||||||
import "#elements/Tabs";
|
import "#elements/Tabs";
|
||||||
import { WithLicenseSummary } from "#elements/mixins/license";
|
import "#admin/events/EventMap";
|
||||||
import { updateURLParams } from "#elements/router/RouteMatch";
|
import "#admin/events/EventVolumeChart";
|
||||||
import "@goauthentik/admin/events/EventMap";
|
import "#components/ak-event-info";
|
||||||
import "@goauthentik/admin/events/EventVolumeChart";
|
|
||||||
import { EventGeo, renderEventUser } from "@goauthentik/admin/events/utils";
|
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
|
||||||
import { EventWithContext } from "@goauthentik/common/events";
|
|
||||||
import { actionToLabel } from "@goauthentik/common/labels";
|
|
||||||
import { formatElapsedTime } from "@goauthentik/common/temporal";
|
|
||||||
import "@goauthentik/components/ak-event-info";
|
|
||||||
import { PaginatedResponse } from "@goauthentik/elements/table/Table";
|
|
||||||
import { TableColumn } from "@goauthentik/elements/table/Table";
|
|
||||||
import { TablePage } from "@goauthentik/elements/table/TablePage";
|
|
||||||
import { SlottedTemplateResult } from "@goauthentik/elements/types";
|
|
||||||
import "@patternfly/elements/pf-tooltip/pf-tooltip.js";
|
import "@patternfly/elements/pf-tooltip/pf-tooltip.js";
|
||||||
|
|
||||||
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
|
import { EventWithContext } from "#common/events";
|
||||||
|
import { actionToLabel } from "#common/labels";
|
||||||
|
import { formatElapsedTime } from "#common/temporal";
|
||||||
|
|
||||||
|
import { WithLicenseSummary } from "#elements/mixins/license";
|
||||||
|
import { updateURLParams } from "#elements/router/RouteMatch";
|
||||||
|
import { PaginatedResponse, TableColumn } from "#elements/table/Table";
|
||||||
|
import { TablePage } from "#elements/table/TablePage";
|
||||||
|
import { SlottedTemplateResult } from "#elements/types";
|
||||||
|
|
||||||
|
import { EventGeo, renderEventUser } from "#admin/events/utils";
|
||||||
|
|
||||||
|
import { Event, EventsApi, LicenseSummaryStatusEnum } from "@goauthentik/api";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { CSSResult, TemplateResult, css, html } from "lit";
|
import { css, CSSResult, html, TemplateResult } from "lit";
|
||||||
import { customElement, property } from "lit/decorators.js";
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
|
||||||
import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";
|
import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";
|
||||||
|
|
||||||
import { Event, EventsApi, LicenseSummaryStatusEnum } from "@goauthentik/api";
|
|
||||||
|
|
||||||
@customElement("ak-event-list")
|
@customElement("ak-event-list")
|
||||||
export class EventListPage extends WithLicenseSummary(TablePage<Event>) {
|
export class EventListPage extends WithLicenseSummary(TablePage<Event>) {
|
||||||
expandable = true;
|
expandable = true;
|
||||||
|
@ -1,28 +1,31 @@
|
|||||||
import { EventWithContext } from "#common/events";
|
|
||||||
import { globalAK } from "#common/global";
|
|
||||||
import { PaginatedResponse } from "#elements/table/Table";
|
|
||||||
import { AKElement } from "@goauthentik/elements/Base";
|
|
||||||
import "@openlayers-elements/core/ol-layer-vector";
|
import "@openlayers-elements/core/ol-layer-vector";
|
||||||
import type OlLayerVector from "@openlayers-elements/core/ol-layer-vector";
|
|
||||||
import OlMap from "@openlayers-elements/core/ol-map";
|
|
||||||
import "@openlayers-elements/maps/ol-layer-openstreetmap";
|
import "@openlayers-elements/maps/ol-layer-openstreetmap";
|
||||||
import "@openlayers-elements/maps/ol-select";
|
import "@openlayers-elements/maps/ol-select";
|
||||||
import Feature from "ol/Feature";
|
|
||||||
import { isEmpty } from "ol/extent";
|
|
||||||
import { Point } from "ol/geom";
|
|
||||||
import { fromLonLat } from "ol/proj";
|
|
||||||
import Icon from "ol/style/Icon";
|
|
||||||
import Style from "ol/style/Style";
|
|
||||||
|
|
||||||
import { CSSResult, PropertyValues, TemplateResult, css, html } from "lit";
|
import { EventWithContext } from "#common/events";
|
||||||
|
import { globalAK } from "#common/global";
|
||||||
|
|
||||||
|
import { AKElement } from "#elements/Base";
|
||||||
|
import { PaginatedResponse } from "#elements/table/Table";
|
||||||
|
|
||||||
|
import { Event } from "@goauthentik/api";
|
||||||
|
|
||||||
|
import type OlLayerVector from "@openlayers-elements/core/ol-layer-vector.js";
|
||||||
|
import OlMap from "@openlayers-elements/core/ol-map.js";
|
||||||
|
import { isEmpty } from "ol/extent.js";
|
||||||
|
import Feature from "ol/Feature.js";
|
||||||
|
import { Point } from "ol/geom.js";
|
||||||
|
import { fromLonLat } from "ol/proj.js";
|
||||||
|
import Icon from "ol/style/Icon.js";
|
||||||
|
import Style from "ol/style/Style.js";
|
||||||
|
|
||||||
|
import { css, CSSResult, html, PropertyValues, TemplateResult } from "lit";
|
||||||
import { customElement, property, query } from "lit/decorators.js";
|
import { customElement, property, query } from "lit/decorators.js";
|
||||||
|
|
||||||
import PFCard from "@patternfly/patternfly/components/Card/card.css";
|
import PFCard from "@patternfly/patternfly/components/Card/card.css";
|
||||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||||
import OL from "ol/ol.css";
|
import OL from "ol/ol.css";
|
||||||
|
|
||||||
import { Event } from "@goauthentik/api";
|
|
||||||
|
|
||||||
@customElement("ak-map")
|
@customElement("ak-map")
|
||||||
export class Map extends OlMap {
|
export class Map extends OlMap {
|
||||||
public render() {
|
public render() {
|
||||||
|
@ -1,14 +1,19 @@
|
|||||||
import { EventGeo, renderEventUser } from "#admin/events/utils";
|
import "#components/ak-event-info";
|
||||||
|
import "#components/ak-page-header";
|
||||||
|
|
||||||
import { DEFAULT_CONFIG } from "#common/api/config";
|
import { DEFAULT_CONFIG } from "#common/api/config";
|
||||||
import { EventWithContext } from "#common/events";
|
import { EventWithContext } from "#common/events";
|
||||||
import { actionToLabel } from "#common/labels";
|
import { actionToLabel } from "#common/labels";
|
||||||
import { formatElapsedTime } from "#common/temporal";
|
import { formatElapsedTime } from "#common/temporal";
|
||||||
import "#components/ak-event-info";
|
|
||||||
import "#components/ak-page-header";
|
|
||||||
import { AKElement } from "#elements/Base";
|
import { AKElement } from "#elements/Base";
|
||||||
|
|
||||||
|
import { EventGeo, renderEventUser } from "#admin/events/utils";
|
||||||
|
|
||||||
|
import { EventsApi, EventToJSON } from "@goauthentik/api";
|
||||||
|
|
||||||
import { msg, str } from "@lit/localize";
|
import { msg, str } from "@lit/localize";
|
||||||
import { CSSResult, PropertyValues, TemplateResult, html } from "lit";
|
import { CSSResult, html, PropertyValues, TemplateResult } from "lit";
|
||||||
import { customElement, property, state } from "lit/decorators.js";
|
import { customElement, property, state } from "lit/decorators.js";
|
||||||
|
|
||||||
import PFCard from "@patternfly/patternfly/components/Card/card.css";
|
import PFCard from "@patternfly/patternfly/components/Card/card.css";
|
||||||
@ -18,8 +23,6 @@ import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
|||||||
import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";
|
import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";
|
||||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||||
|
|
||||||
import { EventToJSON, EventsApi } from "@goauthentik/api";
|
|
||||||
|
|
||||||
@customElement("ak-event-view")
|
@customElement("ak-event-view")
|
||||||
export class EventViewPage extends AKElement {
|
export class EventViewPage extends AKElement {
|
||||||
@property({ type: String })
|
@property({ type: String })
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user