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>
|
||||
</ak-forms-delete>
|
||||
<button
|
||||
class="pf-c-button pf-m-secondary ak-root-link"
|
||||
class="pf-c-button pf-m-secondary"
|
||||
@click=${() => {
|
||||
new FlowsApi(DEFAULT_CONFIG).flowsInstancesExecute({
|
||||
slug: item.slug
|
||||
|
@ -98,7 +98,7 @@ export class FlowListPage extends TablePage<Flow> {
|
|||
}}>
|
||||
${gettext("Execute")}
|
||||
</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")}
|
||||
</a>`,
|
||||
];
|
||||
|
|
|
@ -80,9 +80,17 @@ export class FlowViewPage extends LitElement {
|
|||
</dt>
|
||||
<dd class="pf-c-description-list__description">
|
||||
<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")}
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
</dd>
|
||||
</div>
|
||||
|
|
Reference in New Issue