12 Replies Latest reply on Oct 5, 2017 9:48 AM by hellcat

    HTML/Javacript

    max348

      Hi.. i want to create a custom view where i want to execute for example the query "SELECT  Name FROM Orion.Groups" under custom HTML resource and display the result from the query.

      How can i get to display the database result under HTML code.

       

      Also how can i connect to database and query the same result using Javascript and HTML. can anyone help me with a sample code ??

        • Re: HTML/Javacript
          dodo123

          Can I ask why u need it in java or HTML. Why not use swsql, Instead of custom HTML use custom query.

           

          then insert your query, will be very simple but you can add to and change.

            • Re: HTML/Javacript
              max348

              i want to create a custom view using gif images and stuff.. i have created a view using sql query but it does not look that lively.. so i was trying to create and different type of view using javascript and HTML/CSS .. but i don't know how i can make a script execute a query using html or javascript.. any help or advice would be appreciated.

                • Re: HTML/Javacript
                  dodo123

                  Have you used network atlas yet, i know its not very user friendly but you can get images in?

                   

                  Below was something i created with network atlas.

                  Or using swsql

                  I like using swsql better as you can create links and add images, we have a dba team who know sql which is very handy.

                    • Re: HTML/Javacript
                      max348

                      Here is what i have created with sql query using custom query resource.

                       

                      thwack.PNG

                       

                      I want to create something like below or even better with background color or using GIF images and also want to  remove the custom query resource name. This i am not able to achieve just with SQL query

                       

                      thw.PNG

                        • Re: HTML/Javacript
                          dodo123

                          Looks good, I would try network atlas then you can add your own icons and i think you can get them to change just not sure if its the whole icon?

                           

                          Or create your own html and pull/scrape from solarwinds? then add the source to solarwinds. when using links just remember to use from /orion...

                            • Re: HTML/Javacript
                              max348

                              is it possible to move the columns from single row and display each column in different row ??.. for example keep the column "NAME" on top and move Columns "Health" and "availablilty" below just like my second image above. 

                                • Re: HTML/Javacript
                                  dodo123

                                  If you were trying to reduce the space used maybe create a query for each app so you would get rid of the name column and just have the health and availability icons and change the title from mail server to email.

                                    • Re: HTML/Javacript
                                      hellcat

                                      Reasons for SQL/HTML/Java and not using SWQL, for me personally...

                                       

                                      SWQL is extremely limited compared to available SQL functions and formatting options.  For example, SWQL number calculation formatting capabilities are often a show stopper for statistics tables.

                                       

                                      A custom query with SWQL does provide table sorting capabilities to the user but limited data calculation and formatting tend to steer me in another direction.

                                       

                                      Custom tables do not provide the ability for users to sort information by clicking column headers.  Sort order is static with SWQL and SQL.  An HTML table and java sorting  function would provide more flexibility to the user.

                                       

                                      How To Sort a Table

                        • Re: HTML/Javacript
                          mesverrum

                          Not to derail you completely from what you are working on using Atlas, as that is still probably the easiest way to accomplish what you are looking at, you can direct java queries toward the following address /Orion/Services/Information.asmx/Query

                          where you would use JSON formatting something like this

                          {query:'SELECT Name FROM Orion.Groups where XYZ'}

                           

                          If you have a background in web dev then you might find it to be easier to do custom scripting than to work around the limitations of the Atlas program, but if not then I would expect Atlas is the more efficient route.

                          1 of 1 people found this helpful
                          • Re: HTML/Javacript
                            tkercher

                            As has been suggested, I would strongly recommend using Network Atlas for this