Skip to content

Commit

Permalink
fix(aws): Component for additional security group details (#7803)
Browse files Browse the repository at this point in the history
* Additional Security Group Details Component

* fixup: update module name

* PR feedback

* fix module imports

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
aravindmd and mergify[bot] committed Jan 24, 2020
1 parent 821b82f commit 35fcebb
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ angular
'securityGroup',
'$controller',
function($scope, $uibModalInstance, $state, application, securityGroup, $controller) {
$scope.self = $scope;
$scope.pages = {
ingress: require('./createSecurityGroupIngress.html'),
};
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ module(AMAZON_SECURITYGROUP_CONFIGURE_CONFIGSECURITYGROUP_MIXIN_CONTROLLER, [
function($scope, $state, $uibModalInstance, application, securityGroup, securityGroupReader, cacheInitializer) {
let allSecurityGroups;
const ctrl = this;
$scope.self = $scope;
$scope.application = application;

$scope.state = {
submitting: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@
</p>
</div>
</div>
<additional-ip-rules security-group-details="securityGroupDetails"></additional-ip-rules>
<security-group-details-custom security-group-details="securityGroup" ctrl="ctrl" scope="self" />
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { module } from 'angular';
import { react2angular } from 'react2angular';
import { SecurityGroupDetailsCustom } from './securityGroupDetailsCustom';

export const AWS_SECURITY_GROUP_DETAILS_CUSTOM = 'spinnaker.amazon.securityGroups.details.custom.component';
module(AWS_SECURITY_GROUP_DETAILS_CUSTOM, []).component(
'securityGroupDetailsCustom',
react2angular(SecurityGroupDetailsCustom, ['securityGroupDetails', 'ctrl', 'scope']),
);
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import { ISecurityGroupDetail } from '@spinnaker/core';

export interface IAdditionalIpRulesProps {
securityGroupDetails: ISecurityGroupDetail;
ctrl: any;
scope: any;
}

@Overridable('aws.securityGroup.additional.ipRules')
export class AdditionalIpRules extends React.Component<IAdditionalIpRulesProps> {
@Overridable('aws.securityGroup.details.custom')
export class SecurityGroupDetailsCustom extends React.Component<IAdditionalIpRulesProps> {
public render(): any {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { AMAZON_SECURITYGROUP_CONFIGURE_EDITSECURITYGROUPCTRL } from './configur
import { AMAZON_SECURITYGROUP_DETAILS_SECURITYGROUPDETAIL_CONTROLLER } from './details/securityGroupDetail.controller';
import { AMAZON_SECURITYGROUP_SECURITYGROUP_TRANSFORMER } from './securityGroup.transformer';
import { AWS_SECURITY_GROUP_IP_RANGE_RULES } from './details/securityGroupIpRangeRules.component';
import { AWS_SECURITY_GROUP_ADDITIONAL_IP_RULES } from 'amazon/securityGroup/configure/additionalIpRules.component';
import { AWS_SECURITY_GROUP_DETAILS_CUSTOM } from './configure/securityGroupDetailsCustom.component';

export const AWS_SECURITY_GROUP_MODULE = 'spinnaker.amazon.securityGroup';
module(AWS_SECURITY_GROUP_MODULE, [
Expand All @@ -22,5 +22,5 @@ module(AWS_SECURITY_GROUP_MODULE, [
AMAZON_SECURITYGROUP_DETAILS_SECURITYGROUPDETAIL_CONTROLLER,
AMAZON_SECURITYGROUP_SECURITYGROUP_TRANSFORMER,
AWS_SECURITY_GROUP_IP_RANGE_RULES,
AWS_SECURITY_GROUP_ADDITIONAL_IP_RULES,
AWS_SECURITY_GROUP_DETAILS_CUSTOM,
]);
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export interface IRangeRule {
endPort: number;
}>;
protocol: string;
description: string;
}

export interface ISecurityGroupRule extends IRangeRule {
Expand Down

0 comments on commit 35fcebb

Please sign in to comment.