Skip to Content

On popular demand:

/wp-content/uploads/2013/06/endresult_231123.jpg

How do you add multiple SAP systems to the Solution Manager 7.1 – Technical Monitoring widget? I gave away some hints in the original blog post: “Solution Manager 7.1 Return of the widget” but still many questions came in my direction on how to exactly go about changing the widget.

In this example I show you have you can end up with seven managed SAP systems. I don’t know if there is any upper limit in terms of how many you can add so you can follow these steps & change them to your liking in order to add <n> number of managed SAP systems.

So here we go:

/wp-content/uploads/2013/06/preferences_231124.jpg

Call up the System Monitoring widget, right click & choose Widget Preferences

/wp-content/uploads/2013/06/preference_orig_231191.jpg

In the preferences, you only have 5 input fields to insert managed SAP systems.

So this is the first place where we have to make a change in order to allow more inputs to be given to the widget.

/wp-content/uploads/2013/06/content_231193.jpg

Open up Main.kon with notepad ++ (or another editor)

/wp-content/uploads/2013/06/main1_231197.jpg

If you look for “FavoriteSystem” you will soon notice XML that is related to the five input fields.

/wp-content/uploads/2013/06/main2_231198.jpg

Copy one block (not the last one) & insert it twice

Change the <name> of the copied blocks as shown above into FavoriteSystemFive & FavoriteSystemSix

Rename the last block from FavoriteSystemFive to FavoriteSystemSeven

/wp-content/uploads/2013/06/main3_231203.jpg

To check the result, zip your folder back into a zip file and rename it to .widget ~use another name than the original widget.

Now open up this widget with the Yahoo Widget Engine

Right click and navigate to preferences

/wp-content/uploads/2013/06/preference_middle_231204.jpg

So we have two additional input fields. It’s not very clean yet because the * text is displayed twice but we’ll fix that in a second.

/wp-content/uploads/2013/06/findinfiles_231205.jpg

You can use the find in files function in notepad ++ to detect other spots in the coding where FavoriteSystem is used

/wp-content/uploads/2013/06/controllerjs_231207.jpg

One of the first hits is in controller.js

Here you can see where the “Enter at least” text is coming from on the Fifth system. Since we added two more systems, we now change FavoriteSystemFive into FavoriteSystemSeven

/wp-content/uploads/2013/06/preferences_end_231208.jpg

Pack the widget back in, run it to check and you now see the text “*Enter …” is only displayed on the last system in the preferences.

/wp-content/uploads/2013/06/controller2_231209.jpg

Moving forward, the next “hit” on FavoriteSystem is still in controller.js

Here add  && ( preferences.FavoriteSystemSix.value == 00) && ( preferences.FavoriteSystemSeven.value == 0) before the last )

/wp-content/uploads/2013/06/controller3_231210.jpg

Result

Moving forward, the next “hit” on FavoriteSystem is in Model.js

We are not going to change line 155 – 159 or add lines since this is purely commented code //

So we end up on line 166 in Model.js

/wp-content/uploads/2013/06/model1_231211.jpg

Before line 180, add two blocks for six & seven

/wp-content/uploads/2013/06/model2_231215.jpg

Result

/wp-content/uploads/2013/06/result_middle_231216.jpg

Pack in, load widget again

You can see now that we have more than five systems!!!

But as you can see, the widget seems to be too small.

Two options, we can increase the widget pane and we can let the widget “scroll” by adding lines to the table.

/wp-content/uploads/2013/06/view1_231217.jpg

C:\widget\sysmon\SAP System Monitor.widget\Contents\components\Main\js\view\view.js

Adjust the line for(var j=0; j<5; j++) into (var j=0; j<7; j++)

The screenshot above also represents the result!


Main.kon defines the main widget pane so we have to take a look there ๐Ÿ™‚

/wp-content/uploads/2013/06/height1_231219.jpg

C:\widget\sysmon\SAP System Monitor.widget\Contents\Main.kon

In Main.kon we see a <height> tag for the mainWindow so this looks like the value we need. So we have enlarged the “placeholder” of the content by 138 pixels (original value was 262).

/wp-content/uploads/2013/06/config_231220.jpg

In the config.xml file that accompanies the “skin” of the widget, you also have height values which define the height of the respective rows.

/wp-content/uploads/2013/06/toolheight_231221.jpg

To add some height here, we add 30 pixels to tools_height (from 255 to 285) and we add 30 pixels to <row height=”160” /> which makes us end up with the above result <row height=”190″ />

Again pack up & widget it

/wp-content/uploads/2013/06/endresult_231123.jpg

Voila, you now have more than five systems configured, seven to be accurate.

You don’t see all seven in above screenshot because I didn’t enlarge the pane to display them all. The bar on the bottom indicates you can scroll up / down to display the system(s) that are not visible at first sight. In order to scroll click next to the System Monitoring header and then you can just mouse scroll up & down the list.

Of course you can also enlarge the widget further if wanted using the instructions in the blog post (if you want to avoid scrolling).

Have fun!


To report this post you need to login first.

18 Comments

You must be Logged on to comment or reply to a post.

  1. Otto Nanassi

    Hi Tom,

    can you please let me know how to get the Main.kon file and the others?

    We have the sysmon widget downloaded but it is only one widget file? How to get the others?

    Thank you,

    Kind regards,

    Otto

    (0) 
    1. Tom Cenens Post author

      Hi MM

      Well, as long as the link is there, you could still use it but the Yahoo Widget engine is obsolete. You can still find downloads of the Yahoo Widget engine but you need to be careful where you download it from because I’ve downloaded one which was infected so be careful if you decide to do that.

      Best regards

      Tom

      (0) 
  2. Raffaello Rodiman

    Thanks for the good tutorial Tom,

    Although its quite old, I would like to see if its possible to run multiple widget with different system value ?

    Cheers,

    Raff

    (0) 
    1. Tom Cenens Post author

      Hi Raff

      Yes, that would work if the widget has a different name.

      The Yahoo Widget engine is no longer available on any official source in the meantime.

      Downloading it from 3rd party websites holds some danger as those files can be infected.

      Kr

      Tom

      (0) 
      1. Raffaello Rodiman

        Thanks for the fast reply Tom,

        Yes I’am aware but I’m pretty lucky that I still kept the old one and apparently its ran without any issues on Windows 8.1.

        Would you assist me on which different name I should point out ?

        I have tried to ran it on Test1.widget and also test2.widget and it can be ran both.

        The problem is the preferences for the lists on the system is same.

        Could it be somewhere but I don’t know yet.

        Cheers,

        Raff

        (0) 
        1. Tom Cenens Post author

          Hi Raff

          Mmm, I don’t know and I don’t have it running anymore so it’s difficult to tell you. If you change the preferences, the values do not remain?

          Kind regards

          Tom

          (0) 
          1. Raffaello Rodiman

            Yep,

            I think I need to dig around on this ๐Ÿ™‚ .

            If I change the preferences from one of the widget, it will reflect on both widget.

            Cheers,

            Raff

            (0) 
  3. Alexey Maksimenko

    Hi Tom! Is there any chance to make the rows in table higher and wider? I want to make this widget bigger, but can not find how to change the size of area with system list.

    (0) 
    1. Tom Cenens Post author

      Hi Alexey

      I bet the answer is yes but I don’t have the widget installed anymore ๐Ÿ™‚ .

      The Yahoo widget engine is also “obsolete” by now and no longer available from any official source.

      You would have to check coding / css to see if you can change it but it should be possible.

      Best regards

      Tom

      (0) 

Leave a Reply