fnproject / ui

User interface for fn project.
Apache License 2.0
89 stars 21 forks source link

delete func config vars from UI currently not working #63

Closed carimura closed 5 years ago

carimura commented 5 years ago

The PUT seems to work properly (removes the config param I'm trying to delete) ... but doesn't actually remove config.

vzDevelopment commented 5 years ago

Hi @carimura, I've just checked on a clean version of master and it's working for me. For example:

I create an app using the ui with two configs:

vzarola-Mac:~ vzarola$ fn inspect app uiapp
{
    "config": {
        "aConfigVar": "var1",
        "aConfigVar2": "var2"
    },
    "created_at": "2019-04-25T18:18:02.687Z",
    "id": "01D9AVFZHZNG8G00GZJ0000001",
    "name": "uiapp",
    "updated_at": "2019-04-25T18:18:02.687Z"
}

I then deleted one of the configs using the UI and got

vzarola-Mac:~ vzarola$ fn inspect app uiapp
{
    "config": {
        "aConfigVar2": "var2"
    },
    "created_at": "2019-04-25T18:18:02.687Z",
    "id": "01D9AVFZHZNG8G00GZJ0000001",
    "name": "uiapp",
    "updated_at": "2019-04-25T18:18:31.102Z"
}

Do you have any more info so I can try and replicate? Does the issue happen with both apps and functions?

carimura commented 5 years ago

oh i see it's supposed to send an empty val. Ya I don't see that.. per screenshot below, the config var I was deleting was a:b

Screen Shot 2019-04-25 at 11 19 22 AM

vzDevelopment commented 5 years ago

Humm I can't seem to replicate the issue (just tried with a function using a => b, c => d and deleting a => b in both Firefox and Chrome).

Have you tried running webpack again? Maybe something went wrong with the build. Are there any errors in the console at all?

Created a function using the UI:

vzarola-Mac:~ vzarola$ fn inspect function uiapp hello
{
    "annotations": {
        "fnproject.io/fn/invokeEndpoint": "http://localhost:8080/invoke/01D9AW09QVNG8G00GZJ0000002"
    },
    "app_id": "01D9AVFZHZNG8G00GZJ0000001",
    "config": {
        "a": "b",
        "c": "d"
    },
    "created_at": "2019-04-25T18:26:57.403Z",
    "id": "01D9AW09QVNG8G00GZJ0000002",
    "idle_timeout": 30,
    "image": "fnproject/hello",
    "memory": 128,
    "name": "hello",
    "timeout": 30,
    "updated_at": "2019-04-25T18:29:54.089Z"
}

After deleting a => b

vzarola-Mac:~ vzarola$ fn inspect function uiapp hello
{
    "annotations": {
        "fnproject.io/fn/invokeEndpoint": "http://localhost:8080/invoke/01D9AW09QVNG8G00GZJ0000002"
    },
    "app_id": "01D9AVFZHZNG8G00GZJ0000001",
    "config": {
        "c": "d"
    },
    "created_at": "2019-04-25T18:26:57.403Z",
    "id": "01D9AW09QVNG8G00GZJ0000002",
    "idle_timeout": 30,
    "image": "fnproject/hello",
    "memory": 128,
    "name": "hello",
    "timeout": 30,
    "updated_at": "2019-04-25T18:30:05.803Z"
}
vzDevelopment commented 5 years ago

Here's a screenshot of Firefox's debug tools when I click save after deleting a config for a function:

Screen Shot 2019-04-25 at 19 34 30

The screenshot you sent looks like the old behaviour where it wouldn't send it 🤔

carimura commented 5 years ago

wait. i think this is user error again. My webpack was failing thus I wasn't testing latest. one sec

carimura commented 5 years ago

yep. mea culpa. we're good!!

vzDevelopment commented 5 years ago

Wooo. You had me worried for a second then - thought I'd missed something 😅