Skip to content

Commit

Permalink
chore(core): update typescript to v5
Browse files Browse the repository at this point in the history
  • Loading branch information
jrsquared committed Apr 14, 2017
1 parent ed41f9c commit f325761
Show file tree
Hide file tree
Showing 28 changed files with 469 additions and 690 deletions.
22 changes: 11 additions & 11 deletions app/scripts/modules/appengine/helpContents/appengineHelpContents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module(APPENGINE_HELP_CONTENTS_REGISTRY, [HELP_CONTENTS_REGISTRY])
},
{
key: 'appengine.serverGroup.gitCredentialType',
value: `The credential type that will be used to access the git repository for this deployment.
value: `The credential type that will be used to access the git repository for this deployment.
You can configure these credentials alongside your App Engine credentials.`
},
{
Expand All @@ -23,7 +23,7 @@ module(APPENGINE_HELP_CONTENTS_REGISTRY, [HELP_CONTENTS_REGISTRY])
{
key: 'appengine.serverGroup.applicationDirectoryRoot',
value: `(Optional) Path to the directory root of the application to be deployed,
starting from the root of the git repository. This is the directory from which
starting from the root of the git repository. This is the directory from which
<code>gcloud app deploy</code> will be run.`,
},
{
Expand All @@ -34,15 +34,15 @@ module(APPENGINE_HELP_CONTENTS_REGISTRY, [HELP_CONTENTS_REGISTRY])
},
{
key: 'appengine.serverGroup.configFiles',
value: `<p>(Optional) The contents of an App Engine config file (e.g., an <code>app.yaml</code> or
<code>cron.yaml</code> file). These files should not conflict with the config filepaths above:
value: `<p>(Optional) The contents of an App Engine config file (e.g., an <code>app.yaml</code> or
<code>cron.yaml</code> file). These files should not conflict with the config filepaths above:
if you include, for example, the contents of an <code>app.yaml</code>
file here, you should <b>not</b> specify the file path to an <code>app.yaml</code> above.<br></p>
<p>If this is a pipeline stage, you can use Spinnaker Pipeline Expressions here.</p>`,
},
{
key: 'appengine.serverGroup.matchBranchOnRegex',
value: `(Optional) A Jenkins trigger may produce details from multiple repositories and branches.
value: `(Optional) A Jenkins trigger may produce details from multiple repositories and branches.
Spinnaker will use the regex specified here to help resolve a branch for the deployment.
If Spinnaker cannot resolve exactly one branch from the trigger, this pipeline will fail.`,
},
Expand All @@ -66,9 +66,9 @@ module(APPENGINE_HELP_CONTENTS_REGISTRY, [HELP_CONTENTS_REGISTRY])
},
{
key: 'appengine.loadBalancer.migrateTraffic',
value: `If selected, traffic will be gradually shifted to a single version. For gradual traffic migration,
the target version must be located within instances that are configured for
both warmup requests and automatic scaling.
value: `If selected, traffic will be gradually shifted to a single version. For gradual traffic migration,
the target version must be located within instances that are configured for
both warmup requests and automatic scaling.
Gradual traffic migration is not supported in the App Engine flexible environment.`
},
{
Expand All @@ -77,7 +77,7 @@ module(APPENGINE_HELP_CONTENTS_REGISTRY, [HELP_CONTENTS_REGISTRY])
},
{
key: 'appengine.loadBalancer.textLocator',
value: `Either the name of a server group, or a Spinnaker Pipeline Expression
value: `Either the name of a server group, or a Spinnaker Pipeline Expression
that resolves to the name of a server group.`
},
{
Expand All @@ -87,8 +87,8 @@ module(APPENGINE_HELP_CONTENTS_REGISTRY, [HELP_CONTENTS_REGISTRY])
<ul>
<li>Manual scaling versions use resident instances</li>
<li>Basic scaling versions use dynamic instances</li>
<li>Auto scaling versions use dynamic instances - but if you specify a number, N,
of minimum idle instances, the first N instances will be resident,
<li>Auto scaling versions use dynamic instances - but if you specify a number, N,
of minimum idle instances, the first N instances will be resident,
and additional dynamic instances will be created as necessary.
</li>
</ul>`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class AppengineLoadBalancerDetailsController {
if (hasMoreThanOne) {
const listOfServerGroupNames = serverGroupNames.map(name => `<li>${name}</li>`).join('');
return `
<div class="alert alert-warning">
<div class="alert alert-warning">
<p>
Deleting <b>${this.loadBalancer.name}</b> will destroy the following server groups:
<ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class AppengineConfigFileConfigurerComponent implements ng.IComponentOptions {
<div class="form-horizontal container-fluid">
<div class="form-group">
<div class="col-md-3 sm-label-right">
Application Root
Application Root
<help-field class="help-field-absolute" key="appengine.serverGroup.applicationDirectoryRoot"></help-field>
</div>
<div class="col-md-7">
Expand All @@ -44,7 +44,7 @@ class AppengineConfigFileConfigurerComponent implements ng.IComponentOptions {
name="applicationDirectoryRoot"
ng-model="$ctrl.command.applicationDirectoryRoot"/></div>
</div>
<div class="form-group">
<div class="col-md-3 sm-label-right">
Config Filepaths <help-field key="appengine.serverGroup.configFilepaths"></help-field>
Expand All @@ -59,7 +59,7 @@ class AppengineConfigFileConfigurerComponent implements ng.IComponentOptions {
</ui-select>
</div>
</div>
<div class="form-group">
<div class="col-md-3 sm-label-right">
Config Files <help-field key="appengine.serverGroup.configFiles"></help-field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,13 @@ class AppengineServerGroupDetailsController {
const modalBody = `
<div class="well well-sm">
<p>
Enabling <b>${this.serverGroup.name}</b> will set its traffic allocation for
Enabling <b>${this.serverGroup.name}</b> will set its traffic allocation for
<b>${this.serverGroup.loadBalancers[0]}</b> to 100%.
</p>
<p>
If you would like more fine-grained control over your server groups' allocations,
edit <b>${this.serverGroup.loadBalancers[0]}</b> under the <b>Load Balancers</b> tab.
</p>
</p>
</div>
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class AppengineApplicationNameValidator implements IApplicationNameValidator {
warnings.push('You will not be able to include a stack or detail field for clusters.');
} else {
const remaining = 56 - name.length;
warnings.push(`If you plan to include a stack or detail field for clusters, you will only have
warnings.push(`If you plan to include a stack or detail field for clusters, you will only have
${remaining} character${remaining > 1 ? 's' : ''} to do so.`);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ const helpContents: any[] = [
},
{
key: 'trafficGuard.stack',
contents: `<p>Optional; you can use the wildcard (*) to include all stacks (including no stack).
contents: `<p>Optional; you can use the wildcard (*) to include all stacks (including no stack).
To apply the guard <em>only</em> to a cluster without a stack, leave this field blank.</p>`
},
{
key: 'trafficGuard.detail',
contents: `<p>Optional; you can use the wildcard (*) to include all stacks (including no detail).
contents: `<p>Optional; you can use the wildcard (*) to include all stacks (including no detail).
To apply the guard <em>only</em> to a cluster without a detail, leave this field blank.</p>`
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class SecondaryApplicationNavComponent implements IComponentOptions {
ng-class="{active: $ctrl.isActive(dataSource)}">
<i ng-if="dataSource.icon" class="ds-icon fa fa-{{dataSource.icon}}"></i>
{{dataSource.label}}
<ds-alerts alerts="dataSource.alerts"
application-name="$ctrl.application.name"
<ds-alerts alerts="dataSource.alerts"
application-name="$ctrl.application.name"
tab-name="{{dataSource.key}}"></ds-alerts>
<span class="badge"
ng-if="dataSource.badge && $ctrl.application[dataSource.badge].data.length">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class CloudProviderLogoComponent implements ng.IComponentOptions {
showTooltip: '<',
};
public controller: any = CloudProviderLogoController;
public template = `<span class="icon icon-{{$ctrl.provider}} icon-{{$ctrl.state}}"
style="height: {{$ctrl.height}}; width: {{$ctrl.width}}"
public template = `<span class="icon icon-{{$ctrl.provider}} icon-{{$ctrl.state}}"
style="height: {{$ctrl.height}}; width: {{$ctrl.width}}"
uib-tooltip="{{$ctrl.tooltip}}"></span>`;
}

Expand Down
8 changes: 4 additions & 4 deletions app/scripts/modules/core/domain/IEntityTags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ export interface ICreationMetadata {
comments?: string;
}

export interface ICreationMetadataTag extends IEntityTag {
value: ICreationMetadata;
}

export interface IEntityTag {
name: string;
value: any;
Expand All @@ -30,6 +26,10 @@ export interface IEntityTag {
lastModifiedBy?: string;
}

export interface ICreationMetadataTag extends IEntityTag {
value: ICreationMetadata;
}

export interface IEntityTags {
id: string;
idPattern?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ class DataSourceAlertsComponent implements ng.IComponentOptions {
public controller: any = DataSourceAlertsCtrl;
public template = `
<span ng-if="$ctrl.alerts.length > 0"
class="tag-marker small"
ng-mouseover="$ctrl.showPopover()"
class="tag-marker small"
ng-mouseover="$ctrl.showPopover()"
ng-mouseleave="$ctrl.hidePopover(true)">
<span uib-popover-template="$ctrl.popoverTemplate"
analytics-on="mouseenter"
Expand All @@ -77,7 +77,7 @@ class DataSourceAlertsComponent implements ng.IComponentOptions {
popover-class="no-padding">
<i class="entity-tag fa fa-exclamation-triangle"></i>
</span>
</span>
</span>
`;
}

Expand Down
12 changes: 6 additions & 6 deletions app/scripts/modules/core/entityTag/entityTags.help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@ import {HELP_CONTENTS_REGISTRY, HelpContentsRegistry} from 'core/help/helpConten
const helpContents: any[] = [
{
key: 'entityTags.serverGroup.alert',
contents: `<p>Alerts indicate an issue with a server group. When present, an alert icon
contents: `<p>Alerts indicate an issue with a server group. When present, an alert icon
<i class="entity-tag fa fa-exclamation-triangle"></i> will be displayed in the clusters view next to the server group.</p>`
},
{
key: 'entityTags.serverGroup.notice',
contents: `<p>Notices provide additional context for a server group. When present, an info icon
contents: `<p>Notices provide additional context for a server group. When present, an info icon
<i class="entity-tag fa fa-flag"></i> will be displayed in the clusters view next to the server group.</p>`
},
{
key: 'entityTags.loadBalancer.alert',
contents: `<p>Alerts indicate an issue with a load balancer. When present, an alert icon
contents: `<p>Alerts indicate an issue with a load balancer. When present, an alert icon
<i class="entity-tag fa fa-exclamation-triangle"></i> will be displayed in the load balancers view next to the server group.</p>`
},
{
key: 'entityTags.loadBalancer.notice',
contents: `<p>Notices provide additional context for a load balancer. When present, an info icon
contents: `<p>Notices provide additional context for a load balancer. When present, an info icon
<i class="entity-tag fa fa-flag"></i> will be displayed in the load balancers view next to the server group.</p>`
},
{
key: 'entityTags.securityGroup.notice',
contents: `<p>Notices provide additional context for a security group. When present, an info icon
contents: `<p>Notices provide additional context for a security group. When present, an info icon
<i class="entity-tag fa fa-flag"></i> will be displayed in the security groups view next to the security group.</p>`
},
{
key: 'entityTags.securityGroup.alert',
contents: `<p>Alerts indicate an issue with a security group. When present, an alert icon
contents: `<p>Alerts indicate an issue with a security group. When present, an alert icon
<i class="entity-tag fa fa-exclamation-triangle"></i> will be displayed in the security groups view next to the security group.</p>`
}
];
Expand Down
6 changes: 3 additions & 3 deletions app/scripts/modules/core/entityTag/entityUiTags.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ class EntityUiTagsComponent implements ng.IComponentOptions {
public template = `
<span ng-if="$ctrl.component.entityTags.alerts.length + $ctrl.component.entityTags.notices.length > 0">
<span ng-if="$ctrl.component.entityTags.alerts.length > 0"
class="tag-marker"
ng-mouseover="$ctrl.showPopover('alert')"
class="tag-marker"
ng-mouseover="$ctrl.showPopover('alert')"
ng-mouseleave="$ctrl.hidePopover(true)">
<span uib-popover-template="$ctrl.popoverTemplate"
popover-placement="auto top"
Expand All @@ -165,7 +165,7 @@ class EntityUiTagsComponent implements ng.IComponentOptions {
</span>
<span ng-if="$ctrl.component.entityTags.notices.length > 0"
class="tag-marker"
ng-mouseover="$ctrl.showPopover('notice')"
ng-mouseover="$ctrl.showPopover('notice')"
ng-mouseleave="$ctrl.hidePopover(true)">
<span uib-popover-template="$ctrl.popoverTemplate"
popover-placement="auto top"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ class NumberListComponent implements ng.IComponentOptions {
<div ng-if="!$ctrl.parameterized" class="row-number" ng-repeat="entry in $ctrl.backingModel track by $index">
<input type="number"
class="form-control input-sm"
ng-model="$ctrl.backingModel[$index]"
ng-min="$ctrl.constraints.min"
ng-model="$ctrl.backingModel[$index]"
ng-min="$ctrl.constraints.min"
ng-max="$ctrl.constraints.max"
ng-change="$ctrl.synchronize()"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@ export interface IValidatorConfig {
preventSave?: boolean;
}

export interface ITriggerTypeConfig extends IStageOrTriggerTypeConfig {
manualExecutionHandler?: string;
}

export interface IStageTypeConfig extends IStageOrTriggerTypeConfig {
executionDetailsUrl: string;
defaultTimeoutMs?: number;
}

export interface IStageOrTriggerTypeConfig {
label: string;
description: string;
Expand All @@ -44,6 +35,15 @@ export interface IStageOrTriggerTypeConfig {
validators: IValidatorConfig[];
}

export interface ITriggerTypeConfig extends IStageOrTriggerTypeConfig {
manualExecutionHandler?: string;
}

export interface IStageTypeConfig extends IStageOrTriggerTypeConfig {
executionDetailsUrl: string;
defaultTimeoutMs?: number;
}

export interface IStageOrTriggerValidator {
validate(pipeline: IPipeline,
stageOrTrigger: IStage | ITrigger,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ class PageNavigatorComponent implements ng.IComponentOptions {
<ul class="page-navigation">
<li ng-repeat="page in $ctrl.pageNavigationState.pages"
data-page-navigation-link="{{page.key}}"
ng-if="page.visible"
ng-if="page.visible"
ng-class="{current: $ctrl.pageNavigationState.currentPageKey === page.key}">
<a href ng-click="$ctrl.setCurrentSection(page.key)">
{{page.label}}
{{page.label}}
<span ng-if="page.badge">({{page.badge}})</span>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/modules/core/retry/retry.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe('Service: Retry', function () {
$timeout.flush();
});

it(`should be tolerant of a function that does not return a promise
it(`should be tolerant of a function that does not return a promise
(only relevant if stopCondition is met on first try)`, () => {
const callback = () => true;
const stopCondition = () => true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import {IState} from 'angular-ui-router';
import {APPLICATION_MODEL_BUILDER, ApplicationModelBuilder} from '../application/applicationModel.builder';
import {Application} from '../application/application.model';

export interface ISecurityGroupDetailsStateParms extends IStandaloneSecurityGroupDetailsStateParams, IApplicationStateParams {
}

export interface IStandaloneSecurityGroupDetailsStateParams extends IState {
provider: string;
accountId: string;
Expand All @@ -22,6 +19,9 @@ export interface IStandaloneSecurityGroupDetailsStateParams extends IState {
name: string;
}

export interface ISecurityGroupDetailsStateParms extends IStandaloneSecurityGroupDetailsStateParams, IApplicationStateParams {
}

export const SECURITY_GROUP_STATES = 'spinnaker.core.securityGroup.states';
module(SECURITY_GROUP_STATES, [
APPLICATION_STATE_PROVIDER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ServerGroupRunningTasksComponent implements ng.IComponentOptions {
</div>
</div>
</div>
<div class="container-fluid no-padding" ng-repeat="execution in $ctrl.serverGroup.runningExecutions">
<div class="row">
<div class="col-md-12">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ export class ServerGroupWarningMessageService {
<dl class="dl-horizontal dl-narrow">
<dt>Account: </dt>
<dd>${serverGroup.account}</dd>
<dt>Region: </dt>
<dd>${serverGroup.region}</dd>
<dt>Cluster: </dt>
<dd>${serverGroup.cluster}</dd>
</dl>`;
Expand All @@ -46,7 +46,7 @@ export class ServerGroupWarningMessageService {
const activePercentRemaining = Math.round(activeInstancesAfterDisable / totalActiveInstances * 100);

params.body = `
<h4>You are disabling <b>${serverGroup.instanceCounts.up}</b>
<h4>You are disabling <b>${serverGroup.instanceCounts.up}</b>
instance${serverGroup.instanceCounts.up === 1 ? '' : 's'}.</h4>
<p>This will reduce the cluster to <b>${activePercentRemaining}</b> percent of its current capacity,
leaving <b>${activeInstancesAfterDisable}</b> instance${activeInstancesAfterDisable === 1 ? '' : 's'} taking
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export class CopyToClipboardController implements IComponentController {
private $timeout: ITimeoutService) {}

public $onInit(): void {
// tslint:disable:no-unused-expression
new Clipboard('.clipboard-btn');
this.$element.on('click', () => {
this.isOpen = true;
Expand Down
Loading

0 comments on commit f325761

Please sign in to comment.