Skip to content

Commit

Permalink
b
Browse files Browse the repository at this point in the history
  • Loading branch information
polterguy committed Dec 24, 2023
1 parent 968c0fd commit 4e7b002
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
12 changes: 2 additions & 10 deletions backend/files/system/workflows/get-hyperlambda.post.hl
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@ if
add:x:@.action
hyper2lambda:x:@load-file
comments:true
.name
strings.split:x:@.arguments/*/filename
.:/
strings.split:x:-/0/-
.:.
remove-nodes:x:@strings.split/0/-
set-value:x:@.name
strings.join:x:@strings.split/0
.:.

// Creating our action invocation.
.invocation
Expand All @@ -43,7 +34,8 @@ if
filename
arguments
set-value:x:@.invocation/*/execute/*/name
get-value:x:@.name
get-value:x:@.arguments/*/args/*/action_name
remove-nodes:x:@.arguments/*/args/*/action_name
set-value:x:@.invocation/*/execute/*/filename
get-value:x:@.arguments/*/filename

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export class IdeTreeComponent implements OnInit {
autoFocus: false,
data: {
name: el.name,
is_action: true,
description: el.description,
input: result.input,
candidates: result.candidates?.map((x: any) => {
Expand Down Expand Up @@ -689,6 +690,7 @@ export class IdeTreeComponent implements OnInit {
autoFocus: true,
data: {
name: path,
is_action: false,
description: 'What arguments can your Hyperlambda file handle?',
input: {
arguments: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ export class ParametriseActionDialog implements OnInit {

ngOnInit() {

if (this.data.is_action) {
this.fields.push({
key: 'action_name',
type: 'input',
className: 'w-100 standalone-field',
props: {
placeholder: 'Action name ...',
label: 'Name of Action',
required: true,
}
});
this.model.action_name = this.data.name;
}

// Adding fields as returned from server.
for (const idx in this.data.input) {
const field: FormlyFieldConfig = {
Expand Down

0 comments on commit 4e7b002

Please sign in to comment.