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

jingrow.ui.form.on('Ansible Console Log', {
	refresh(frm) {
		frm.add_custom_button(__('Re-Run in Console'), () => {
			window.localStorage.setItem(
				'ansible_console_inventory',
				frm.pg.inventory,
			);
			window.localStorage.setItem('ansible_console_command', frm.pg.command);
			jingrow.set_route('Form', 'Ansible Console');
		});
	},
});
