var initial_backend_states = {
    [% FOREACH pd IN backends %]'[% pd %]': '[% backend_detail.$pd.state %]'[% UNLESS loop.last %], [% END %][% END %]
};
var initial_backends = {
    [% FOREACH pd IN backends +%]
      '[% pd %]': {
        key:              '[% pd %]',
        name:             '[% backend_detail.$pd.name %]',
        state:            '[% backend_detail.$pd.state %]',
        version:          '[% IF pi_detail.exists(pd) && pi_detail.$pd.exists('program_version') %][% pi_detail.$pd.program_version %][% END %]',
        data_src_version: '[% IF pi_detail.exists(pd) && pi_detail.$pd.exists('data_source_version') %][% pi_detail.$pd.data_source_version %][% END %]',
        program_start:    '[% IF pi_detail.exists(pd) && pi_detail.$pd.exists('program_start') %][% pi_detail.$pd.program_start %][% END %]'
      }[% UNLESS loop.last %],[% END +%]
    [% END +%]
};
