influxdata / influxdata/ui

Notebook(Alerts): Check Every value and Time range dropdown value are not reflected in exported task script

Open
#3,919 0 comments 0 reactions 0 assignees View on GitHub
area/notebooks bonitoo kind/bug severity/sev-4 team/automation team/ui team/unity
Dominant language
TypeScript
Stars
117
Forks
51
Avg merge
2d 15h
Merged PRs (30d)
4

Description

## About the bug

**Steps to reproduce:**
List the minimal actions needed to reproduce the behavior.

1. Setup an echo listener to receive HTTP messages including Basic Authentication verification. Headers and body should be simply echoed to the console once authentication succeeds.
2. Go to Influxdbv2 UI (note that during this test the feature flag 'notebooksNewEndpoints' was set)
3. Add test data to a bucket
4. Create an Alert Notebook
5. Use the test data to define the query
6. In the alert section choose HTTP
7. Add the URL to the listener
8. In the Time range dropdown change the default value to '15m'
9. In the Check Every input change the default value to '15m'
10. Click 'Export Alert Task'
11. Tasks > New Task > Edit task. Inspect the generated script.

**Expected behavior:**

Expected the options `task` and `v` defined in lines 10 and 11 to reflect the values in the inputs.

**Actual behavior:**

The values still reflect the defaults from when the notebook was first created.

```javascript
option task = {name: "Notebook Task for local_Lp065zk144w1ZhH0J08RZ", every: 10m, offset: 0s}
option v = {timeRangeStart: -1h, timeRangeStop: now()}
```
Note that if I return to the notebook and export the task a second time without again changing the values in these two inputs, the second task has the correct values.

**Visual Proof:**

![NBAlertsFieldValsNotInScript02](https://user-images.githubusercontent.com/25881301/154681545-e629ae8e-50e1-4a56-a4ad-2676e1cd4ff9.gif)

## About your environment

**Environment info:**

Testing in K8SIDPE remocal

latest commit in the UI project

```
commit 0bf6a5df9e96be6832c188b04f8aead7f3c3c93e (HEAD -> master, upstream/master, origin/master, origin/HEAD)
Author: Gene Hynson
Date: Thu Feb 17 16:23:46 2022 -0800
```

latest commit in K8SIDPE

```
commit 048cf61a6f12841317ad12563f9f88e23905b653 (HEAD -> master, origin/master, origin/HEAD)
Author: Phil Bracikowski <13472206+philjb@users.noreply.github.com>
Date: Thu Feb 17 18:15:10 2022 -0800
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.