// Copyright (c) 2025, JINGROW
// For license information, please see license.txt

jingrow.ui.form.on('Build Metric', {
	refresh(frm) {
		frm.add_custom_button(
			'Get Metrics',
			() => {
				frm.call('get_metrics').then(() => {
					jingrow.msgprint({
						title: __('Get Metrics'),
						indicator: 'green',
						message: __('Getting metrics'),
					});
					frm.refresh();
				});
			},
			__('Actions'),
		);
	},
});
