diff --git a/app/scripts/modules/amazon/src/securityGroup/configure/EditSecurityGroupCtrl.js b/app/scripts/modules/amazon/src/securityGroup/configure/EditSecurityGroupCtrl.js index c0bf89fe1ea..823abed7c46 100644 --- a/app/scripts/modules/amazon/src/securityGroup/configure/EditSecurityGroupCtrl.js +++ b/app/scripts/modules/amazon/src/securityGroup/configure/EditSecurityGroupCtrl.js @@ -18,6 +18,7 @@ angular 'securityGroup', '$controller', function($scope, $uibModalInstance, $state, application, securityGroup, $controller) { + $scope.self = $scope; $scope.pages = { ingress: require('./createSecurityGroupIngress.html'), }; diff --git a/app/scripts/modules/amazon/src/securityGroup/configure/additionalIpRules.component.ts b/app/scripts/modules/amazon/src/securityGroup/configure/additionalIpRules.component.ts deleted file mode 100644 index fbdb04582d6..00000000000 --- a/app/scripts/modules/amazon/src/securityGroup/configure/additionalIpRules.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { module } from 'angular'; -import { react2angular } from 'react2angular'; -import { AdditionalIpRules } from './additionalIpRules'; - -export const AWS_SECURITY_GROUP_ADDITIONAL_IP_RULES = - 'spinnaker.amazon.securityGroups.details.securityGroups.additionalIpRules.component'; -module(AWS_SECURITY_GROUP_ADDITIONAL_IP_RULES, []).component( - 'additionalIpRules', - react2angular(AdditionalIpRules, ['securityGroupDetails']), -); diff --git a/app/scripts/modules/amazon/src/securityGroup/configure/configSecurityGroup.mixin.controller.js b/app/scripts/modules/amazon/src/securityGroup/configure/configSecurityGroup.mixin.controller.js index 714914ca2d7..dd819049ccd 100644 --- a/app/scripts/modules/amazon/src/securityGroup/configure/configSecurityGroup.mixin.controller.js +++ b/app/scripts/modules/amazon/src/securityGroup/configure/configSecurityGroup.mixin.controller.js @@ -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, diff --git a/app/scripts/modules/amazon/src/securityGroup/configure/createSecurityGroupIngress.html b/app/scripts/modules/amazon/src/securityGroup/configure/createSecurityGroupIngress.html index 67f92c9202f..e4167a06fa8 100644 --- a/app/scripts/modules/amazon/src/securityGroup/configure/createSecurityGroupIngress.html +++ b/app/scripts/modules/amazon/src/securityGroup/configure/createSecurityGroupIngress.html @@ -95,6 +95,6 @@

- + diff --git a/app/scripts/modules/amazon/src/securityGroup/configure/securityGroupDetailsCustom.component.ts b/app/scripts/modules/amazon/src/securityGroup/configure/securityGroupDetailsCustom.component.ts new file mode 100644 index 00000000000..c4c90eef522 --- /dev/null +++ b/app/scripts/modules/amazon/src/securityGroup/configure/securityGroupDetailsCustom.component.ts @@ -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']), +); diff --git a/app/scripts/modules/amazon/src/securityGroup/configure/additionalIpRules.tsx b/app/scripts/modules/amazon/src/securityGroup/configure/securityGroupDetailsCustom.tsx similarity index 61% rename from app/scripts/modules/amazon/src/securityGroup/configure/additionalIpRules.tsx rename to app/scripts/modules/amazon/src/securityGroup/configure/securityGroupDetailsCustom.tsx index f161ee584c8..797807d397d 100644 --- a/app/scripts/modules/amazon/src/securityGroup/configure/additionalIpRules.tsx +++ b/app/scripts/modules/amazon/src/securityGroup/configure/securityGroupDetailsCustom.tsx @@ -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 { +@Overridable('aws.securityGroup.details.custom') +export class SecurityGroupDetailsCustom extends React.Component { public render(): any { return null; } diff --git a/app/scripts/modules/amazon/src/securityGroup/securityGroup.module.ts b/app/scripts/modules/amazon/src/securityGroup/securityGroup.module.ts index df1926c80d8..05bbafea64b 100644 --- a/app/scripts/modules/amazon/src/securityGroup/securityGroup.module.ts +++ b/app/scripts/modules/amazon/src/securityGroup/securityGroup.module.ts @@ -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, [ @@ -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, ]); diff --git a/app/scripts/modules/core/src/securityGroup/securityGroupReader.service.ts b/app/scripts/modules/core/src/securityGroup/securityGroupReader.service.ts index a221c75aefd..16d2b945ee4 100644 --- a/app/scripts/modules/core/src/securityGroup/securityGroupReader.service.ts +++ b/app/scripts/modules/core/src/securityGroup/securityGroupReader.service.ts @@ -42,6 +42,7 @@ export interface IRangeRule { endPort: number; }>; protocol: string; + description: string; } export interface ISecurityGroupRule extends IRangeRule {