fix(cockpit/diagram): fix compile failure in directive