Adding items to ISPmanager menu
We've been going through the docs on how to add items to the ISPmanager menu and we have one problem and one recommendation:
1) The docs state this: "As a category name use the value of the name attribute of the XML-node node for appropriate category of the navigation menu described in /usr/local/ispmgr/etc/ispmgr_menu.xml." Unfortunately there's no such file on the server. We're guessing that in the example "tool" isn't a valid name as we don't seem to be getting the menu item showing up in ISPmanager, but since that noted file doesn't exist, we have no idea what the value needs to be. 2) In the sample code on the docs page (and the supplied .xml files in the /usr/local/ispmgr/etc/ directory), can you please make sure each element is on a new line. Having all of the elements on one line makes it very difficult to go through the code, and in the case of supplied language files such as /usr/local/*mgr/etc/*.xml, it is very necessary, as we clean up some of the badly-translated content, grammatical errors, etc., and properly having the elements one-to-a-line will greatly help in running diffs between old and new versions of the originals so we can determine what lines need to update in our versions of those files (in case new elements are added, old elements have name changes, etc.). Thank you in advance. The sooner we can get an answer to #1, the sooner we can continue our testing, so please assist ASAP. |
1) Unfortunately, there is old offline version of documentation in ISPmanager. Now you can see revised version of documentation at http://www.ispsystem.com/en/software...documentation/. But at the present time there isn't any information about ISPmanager API on this website.
Information about menu levels is located in /usr/local/ispmgr/etc/ispmgr.xml file. What are your working hours? We have a difference in time zones, I'll try answer on your questions ASAP. 2) Do you mean "Nodes are placed on new lines and their values are placed on the same lines"? We store all nodes on new lines. Also we handle these *.xml files (look for changes, mistakes and etc.). This is not a problem. |
Quote:
We've made some progress on this topic and have created our test scenario of adding an item; however, the docs are very lacking in the toolbar button to column data area. We've managed to get the column data via a CGI to present the XML data properly, but we cannot seem to figure out how to interact with the toolbar buttons. Essentially, we have 3 buttons (start/stop/restart) and the column data present a single line of information. We cannot figure out how to have the buttons interact with that data. When the page loads, all buttons are disabled, and when we click on the single item in the column data, the buttons activate, but if we click on any of the buttons, nothing happens. What is actually going on behind the scenes when a button is created, i.e., what kind of POST/GET request is made and with what specific data? Ideally, we'd like for the system to recognize that the item is 'running' (we have a status in one of our columns) and then only activate the stop/restart buttons if it is running. If the status is reporting 'stopped', then only the start/restart buttons activate. But of course, before we can even pursue that possibility, we just need the buttons to actually work. Quote:
--- ... </message><messages name="messagesname1"> <msg name="msgname1">String for name1</msg> <msg name="msgname2">String for name2</msg> <msg name="msgname3">String for name3</msg><msg name="msgname4">String for name4</msg><msg name="msgname5">String for name5</msg> </message><messages name="messagesname2"> ... --- As you can see above, you have the closing tag for the previous messages element on the same line as the next messages element opening tag, as well as having *3* msg elements on one line. This poses us a problem as in some cases you have more than 100 elements on a single line in the xml files and if just one of them changes between your releases, the diff reports that the line with 100 elements has changed, but we then need to manually review that single line to figure out what actually changed, which is very time-consuming. What we need is for your xml files to cleanly have a single element on each line, such as: --- ... </messages> <messages name="messagesname1"> <msg name="msgname1">String for name1</msg> <msg name="msgname2">String for name2</msg> <msg name="msgname3">String for name3</msg> <msg name="msgname4">String for name4</msg> <msg name="msgname5">String for name5</msg> </messages> <messages name="messagesname2"> ... --- Thank you for your attention to this matter. |
1) I'll write an working example (with extended explanations) and publish it a little bit later.
2) We aren't going to change the current .xml files structure. Quote:
|
Quote:
Quote:
|
This small example reads information about services from /tmp/services.txt and allows to stop/start/edit the services. Also you can add/delete services with the plugin.
1) Add information about services to /tmp/services.txt. For example: httpd /etc/init.d/httpd mysqld /etc/init.d/mysqld 2) The content of ispmgr_mod_myplugin.xml file: Code:
<?xml version="1.0" encoding="UTF-8"?> Quote:
<msg name="msg_service_management_start">Do you really want to start the services?</msg> 3) The content of servstate.pl: Code:
#!/usr/bin/perl Quote:
|
This was helpful; thank you.
However, when we highlight the item in the list and try clicking on any of the toolbar buttons (stop/start/restart), a dialog box just pops up saying "No selection". Any ideas? |
What is being written in the ISPmanager logfile when you press a button?
Each element from the table has the element id (tag <elid>). When you press a button your application sends a request to ISPmanager, the request has to include the tag <elid>element_id</elid>. |
Quote:
|
It's difficult to determine the problem. Write a ticket to our support team (if it's possible, provide an access to the test server).
|
All times are GMT +2. The time now is 01:21 PM. |
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.