-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pressing Copy this Report in a middleware report does nothing #1740
Comments
@Fryguy regardless of the fact that nothing happens and that should be investigated - what do you mean by "not creatable so should not be copyable"? there are a lot of reports that are out of the box in miq (not created by user), so what do you define by "not creatable"? |
the error is around this part the exception that I see in the log is: |
@lucasponce do you remember any difference in how miq_report for live metrics is stored in db vs a regular report? although the error is in ui, iiuc it is originated by some lack of config on miq_report |
When we created this logic, once the report was generated it was stored in the miq_report model as html_details. |
@lucasponce there's miq_report and miq_report_results - isn't the generated one going to results table? |
@abonas Correct. I meant miq_report* model/tables. I usually started from miq_report entities on a debug session and tracing the results stored in the model. |
@lucasponce thanks. from the exception that I pasted above it looks like copying a report definition is failing with an exception on something empty in a miq_report (and not its result iiic_ |
@lucasponce from debugging this I see a difference in how the rpt object is represented comparing a middleware report to another non middleware report. but for the middleware reports: so rpt.db_options[:start_offset] for middleware report is always empty and hence the code fails on copy. |
@abonas I think that was not intentional. |
@lucasponce @josejulio where is start_offset and end_offset assigned a value? I don't see it in the above class, only see it being consumed |
@abonas IIRC these variables are defined in the report configuration |
@lucasponce right. what I still don't understand (and that is also what's causing this to crash) is why sometimes the start/end offset are on db_options, and sometimes they are on db_options.options |
@abonas I think this was motivated due this logic |
By not creatable I mean that if you go to create a new report, you can't create a "Middleware Servers" report, because it's not in the "Base the report on" dropdown (which makes sense because these are not typical reports). The existing reports are created out of the box, so they have bypassed that restriction by the nature of being seeded. By copyable I mean that by choosing copy in the UI, you create a duplicate record that you can edit and change, however even if you could copy it, you can't modify it at present, because there is no edit capability. IMO, if you can't create a type of report, you shouldn't be able to copy that type of report as that is just another form of "creation". |
cc @gtanzillo Can you help on the reports definition side of things? |
I think it would be best to move the items under db_options.options up to db_options because that's where the report editor expects them. I looked at some (but not all) of the the original (circa 2009) performance related reports and they all had I made the change to this report and I was able to copy it. The seeding process will take care of updating the instance in the Db. You'll also need to update the code in diff --git a/product/reports/670_Performance by Asset Type - Middleware Servers/150_Transactions - hourly over last day.yaml b/product/reports/670_Performance by Asset Type - Middleware Servers/150_Transactions - hourly over last day.yaml
index 82d186f..0b81aea 100644
--- a/product/reports/670_Performance by Asset Type - Middleware Servers/150_Transactions - hourly over last day.yaml
+++ b/product/reports/670_Performance by Asset Type - Middleware Servers/150_Transactions - hourly over last day.yaml
@@ -37,10 +37,9 @@ rpt_type: Custom
filename:
db_options:
:rpt_type: middleware
- :options:
- :interval: hourly
- :start_offset: 86400
- :end_offset: 0
+ :interval: hourly
+ :start_offset: 86400
+ :end_offset: 0
include: {}
db: MiddlewareServerPerformance |
@gtanzillo Fixing the bug aside, what happens when you copy it...can you then edit it? |
@Fryguy After copying I was able to edit the report definition and save it. (with the change above in place) |
but the middleware reports are also created out of the box, so what am I missing?
|
@gtanzillo thanks. it will require change in some logic additionally so the report generation will not be broken of course. |
@cfcosta Caina I'm looping you in here, please drive this. |
I am not certain but I understand we are talking about the report generator here ? |
@lucasponce so what you are saying is that the copy should be disabled and we should not fix/move things from options to dbtotions? |
Probably, that could be easier option, I think, unless I miss something, my point is that we can maintain the predefined reports and not let user to generate/customize middleware reports yet. So, this issue is interesting and would let us to collect user requeriments. I think that maintained the pre-defined reports (or adding more) could be a valid tradeoff. |
thanks @lucasponce. so it sounds that right now it is ok to make the reports non copy-able. |
+1 let's make then non-copyable. I'll log another requirement where we can scope and manger the priority of 'copy and modify'. |
@jdoyleoss I didn't find the JIRA for that, can you please mention it? |
I agree we can proceed as non-copyable for now. I logged a JIRA for future consideration. |
Disable button Copy for Middleware Reports - Fix issue #1740
CloudIntel -> Reports -> Performance By Asset Type -> Middleware (Server or Datasources) -> pick a report -> Configuration -> Copy this Report
The screen blinks but nothing happens (I'm not sure if there are errors logged as I'm using a system that is not mine). This is because the Middleware reports are based on Live Metrics and are not creatable by the user. Since they are not creatable, they should not be Copyable, so we should probably grey out this button with a tooltip explanation.
@abonas Please review
The text was updated successfully, but these errors were encountered: