diff --git a/components/crowdstrike-block.js b/components/crowdstrike-block.js index e6f4114..63ea2d8 100644 --- a/components/crowdstrike-block.js +++ b/components/crowdstrike-block.js @@ -50,6 +50,13 @@ polarity.export = PolarityComponent.extend({ actions: { changeTab: function (tabName) { this.set('activeTab', tabName); + + // If there is only one device, select it in the drop down automatically + if(tabName === 'rtr' && this.get('details.hosts.devices.length') === 1){ + const selectedDevice = this.get('details.hosts.devices.0') + this.set('state.rtr.selectedDevice', selectedDevice); + this.set('state.rtr.selectedDeviceId', selectedDevice.device_id); + } }, changeScriptTab: function (tabName) { if (this.get('activeScriptTab') === tabName) { diff --git a/package-lock.json b/package-lock.json index 39c8ced..9eeedb6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "crowdstrike", - "version": "3.7.1", + "version": "3.7.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 8dc62c5..3999dee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "crowdstrike", - "version": "3.7.1", + "version": "3.7.2", "main": "./integration.js", "private": true, "license": "MIT", diff --git a/templates/crowdstrike-block.hbs b/templates/crowdstrike-block.hbs index e42fafa..19908ba 100644 --- a/templates/crowdstrike-block.hbs +++ b/templates/crowdstrike-block.hbs @@ -594,7 +594,7 @@ > {{#each details.hosts.devices as |device|}} - + {{/each}} {{fa-icon icon="chevron-down" fixedWidth=true class="select-arrow"}} @@ -684,7 +684,7 @@