Lagrange's radio, part 2

Can you derive the equation of motion of the \(LC\)-circuit from the Lagrange function by a variational principle and show that it is solved by harmonic solutions? Imagine now, that there’s a resistance \(R\) in the circuit, would there still be a Lagrangian description? Is there an interpretation of the canonical momentum?