web/admin: fix execute button on flow view
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
e96d2fa666
commit
3945dc9f3f
|
@ -88,7 +88,7 @@ export class FlowListPage extends TablePage<Flow> {
|
||||||
</button>
|
</button>
|
||||||
</ak-forms-delete>
|
</ak-forms-delete>
|
||||||
<button
|
<button
|
||||||
class="pf-c-button pf-m-secondary ak-root-link"
|
class="pf-c-button pf-m-secondary"
|
||||||
@click=${() => {
|
@click=${() => {
|
||||||
new FlowsApi(DEFAULT_CONFIG).flowsInstancesExecute({
|
new FlowsApi(DEFAULT_CONFIG).flowsInstancesExecute({
|
||||||
slug: item.slug
|
slug: item.slug
|
||||||
|
@ -98,7 +98,7 @@ export class FlowListPage extends TablePage<Flow> {
|
||||||
}}>
|
}}>
|
||||||
${gettext("Execute")}
|
${gettext("Execute")}
|
||||||
</button>
|
</button>
|
||||||
<a class="pf-c-button pf-m-secondary ak-root-link" href="${`${DEFAULT_CONFIG.basePath}/flows/instances/${item.slug}/export/`}">
|
<a class="pf-c-button pf-m-secondary" href="${`${DEFAULT_CONFIG.basePath}/flows/instances/${item.slug}/export/`}">
|
||||||
${gettext("Export")}
|
${gettext("Export")}
|
||||||
</a>`,
|
</a>`,
|
||||||
];
|
];
|
||||||
|
|
|
@ -80,9 +80,17 @@ export class FlowViewPage extends LitElement {
|
||||||
</dt>
|
</dt>
|
||||||
<dd class="pf-c-description-list__description">
|
<dd class="pf-c-description-list__description">
|
||||||
<div class="pf-c-description-list__text">
|
<div class="pf-c-description-list__text">
|
||||||
<a class="pf-c-button pf-m-secondary ak-root-link" href="${AdminURLManager.flows(`${this.flow.pk}/execute/?next=/%23${window.location.href}`)}">
|
<button
|
||||||
|
class="pf-c-button pf-m-secondary"
|
||||||
|
@click=${() => {
|
||||||
|
new FlowsApi(DEFAULT_CONFIG).flowsInstancesExecute({
|
||||||
|
slug: flow.slug
|
||||||
|
}).then(link => {
|
||||||
|
window.location.assign(`${link.link}?next=/%23${window.location.href}`);
|
||||||
|
});
|
||||||
|
}}>
|
||||||
${gettext("Execute")}
|
${gettext("Execute")}
|
||||||
</a>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
|
|
Reference in New Issue