File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ export default Vue.extend({
1616 }
1717 },
1818 mounted() {
19- this .fetch_available_interfaces_task .setAction (this .fetchAvailableInterfaces )
19+ this .fetch_available_interfaces_task .setAction (this .fetchAvailableEthernetInterfaces )
2020 },
2121 methods: {
22- async fetchAvailableInterfaces (): Promise <void > {
23- await ethernet .getAvailableInterfaces ()
22+ async fetchAvailableEthernetInterfaces (): Promise <void > {
23+ await ethernet .getAvailableEthernetInterfaces ()
2424 .then ((response ) => {
2525 ethernet .setInterfaces (response .data )
2626 })
Original file line number Diff line number Diff line change @@ -166,6 +166,21 @@ class EthernetStore extends VuexModule {
166166 url : `${ this . API_URL } /interfaces` ,
167167 // Necessary since the system can hang with dhclient timeouts
168168 timeout : 10000 ,
169+ } )
170+ . catch ( ( error ) => {
171+ this . context . commit ( 'setInterfaces' , [ ] )
172+ notifier . pushBackError ( 'AVAILABLE_INTERFACES_FETCH_FAIL' , error )
173+ throw error
174+ } )
175+ }
176+
177+ @Action
178+ async getAvailableEthernetInterfaces ( ) {
179+ return await back_axios ( {
180+ method : 'get' ,
181+ url : `${ this . API_URL } /ethernet` ,
182+ // Necessary since the system can hang with dhclient timeouts
183+ timeout : 10000 ,
169184 } )
170185 . catch ( ( error ) => {
171186 this . context . commit ( 'setInterfaces' , [ ] )
You can’t perform that action at this time.
0 commit comments