Skip to content

Commit

Permalink
fix some eks typescript and hide cluster name when no credential
Browse files Browse the repository at this point in the history
  • Loading branch information
mantis-toboggan-md committed Apr 8, 2024
1 parent dd78769 commit 90da017
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 2 additions & 4 deletions pkg/eks/components/AccountAccess.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import LabeledSelect from '@shell/components/form/LabeledSelect.vue';
import SelectCredential from '@shell/edit/provisioning.cattle.io.cluster/SelectCredential.vue';
import { DEFAULT_REGION } from './CruEKS.vue';
import { mapGetters } from 'vuex';
import { AWS } from 'types';
export default defineComponent({
name: 'EKSAccountAccess',
Expand Down Expand Up @@ -71,7 +72,7 @@ export default defineComponent({
try {
const ec2Client = await this.$store.dispatch('aws/ec2', { region, cloudCredentialId: credential });
const res = await ec2Client.describeRegions({});
const res: {Regions: AWS.EC2Region[]} = await ec2Client.describeRegions({});
this.regions = (res?.Regions || []).map((r) => r.RegionName);
} catch (err) {
Expand Down Expand Up @@ -164,9 +165,6 @@ export default defineComponent({
&>.select-credential-container{
flex-basis: 50%;
// display:flex;
// flex-direction: column;
// flex-grow: 1;
&>.select-credential{
flex-grow: 1;
Expand Down
5 changes: 4 additions & 1 deletion pkg/eks/components/CruEKS.vue
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,10 @@ export default defineComponent({
@finish="save"
@cancel="done"
>
<div class="row mb-10">
<div
v-if="hasCredential"
class="row mb-10"
>
<div class="col span-6">
<LabeledInput
required
Expand Down
4 changes: 4 additions & 0 deletions pkg/eks/types/aws-sdk.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,7 @@ export interface EKSAddon {
}[]
}[]
}

export interface EC2Region {
RegionName: string
}

0 comments on commit 90da017

Please sign in to comment.