My read is that the pentagon's war hawks wanted to escalate the violence but he resisted. Now the Times does spin it that he was listening to Tucker Carlson's admonition that if he attacks he will lose the next election... but that is actually sound advice.... and he took it,
Link: https://www.nytimes.com/2019/06/21/us/politics/trump-iran-strike.html?action=click&module=Top%20Stories&pgtype=Homepage