Skip to content

Commit

Permalink
Merge in (#38)
Browse files Browse the repository at this point in the history
* feat(amazon/serverGroup): warn that scaling policies will not work when capacity is pinned (spinnaker#4668)

* feat(webhooks): preconfigured webhook params (spinnaker#4669)

adds support for preconfigured webhook parameters. these parameters can
be set in orca's config and are then exposed to users. instead of
expecting users to fillout an entire payload, these parameters can be
used to expose the important parts and abstract the other configuration
away.

* feat(provider/kubernetes): export k8s server group interface (spinnaker#4674)

* chore(provider/kubernetes): bump kubernetes package version (spinnaker#4676)

* chore(amazon): bump package to 0.0.59 (spinnaker#4677)

- feat(amazon/serverGroup): warn that scaling policies will not work when capacity is pinned

* Add/update Travis Slack notifications (spinnaker#4673)

* fix(core): fix restore to this version behavior on pipeline config (spinnaker#4671)

* fix(core/vis): Fix visualizer toggle to clean up old copies of the visualizer (spinnaker#4672)

(cherry picked from commit 4604e0f)

* fix(core/search): Fix instance searches (spinnaker#4670)

* fix(webhooks): default parameters to empty list (spinnaker#4678)

* fix(core/presentation): Add padding to filter sidebar as a scrolling affordance (spinnaker#4679)

* fix(core): surface app data status in views without active states (spinnaker#4675)

* style(amazon/application/projects/pipeline/google/kubernetes): Replacing fa-cog icons with new spinner (spinnaker#4630)

* Replaced cogs with new spinner

* removing space around 'finding' phrases + updating some of the spinners to be larger

* removing unnecessary spaces

* fix(core/search): Fix calling setState on unmounted RecentlyViewedItems (spinnaker#4680)

* fix(amazon/loadBalancers): Fix editing load balancers that are associated with an app that no longer exists (spinnaker#4682)

* fix(provider/kubernetes): Fix label wording (spinnaker#4683)

Artifacts are "bound", not "deployed"

* fix(amazon/loadBalancer): Show region and account when deleting a load balancer (spinnaker#4684)

* refactor(core/search): Reactify SearchV2

* refactor(core/search): Use router state to drive search results.

Remove IFilterType 'modifier' in favor of 'key'; rename 'text' to 'name'

* refactor(core/search): Refactor Search V2.

Simplify interfaces and post-search logic.
Simplify Search v2 service logic.

* perf(core/clusters): use ReactVirtualized to render clusters (spinnaker#4688)

* refactor(amazon/loadBalancer): Make load balancer actions button a react component

* refactor(core): Remove unused function in waypoint service

* feat(core/forms): Create a react version of the checklist component

* feat(core/account): Create react wrapper for account select field

* feat(core/region): Create react version of region select field

* feat(core/entityTag): Create react wrapper for add entity tag links

* feat(core/validation): Add react component for form validation errors

* fix(core): Add loadBalancerWriter to react injector

* refactor(core): remove redundant div from cluster pod wrapper (spinnaker#4690)

* style(pipeline): Fit contents in the debugging section (spinnaker#4622)

* Fixed overflow of long messages in modal

* Using existing break-word class

* chore(amazon): bump package to 0.0.60 (spinnaker#4692)

* chore(core): bump package to 0.0.130 (spinnaker#4693)

* feat(core/search): Show search results as they arrive -- do not wait for all to complete

* refactor(core/search): Switch to ul/li in search tabs. Convert AccountTag to react.

* refactor(core/search): Use flex classes

* chore(core): bump package to 0.0.131

* fix(core/search): Fix external search types for v1 search/global search

* chore(core): bump package to 0.0.132

* fix(core): use small loader instead of nano on task monitor (spinnaker#4699)

* fix(core): reset cluster measure cache when groups update (spinnaker#4698)

* fix(amazon): show load balancer actions menu (spinnaker#4700)

* chore(chore): bump package to 0.0.133 (spinnaker#4701)

* chore(amazon): bump package to 0.0.61 (spinnaker#4702)

* feat(core): Create a react modal wizard (spinnaker#4695)

* fix(core/account): Fix account tag color rendering during scroll/filter operation (spinnaker#4706)

* chore(kayenta): bump deck-kayenta version (spinnaker#4707)

* chore(core): upgrade jQuery to 3.3.1 (spinnaker#4703)

* Added disabled states for button + a button group for buttons to be arranged (spinnaker#4704)

* fix(provider/kubernetes) - manfiests can be provided now through artifacts (spinnaker#4709)

* fix(core): Fix module creation by not using internal type (spinnaker#4712)

* fix(core): handle load failures in entityTags datasource (spinnaker#4708)

* Add watch on the region to update subnets properly (spinnaker#4713)

* fix(core/amazon): wrap spinner size in quotes (spinnaker#4710)

* reverting to cogs for the pipeline saving button (spinnaker#4715)

* chore(core): Ignore styleguide.html changes since it is generated (spinnaker#4714)

* fix(core): Add styleguide.html back since it breaks the docker build (spinnaker#4716)

* chore(amazon): bump package to 0.0.62 (spinnaker#4717)

* chore(core): bump package to 0.0.134 (spinnaker#4718)

* feat(amazon): Convert create load balancer modal to react (spinnaker#4705)

* feat(provider/appengine): Surface container deploy with free text container url or expected artifact (spinnaker#4686)

* chore(kayenta): bump deck-kayenta version (spinnaker#4719)

* feat(provider/kubernetes): v1 subpath UI support (spinnaker#4720)

* feat(core): map editor hidden keys (spinnaker#4721)

* chore(core): bump package version (spinnaker#4722)

* fix(provider/kubernetes): prevent npe in run job stage if no triggers configured (spinnaker#4724)

* chore(amazon): Bump to 0.0.63 (spinnaker#4725)

* fix(provider/gce): Fix search endpoint calls. (spinnaker#4726)

We previously used /search to query the infrastructure caches and
suggest several types of components in the UI. There was a recently
added constraint that requires /search queries to provide a string
>= length 3, which broke our cache queries. This change is a temporary
fix/workaround to fix the contract breakage.

* feat(core): Indicate templated pipelines (spinnaker#4728)

Add an icon to the group header / execution title of pipelines based on templates.

* docs(provider/kubernetes) - Adding additional tool tips around kubernetes v2 provider (spinnaker#4723)

* fix(core): Improved pipeline template tooltip copy (spinnaker#4729)

* feat(core/reactShims): Add angularJS template/controller adapter (spinnaker#4730)

* feat(core/reactShims): Add angularJS template/controller adapter

* feat(core): Add support for react versions of stage details (spinnaker#4731)

* fix(core): append pipeline dropdown to body (spinnaker#4727)

* style(all): Added grids to the main container of the app (spinnaker#4691)

* Using grids for the main container of the page

* Using grids for the main container of the page

* Fixing infrastructure search section with overflow contents

* refactor(core): convert instance list body to React (spinnaker#4733)

* chore(core): bump package to 0.0.136 (spinnaker#4734)

* fix(core/instance): Make navigating to instance details work again post-React-rewrite (spinnaker#4735)

* chore(chore): bump package to 0.0.137

* feat(core/search): Require 3 chars for global search, move to React (spinnaker#4737)

* fix(provider/kubernetes): Disable editing of managed ReplicaSets (spinnaker#4696)

ReplicaSets owned by a Kubernetes controller should be scaled and
edited by using the server group manager to change the controller.

Otherwise the controller that owns the ReplicaSet will immediately
undo the scaling/editing.

Disable scaling and editing if the manifest is owned by a controller,
and include links to the server group manager if there is one.

Allow ReplicaSets to be deleted, but show a warning explaining that
the controller that owns the ReplicaSet may recreate it.

Fixes spinnaker/spinnaker#2211

* fix(provider/kubernetes): add error message when manifest yaml isn't valid (spinnaker#4739)

* Feat(provider/openstack): Add Scheduler Hints and Availability Zone Select (spinnaker#4740)

Update help text for availability zones

* fix(pipelines): Fix polling for manual execution (spinnaker#4743)

Refresh pipeline executions when a manual execution fails, so the
failure is surfaced in the UI. Update polling for executions to look
for the specific execution, rather than looking for all running executions
and filtering in JavaScript.  This fixes a bug leading to infinite
polling if the execution ended up in a non-running status before the
first poll.

* fix(pipelines/help): explains when concurrent pipelines get canceled (spinnaker#4744)

* fix(core/search): Export the new GlobalSearch react component (spinnaker#4750)

* feat(core): allow hidden (but enable-able) data sources (spinnaker#4738)

* fix(details): allow details dropdowns to wrap (at smaller widths). remove clearfix (spinnaker#4748)

* style(pipelines): Remove explicit use of $q.defer (spinnaker#4746)

Small fix to replace explicit use of $q.defer with directly
returning a promise.

* fix(core): allow multiselect toggling on instance checkbox click (spinnaker#4745)

* feat(core/overrideRegistry): Add react component decorators to enable UI overrides (spinnaker#4741)

feat(core/reactShims): Add templateUrl support to AngularJSAdapter react component

* feat(details): Migrate the following to @overridable() decorator: (spinnaker#4749)

- Application Config
- Application Icon

- Target Group Details
- Load Balancer Details
- Instance Details
- Security Group Details
- Server Group Manager Details

* fix(amazon): copy EBS volumes when explicitly cloning an ASG (spinnaker#4754)

* fix(core): eagerly fetch more than one cluster grouping pod (spinnaker#4753)

* refactor(core): limit calls to /credentials (spinnaker#4752)

* feat(dryrun): added a checkbox to let users dry run pipelines (spinnaker#4747)

* chore(core): bump package to 0.0.138 (spinnaker#4755)

* fix(provider/kubernetes): remove a trailing 'for' from title (spinnaker#4756)

* fix(core): consistent button sizing in details panels (spinnaker#4757)

* feat(dryrun): made dry run a flag on the trigger rather than a different type (spinnaker#4761)

See spinnaker/orca#1931

* fix(core/search): Vertically center spinners and 'no results found' messages (spinnaker#4758)

* feat(core/serverGroup): Prepare for Reactification of provider server group details

* feat(amazon/serverGroups): Convert server group details to react

* chore(core): Bump module to 0.0.139

* chore(amazon): Bump module to 0.0.64

* fix(core/cluster): Vertically align icons and make them the same size (spinnaker#4764)

My OCD was hurting

* fix(amazon): restore server group actions (spinnaker#4765)

* chore(amazon): bump package to 0.0.65 (spinnaker#4767)

* fix(core): handle challengeDestructiveActions being undefined in API response (spinnaker#4766)

* fix(provider/appengine): dont throw error when git credentials are missing (spinnaker#4768)

* fix(core/search): Remove angular2react bridging of native react component (spinnaker#4763)

* fix(provider/appengine): Spelling mistake (spinnaker#4771)

* fix(provider/kubernetes): stack/detail aren't required (spinnaker#4770)

* feat(core/application): reactify applications search (spinnaker#4759)

* fix(core): shrink tag marker to fit better in cluster header (spinnaker#4773)

* fix(rxjs): switch RxJS deep imports to `import { Foo } from 'rxjs'` (spinnaker#4772)

* fix(core): avoid flickering scrollbars in clusters view (spinnaker#4774)

* fix(core/loadBalancer): Fix create load balancer button for multiple providers.

Fixes spinnaker/spinnaker#2285

* refactor(amazon/loadBalancer): Pull out load balancer create type since it is generic

* refactor(core/search): Clean up GlobalSearch, make state mgmt. way less flaky (spinnaker#4760)

* fix(core): Fix missing wizard section labels (spinnaker#4778)

* fix(core): restore auto-scroll on deep linked server group render (spinnaker#4776)

* feat(core/search): Consolidate search registries and v1/v2 data fetching (spinnaker#4775)

- Refactor ISearchResultType to SearchResultType class

- Remove PostSearchResultSearcherRegistry (consolidate with SearchResultType)
- Remove SearchResultHydratorRegistry (consolidate with SearchResultType)
- Remove ExternalSearchRegistry (consolidate with SearchResultType)

- Migrate ClusterPostSearchResultSearcher and ClusterSearchResultHydrator to a ClustersSearchResultType
- Remove ServerGroupSearchResultHydrator
- Remove ApplicationPostSearchResultSearcher in favor of fetching /search?type=applications
- Migrate individual SearchResultType(s) to classes (i.e., ApplicationSearchResultType)

* Updates based on PR comments, and Add missing SearchResultType files

* chore(amazon): bump package to 0.0.66 (spinnaker#4779)

* chore(core): Bump module to 0.0.140 (spinnaker#4780)

* feat(dryrun): temporarily disable dry run until Orca goes out
  • Loading branch information
dkirillov authored Feb 7, 2018
1 parent cbec540 commit b27eec2
Show file tree
Hide file tree
Showing 405 changed files with 9,861 additions and 6,306 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ build/
dist/
lib/
transpiled/
app/scripts/modules/core/src/styleguide/src/public/
app/scripts/modules/core/src/styleguide/public/

# Test Results
test-results.xml
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ cache:
- node_modules
notifications:
slack:
secure: tiW8Hb82slR0ldYvtoTlF8HDTwrhzgtwFFbCH8yo/1bkHhv9xRK2rF68q+DNDk9+34dDlTs5oOGYHMc8Q27S+qJUWUaj3He0BJhDTnJPaaBSOrbeMbq795hfLdGJLu4sJeTcBQ09ci51/uVl9hrNRalB2pfa/aRGvbPraxS5+TPXZpJf2x4YkMs1unTWOqbF3D1ffhgvh5R7UoqAdx/xfrQsj9aSVTvc1OrwI36vEu+bUMTvSXJ7TrdZ7rb6wR5lgcGJ1Jhk9kwyC4qvXIT09IET2Ubq7lCUwU6IqL6tHh872eRz9pG/ZQMVomlnn1gIyLu/0xI8vgxMx7UJ69ZOpeGbdNuUnEu8x+LJ/qV+O8/oc8m2DnJ9xgJCokPkmL0lv76IHxlU7G4Py6V7p28Kk59h2hCw2NSfAnsnx8pFhdu9imw2QeG5p1ueLCThq6s6tEBAYjBS0uvye6Fv62EJJd5he867aeCfm9IuXUuT33HkM0AwUo3oJuErG3errvIQiuVNK8p5vbZLNp+amBtk2tcquUUbB8g7ui61M+YNKvzGJ1ugYUo3Sp3DyvD3DFIH+kP+w3Gw85c/maYEug1CiAbHn0B2fTWpkiOkRwOrAOwN2uKSVQHW7wmXSeJiU0ggMlwTiJ8LgN/6NckqM029NuRg8TskSeSwdnGMTTCEs00=
rooms:
- secure: nehEpy2+AWBxq5hNwn+PIrjvde0lVzpQeL/NAXxa5gm0Sw/q7t8kN0+LWDKdVOfZBE2e0GEntLo3f2Wy+dJYBGD1ce9PGXgBaHByITEn4A1QFT0aoiyBx8Rd0qSsFZLZZFMO+bQBlA2zp9/FFqAF/S7upBX9XyIwW70nO2gXEftycvf/tOuowDmhrJuwjFm4Sg++Z3s9LoFzzJ5re7hyWhAXz3nxrA32ABq6AXp5ZT96CbYFF53CTw8fep1/U/MTsbOYq+nwTFOeziCPkK7wnFPNzo1gBeXDPmInTxZPq9osimFar2bplLBs2SWQP1XNVZWmSYRVHJY7TDPYLJkRYZXDS3c+NHPe65Sw7e563E/UfhuNio6b7EfUsP615RMtEYAsfzHkTU/4DwUMd3fj5eUUE4Cazg++wV8KX0yz9CWvX5R58uD5lEG0UxxVrmFEDa6AZIrtYimxzLd7TpmZuJmw+Qy7UHwJnPHyIR8A7uZcJHEab4P6urdDs/3Ipu1QIUORUlu7ciMvWD5Ql1mE0qLGzuimaOLWjYryDFH9HAln3X6kq5iapDFzRmFitxZPwah/dAi+KpRAkRd+lg5HSa9K6ZPl8/vq9rv8hTj4fq5sJfjQeaITc+mniMYYMwn+9SN+ERFl6Yu4nRW20a1aCUslj2/ZzzjIhB2S+pBhiZY=
- secure: k8v5fOqIji7YPphG/8j/qbbn9BPIJUE6wHBbFhOVrdcdw1TmcleXGRzxXHl7V8yoLbPcvAD1Ff+ao6hrOGT14pzKj3kgUWV8ILMV9FPTLRBff9AysHBFkoUsHj8QgswXbEZv8rDIbtzwwE4LLUJi/9RZUTT2me+v4bfAqAbCATwIXzoxWNl2E8ls6/AdAgKwVjgpm93CCEdPWG/71dAXyYgHCjaUtfZvOiSNAIcYukCUI7x3qd8x/kDfE69yPaebW7kGrflf8XUaZYRbKNkPfAcCNgJTmXFgz36znoFd7LxwjzsX2D4VyMLPwKJz0kOZS5zYv25CtuQ75m5j3I6HtciozxZzjiJwUSiSJ2Nn5khdcC16dQxQUypYxOxfWBjSRT+of8qzVT2eueRDnrerSu2c4AxpTSalWXYfBlxJJiuFdg2fVJv1PbgYR/oMPG1ePDZuvmw2scb82WXiAICpMYBlS4diYYmSQ37xXvTaXGejSu6yn1lz+ULYggGFyUuz8qILaM01TpyUMO/66qof7ppdKtJq6rrKzeKKS87JiNcTzJ604e74KC5MdFerPaHbcihgElFho6n7mOhhPTOVdwGORzzMJScJrNO7Nz7FIHwZfL7jh5y+gGeoz9nUJWRQRAq3YhbsLSxZo2QIBDoju2xzKFTFxl1Q4z80WsEp0gE=
env:
global:
- secure: B3KkWCFv2I+fqAIL6NcfK6is+CrTTsrhTOxRjD1DwnqduxfGOjrS+3qVD8NfIGx7O3MsCk0CCnz1xqiOFrLERf8elhCuEuVjumSpt9VZwpsd+hKmNQeuVoFABB1hlZrHdr2rDH17KVT+TgWNTDSt9Mk3cvRAq+j2BxOHxZXDi59PiVaRGiiM4/aEBtF0/zWfusGIHRGsouGENJU1Zi6xyt0MChx3SCDL2p5qMduGWYsnnUy4BnHMPBi+pF30mjKTI+9JVrecFRuSFezh+MEE67ZiJNw/6bAsZ35sPrd/ECEiELwiEUekpNyXu9/1AxlzaKzrHDnijuZJoEvIaKV8WYwjGjhljF0QNuWGkaKQUcIs4bOKxAY2E62/ZjDbb5J8P3V7k5FD/RHdbVva0A0g7twUNR1vJIk8DFFdY4zqgCRxCyKlQKTdTjk/tV/PjxX5MAQT5J6/OgNLohA8tLRN72xvnDd9XFaKV9RJW23a4xGNUBH24wn1Od11lqR2ZU6/oejXqSojee8IgsjcCXypwW0ZS6OAOjybjxlt/n0av4MKnLFaEmUvxRP26gGJ1H8nfgNCnsLAH9UD1y1XT3VmU7g32cv8AUKyxhh/IgBG2qiqjVNaWvqK8YrepnR0Rbti5AnUiLz8QwipWW3g9DUffUWR98Ubjzs3kMzorbRB7rM=
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/modules/amazon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@spinnaker/amazon",
"version": "0.0.58",
"version": "0.0.66",
"main": "lib/lib.js",
"typings": "lib/index.d.ts",
"scripts": {
Expand Down
42 changes: 38 additions & 4 deletions app/scripts/modules/amazon/src/aws.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { AMAZON_APPLICATION_NAME_VALIDATOR } from './validation/applicationName.
import { VPC_MODULE } from './vpc/vpc.module';
import { SUBNET_RENDERER } from './subnet/subnet.renderer';
import { SERVER_GROUP_DETAILS_MODULE } from './serverGroup/details/serverGroupDetails.module';
import { SERVER_GROUP_CONFIGURE_MODULE } from './serverGroup/configure/serverGroup.configure.aws.module';
import { COMMON_MODULE } from './common/common.module';
import { AMAZON_HELP } from './help/amazon.help';

Expand All @@ -19,6 +20,25 @@ import { AmazonLoadBalancersTag } from './loadBalancer/AmazonLoadBalancersTag';
import './deploymentStrategy/rollingPush.strategy';

import './logo/aws.logo.less';
import { AmazonLoadBalancerChoiceModal } from './loadBalancer/configure/AmazonLoadBalancerChoiceModal';

import { AmazonServerGroupActions } from './serverGroup/details/AmazonServerGroupActions';
import { amazonServerGroupDetailsGetter } from './serverGroup/details/amazonServerGroupDetailsGetter';

import {
AdvancedSettingsDetailsSection,
AmazonInfoDetailsSection,
CapacityDetailsSection,
HealthDetailsSection,
LaunchConfigDetailsSection,
LogsDetailsSection,
PackageDetailsSection,
ScalingPoliciesDetailsSection,
ScalingProcessesDetailsSection,
ScheduledActionsDetailsSection,
SecurityGroupsDetailsSection,
TagsDetailsSection,
} from './serverGroup/details/sections';

// load all templates into the $templateCache
const templates = require.context('./', true, /\.html$/);
Expand Down Expand Up @@ -54,6 +74,7 @@ module(AMAZON_MODULE, [
AWS_LOAD_BALANCER_MODULE,
require('./instance/details/instance.details.controller').name,
AWS_SECURITY_GROUP_MODULE,
SERVER_GROUP_CONFIGURE_MODULE,
SUBNET_RENDERER,
VPC_MODULE,
require('./image/image.reader').name,
Expand All @@ -73,8 +94,22 @@ module(AMAZON_MODULE, [
},
serverGroup: {
transformer: 'awsServerGroupTransformer',
detailsTemplateUrl: require('./serverGroup/details/serverGroupDetails.html'),
detailsController: 'awsServerGroupDetailsCtrl',
detailsActions: AmazonServerGroupActions,
detailsGetter: amazonServerGroupDetailsGetter,
detailsSections: [
AmazonInfoDetailsSection,
CapacityDetailsSection,
HealthDetailsSection,
LaunchConfigDetailsSection,
SecurityGroupsDetailsSection,
ScalingProcessesDetailsSection,
ScalingPoliciesDetailsSection,
ScheduledActionsDetailsSection,
TagsDetailsSection,
PackageDetailsSection,
AdvancedSettingsDetailsSection,
LogsDetailsSection,
],
cloneServerGroupTemplateUrl: require('./serverGroup/configure/wizard/serverGroupWizard.html'),
cloneServerGroupController: 'awsCloneServerGroupCtrl',
commandBuilder: 'awsServerGroupCommandBuilder',
Expand All @@ -90,8 +125,7 @@ module(AMAZON_MODULE, [
transformer: 'awsLoadBalancerTransformer',
detailsTemplateUrl: require('./loadBalancer/details/loadBalancerDetails.html'),
detailsController: 'awsLoadBalancerDetailsCtrl',
createLoadBalancerTemplateUrl: require('./loadBalancer/configure/choice/awsLoadBalancerChoice.modal.html'),
createLoadBalancerController: 'awsLoadBalancerChoiceCtrl',
CreateLoadBalancerModal: AmazonLoadBalancerChoiceModal,
targetGroupDetailsTemplateUrl: require('./loadBalancer/details/targetGroupDetails.html'),
targetGroupDetailsController: 'awsTargetGroupDetailsCtrl',
ClusterContainer: AmazonLoadBalancerClusterContainer,
Expand Down
100 changes: 55 additions & 45 deletions app/scripts/modules/amazon/src/domain/IAmazonLoadBalancer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { IAmazonLoadBalancerSourceData } from './IAmazonLoadBalancerSourceData';
import { ILoadBalancer, ILoadBalancerDeleteCommand, ILoadBalancerUpsertCommand, IInstance, IInstanceCounts, IServerGroup, ISubnet } from '@spinnaker/core';
import { ILoadBalancer, ILoadBalancerDeleteCommand, ILoadBalancerUpsertCommand, IInstance, IInstanceCounts, ISubnet } from '@spinnaker/core';
import { IAmazonServerGroup } from './IAmazonServerGroup';

export type ClassicListenerProtocol = 'HTTP' | 'HTTPS' | 'TCP' | 'SSL';
export type ALBListenerProtocol = 'HTTP' | 'HTTPS';

export interface IAmazonLoadBalancer extends ILoadBalancer {
availabilityZones?: string[];
Expand All @@ -8,15 +12,16 @@ export interface IAmazonLoadBalancer extends ILoadBalancer {
elb?: IAmazonLoadBalancerSourceData;
isInternal?: boolean;
regionZones: string[];
serverGroups: IAmazonServerGroup[];
subnets?: string[];
subnetDetails?: ISubnet[];
subnetType?: string;
}

export interface IClassicListener {
internalProtocol: 'HTTP' | 'HTTPS' | 'TCP' | 'SSL';
internalProtocol: ClassicListenerProtocol;
internalPort: number;
externalProtocol: 'HTTP' | 'HTTPS' | 'TCP' | 'SSL';
externalProtocol: ClassicListenerProtocol;
externalPort: number;
sslCertificateType?: string;
}
Expand Down Expand Up @@ -49,6 +54,7 @@ export interface IALBListenerCertificate {
type: string;
name: string;
}

export interface IALBListener {
certificates: IALBListenerCertificate[];
defaultActions: IListenerAction[];
Expand All @@ -65,8 +71,10 @@ export interface IListenerRule {
priority: number | 'default';
}

export type ListenerRuleConditionField = 'path-pattern' | 'host-header';

export interface IListenerRuleCondition {
field: 'path-pattern' | 'host-header';
field: ListenerRuleConditionField;
values: string[];
}

Expand Down Expand Up @@ -97,12 +105,50 @@ export interface ITargetGroup {
protocol: string;
provider?: string;
region: string; // returned from clouddriver
serverGroups?: IServerGroup[];
serverGroups?: IAmazonServerGroup[];
type: string; // returned from clouddriver
vpcId?: string;
vpcName?: string;
}

export interface IALBListenerDescription {
certificates?: IALBListenerCertificate[];
protocol: 'HTTP' | 'HTTPS';
port: number;
sslPolicy?: string;
defaultActions: IListenerAction[];
rules?: IListenerRule[];
}

export interface IALBTargetGroupDescription {
name: string;
protocol: 'HTTP' | 'HTTPS';
port: number;
attributes: {
// Defaults to 300
deregistrationDelay?: number;
// Defaults to false
stickinessEnabled?: boolean;
// Defaults to 'lb_cookie'. The only option for now, but they promise there will be more...
stickinessType?: 'lb_cookie';
// Defaults to 86400
stickinessDuration?: number;
};
// Defaults to 10
healthCheckInterval?: number;
// Defaults to '200-299'
healthCheckMatcher?: string;
healthCheckPath: string;
healthCheckPort: string;
healthCheckProtocol: 'HTTP' | 'HTTPS';
// Defaults to 10
healthyThreshold?: number;
// Defaults to 5
healthCheckTimeout?: number;
// Defaults to 2
unhealthyThreshold?: number;
}

export interface IAmazonLoadBalancerUpsertCommand extends ILoadBalancerUpsertCommand {
availabilityZones: { [region: string]: string[] };
isInternal: boolean;
Expand All @@ -113,6 +159,7 @@ export interface IAmazonLoadBalancerUpsertCommand extends ILoadBalancerUpsertCom
regionZones: string[];
securityGroups: string[];
subnetType: string;
usePreferredZones?: boolean;
vpcId: string;
}

Expand All @@ -137,45 +184,8 @@ export interface IAmazonClassicLoadBalancerUpsertCommand extends IAmazonLoadBala
unhealthyThreshold?: number;
}


export interface IAmazonApplicationLoadBalancerUpsertCommand extends IAmazonLoadBalancerUpsertCommand {
listeners: {
certificates?: {
certificateArn: string;
name?: string; // Only used while creating the description
type?: string; // Only used while creating the description
}[];
protocol: 'HTTP' | 'HTTPS';
port: number;
sslPolicy?: string;
defaultActions: IListenerAction[];
rules?: IListenerRule[];
}[];
targetGroups: {
name: string;
protocol: 'HTTP' | 'HTTPS';
port: number;
attributes: {
// Defaults to 300
deregistrationDelay?: number;
// Defaults to false
stickinessEnabled?: boolean;
// Defaults to 'lb_cookie'. The only option for now, but they promise there will be more...
stickinessType?: 'lb_cookie';
// Defaults to 86400
stickinessDuration?: number;
};
// Defaults to 10
healthCheckInterval?: number;
// Defaults to '200-299'
healthCheckMatcher?: string;
healthCheckPath: string;
healthCheckPort: string;
healthCheckProtocol: 'HTTP' | 'HTTPS';
// Defaults to 10
healthyThreshold?: number;
// Defaults to 5
healthCheckTimeout?: number;
// Defaults to 2
unhealthyThreshold?: number;
}[];
listeners: IALBListenerDescription[];
targetGroups: IALBTargetGroupDescription[];
}
14 changes: 13 additions & 1 deletion app/scripts/modules/amazon/src/domain/IAmazonServerGroup.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
import { IServerGroup, IAsg } from '@spinnaker/core';
import { IAccountDetails, IServerGroup, IAsg } from '@spinnaker/core';

import { IScalingPolicy } from './IScalingPolicy';
import { IScalingPolicyView } from 'amazon/domain';

export interface IAmazonAsg extends IAsg {
availabilityZones: string[];
defaultCooldown: number;
healthCheckType: string;
healthCheckGracePeriod: number;
terminationPolicies: string[];
enabledMetrics: { metric: string }[];
vpczoneIdentifier?: string;
}

export interface IAmazonServerGroup extends IServerGroup {
image?: any;
scalingPolicies?: IScalingPolicy[];
targetGroups?: string[];
asg: IAmazonAsg;
}

export interface IScheduledAction {
recurrence: number;
minSize: number;
maxSize: number;
desiredCapacity: number;
}

export interface IAmazonServerGroupView extends IAmazonServerGroup {
accountDetails?: IAccountDetails;
scalingPolicies: IScalingPolicyView[];
scheduledActions?: IScheduledAction[];
}
6 changes: 6 additions & 0 deletions app/scripts/modules/amazon/src/domain/IScalingProcess.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export interface IScalingProcess {
name: string;
enabled: boolean;
description: string;
suspensionDate: number;
}
1 change: 1 addition & 0 deletions app/scripts/modules/amazon/src/domain/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ export * from './IAmazonScalingPolicy';
export * from './IAmazonServerGroup';
export * from './IKeyPair';
export * from './IScalingPolicy';
export * from './IScalingProcess';
export * from './ITargetTrackingPolicy';
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ <h3 select-on-dbl-click>
<li ng-repeat="action in instance.insightActions"><a target=_blank href="{{action.url}}">{{action.label}}</a></li>
</ul>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export interface IAmazonLoadBalancersTagState {
@BindAll()
export class AmazonLoadBalancersTag extends React.Component<ILoadBalancersTagProps, IAmazonLoadBalancersTagState> {
private loadBalancersRefreshUnsubscribe: () => void;
private mounted = false;

constructor(props: ILoadBalancersTagProps) {
super(props);
Expand All @@ -77,8 +78,18 @@ export class AmazonLoadBalancersTag extends React.Component<ILoadBalancersTagPro
targetGroups: [],
};

LoadBalancerDataUtils.populateLoadBalancers(props.application, props.serverGroup).then((loadBalancers) => this.setState({ loadBalancers }));
AmazonLoadBalancerDataUtils.populateTargetGroups(props.application, props.serverGroup as IAmazonServerGroup).then((targetGroups: ITargetGroup[]) => this.setState({ targetGroups }))
LoadBalancerDataUtils.populateLoadBalancers(props.application, props.serverGroup)
.then((loadBalancers) => {
if (this.mounted) {
this.setState({ loadBalancers });
}
});
AmazonLoadBalancerDataUtils.populateTargetGroups(props.application, props.serverGroup as IAmazonServerGroup)
.then((targetGroups: ITargetGroup[]) => {
if (this.mounted) {
this.setState({ targetGroups });
}
});
}

private showLoadBalancerDetails(loadBalancer: ILoadBalancer): void {
Expand Down Expand Up @@ -107,10 +118,12 @@ export class AmazonLoadBalancersTag extends React.Component<ILoadBalancersTagPro
}

public componentDidMount(): void {
this.mounted = true;
this.loadBalancersRefreshUnsubscribe = this.props.application.getDataSource('loadBalancers').onRefresh(null, () => { this.forceUpdate(); });
}

public componentWillUnmount(): void {
this.mounted = false;
this.loadBalancersRefreshUnsubscribe();
}

Expand Down
14 changes: 14 additions & 0 deletions app/scripts/modules/amazon/src/loadBalancer/TargetGroupDetails.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import * as React from 'react';
import { Overridable, IOverridableProps } from '@spinnaker/core';

export interface ITargetGroupDetailsProps extends IOverridableProps {
}

@Overridable('loadBalancer.targetGroupDetails')
export class TargetGroupDetails extends React.Component<ITargetGroupDetailsProps> {
public render() {
return (
<h3>Target Group Details</h3>
);
}
}
Loading

0 comments on commit b27eec2

Please sign in to comment.