Home Analyst Portal
Options

Duplicate dashboards for multiple support groups

Gerhard_GoossensGerhard_Goossens Customer Advanced IT Monkey ✭✭✭
Good day everyone,

With the limitation on the number of queues that can be created within SCSM, I have created a queue for each department ie. IT, HR, Finance, Facilities etc. and then just use the support group portal mapper to manage the team views within the portal.

The problem I have now is that the OOB Dashboards/Analytics is scoped to everything within the queue the user has access to and this is not ideal for managers that only wants to see only their support group stats.

To get around this, I have modified the SQL so that I can only pass in the support group name with the ('{{SuppGroup}}') token.

This works awesome and I can quickly create the required charts.

So now I have the daunting task of going into Navigation Settings and to create a page for all the support groups 30+, then going into those pages, creating the charts and only changing the support group token. 

So here is my question:

Is there a way that I can create one page with all the required sharts and then duplicate that page to other pages.
This will allow me to only then go and change the token on each page and not create each page from scratch.

I hope this makes sense...
Anny help or suggestions will be highly appreciated.

Regards
Gerhard

Best Answer

Answers

  • Options
    Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    Yes and No
    I have currently about 200 support groups and the list keeps growing, I had a one point a requirement to create a dashboard list for 97 level one groups that all the pages would be the same just the support group name is different. 
    How I accomplished this was to use SQL scripting to create many of the values. (Well my SQL engineer did this more so)

    Use Case
    One Dashboard page that contained 6 SQL widgets. 
    Create use case for 97 support groups to view their specific work items

    Basically how we accomplished 
    I created one set SQL queries in the for the widgets in the admin setting Dashboard query settings. 
    Making sure to have a set structure of Name, Data source and query all where my support group can be uniquely identified from all other content in the columns. 
    Created one Navigation dashboard page and designed the page with the widgets using the SQL queries defined above.
    So now I have one example I needed to build the other 96 desks against. 

    If you log into the ServiceManagement Database you will see that performing the above you will see new rows were added to tables dbo.Datasource for your 6 SQL widget queries
    And one row in dbo.NavigationNode for the Dashboard page

    So what we did to script it. 
    For the widgets SQL queries 
    Inserted new rows for each of the required widgets doing a replace in the query string of the support group. allowing the ID to be a auto gen GUID. This was a pretty easy one. 

    The NavigationNodes in testing we found we could not create the pages in SQL via script but in the portal we were able to create just a bunch of blank pages to have the populate correctly via the Cireson build process. That created a number of rows in the database and being blank the row Definition did not have much to it. 
    What my SQL engineer was able to do was script out updating the NavigationNode Definition of the one we did so all the blanks were updated to match while at the same time the values in the Definition were updated to the values created in the above widgets GUID values. 

    HTH to get you on the path how we got this accomplished. 
  • Options
    Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    One page to rule them all?  @Gerhard_Goossens - it can be done!  I'll come back with some custom code shortly unless someone else beats me to it!
  • Options
    Gerhard_GoossensGerhard_Goossens Customer Advanced IT Monkey ✭✭✭
    Yes and No
    I have currently about 200 support groups and the list keeps growing, I had a one point a requirement to create a dashboard list for 97 level one groups that all the pages would be the same just the support group name is different. 
    How I accomplished this was to use SQL scripting to create many of the values. (Well my SQL engineer did this more so)

    Use Case
    One Dashboard page that contained 6 SQL widgets. 
    Create use case for 97 support groups to view their specific work items

    Basically how we accomplished 
    I created one set SQL queries in the for the widgets in the admin setting Dashboard query settings. 
    Making sure to have a set structure of Name, Data source and query all where my support group can be uniquely identified from all other content in the columns. 
    Created one Navigation dashboard page and designed the page with the widgets using the SQL queries defined above.
    So now I have one example I needed to build the other 96 desks against. 

    If you log into the ServiceManagement Database you will see that performing the above you will see new rows were added to tables dbo.Datasource for your 6 SQL widget queries
    And one row in dbo.NavigationNode for the Dashboard page

    So what we did to script it. 
    For the widgets SQL queries 
    Inserted new rows for each of the required widgets doing a replace in the query string of the support group. allowing the ID to be a auto gen GUID. This was a pretty easy one. 

    The NavigationNodes in testing we found we could not create the pages in SQL via script but in the portal we were able to create just a bunch of blank pages to have the populate correctly via the Cireson build process. That created a number of rows in the database and being blank the row Definition did not have much to it. 
    What my SQL engineer was able to do was script out updating the NavigationNode Definition of the one we did so all the blanks were updated to match while at the same time the values in the Definition were updated to the values created in the above widgets GUID values. 

    HTH to get you on the path how we got this accomplished. 
    That sounds like it can and have been done. Problem is my SQL knowledge is BAAAD. Hopefully @Justin_Workman can brew us something
  • Options
    Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    I was getting ready to do some custom js to make this work and realized you can do something like what @Tom_Hendricks is talking about here.  Add an HTML widget at the top with links for each support group and use your token in the links.  So the URL would look like this:
    "/Page/7a42acda-0256-4361-aab5-b68617e2eb00?SuppGroup=IT"
    where the guid is the guid of your dashboard page.  It's not dynamic or elegant, but it works.  The next best step(as drawn out by Tom and @Geoff_Ross in that thread) is a fully custom page.  I may still yet build a little POC though ;)
  • Options
    Gerhard_GoossensGerhard_Goossens Customer Advanced IT Monkey ✭✭✭
    OK guys.  I finally got this going!  Keep in mind that URL parameters for dashboards will only work in 8.5+ of the portal.  This little bit of custom code will let you create a single dashboard for all Incident Support Groups.  You could easily add additional tables, charts, etc.  As long as they're expecting the SupportGroup token, they'll change based on what's selected in the drop down.


    @Tom_Hendricks - You might like this too.  
    Awesome, thank you, it is 1AM now and I need to get some sleep before work.. Will test first thing tomorrow.
  • Options
    Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    This is very similar to what I came up with.  Before I started adding some styles, my dropdown the top of my page looked identical to this.  A case of great minds thinking alike? :)

    My mutationobserver is a bit different in that I am actually checking the mutation itself to see if a newly added node has a matching, rather than running a search each time.  That seems to help performance, particularly in IE--which I of course discourage people from using, but people are generally set in their ways.  How does it run for you?
  • Options
    Justin_ClarkeJustin_Clarke Customer Advanced IT Monkey ✭✭✭
    Wow would love to get this working for my setup. Similar to Brian we have a lot of support groups.
    Do you have an example of a sql query that will pull in the URL parameter to allow the filter to work? My sql is not that advanced.
    Also is there a query or table column that will show the support group as the full path including subgroup? IE: Tier 1 > Tier 2 > Tier 3 rather than just the one level like Tier 3?

    i have the HTML filter showing all support groups but just stuck on how to pass this.
  • Options
    Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    Obviously, it's been a while since I first posted this.  Upon reading it now with some distance, I can see where this might be confusing!  Here's some steps and a sample query that will hopefully help.

    Step 1: add a SQL table widget to a page(it can be a new page if you like) and add a new query that accepts a token like this:

    SELECT workitemid, title, ds.displaystring as 'SupportGroup'

    FROM WorkItem w

    LEFT JOIN DisplayString ds ON ds.elementid = w.tierid AND ds.localeid = 'enu'

    WHERE ds.displaystring = '{{supportGroup}}'

    Step 2:add an HTML widget to a page and add the div as the body (like the screenshot above: <div class='htmlwidgetdiv'></div/>) 
    Step 3: save the page
    Step 4: add the code from customDash.txt(above) to your CustomSpace/custom.js file making sure that the GUID on lines 20 and 30 matches the ID of the page selected(or created) on Step 1.



Sign In or Register to comment.