- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise
- >
- Calendar Input Option for Custom Reports
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2023 09:39 AM
06-23-2023 09:39 AM
Calendar Input Option for Custom Reports
Hi,
I am currently working on creating custom reports and I am in need of your expertise. Specifically, I am looking to implement a calendar input option for users to select both dates and times.
I have been exploring the Morpheus Git repository in search of sample code that demonstrates how to incorporate a calendar input option, similar to the functionality found in the Cloud Cost report. In that report, users are prompted to select a start date and end date.
However, for my custom reports, I require users to be able to choose not only the date but also the time of the month. This additional level of granularity is crucial for the accuracy and specificity of the reports.
I kindly request your assistance in locating any relevant sample code within the Morpheus Git repository or any other resources that can guide me in implementing the desired calendar input option. Your expertise and guidance would be highly appreciated.
Thank you in advance for your support. I look forward to hearing from you soon.
- Tags:
- reports
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2023 09:56 AM
06-27-2023 09:56 AM
Re: Calendar Input Option for Custom Reports
@Ollie_Phillips i think it is possible. if you look at the cloud usage report. it will have cloud select option, the drop down is dynamic, dorop down values comes dynamically, so i want to know how that clouds are dynamically pulled in to report.
Also, one more example: if you look at the Run application cost report, this report have Group, Cloud and Environments are select option lists and the values are dynamicalled pulled. if you have source code access to those two reports and tell me how they are pulling the dynamic values then it will solve my problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2023 01:06 PM
06-27-2023 01:06 PM
Re: Calendar Input Option for Custom Reports
Do you have a sample code for the above?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2023 06:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2023 12:10 PM
06-26-2023 12:10 PM
Re: Calendar Input Option for Custom Reports
I would build the custom report using additional text inputs to represent the data you need to filter on for now. Maybe add some help text to the control(s) to outline/guide expected input.
The Plugin framework is getting better by the day, but I don’t think this is available ATM. I’ve no idea if a dateTime picker is on the roadmap, but it would be simple to drop in to improve a working report plugin if it should be.
You should suggest this in the ideas section of this forum too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2023 12:10 AM
06-27-2023 12:10 AM
Re: Calendar Input Option for Custom Reports
There is an example here:
Line 147 shows a method to getOptionTypes in which a single custom input is registered.
Line 96 shows how the value of the input, is obtained from the report filter modal and used in the SQL query which follows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 11:54 AM
06-28-2023 11:54 AM
Re: Calendar Input Option for Custom Reports
Here is what i have added to my custome code and getting below error, i hope you can help me to soleve this error.
i created a file called ReportOptionSourceProvider.groovy
package com.morpheusdata.reports
import com.morpheusdata.core.MorpheusContext
import com.morpheusdata.core.Plugin
import com.morpheusdata.model.*
import groovy.util.logging.Slf4j
import com.morpheusdata.core.OptionSourceProvider
@Slf4j
class ReportOptionSourceProvider implements OptionSourceProvider {
Plugin plugin
MorpheusContext morpheusContext
ReportOptionSourceProvider(Plugin plugin, MorpheusContext context) {
this.plugin = plugin
this.morpheusContext = context
}
@Override
List<String> getMethodNames() {
return new ArrayList<String>(['reportPluginReleaseModes'])
}
List reportPluginReleaseModes(args) {
[
[name: 'Release', value: 'release'],
[name: 'Quick Delete', value: 'quick-delete'],
[name: 'Delete', value: 'delete']
]
}
}
When i run the gradle shadowjar i am getting the below error
ReportOptionSourceProvider.groovy: 7: unable to resolve class com.morpheusdata.core.OptionSourceProvider
@ line 7, column 1.
import com.morpheusdata.core.OptionSourceProvider
^
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileGroovy'.
> Compilation failed; see the compiler error output for details.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
1 actionable task: 1 executed
I got that code from here Morpheus Plugin Documentation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 01:57 PM
06-28-2023 01:57 PM
Re: Calendar Input Option for Custom Reports
I think, i resolved the Problem, will update the full code here once i have full code ready!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2023 09:45 AM
06-27-2023 09:45 AM
Re: Calendar Input Option for Custom Reports
I can’t say if that is possible. Typically when creating a plugin, the inputs required for the plugin would be coded with the plugin and deployed with the Jar for portability. If the values in the option list are ‘manual’ you could create that control using the approach I linked previously. It appears “select” is supported in the plugin framework.
https://developer.morpheusdata.com/api/com/morpheusdata/model/OptionType.InputType.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2023 01:03 PM
06-26-2023 01:03 PM
Re: Calendar Input Option for Custom Reports
i have a custom option list… how can i include that option list in reports code?
Do you have any sample code i can use?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 01:10 PM
06-28-2023 01:10 PM
Re: Calendar Input Option for Custom Reports
@mreed When you get a chance can you look at my post and let me know why i am getting that error? it is really helpful if you can guide me to solve the error from my above post
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 12:17 PM
06-28-2023 12:17 PM
Re: Calendar Input Option for Custom Reports
@Ollie_Phillips Do you know why i am getting the “import com.morpheusdata.core.OptionSourceProvider” error?
Do i need to import anything else to resolve the above import?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 11:20 AM
06-28-2023 11:20 AM
Re: Calendar Input Option for Custom Reports
Hi @rmartha, no, nothing that directly illustrates, but this is a control I have set up in a report I am building. You would want OptionType.InputType.SELECT
as the final line, instead, of ...TEXT
and there would be other steps to configure the select options I would expect, which you can likely work out from the plugin class reference here
// end date
OptionType endDate = new OptionType(
code: 'end-date',
name: 'EndDate',
fieldName: 'endMonth',
fieldContext: 'config',
fieldLabel: 'End date',
displayOrder: 1,
inputType: OptionType.InputType.TEXT
)
Incidentally, you should also check out this post - I got some surprising results based on field naming alone. I wonder if this could be a hack for your date and time picker re your original question?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 12:08 PM
06-28-2023 12:08 PM
Re: Calendar Input Option for Custom Reports
End Month will give you the only Month and Year(mm/yyyy), i was looking for month/date/year ( mm/dd/yyyy) as well
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2023 05:45 AM
06-27-2023 05:45 AM
Re: Calendar Input Option for Custom Reports
@Ollie_Phillips Let me explain in detail about my Question.
- I have created a Manual type option list called test1
- i have created a select Input called TestA
Now i want to use TestA input in my reports code. Do you have any example on how can i call my input in the reports code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2023 10:15 AM
06-27-2023 10:15 AM
Re: Calendar Input Option for Custom Reports
I don’t have any source code access I’m afraid. ATM we have several plugin providers, including the reports provider that expose certain capabilities with which we can interact with Morpheus, but not everything.
Those capabilities are growing, and Morpheus is now using plugins for some integrations which were previously part of the core. Those plugin providers are probably most complete and surface all the pieces needed from the core.
But regarding the core report suite, to my knowledge those have not been written using the plugin SDK, which means (at least for now) the core reports can likely do things via the core SDK, that we can’t yet in the plugin SDK. When/if reports are made modular and form part of a plugin, we’ll likely see parity between what they can do, and what we can achieve in our own reports.
For now, it is possible to script a select input and supply the name/value pairs, which is equivalent to a option list with manual values.