AuScope / seed-vault

Other
2 stars 0 forks source link

Selectbox for Waveform Client #110

Closed bmotevalli closed 2 weeks ago

bmotevalli commented 2 weeks ago

Waveform page also requires selecting client. However, it should default to what is being selected in station page.

bmotevalli commented 2 weeks ago

@laughing0li I looked into the code you checked in (waveform.py). The selectbox for waveform client is not right (See below image). The selected_client is idle and hence the selected client does not seem to get into effect. You should assign the value to the waveform client in the settings (check SeismoLoaderSettings class). Also, the value that you get and assign to index should not come from event client. In the selectbox, it actually should come from the waveform client. Meanwhile, to set the waveform client initially to what is set for station client, you should set that in the prior step to waveform, when user clicks "Next" button (see workflows_combined.py)

image

Also, we no more have SeismoClients enums as we are directly getting the clients from obspy. Please have a look at base.py to see how the client_options are now populated (see below).


client_options = list(self.settings.client_url_mapping.keys())
                self.settings.station.client = st.selectbox(
                    'Choose a client:', client_options, 
                    index=client_options.index(self.settings.station.client), 
                    key="event-pg-client-station"
                )
bmotevalli commented 2 weeks ago

@laughing0li, I just did this myself. Forget about it.