Rev 7278 | Blame | Compare with Previous | Last modification | View Log | RSS feed
-- Generate a table of build machines that are available-- Exclude those that users cannot configure-- Mark as selected any machine that matches :bmcon_id-- Mark as disabled any machine that is already in use by :rtag_id, except :bmcon_id---- Generate data suitable for filling in a MultiCombo BoxSELECT AllMachines.BMCON_ID, AllMachines.display_name, AllMAchines.GBE_VALUE, AllMachines.DESCRIPTION,CASEWHEN AllMachines.selected is not NULL THEN 'selected available'WHEN InUse.BMCON_ID is not NULL THEN 'disabled'ELSE 'available'END as state,AllMachines.selected, NVL2(InUse.BMCON_ID, ' disabled', ' available') AS availableFROM(SELECT bm.bmcon_id, display_name, gbe_value,COALESCE(SUBSTR(description,1,INSTR(description,CHR(10),1,1)),description) AS description,DECODE(:bmcon_id, bm.bmcon_id, 'selected', NULL) AS SELECTEDFROM build_machine_config bm, gbe_machtype gbWHERE bm.gbe_id = gb.gbe_idAND (bm.active = 'Y' OR bm.bmcon_id = :bmcon_id )) AllMachines,(SELECT BMCON_IDFROM release_config rc, gbe_machtype gbeWHERE rc.rtag_id = :rtag_idAND gbe.gbe_id = rc.gbe_id) InUseWHERE AllMachines.BMCON_ID = InUse.BMCON_ID(+)ORDER BY UPPER(display_name)