web: fix minor issues

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-04 13:41:18 +02:00
parent b8c41f54c5
commit 67fef02d71
8 changed files with 747 additions and 600 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -72,8 +72,8 @@ export class BoundPoliciesList extends Table<PolicyBinding> {
}} }}
type=${ifDefined(item.policyObj?.component)}> type=${ifDefined(item.policyObj?.component)}>
</ak-proxy-form> </ak-proxy-form>
<button slot="trigger" class="pf-c-button pf-m-secondary"> <button slot="trigger" class="pf-c-button pf-m-primary">
${t`Edit`} ${t`Edit Policy`}
</button> </button>
</ak-forms-modal>`; </ak-forms-modal>`;
} else if (item.group) { } else if (item.group) {
@ -100,8 +100,8 @@ export class BoundPoliciesList extends Table<PolicyBinding> {
</span> </span>
<ak-user-form slot="form" .user=${item.userObj}> <ak-user-form slot="form" .user=${item.userObj}>
</ak-user-form> </ak-user-form>
<button slot="trigger" class="pf-m-secondary pf-c-button"> <button slot="trigger" class="pf-c-button pf-m-primary">
${t`Edit`} ${t`Edit User`}
</button> </button>
</ak-forms-modal>`; </ak-forms-modal>`;
} else { } else {

View file

@ -64,6 +64,9 @@ export class PolicyBindingForm extends Form<PolicyBinding> {
target: this.targetPk || "", target: this.targetPk || "",
}).then(bindings => { }).then(bindings => {
const orders = bindings.results.map(binding => binding.order); const orders = bindings.results.map(binding => binding.order);
if (orders.length < 1) {
return 0;
}
return Math.max(...orders) + 1; return Math.max(...orders) + 1;
}); });
} }

View file

@ -74,7 +74,7 @@ export class ExpressionPolicyForm extends Form<ExpressionPolicy> {
</ak-codemirror> </ak-codemirror>
<p class="pf-c-form__helper-text"> <p class="pf-c-form__helper-text">
${t`Expression using Python.`} ${t`Expression using Python.`}
<a href="https://goauthentik.io/docs/property-mappings/expression/"> <a target="_blank" href="https://goauthentik.io/docs/policies/expression">
${t`See documentation for a list of all variables.`} ${t`See documentation for a list of all variables.`}
</a> </a>
</p> </p>

View file

@ -65,7 +65,7 @@ export class PropertyMappingLDAPForm extends Form<LDAPPropertyMapping> {
</ak-codemirror> </ak-codemirror>
<p class="pf-c-form__helper-text"> <p class="pf-c-form__helper-text">
${t`Expression using Python.`} ${t`Expression using Python.`}
<a href="https://goauthentik.io/docs/property-mappings/expression/"> <a target="_blank" href="https://goauthentik.io/docs/property-mappings/expression/">
${t`See documentation for a list of all variables.`} ${t`See documentation for a list of all variables.`}
</a> </a>
</p> </p>

View file

@ -75,7 +75,7 @@ export class PropertyMappingLDAPForm extends Form<SAMLPropertyMapping> {
</ak-codemirror> </ak-codemirror>
<p class="pf-c-form__helper-text"> <p class="pf-c-form__helper-text">
${t`Expression using Python.`} ${t`Expression using Python.`}
<a href="https://goauthentik.io/docs/property-mappings/expression/"> <a target="_blank" href="https://goauthentik.io/docs/property-mappings/expression/">
${t`See documentation for a list of all variables.`} ${t`See documentation for a list of all variables.`}
</a> </a>
</p> </p>

View file

@ -72,7 +72,7 @@ export class PropertyMappingScopeForm extends Form<ScopeMapping> {
</ak-codemirror> </ak-codemirror>
<p class="pf-c-form__helper-text"> <p class="pf-c-form__helper-text">
${t`Expression using Python.`} ${t`Expression using Python.`}
<a href="https://goauthentik.io/docs/property-mappings/expression/"> <a target="_blank" href="https://goauthentik.io/docs/property-mappings/expression/">
${t`See documentation for a list of all variables.`} ${t`See documentation for a list of all variables.`}
</a> </a>
</p> </p>