Very cool!
So basically reading CPProdUtil and adding that great information to SmartConsole - I like! And you can probably extend it to additional buttons that take data from CPProdUtil and that you find useful.
If this was just a regular gateway, not a cluster, you could also get it from the Management API Command "show simple-gateway" and the property vpn-settings.vpn-domain https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/show-simple-gateway~v1.6%20
I also like the many validations that you added, such as no relevant gateways.
Worth to mention this requires R80.30 and above. Below that version, we get this:
... another reason to upgrade already 😀 R80.30 is the most popular version already.
Might be better if you include a "welcome" / "please go to Gateways page and find a new tab called VPN Topology" type of page after I click OK.
You do that by adding this to your manifest:
{
"location": "post-enable-popup",
"relevant-types": ["extension"],
"ui-element": {
"caption": "My Fancy Extension",
"tooltip": "",
"action": {
"browser-window": {
"height": "320",
"width": "600"
},
"details-level": "uid",
"method": "get",
"trigger-id": "post-installation-popup",
"url": "instructions.html"
}
}
}],
I then went to the Gateways page and found the new bottom pane with the button. I can see why you made that button - because clicking it pops up a request to commit changes so it's definitely better to have it only happening when the user clicks a button.
If I click "cancel" and don't approve the change the button changes its text to "{" so you may want to handle that as well