OpenSearch-Dashboards
OpenSearch-Dashboards copied to clipboard
Add updated_at column to objects' tables
Signed-off-by: sitbubu [email protected]
Is your feature request related to a problem? Please describe. We want to see more informative data inside the saved objects' tables, one important column that answers our needs will be the “updated at” option. After adding this option we will gain an additional advantage, i.e sort our objects by date.
Describe the solution you'd like to
We wish to add an additional “updated at” column to our management, visualizations, and dashboards tables. e.g. for the management table, we will define:
and then we will be able to see an additional column, like so:
The same solution will be implemented under the visualizations and dashboards tables, besides the fact that we will need to set our updated_at property inside the attributes prop since it uses us as the rendered object info for these tables.
Linked issue: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/1217
There is an advanced setting in stack management that determines the date format of how dates should be pretty printed. We should be using that to format the date/time display.
Thanks for the changes! I believe this field uses the ISO 8601 string format
YYYY-MM-DDTHH:mm:ss.sssZ
, so we should keep that consistent. And I know we can't change the field name, but when we render it I think it would look better to use a noun instead of including theat
proposition (i.e.Updated Time
instead ofUpdated at
).
thanks, changed as requested
Thanks for the changes! I believe this field uses the ISO 8601 string format
YYYY-MM-DDTHH:mm:ss.sssZ
, so we should keep that consistent. And I know we can't change the field name, but when we render it I think it would look better to use a noun instead of including theat
proposition (i.e.Updated Time
instead ofUpdated at
).
Hey, all changes have been made inside this pr. Thanks
Hi @RoyiSitbon, do you need any additional questions answered for this PR?
Hi @RoyiSitbon, do you need any additional questions answered for this PR?
Hey @tmarkley, thanks for checking. I replied above.
Codecov Report
Merging #1218 (7580cec) into main (b5d529a) will increase coverage by
0.02%
. The diff coverage is60.00%
.
@@ Coverage Diff @@
## main #1218 +/- ##
==========================================
+ Coverage 66.55% 66.57% +0.02%
==========================================
Files 3170 3170
Lines 60321 60326 +5
Branches 9181 9182 +1
==========================================
+ Hits 40144 40162 +18
+ Misses 17984 17969 -15
- Partials 2193 2195 +2
Impacted Files | Coverage Δ | |
---|---|---|
...agement_section/objects_table/components/table.tsx | 65.51% <0.00%> (-1.15%) |
:arrow_down: |
...ment_section/objects_table/saved_objects_table.tsx | 73.48% <ø> (ø) |
|
...rd/public/application/listing/dashboard_listing.js | 78.57% <50.00%> (-4.77%) |
:arrow_down: |
...c/core/public/saved_objects/simple_saved_object.ts | 56.25% <100.00%> (+2.91%) |
:arrow_up: |
...objects/public/saved_object/saved_object_loader.ts | 53.84% <100.00%> (+53.84%) |
:arrow_up: |
...ared/static/forms/hook_form_lib/hooks/use_field.ts | 66.66% <0.00%> (+0.96%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Hello @RoyiSitbon,
Will pull this down! Quick question will this require a migration on existing documents?
Hello @RoyiSitbon,
Will pull this down! Quick question will this require a migration on existing documents?
Hey @kavilla , yes pls. not requires a migration, unless we will want to ascertain the existence of these metaFields. Nothing will go wrong even without migration attach(also validated using tests as expected).
Thanks a lot
Hello @RoyiSitbon, Will pull this down! Quick question will this require a migration on existing documents?
Hey @kavilla , yes pls. not requires a migration, unless we will want to ascertain the existence of these metaFields. Nothing will go wrong even without migration attach(also validated using tests as expected).
Thanks a lot
Great then I think we can target to get this in to 2.3! Thank you so much @RoyiSitbon
I've validated this locally and the change looks good! Glad that you exposed the
updated_at
a global level so that every saved object type can utilize it. Sorry that this got sidetracked.
🙏
Nice!