mirror of
https://github.com/itsdave-de/msp.git
synced 2025-05-06 15:35:12 +02:00
Admin Interface and monitoring links
This commit is contained in:
parent
bea7f7c2fe
commit
48ca998883
@ -2,7 +2,19 @@
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('IT Object', {
|
||||
// refresh: function(frm) {
|
||||
|
||||
// }
|
||||
refresh: function(frm) {
|
||||
if (frm.doc.admin_interface_link) {
|
||||
frm.add_custom_button('Open Admin Interface', () => frm.trigger('open_admin_interface'), 'Actions');
|
||||
};
|
||||
if (frm.doc.monitoring_link) {
|
||||
frm.add_custom_button('Open Monitoring', () => frm.trigger('open_monitoring'), 'Actions');
|
||||
};
|
||||
},
|
||||
open_admin_interface: function(frm) {
|
||||
window.open(frm.doc.admin_interface_link, '_blank').focus();
|
||||
},
|
||||
open_monitoring: function(frm) {
|
||||
window.open(frm.doc.monitoring_link, '_blank').focus();
|
||||
},
|
||||
|
||||
});
|
||||
|
@ -21,7 +21,10 @@
|
||||
"description",
|
||||
"image",
|
||||
"network_config_section",
|
||||
"ip_adresses"
|
||||
"ip_adresses",
|
||||
"external_links_section",
|
||||
"monitoring_link",
|
||||
"admin_interface_link"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
@ -118,11 +121,27 @@
|
||||
"fieldtype": "Table",
|
||||
"label": "IP Adresses",
|
||||
"options": "IT Object IP Address"
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "external_links_section",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "External Links"
|
||||
},
|
||||
{
|
||||
"fieldname": "monitoring_link",
|
||||
"fieldtype": "Data",
|
||||
"label": "Monitoring Link"
|
||||
},
|
||||
{
|
||||
"fieldname": "admin_interface_link",
|
||||
"fieldtype": "Data",
|
||||
"label": "Admin Interface Link"
|
||||
}
|
||||
],
|
||||
"image_field": "image",
|
||||
"links": [],
|
||||
"modified": "2022-06-17 11:18:55.707924",
|
||||
"modified": "2022-06-17 11:43:07.550361",
|
||||
"modified_by": "Administrator",
|
||||
"module": "MSP",
|
||||
"name": "IT Object",
|
||||
|
Loading…
x
Reference in New Issue
Block a user