Notebooks/Tasks: Button not grayed out with an invalid time value in an offset field
- Dominant language
- TypeScript
- Stars
- 117
- Forks
- 51
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 4
Description
**Steps to reproduce:**
List the minimal actions needed to reproduce the behavior.
1. go to the Notebooks and create a new notebook
2. in the notebook, create a new task with an offset's [duration unit](https://docs.influxdata.com/flux/v0.x/spec/lexical-elements/#duration-literals) to be a week (w) or larger.
**Expected behavior:**
I expected the Export Tasks button to be grayed out as it is when you enter a day (d) as a duration unit for offset or an error to inform the user about a non-supported duration units.
**Actual behavior:**
The button isn't grayed out. Upon clicking it, an error pops up that says the duration unit is unknown, not informing the user that the unit is just not allowed in the offset field.
Similar behavior happens in the Tasks tab when the task is supposed to run after a certain interval passes. However, when you are using cron as a way to describe when the task should run, a different error pops up that says the largest supported duration unit for offset is an hour (h) which I believe was meant to pop up whenever the user used a duration unit in offset that is a day or larger.
**Visual Proof:**
Notebooks > When offset uses duration unit day (d), the Export Task button is grayed out

The button isn't grayed out when the offset duration unit is larger than a day. Once it's pressed, an error pops up that says the duration unit is unknown, which isn't true as I used the same duration unit for interval as well as offset and it only pops up the error for offset.
Intervals

Cron

Tasks > When offset uses duration unit day (d) or larger, and the task runs after a certain interval

When offset uses duration unit day (d) or larger, and the task runs at the specific time using cron

The error on the last screenshot notifies the user about the set limitations to the offset field.
I believe this was meant to be the error to inform the user about said boundaries because units like a day (d), a week(w), a month (mo), and a year (y) exist; they are just not allowed in the offset field.
## About your environment
**Environment info:**
Testing K8S-IDPE Remocal
The latest commit in project UI
```
commit 65592aad01b9ddd369107e63c22227b075b9dd23 (HEAD -> master, origin/master, origin/HEAD)
Author: Chitlange Sahas
Date: Fri Feb 4 10:58:12 2022 -0700
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.