The man suffered a fractured jaw, an open wound to the head, brain swelling and bruising, other cuts and spent two weeks in hospital.
After the attack, police launched a public search for Panui and asked for help finding him but warned he was dangerous.
Prosecutor for the police, John Kang, said at sentencing at the Waitakere District Court this afternoon that the offending was violent, pre-meditated and the assault caused serious injuries to the victim.
Panui had also deliberately disregarded the protection orders from the court by breaching them numerous times, Kang said.
Panui's lawyer Peter Boylan said the defendant had an issue with methamphetamine and admitted it had caused him problems.
"The over-arching behaviour here is methamphetamine."
Boylan said Panui was a father of three daughters, a skilled floor layer and wanted to come out of prison as a positive and contributing member of the community.
He asked that the sentence not be so long that it "seems impossible to him".
Panui wanted a chance to prove to the court, the community and his ex-partner that he could "grow up" and be a father to his children.
"He understands that drugs are the evil that have controlled him and he has to put those behind him."
Judge Belinda Pidwell said Panui's offending and its ongoing nature showed he was "simply not able to control yourself".
"I need to send a message to you that you understand."
Judge Pidwell sentenced Panui to a sentence of three years and three months' imprisonment.