-- Independent detection configuration. No detector, task, device or result rows. -- Keep historical method permissions for task selection; hide its old external editor. UPDATE `system_menu` SET `visible`=b'0' WHERE `id`=20060; INSERT INTO `system_menu` (`id`,`name`,`permission`,`type`,`sort`,`parent_id`,`path`,`icon`,`component`,`component_name`,`status`,`visible`,`keep_alive`,`always_show`,`creator`,`updater`,`deleted`) VALUES (20900,'检测配置','',1,5,0,'/lab/detection-item','ep:cpu',NULL,NULL,0,b'1',b'1',b'1','bootstrap','bootstrap',b'0'), (20901,'检测项','lab:detection-item:query',2,1,20900,'index','ep:connection','lab/detection-item/index','LabDetectionItem',0,b'1',b'1',b'1','bootstrap','bootstrap',b'0'), (20902,'创建检测项','lab:detection-item:create',3,1,20901,'','','',NULL,0,b'1',b'1',b'1','bootstrap','bootstrap',b'0'), (20903,'编辑检测项','lab:detection-item:update',3,2,20901,'','','',NULL,0,b'1',b'1',b'1','bootstrap','bootstrap',b'0'), (20904,'发布检测项','lab:detection-item:publish',3,3,20901,'','','',NULL,0,b'1',b'1',b'1','bootstrap','bootstrap',b'0'), (20905,'试运行检测项','lab:detection-item:trial',3,4,20901,'','','',NULL,0,b'1',b'1',b'1','bootstrap','bootstrap',b'0') ON DUPLICATE KEY UPDATE `name`=VALUES(`name`),`permission`=VALUES(`permission`),`component`=VALUES(`component`),`visible`=VALUES(`visible`),`deleted`=b'0'; INSERT INTO `system_role_menu` (`role_id`,`menu_id`,`creator`,`updater`,`deleted`,`tenant_id`) SELECT r.role_id,m.id,'bootstrap','bootstrap',b'0',1 FROM (SELECT 910 AS role_id UNION ALL SELECT 911 UNION ALL SELECT 912) r JOIN `system_menu` m ON m.id BETWEEN 20900 AND 20905 WHERE NOT EXISTS (SELECT 1 FROM `system_role_menu` rm WHERE rm.role_id=r.role_id AND rm.menu_id=m.id AND rm.tenant_id=1 AND rm.deleted=0);