Skip to Content
Author's profile photo Tom Cenens

Solution Manager 7.1 Return of the widget – Code in additional systems

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!


Assigned Tags

      18 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Otto Nanassi
      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

      Author's profile photo Tom Cenens
      Tom Cenens
      Blog Post Author

      Hi Otto

      You can simple rename to .zip and unpack it.

      Best regards

      Tom

      Author's profile photo Manuel Martins
      Manuel Martins

      Hi all,

      Do you know if the widget is still available on SP12? Or something comparable?

      Regards,

      MM

      Author's profile photo Tom Cenens
      Tom Cenens
      Blog 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

      Author's profile photo Raffaello Rodiman
      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

      Author's profile photo Tom Cenens
      Tom Cenens
      Blog 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

      Author's profile photo Raffaello Rodiman
      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

      Author's profile photo Tom Cenens
      Tom Cenens
      Blog 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

      Author's profile photo Raffaello Rodiman
      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

      Author's profile photo Former Member
      Former Member

      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.

      Author's profile photo Tom Cenens
      Tom Cenens
      Blog 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

      Author's profile photo Former Member
      Former Member

      Hi Tom! Thank you! It was not so easy, but I did it. Now it's bigger and more readable.

      Новый точечный рисунок (2).png

      Author's profile photo Yogesh Patel
      Yogesh Patel

      Hello Alexey,

      Can you please tell me how did you get to this widget?

      Thanks

      Yogesh

      Author's profile photo Former Member
      Former Member

      Hi Yogesh! What do you mean?

      From this /wp-content/uploads/2015/12/endresult_231222.jpg

      to this /wp-content/uploads/2015/12/_d0_9d_d0_be_d0_b2_d1_8b_d0_b9__d1_82_d0_be_d1_87_d0_b5_d1_87_d0_bd_d1_8b_d0_b9__d1_80_d0_b8_d1_81_d1_83_d0_bd_d0_be_d0_ba__282_29_842571.png ???

      Author's profile photo Yogesh Patel
      Yogesh Patel

      Yea, We are on SAP Solution manager 7.1 SPS 13 so I thought this is something new.

      -Yogesh

      Author's profile photo Tom Cenens
      Tom Cenens
      Blog Post Author

      In SolMan 7.2 you'll have better options again 🙂

      Author's profile photo Former Member
      Former Member

      Yes, we too. But while we're waiting for 7.2 we decided to make "material design" for this old stuff. 🙂

      Author's profile photo Yogesh Patel
      Yogesh Patel

      Config.xml file needs to be changed as below

      Thanks

      Yogesh