Skip to content

Commit

Permalink
fix(provider/cf): fix env variables section (#8549)
Browse files Browse the repository at this point in the history
  • Loading branch information
zachsmith1 committed Sep 8, 2020
1 parent 7c064c7 commit 680906f
Showing 1 changed file with 4 additions and 7 deletions.
@@ -1,10 +1,7 @@
import React from 'react';

import { isEmpty, map } from 'lodash';
import { isEmpty } from 'lodash';

import { CollapsibleSection } from '@spinnaker/core';

import { ICloudFoundryEnvVar } from 'cloudfoundry/domain';
import { ICloudFoundryServerGroupDetailsSectionProps } from './ICloudFoundryServerGroupDetailsSectionProps';

export class EvironmentVariablesSection extends React.Component<ICloudFoundryServerGroupDetailsSectionProps> {
Expand All @@ -19,11 +16,11 @@ export class EvironmentVariablesSection extends React.Component<ICloudFoundrySer
{!isEmpty(serverGroup.env) && (
<CollapsibleSection heading="Environment Variables" defaultExpanded={true}>
<dl className="dl-horizontal dl-flex">
{map(serverGroup.env, (obj: ICloudFoundryEnvVar, index: number) => {
{Object.entries(serverGroup.env).map(([k, v], index) => {
return (
<div key={index}>
<dt>{obj.key}</dt>
<dd>{obj.value}</dd>
<dt>{k}</dt>
<dd>{v}</dd>
</div>
);
})}
Expand Down

0 comments on commit 680906f

Please sign in to comment.