@spinnaker/core 0.14.2 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -0
- package/dist/config/settings.d.ts +1 -0
- package/dist/core.module.d.ts +1 -1
- package/dist/index.js +89 -47
- package/dist/index.js.map +1 -1
- package/dist/instance/instanceType.service.d.ts +3 -2
- package/dist/managed/artifactActions/ArtifactActions.d.ts +24 -0
- package/dist/managed/constraints/registry.d.ts +13 -2
- package/dist/managed/environmentBaseElements/EnvironmentItem.d.ts +3 -2
- package/dist/managed/graphql/graphql-sdk.d.ts +123 -11
- package/dist/managed/overview/Resource.d.ts +5 -2
- package/dist/managed/overview/artifact/Artifact.d.ts +2 -1
- package/dist/managed/overview/artifact/ArtifactActionModal.d.ts +20 -9
- package/dist/managed/overview/artifact/ArtifactCollapsibleSection.d.ts +7 -0
- package/dist/managed/overview/artifact/ArtifactVersions.d.ts +9 -0
- package/dist/managed/overview/artifact/CurrentVersion.d.ts +7 -6
- package/dist/managed/overview/artifact/VersionTitle.d.ts +9 -0
- package/dist/managed/overview/artifact/hooks.d.ts +6 -11
- package/dist/managed/overview/artifact/useCreateRollbackActions.hook.d.ts +3 -0
- package/dist/managed/overview/artifact/utils.d.ts +15 -14
- package/dist/managed/overview/useIsUpdatingResources.hook.d.ts +1 -0
- package/dist/managed/resources/ResourceTitle.d.ts +3 -3
- package/dist/managed/resources/resourceRegistry.d.ts +1 -1
- package/dist/managed/utils/ActionModal.d.ts +1 -0
- package/dist/managed/utils/defaults.d.ts +1 -0
- package/dist/managed/versionMetadata/MetadataComponents.d.ts +18 -19
- package/dist/managed/versionMetadata/VersionMetadata.d.ts +6 -2
- package/dist/search/infrastructure/infrastructureSearch.service.d.ts +2 -1
- package/dist/securityGroup/index.d.ts +2 -1
- package/package.json +6 -6
- package/src/account/AccountSelectInput.spec.tsx +9 -4
- package/src/account/AccountService.spec.ts +6 -6
- package/src/api/ApiService.spec.ts +2 -2
- package/src/api/ApiServiceDeprecated.spec.ts +5 -2
- package/src/application/application.model.spec.ts +78 -79
- package/src/application/applications.state.provider.ts +1 -1
- package/src/application/config/applicationAttributes.directive.html +6 -2
- package/src/application/config/applicationAttributes.directive.js +4 -0
- package/src/application/config/applicationConfig.view.html +14 -1
- package/src/application/config/customBanner/CustomBannerConfig.spec.tsx +3 -3
- package/src/application/config/dataSources/applicationDataSourceEditor.component.spec.ts +4 -3
- package/src/application/config/footer/configSectionFooter.component.spec.ts +2 -1
- package/src/application/listExtractor/AppListExtractor.spec.ts +4 -4
- package/src/application/modal/PermissionsConfigurer.spec.tsx +3 -2
- package/src/application/modal/createApplication.modal.controller.js +7 -6
- package/src/application/modal/createApplication.modal.controller.spec.js +1 -0
- package/src/application/modal/editApplication.controller.modal.js +1 -0
- package/src/application/modal/editApplication.html +2 -2
- package/src/application/modal/validation/ApplicationNameValidator.spec.ts +2 -1
- package/src/application/modal/validation/validateApplicationName.directive.spec.ts +3 -2
- package/src/application/nav/ApplicationNavigation.spec.tsx +12 -11
- package/src/application/nav/NavItem.spec.tsx +7 -5
- package/src/application/nav/NavSection.spec.tsx +3 -2
- package/src/application/search/Applications.tsx +48 -0
- package/src/application/service/ApplicationReader.spec.ts +13 -8
- package/src/application/service/ApplicationWriter.spec.ts +4 -2
- package/src/application/service/InferredApplicationWarningService.spec.ts +2 -3
- package/src/artifact/expectedArtifact.service.spec.ts +2 -1
- package/src/artifact/react/ExpectedArtifactSelector.spec.tsx +2 -3
- package/src/authentication/AuthenticationInitializer.spec.ts +2 -1
- package/src/authentication/AuthenticationService.spec.ts +2 -1
- package/src/authentication/authentication.interceptor.spec.ts +4 -2
- package/src/cache/cacheInitializer.service.spec.ts +7 -4
- package/src/cache/infrastructureCaches.spec.ts +4 -4
- package/src/chaosMonkey/chaosMonkeyExceptions.component.spec.ts +4 -2
- package/src/cloudProvider/providerSelection/ProviderSelectionService.spec.ts +23 -21
- package/src/cluster/ClusterRuleMatcher.spec.ts +2 -1
- package/src/cluster/cluster.service.spec.ts +7 -7
- package/src/cluster/filter/ClusterFilterService.spec.ts +15 -14
- package/src/cluster/filter/LabelFilter.spec.tsx +3 -3
- package/src/cluster/filter/MultiselectModel.spec.ts +2 -2
- package/src/cluster/filter/labelFilterUtils.spec.ts +3 -7
- package/src/config/settings.ts +1 -1
- package/src/core.module.ts +1 -1
- package/src/filterModel/dependentFilter/DependentFilterService.spec.ts +1 -1
- package/src/function/filter/FunctionFilterService.spec.ts +5 -3
- package/src/function/function.read.service.spec.ts +4 -3
- package/src/header/customBanner/CustomBanner.spec.tsx +3 -4
- package/src/healthCounts/HealthCounts.spec.tsx +2 -2
- package/src/history/recentHistory.service.spec.ts +2 -1
- package/src/insight/InsightMenu.spec.tsx +9 -6
- package/src/insight/InsightMenu.tsx +3 -0
- package/src/instance/instance.write.service.spec.ts +8 -7
- package/src/instance/instanceType.service.ts +12 -2
- package/src/instance/instanceTypeService.spec.ts +2 -1
- package/src/loadBalancer/LoadBalancersTag.spec.tsx +8 -6
- package/src/loadBalancer/filter/LoadBalancerFilterService.spec.ts +2 -2
- package/src/managed/Environments.less +4 -4
- package/src/managed/Environments.tsx +1 -1
- package/src/managed/RelativeTimestamp.tsx +8 -6
- package/src/managed/artifactActions/ArtifactActions.tsx +77 -0
- package/src/managed/constraints/AllowedTimes.spec.ts +2 -1
- package/src/managed/constraints/registry.tsx +27 -1
- package/src/managed/environmentBaseElements/BaseEnvironment.less +3 -3
- package/src/managed/environmentBaseElements/EnvironmentItem.tsx +11 -4
- package/src/managed/graphql/graphql-sdk.ts +218 -29
- package/src/managed/graphql/schema.graphql +14 -1
- package/src/managed/overview/EnvironmentOverview.tsx +12 -15
- package/src/managed/overview/EnvironmentsOverview.less +6 -5
- package/src/managed/overview/PreviewEnvironments.tsx +0 -3
- package/src/managed/overview/Resource.less +1 -1
- package/src/managed/overview/Resource.tsx +62 -47
- package/src/managed/overview/artifact/Artifact.less +27 -52
- package/src/managed/overview/artifact/Artifact.tsx +86 -22
- package/src/managed/overview/artifact/ArtifactActionModal.less +19 -0
- package/src/managed/overview/artifact/ArtifactActionModal.tsx +150 -68
- package/src/managed/overview/artifact/ArtifactCollapsibleSection.tsx +32 -0
- package/src/managed/overview/artifact/ArtifactVersionTasks.tsx +2 -0
- package/src/managed/overview/artifact/{PendingVersion.tsx → ArtifactVersions.tsx} +35 -25
- package/src/managed/overview/artifact/Constraints.tsx +61 -21
- package/src/managed/overview/artifact/CurrentVersion.tsx +42 -27
- package/src/managed/overview/artifact/VersionTitle.tsx +18 -0
- package/src/managed/overview/artifact/hooks.ts +71 -34
- package/src/managed/overview/artifact/useCreateRollbackActions.hook.ts +75 -0
- package/src/managed/overview/artifact/utils.spec.ts +1 -1
- package/src/managed/overview/artifact/utils.ts +47 -80
- package/src/managed/overview/baseStyles.less +124 -88
- package/src/managed/overview/queries.graphql +54 -13
- package/src/managed/overview/useIsUpdatingResources.hook.ts +9 -0
- package/src/managed/resources/ResourceTitle.tsx +12 -5
- package/src/managed/utils/ActionModal.tsx +4 -1
- package/src/managed/utils/defaults.ts +3 -0
- package/src/managed/utils/useNotifyOnError.hook.ts +1 -1
- package/src/managed/versionMetadata/MetadataComponents.tsx +100 -68
- package/src/managed/versionMetadata/VersionMetadata.less +17 -18
- package/src/managed/versionMetadata/VersionMetadata.tsx +23 -31
- package/src/managed/versionsHistory/VersionContent.tsx +20 -13
- package/src/managed/versionsHistory/VersionHeading.tsx +2 -1
- package/src/managed/versionsHistory/VersionsHistory.less +11 -3
- package/src/manifest/PodNameProvider.spec.ts +1 -1
- package/src/navigation/customParamTypes.spec.ts +1 -1
- package/src/pagerDuty/pagerDuty.read.service.spec.ts +4 -2
- package/src/pagerDuty/pagerDutyTag.component.spec.ts +7 -3
- package/src/pipeline/config/PipelineRegistry.spec.ts +38 -37
- package/src/pipeline/config/actions/templateJson/ShowPipelineTemplateJsonModal.spec.tsx +3 -3
- package/src/pipeline/config/pipelineConfigurer.controller.spec.ts +3 -3
- package/src/pipeline/config/services/PipelineConfigService.spec.ts +4 -3
- package/src/pipeline/config/stages/bakeManifest/helm/BakeHelmConfigForm.spec.tsx +51 -8
- package/src/pipeline/config/stages/bakeManifest/helm/BakeHelmConfigForm.tsx +36 -6
- package/src/pipeline/config/stages/findArtifactFromExecution/findArtifactFromExecution.controller.spec.ts +2 -1
- package/src/pipeline/config/stages/manualJudgment/manualJudgment.service.spec.ts +6 -4
- package/src/pipeline/config/stages/travis/travisExecutionDetails.controller.spec.ts +5 -2
- package/src/pipeline/config/stages/travis/travisStage.controller.spec.ts +3 -2
- package/src/pipeline/config/stages/unmatchedStageTypeStage/unmatchedStageTypeStage.controller.spec.ts +2 -1
- package/src/pipeline/config/stages/wait/SkipWait.tsx +3 -1
- package/src/pipeline/config/stages/wercker/werckerExecutionDetails.controller.spec.ts +5 -2
- package/src/pipeline/config/stages/wercker/werckerStage.controller.spec.ts +3 -2
- package/src/pipeline/config/templates/Variable.spec.tsx +6 -5
- package/src/pipeline/config/templates/configurePipelineTemplateModal.controller.spec.ts +7 -8
- package/src/pipeline/config/templates/v2/configurePipelineTemplateModalV2.controller.spec.ts +7 -8
- package/src/pipeline/config/templates/v2/pipelineTemplateV2.service.spec.ts +1 -1
- package/src/pipeline/config/triggers/TriggersPageContent.spec.tsx +4 -4
- package/src/pipeline/config/triggers/TriggersPageContent.tsx +1 -2
- package/src/pipeline/config/triggers/artifacts/docker/defaultDocker.artifact.spec.ts +1 -2
- package/src/pipeline/config/validation/pipelineConfig.validator.spec.ts +14 -15
- package/src/pipeline/create/CreatePipelineModal.spec.tsx +9 -7
- package/src/pipeline/details/StageFailureMessage.tsx +25 -10
- package/src/pipeline/details/executionDetailsSection.service.spec.ts +3 -2
- package/src/pipeline/executions/Executions.spec.tsx +9 -6
- package/src/pipeline/executions/executionAction/ExecutionAction.spec.tsx +1 -1
- package/src/pipeline/executions/executionGroup/ExecutionGroup.tsx +2 -1
- package/src/pipeline/filter/executionFilter.service.spec.ts +1 -1
- package/src/pipeline/pipeline.dataSource.spec.ts +8 -7
- package/src/pipeline/service/ExecutionsTransformer.spec.ts +2 -2
- package/src/pipeline/service/execution.service.spec.ts +7 -5
- package/src/pipeline/status/Artifact.spec.tsx +7 -6
- package/src/pipeline/status/ArtifactList.spec.tsx +7 -6
- package/src/pipeline/status/ExecutionParameters.spec.tsx +5 -4
- package/src/pipeline/status/ResolvedArtifactList.spec.tsx +7 -6
- package/src/plugins/deck.plugin.spec.ts +4 -2
- package/src/plugins/plugin.registry.spec.ts +6 -4
- package/src/presentation/forms/SpinFormik.spec.tsx +3 -2
- package/src/presentation/forms/fields/FormikFormField.spec.tsx +3 -3
- package/src/presentation/forms/hooks/useSaveRestoreMutuallyExclusiveFields.hook.spec.tsx +4 -3
- package/src/presentation/forms/inputs/ChecklistInput.spec.tsx +1 -1
- package/src/presentation/forms/inputs/RadioButtonInput.spec.tsx +2 -1
- package/src/presentation/forms/inputs/SelectInput.spec.tsx +2 -1
- package/src/presentation/forms/inputs/hooks/useInternalValidator.hook.spec.tsx +4 -3
- package/src/presentation/forms/validation/FormValidator.spec.ts +2 -2
- package/src/presentation/forms/validation/useValidationData.spec.tsx +4 -3
- package/src/presentation/hooks/useContainerClassNames.hook.spec.tsx +2 -1
- package/src/presentation/hooks/useData.hook.spec.tsx +3 -2
- package/src/presentation/hooks/useDebouncedValue.hook.spec.tsx +1 -1
- package/src/presentation/hooks/useDeepObjectDiff.hook.spec.tsx +2 -1
- package/src/presentation/hooks/useEventListener.hook.spec.tsx +2 -1
- package/src/presentation/hooks/useForceUpdate.hook.spec.tsx +2 -1
- package/src/presentation/hooks/useInterval.hook.spec.tsx +2 -1
- package/src/presentation/hooks/useIsMountedRef.hook.spec.tsx +1 -1
- package/src/presentation/hooks/useLatestCallback.hook.spec.tsx +2 -1
- package/src/presentation/hooks/useLatestPromise.hook.spec.tsx +9 -3
- package/src/presentation/hooks/useMountStatusRef.hook.spec.tsx +3 -1
- package/src/presentation/hooks/usePollingData.hook.spec.tsx +3 -2
- package/src/presentation/hooks/usePrevious.hook.spec.tsx +2 -1
- package/src/presentation/navigation/pageNavigator.component.spec.ts +3 -3
- package/src/presentation/spel/SpelInput.spec.tsx +9 -4
- package/src/presentation/spel/SpelService.spec.ts +1 -1
- package/src/scheduler/SchedulerFactory.spec.ts +2 -1
- package/src/search/infrastructure/infrastructure.controller.js +3 -0
- package/src/search/infrastructure/infrastructureSearch.service.ts +3 -2
- package/src/search/widgets/Filter.spec.tsx +5 -3
- package/src/search/widgets/Filters.spec.tsx +5 -3
- package/src/search/widgets/Search.spec.tsx +4 -2
- package/src/securityGroup/index.ts +2 -1
- package/src/securityGroup/securityGroupReader.service.spec.ts +8 -10
- package/src/serverGroup/configure/common/deployInitializer.component.spec.ts +7 -3
- package/src/serverGroup/configure/common/v2instanceArchetypeSelector.component.ts +1 -1
- package/src/serverGroup/details/capacity/CapacityDetailsSection.spec.tsx +1 -1
- package/src/serverGroup/details/scalingActivities/ScalingActivitiesModal.spec.ts +2 -1
- package/src/serverGroup/details/serverGroupWarningMessage.service.spec.ts +4 -4
- package/src/serverGroup/serverGroupWriter.service.spec.ts +10 -8
- package/src/slack/SlackReader.spec.ts +2 -1
- package/src/subnet/subnet.read.service.spec.ts +4 -3
- package/src/task/monitor/taskMonitor.spec.ts +6 -5
- package/src/task/task.dataSource.spec.ts +5 -4
- package/src/task/task.write.service.spec.ts +3 -1
- package/src/utils/clipboard/CopyToClipboard.spec.tsx +2 -1
- package/src/utils/json/json.utility.service.spec.ts +2 -1
- package/src/utils/timeFormatters.spec.ts +3 -2
- package/src/utils/workerPool.spec.ts +2 -1
- package/src/widgets/ApplicationsPickerInput.spec.tsx +3 -2
- package/src/widgets/spelText/SpelAutocompleteService.spec.ts +4 -3
- package/src/widgets/tags/Tag.spec.tsx +4 -2
- package/src/widgets/tags/TagList.spec.tsx +5 -3
- package/src/yamlEditor/yamlEditorUtils.spec.ts +1 -1
- package/dist/managed/overview/artifact/PendingVersion.d.ts +0 -7
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { mock } from 'angular';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import type { IApplicationNameValidationResult } from './ApplicationNameValidator';
|
|
4
|
+
import { ApplicationNameValidator } from './ApplicationNameValidator';
|
|
4
5
|
import { ExampleApplicationNameValidator, ExampleApplicationNameValidator2 } from './ExampleApplicationNameValidator';
|
|
5
6
|
import { AccountService } from '../../../account/AccountService';
|
|
6
7
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ICompileService, IQService, IRootScopeService
|
|
1
|
+
import type { ICompileService, IQService, IRootScopeService } from 'angular';
|
|
2
|
+
import { mock } from 'angular';
|
|
2
3
|
|
|
3
4
|
import { ExampleApplicationNameValidator, ExampleApplicationNameValidator2 } from './ExampleApplicationNameValidator';
|
|
4
|
-
import { VALIDATE_APPLICATION_NAME } from './validateApplicationName.directive';
|
|
5
5
|
import { AccountService } from '../../../account/AccountService';
|
|
6
|
+
import { VALIDATE_APPLICATION_NAME } from './validateApplicationName.directive';
|
|
6
7
|
|
|
7
8
|
describe('Validator: validateApplicationName', function () {
|
|
8
9
|
const validator1 = new ExampleApplicationNameValidator();
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
+
import { StateMatcher } from '@uirouter/core';
|
|
2
|
+
import type { UIRouterReact } from '@uirouter/react';
|
|
3
|
+
import { UIRouterContext } from '@uirouter/react';
|
|
4
|
+
import { mock } from 'angular';
|
|
5
|
+
import { mount } from 'enzyme';
|
|
1
6
|
import React from 'react';
|
|
2
7
|
import { RecoilRoot } from 'recoil';
|
|
3
|
-
import { mount } from 'enzyme';
|
|
4
|
-
import { mock } from 'angular';
|
|
5
|
-
import { UIRouterReact, UIRouterContext } from '@uirouter/react';
|
|
6
|
-
import { StateMatcher } from '@uirouter/core';
|
|
7
8
|
|
|
8
|
-
import { REACT_MODULE } from '../../reactShims';
|
|
9
|
-
import { OVERRIDE_REGISTRY } from '../../overrideRegistry';
|
|
10
9
|
import {
|
|
11
10
|
mockAppConfigDataSourceConfig,
|
|
12
|
-
mockServerGroupDataSourceConfig,
|
|
13
11
|
mockLoadBalancerDataSourceConfig,
|
|
14
|
-
mockTaskDataSourceConfig,
|
|
15
12
|
mockPipelineDataSourceConfig,
|
|
13
|
+
mockServerGroupDataSourceConfig,
|
|
14
|
+
mockTaskDataSourceConfig,
|
|
16
15
|
} from '@spinnaker/mocks';
|
|
17
|
-
import { ApplicationModelBuilder } from '../../application';
|
|
18
|
-
import { IPipeline } from '../../domain';
|
|
19
|
-
import { ApplicationDataSource } from '../service/applicationDataSource';
|
|
20
16
|
|
|
21
17
|
import { ApplicationNavigation } from './ApplicationNavigation';
|
|
18
|
+
import { ApplicationModelBuilder } from '../../application';
|
|
22
19
|
import { SETTINGS } from '../../config';
|
|
20
|
+
import type { IPipeline } from '../../domain';
|
|
21
|
+
import { OVERRIDE_REGISTRY } from '../../overrideRegistry';
|
|
22
|
+
import { REACT_MODULE } from '../../reactShims';
|
|
23
|
+
import type { ApplicationDataSource } from '../service/applicationDataSource';
|
|
23
24
|
|
|
24
25
|
describe('ApplicationNavigation', () => {
|
|
25
26
|
let $uiRouter: UIRouterReact;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import { mount } from 'enzyme';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { RecoilRoot } from 'recoil';
|
|
3
|
-
import { mount } from 'enzyme';
|
|
4
4
|
import { BehaviorSubject } from 'rxjs';
|
|
5
5
|
|
|
6
|
-
import { mockEntityTags,
|
|
7
|
-
|
|
8
|
-
import { ApplicationDataSource, IDataSourceConfig } from '../service/applicationDataSource';
|
|
9
|
-
import { IEntityTags, IServerGroup, IPipeline } from '../../domain';
|
|
6
|
+
import { mockEntityTags, mockPipelineDataSourceConfig, mockServerGroupDataSourceConfig } from '@spinnaker/mocks';
|
|
7
|
+
|
|
10
8
|
import { NavItem } from './NavItem';
|
|
9
|
+
import type { Application } from '../../application';
|
|
10
|
+
import { ApplicationModelBuilder } from '../../application';
|
|
11
|
+
import type { IEntityTags, IPipeline, IServerGroup } from '../../domain';
|
|
12
|
+
import type { ApplicationDataSource, IDataSourceConfig } from '../service/applicationDataSource';
|
|
11
13
|
|
|
12
14
|
describe('NavItem', () => {
|
|
13
15
|
const buildApp = <T,>(config: IDataSourceConfig<T>): Application =>
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { shallow } from 'enzyme';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
mockLoadBalancerDataSourceConfig,
|
|
6
6
|
mockPipelineDataSourceConfig,
|
|
7
7
|
mockServerGroupDataSourceConfig,
|
|
8
8
|
} from '@spinnaker/mocks';
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
import { NavSection } from './NavSection';
|
|
11
|
+
import { ApplicationModelBuilder } from '../../application';
|
|
11
12
|
|
|
12
13
|
describe('NavItem', () => {
|
|
13
14
|
it('should render multiple categories', () => {
|
|
@@ -8,9 +8,11 @@ import { distinctUntilChanged, map, takeUntil } from 'rxjs/operators';
|
|
|
8
8
|
import { ApplicationTable } from './ApplicationsTable';
|
|
9
9
|
import { PaginationControls } from './PaginationControls';
|
|
10
10
|
import type { IAccount } from '../../account';
|
|
11
|
+
import type { Application } from '../../application';
|
|
11
12
|
import type { ICache } from '../../cache';
|
|
12
13
|
import { ViewStateCache } from '../../cache';
|
|
13
14
|
import { InsightMenu } from '../../insight/InsightMenu';
|
|
15
|
+
import { ModalInjector, ReactInjector } from '../../reactShims';
|
|
14
16
|
import type { IApplicationSummary } from '../service/ApplicationReader';
|
|
15
17
|
import { ApplicationReader } from '../service/ApplicationReader';
|
|
16
18
|
import { Spinner } from '../../widgets';
|
|
@@ -22,6 +24,10 @@ interface IViewState {
|
|
|
22
24
|
sort: string;
|
|
23
25
|
}
|
|
24
26
|
|
|
27
|
+
interface IApplicationsStateParams {
|
|
28
|
+
create?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
25
31
|
export interface IApplicationPagination {
|
|
26
32
|
currentPage: number;
|
|
27
33
|
itemsPerPage: number;
|
|
@@ -113,6 +119,48 @@ export class Applications extends React.Component<{}, IApplicationsState> {
|
|
|
113
119
|
throw error;
|
|
114
120
|
},
|
|
115
121
|
);
|
|
122
|
+
|
|
123
|
+
const { $stateParams, $state, $rootScope, overrideRegistry } = ReactInjector;
|
|
124
|
+
const { create } = $stateParams as IApplicationsStateParams;
|
|
125
|
+
applicationSummaries$.subscribe((applications: IApplicationSummary[]) => {
|
|
126
|
+
if (create) {
|
|
127
|
+
const found = applications.find((app) => app.name === create);
|
|
128
|
+
if (found) {
|
|
129
|
+
if (found.email) {
|
|
130
|
+
// Application already exists - redirect to app
|
|
131
|
+
$state.go('home.applications.application', { application: create, create: null });
|
|
132
|
+
} else {
|
|
133
|
+
// Inferred application - redirect to config
|
|
134
|
+
$state.go('home.applications.application.config', { application: create, create: null });
|
|
135
|
+
}
|
|
136
|
+
} else {
|
|
137
|
+
// Nonexistant application - open create modal
|
|
138
|
+
ModalInjector.modalService
|
|
139
|
+
.open({
|
|
140
|
+
scope: $rootScope.$new(),
|
|
141
|
+
templateUrl: overrideRegistry.getTemplate(
|
|
142
|
+
'createApplicationModal',
|
|
143
|
+
require('../modal/newapplication.html'),
|
|
144
|
+
),
|
|
145
|
+
resolve: {
|
|
146
|
+
name: () => create,
|
|
147
|
+
},
|
|
148
|
+
controller: overrideRegistry.getController('CreateApplicationModalCtrl'),
|
|
149
|
+
controllerAs: 'newAppModal',
|
|
150
|
+
})
|
|
151
|
+
.result.then(
|
|
152
|
+
(app: Application) => {
|
|
153
|
+
$state.go('home.applications.application', { application: app.name, create: null });
|
|
154
|
+
},
|
|
155
|
+
() => {
|
|
156
|
+
// Clear out the query parameter if the dialog is dismissed
|
|
157
|
+
$state.go('home.applications', { create: null });
|
|
158
|
+
},
|
|
159
|
+
)
|
|
160
|
+
.catch(() => {});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
});
|
|
116
164
|
}
|
|
117
165
|
|
|
118
166
|
private toggleSort(column: string): void {
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { mock } from 'angular';
|
|
2
|
-
import { mockHttpClient } from '../../api/mock/jasmine';
|
|
3
2
|
|
|
4
|
-
import Spy = jasmine.Spy;
|
|
5
|
-
import { IApplicationDataSourceAttribute, ApplicationReader } from './ApplicationReader';
|
|
6
3
|
import { ApplicationDataSourceRegistry } from './ApplicationDataSourceRegistry';
|
|
7
|
-
import {
|
|
4
|
+
import type { IApplicationDataSourceAttribute } from './ApplicationReader';
|
|
5
|
+
import { ApplicationReader } from './ApplicationReader';
|
|
6
|
+
import { mockHttpClient } from '../../api/mock/jasmine';
|
|
7
|
+
import type { Application } from '../application.model';
|
|
8
|
+
import type { ClusterService } from '../../cluster/cluster.service';
|
|
9
|
+
import { CLUSTER_SERVICE } from '../../cluster/cluster.service';
|
|
8
10
|
import { LOAD_BALANCER_DATA_SOURCE } from '../../loadBalancer/loadBalancer.dataSource';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { CLUSTER_SERVICE, ClusterService } from '../../cluster/cluster.service';
|
|
12
|
-
import { SERVER_GROUP_DATA_SOURCE } from '../../serverGroup/serverGroup.dataSource';
|
|
11
|
+
import type { LoadBalancerReader } from '../../loadBalancer/loadBalancer.read.service';
|
|
12
|
+
import { LOAD_BALANCER_READ_SERVICE } from '../../loadBalancer/loadBalancer.read.service';
|
|
13
13
|
import { SECURITY_GROUP_DATA_SOURCE } from '../../securityGroup/securityGroup.dataSource';
|
|
14
|
+
import type { SecurityGroupReader } from '../../securityGroup/securityGroupReader.service';
|
|
15
|
+
import { SECURITY_GROUP_READER } from '../../securityGroup/securityGroupReader.service';
|
|
16
|
+
import { SERVER_GROUP_DATA_SOURCE } from '../../serverGroup/serverGroup.dataSource';
|
|
17
|
+
|
|
18
|
+
import Spy = jasmine.Spy;
|
|
14
19
|
|
|
15
20
|
describe('ApplicationReader', function () {
|
|
16
21
|
let securityGroupReader: SecurityGroupReader;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { mock } from 'angular';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { IApplicationAttributes } from './ApplicationWriter';
|
|
4
|
+
import { ApplicationWriter } from './ApplicationWriter';
|
|
5
|
+
import type { IJob } from '../../task/taskExecutor';
|
|
6
|
+
import { TaskExecutor } from '../../task/taskExecutor';
|
|
5
7
|
import Spy = jasmine.Spy;
|
|
6
8
|
|
|
7
9
|
describe('ApplicationWriter', function () {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import Spy = jasmine.Spy;
|
|
2
2
|
|
|
3
|
-
import { NotifierService } from '../../widgets/notifier/notifier.service';
|
|
4
|
-
|
|
5
3
|
import { InferredApplicationWarningService } from './InferredApplicationWarningService';
|
|
6
|
-
import { Application } from '../application.model';
|
|
4
|
+
import type { Application } from '../application.model';
|
|
7
5
|
import { ApplicationModelBuilder } from '../applicationModel.builder';
|
|
6
|
+
import { NotifierService } from '../../widgets/notifier/notifier.service';
|
|
8
7
|
|
|
9
8
|
describe('Service: inferredApplicationWarning', () => {
|
|
10
9
|
describe('checkIfInferredAndWarn', () => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { noop } from 'lodash';
|
|
2
|
+
|
|
3
|
+
import type { IArtifact, IArtifactKindConfig } from '../domain';
|
|
2
4
|
import { ExpectedArtifactService } from './expectedArtifact.service';
|
|
3
|
-
import { IArtifact, IArtifactKindConfig } from '../domain';
|
|
4
5
|
import { Registry } from '../registry';
|
|
5
6
|
|
|
6
7
|
describe('ExpectedArtifactService', () => {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { mount } from 'enzyme';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
|
|
4
4
|
import { ExpectedArtifactService } from '..';
|
|
5
|
-
import { IExpectedArtifact } from '../../domain';
|
|
6
|
-
|
|
7
5
|
import { ExpectedArtifactSelector } from './ExpectedArtifactSelector';
|
|
6
|
+
import type { IExpectedArtifact } from '../../domain';
|
|
8
7
|
|
|
9
8
|
const artifact = (type: string): IExpectedArtifact => {
|
|
10
9
|
const ea = ExpectedArtifactService.createEmptyArtifact();
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
/* eslint-disable @spinnaker/migrate-to-mock-http-client */
|
|
1
2
|
import { mock } from 'angular';
|
|
2
3
|
|
|
3
|
-
import { IDeckRootScope } from '../domain';
|
|
4
4
|
import { AuthenticationInitializer } from './AuthenticationInitializer';
|
|
5
5
|
import { AuthenticationService } from './AuthenticationService';
|
|
6
6
|
import { AUTHENTICATION_MODULE } from './authentication.module';
|
|
7
7
|
import { SETTINGS } from '../config/settings';
|
|
8
|
+
import type { IDeckRootScope } from '../domain';
|
|
8
9
|
|
|
9
10
|
declare const window: any;
|
|
10
11
|
describe('authenticationProvider: application startup', function () {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IUser } from './AuthenticationService';
|
|
2
|
+
import { AuthenticationService } from './AuthenticationService';
|
|
2
3
|
|
|
3
4
|
describe('AuthenticationService', function () {
|
|
4
5
|
beforeEach(() => AuthenticationService.reset());
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { IQService, IRequestConfig, IRootScopeService
|
|
1
|
+
import type { IQService, IRequestConfig, IRootScopeService } from 'angular';
|
|
2
|
+
import { mock } from 'angular';
|
|
2
3
|
|
|
3
|
-
import { AUTHENTICATION_INTERCEPTOR_SERVICE, AuthenticationInterceptor } from './authentication.interceptor.service';
|
|
4
4
|
import { AuthenticationService } from './AuthenticationService';
|
|
5
|
+
import type { AuthenticationInterceptor } from './authentication.interceptor.service';
|
|
6
|
+
import { AUTHENTICATION_INTERCEPTOR_SERVICE } from './authentication.interceptor.service';
|
|
5
7
|
import { SETTINGS } from '../config/settings';
|
|
6
8
|
|
|
7
9
|
describe('authenticationInterceptor', function () {
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import type { IQService, IRootScopeService } from 'angular';
|
|
2
|
+
import { mock } from 'angular';
|
|
1
3
|
import { flatten } from 'lodash';
|
|
2
4
|
|
|
3
|
-
import { mock, IQService, IRootScopeService } from 'angular';
|
|
4
|
-
import { CACHE_INITIALIZER_SERVICE, CacheInitializerService } from './cacheInitializer.service';
|
|
5
|
-
import { AccountService } from '../account/AccountService';
|
|
6
5
|
import { InfrastructureCaches } from './';
|
|
7
|
-
import {
|
|
6
|
+
import { AccountService } from '../account/AccountService';
|
|
7
|
+
import type { CacheInitializerService } from './cacheInitializer.service';
|
|
8
|
+
import { CACHE_INITIALIZER_SERVICE } from './cacheInitializer.service';
|
|
9
|
+
import type { SecurityGroupReader } from '../securityGroup/securityGroupReader.service';
|
|
10
|
+
import { SECURITY_GROUP_READER } from '../securityGroup/securityGroupReader.service';
|
|
8
11
|
|
|
9
12
|
interface IKeys {
|
|
10
13
|
[key: string]: string[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { CacheFactory, CacheOptions } from 'cachefactory';
|
|
2
|
-
|
|
3
|
-
import { noop } from '../utils';
|
|
1
|
+
import type { CacheFactory, CacheOptions } from 'cachefactory';
|
|
4
2
|
|
|
3
|
+
import type { ICache, ICacheConfig } from './deckCacheFactory';
|
|
4
|
+
import { DeckCacheFactory } from './deckCacheFactory';
|
|
5
5
|
import { InfrastructureCaches } from './infrastructureCaches';
|
|
6
|
-
import {
|
|
6
|
+
import { noop } from '../utils';
|
|
7
7
|
|
|
8
8
|
interface ICacheInstantiation {
|
|
9
9
|
cacheId: string;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IComponentControllerService, IQService, IRootScopeService, IScope } from 'angular';
|
|
2
|
+
import { mock } from 'angular';
|
|
2
3
|
|
|
3
|
-
import { CHAOS_MONKEY_EXCEPTIONS_COMPONENT, ChaosMonkeyExceptionsController } from './chaosMonkeyExceptions.component';
|
|
4
4
|
import { AccountService } from '../account/AccountService';
|
|
5
5
|
import { ApplicationModelBuilder } from '../application/applicationModel.builder';
|
|
6
6
|
import { ChaosMonkeyConfig } from './chaosMonkeyConfig.component';
|
|
7
|
+
import type { ChaosMonkeyExceptionsController } from './chaosMonkeyExceptions.component';
|
|
8
|
+
import { CHAOS_MONKEY_EXCEPTIONS_COMPONENT } from './chaosMonkeyExceptions.component';
|
|
7
9
|
|
|
8
10
|
describe('Controller: ChaosMonkeyExceptions', () => {
|
|
9
11
|
let $componentController: IComponentControllerService,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { mock, IQService, IScope, IRootScopeService } from 'angular';
|
|
1
|
+
import type { IQService, IRootScopeService, IScope } from 'angular';
|
|
2
|
+
import { mock } from 'angular';
|
|
4
3
|
|
|
5
|
-
import { AccountService, IAccountDetails } from '../../account/AccountService';
|
|
6
4
|
import { CloudProviderRegistry } from '..';
|
|
7
5
|
import { ProviderSelectionModal } from './ProviderSelectionModal';
|
|
8
6
|
import { ProviderSelectionService } from './ProviderSelectionService';
|
|
7
|
+
import type { IAccountDetails } from '../../account/AccountService';
|
|
8
|
+
import { AccountService } from '../../account/AccountService';
|
|
9
|
+
import type { Application } from '../../application/application.model';
|
|
10
|
+
import { ApplicationModelBuilder } from '../../application/applicationModel.builder';
|
|
9
11
|
import { SETTINGS } from '../../config/settings';
|
|
10
12
|
|
|
11
13
|
function fakeAccount(provider: string): IAccountDetails {
|
|
@@ -182,7 +184,7 @@ describe('ProviderSelectionService: API', () => {
|
|
|
182
184
|
const k8s = fakeAccount('kubernetes');
|
|
183
185
|
k8s.type = 'kubernetes';
|
|
184
186
|
accounts = [k8s];
|
|
185
|
-
|
|
187
|
+
const configuration = {
|
|
186
188
|
name: 'Kubernetes',
|
|
187
189
|
adHocInfrastructureWritesEnabled: true,
|
|
188
190
|
};
|
|
@@ -200,7 +202,7 @@ describe('ProviderSelectionService: API', () => {
|
|
|
200
202
|
const k8s = fakeAccount('kubernetes');
|
|
201
203
|
k8s.type = 'kubernetes';
|
|
202
204
|
accounts = [k8s];
|
|
203
|
-
|
|
205
|
+
const configuration = {
|
|
204
206
|
name: 'Kubernetes',
|
|
205
207
|
adHocInfrastructureWritesEnabled: false,
|
|
206
208
|
};
|
|
@@ -218,7 +220,7 @@ describe('ProviderSelectionService: API', () => {
|
|
|
218
220
|
const k8s = fakeAccount('gce');
|
|
219
221
|
k8s.type = 'gce';
|
|
220
222
|
accounts = [k8s];
|
|
221
|
-
|
|
223
|
+
const configuration = {
|
|
222
224
|
name: 'Kubernetes',
|
|
223
225
|
};
|
|
224
226
|
CloudProviderRegistry.registerProvider('gce', configuration);
|
|
@@ -235,7 +237,7 @@ describe('ProviderSelectionService: API', () => {
|
|
|
235
237
|
const k8s = fakeAccount('kubernetes');
|
|
236
238
|
k8s.type = 'kubernetes';
|
|
237
239
|
accounts = [k8s, fakeAccount('gce')];
|
|
238
|
-
|
|
240
|
+
const configuration = {
|
|
239
241
|
name: 'Kubernetes',
|
|
240
242
|
adHocInfrastructureWritesEnabled: false,
|
|
241
243
|
};
|
|
@@ -254,7 +256,7 @@ describe('ProviderSelectionService: API', () => {
|
|
|
254
256
|
const k8s = fakeAccount('kubernetes');
|
|
255
257
|
k8s.type = 'kubernetes';
|
|
256
258
|
accounts = [k8s, fakeAccount('gce')];
|
|
257
|
-
|
|
259
|
+
const configuration = {
|
|
258
260
|
name: 'Kubernetes',
|
|
259
261
|
adHocInfrastructureWritesEnabled: true,
|
|
260
262
|
};
|
|
@@ -279,7 +281,7 @@ describe('ProviderSelectionService: API', () => {
|
|
|
279
281
|
k8s_account.type = 'kubernetes';
|
|
280
282
|
|
|
281
283
|
accounts = [k8s_account];
|
|
282
|
-
|
|
284
|
+
const configuration = {
|
|
283
285
|
name: 'kubernetes',
|
|
284
286
|
adHocInfrastructureWritesEnabled: true,
|
|
285
287
|
};
|
|
@@ -300,7 +302,7 @@ describe('ProviderSelectionService: API', () => {
|
|
|
300
302
|
k8s_account.type = 'kubernetes';
|
|
301
303
|
|
|
302
304
|
accounts = [k8s_account];
|
|
303
|
-
|
|
305
|
+
const configuration = {
|
|
304
306
|
name: 'kubernetes',
|
|
305
307
|
adHocInfrastructureWritesEnabled: false,
|
|
306
308
|
};
|
|
@@ -322,7 +324,7 @@ describe('ProviderSelectionService: API', () => {
|
|
|
322
324
|
const k8s_account = fakeAccount('kubernetes');
|
|
323
325
|
k8s_account.type = 'kubernetes';
|
|
324
326
|
accounts = [k8s_account, fakeAccount('gce')];
|
|
325
|
-
|
|
327
|
+
const kubernetes_configuration = {
|
|
326
328
|
name: 'Kubernetes',
|
|
327
329
|
adHocInfrastructureWritesEnabled: false,
|
|
328
330
|
};
|
|
@@ -350,7 +352,7 @@ describe('ProviderSelectionService: API', () => {
|
|
|
350
352
|
k8s_account_2.type = 'kubernetes';
|
|
351
353
|
|
|
352
354
|
accounts = [k8s_account_1, k8s_account_2];
|
|
353
|
-
|
|
355
|
+
const configuration = {
|
|
354
356
|
name: 'kubernetes',
|
|
355
357
|
adHocInfrastructureWritesEnabled: false,
|
|
356
358
|
};
|
|
@@ -371,7 +373,7 @@ describe('ProviderSelectionService: API', () => {
|
|
|
371
373
|
aws_account.type = 'aws';
|
|
372
374
|
|
|
373
375
|
accounts = [aws_account];
|
|
374
|
-
|
|
376
|
+
const configuration = {
|
|
375
377
|
name: 'aws',
|
|
376
378
|
adHocInfrastructureWritesEnabled: false,
|
|
377
379
|
};
|
|
@@ -392,7 +394,7 @@ describe('ProviderSelectionService: API', () => {
|
|
|
392
394
|
aws_account.type = 'aws';
|
|
393
395
|
|
|
394
396
|
accounts = [aws_account];
|
|
395
|
-
|
|
397
|
+
const configuration = {
|
|
396
398
|
name: 'aws',
|
|
397
399
|
adHocInfrastructureWritesEnabled: false,
|
|
398
400
|
};
|
|
@@ -415,11 +417,11 @@ describe('ProviderSelectionService: API', () => {
|
|
|
415
417
|
aws_account.type = 'aws';
|
|
416
418
|
|
|
417
419
|
accounts = [k8s_account, aws_account];
|
|
418
|
-
|
|
420
|
+
const k8s_configuration = {
|
|
419
421
|
name: 'kubernetes',
|
|
420
422
|
adHocInfrastructureWritesEnabled: false,
|
|
421
423
|
};
|
|
422
|
-
|
|
424
|
+
const aws_configuration = {
|
|
423
425
|
name: 'aws',
|
|
424
426
|
adHocInfrastructureWritesEnabled: false,
|
|
425
427
|
};
|
|
@@ -445,11 +447,11 @@ describe('ProviderSelectionService: API', () => {
|
|
|
445
447
|
aws_account.type = 'aws';
|
|
446
448
|
|
|
447
449
|
accounts = [k8s_account, aws_account];
|
|
448
|
-
|
|
450
|
+
const k8s_configuration = {
|
|
449
451
|
name: 'kubernetes',
|
|
450
452
|
adHocInfrastructureWritesEnabled: true,
|
|
451
453
|
};
|
|
452
|
-
|
|
454
|
+
const aws_configuration = {
|
|
453
455
|
name: 'aws',
|
|
454
456
|
adHocInfrastructureWritesEnabled: true,
|
|
455
457
|
};
|
|
@@ -480,11 +482,11 @@ describe('ProviderSelectionService: API', () => {
|
|
|
480
482
|
aws_account.type = 'aws';
|
|
481
483
|
|
|
482
484
|
accounts = [k8s_account, aws_account];
|
|
483
|
-
|
|
485
|
+
const k8s_configuration = {
|
|
484
486
|
name: 'kubernetes',
|
|
485
487
|
adHocInfrastructureWritesEnabled: false,
|
|
486
488
|
};
|
|
487
|
-
|
|
489
|
+
const aws_configuration = {
|
|
488
490
|
name: 'aws',
|
|
489
491
|
adHocInfrastructureWritesEnabled: true,
|
|
490
492
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IClusterMatcher, IClusterMatchRule } from './ClusterRuleMatcher';
|
|
2
|
+
import { DefaultClusterMatcher } from './ClusterRuleMatcher';
|
|
2
3
|
|
|
3
4
|
describe('CustomRuleMatcher', () => {
|
|
4
5
|
let matcher: IClusterMatcher;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { mockHttpClient } from '../api/mock/jasmine';
|
|
2
1
|
import { mock } from 'angular';
|
|
3
2
|
import { find } from 'lodash';
|
|
4
3
|
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
4
|
+
import { mockHttpClient } from '../api/mock/jasmine';
|
|
5
|
+
import type { Application } from '../application/application.model';
|
|
7
6
|
import { ApplicationModelBuilder } from '../application/applicationModel.builder';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
import { CLUSTER_SERVICE, ClusterService } from './cluster.service';
|
|
7
|
+
import type { ClusterService } from './cluster.service';
|
|
8
|
+
import { CLUSTER_SERVICE } from './cluster.service';
|
|
12
9
|
import { SETTINGS } from '../config/settings';
|
|
10
|
+
import type { IInstanceCounts, IServerGroup } from '../domain';
|
|
11
|
+
import { REACT_MODULE } from '../reactShims';
|
|
12
|
+
import * as State from '../state';
|
|
13
13
|
|
|
14
14
|
const ClusterState = State.ClusterState;
|
|
15
15
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { mock } from 'angular';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { Application } from '../../application/application.model';
|
|
2
|
+
import { cloneDeep, filter } from 'lodash';
|
|
3
|
+
|
|
4
|
+
import type { Application } from '../../application/application.model';
|
|
5
5
|
import { ApplicationModelBuilder } from '../../application/applicationModel.builder';
|
|
6
|
+
import { CLUSTER_SERVICE } from '../cluster.service';
|
|
7
|
+
import { REACT_MODULE } from '../../reactShims';
|
|
6
8
|
import * as State from '../../state';
|
|
7
|
-
import { cloneDeep, filter } from 'lodash';
|
|
8
9
|
|
|
9
10
|
const ClusterState = State.ClusterState;
|
|
10
11
|
|
|
@@ -324,8 +325,8 @@ describe('Service: clusterFilterService', function () {
|
|
|
324
325
|
|
|
325
326
|
describe('filter by starting status', function () {
|
|
326
327
|
it('should filter by starting status if checked', function (done) {
|
|
327
|
-
const starting: any = { healthState: 'Unknown' }
|
|
328
|
-
|
|
328
|
+
const starting: any = { healthState: 'Unknown' };
|
|
329
|
+
const serverGroup = application.getDataSource('serverGroups').data[0];
|
|
329
330
|
serverGroup.instances.push(starting);
|
|
330
331
|
|
|
331
332
|
ClusterState.filterModel.asFilterModel.sortFilter.status = { Starting: true };
|
|
@@ -348,8 +349,8 @@ describe('Service: clusterFilterService', function () {
|
|
|
348
349
|
|
|
349
350
|
describe('filter by out of service status', function () {
|
|
350
351
|
it('should filter out by out of service status if checked', function (done) {
|
|
351
|
-
const starting: any = { healthState: 'Unknown' }
|
|
352
|
-
|
|
352
|
+
const starting: any = { healthState: 'Unknown' };
|
|
353
|
+
const serverGroup = application.getDataSource('serverGroups').data[0];
|
|
353
354
|
serverGroup.instances.push(starting);
|
|
354
355
|
|
|
355
356
|
ClusterState.filterModel.asFilterModel.sortFilter.status = { OutOfService: true };
|
|
@@ -363,8 +364,8 @@ describe('Service: clusterFilterService', function () {
|
|
|
363
364
|
|
|
364
365
|
describe('filter by unknown status', function () {
|
|
365
366
|
it('should filter out by unknown status if checked', function (done) {
|
|
366
|
-
const starting: any = { healthState: 'Up' }
|
|
367
|
-
|
|
367
|
+
const starting: any = { healthState: 'Up' };
|
|
368
|
+
const serverGroup = application.getDataSource('serverGroups').data[0];
|
|
368
369
|
serverGroup.instances.push(starting);
|
|
369
370
|
|
|
370
371
|
ClusterState.filterModel.asFilterModel.sortFilter.status = { Unknown: true };
|
|
@@ -650,8 +651,8 @@ describe('Service: clusterFilterService', function () {
|
|
|
650
651
|
|
|
651
652
|
it('should remove all instanceIds if server group is no longer visible, and add back when visible again', function (done) {
|
|
652
653
|
ClusterState.filterModel.asFilterModel.sortFilter.listInstances = true;
|
|
653
|
-
const serverGroup = application.getDataSource('serverGroups').data[0]
|
|
654
|
-
|
|
654
|
+
const serverGroup = application.getDataSource('serverGroups').data[0];
|
|
655
|
+
const multiselectGroup = ClusterState.multiselectModel.getOrCreateInstanceGroup(serverGroup);
|
|
655
656
|
|
|
656
657
|
serverGroup.instances.push({ id: 'i-1234' });
|
|
657
658
|
ClusterState.multiselectModel.toggleSelectAll(serverGroup, ['i-1234']);
|
|
@@ -1133,8 +1134,8 @@ describe('Service: clusterFilterService', function () {
|
|
|
1133
1134
|
});
|
|
1134
1135
|
|
|
1135
1136
|
it('adds executions and running tasks, even when stringVal does not change', function (done) {
|
|
1136
|
-
const runningTasks: any = [{ name: 'a' }]
|
|
1137
|
-
|
|
1137
|
+
const runningTasks: any = [{ name: 'a' }];
|
|
1138
|
+
const executions: any = [{ name: 'b' }];
|
|
1138
1139
|
application = this.buildApplication({
|
|
1139
1140
|
serverGroups: {
|
|
1140
1141
|
data: [
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { shallow } from 'enzyme';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
|
|
4
|
+
import type { ILabelFilterProps } from './LabelFilter';
|
|
5
|
+
import LabelFilter, { LabelFilterSelect } from './LabelFilter';
|
|
4
6
|
import { noop } from '../../utils';
|
|
5
7
|
|
|
6
|
-
import LabelFilter, { ILabelFilterProps, LabelFilterSelect } from './LabelFilter';
|
|
7
|
-
|
|
8
8
|
describe('<LabelFilter />', () => {
|
|
9
9
|
let props: ILabelFilterProps;
|
|
10
10
|
beforeEach(() => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { MultiselectModel } from './MultiselectModel';
|
|
1
2
|
import { ReactInjector } from '../../reactShims';
|
|
2
3
|
import * as State from '../../state';
|
|
3
|
-
const { ClusterState } = State;
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const { ClusterState } = State;
|
|
6
6
|
|
|
7
7
|
describe('Multiselect Model', () => {
|
|
8
8
|
let multiselectModel: MultiselectModel;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
trueKeyObjectToLabelFilters,
|
|
5
|
-
ILabelFilter,
|
|
6
|
-
} from './labelFilterUtils';
|
|
7
|
-
import { IServerGroup } from '../../domain/IServerGroup';
|
|
1
|
+
import type { IServerGroup } from '../../domain/IServerGroup';
|
|
2
|
+
import type { ILabelFilter } from './labelFilterUtils';
|
|
3
|
+
import { buildLabelsMap, labelFiltersToTrueKeyObject, trueKeyObjectToLabelFilters } from './labelFilterUtils';
|
|
8
4
|
|
|
9
5
|
describe('Label filter utils', () => {
|
|
10
6
|
let labelFilters: ILabelFilter[];
|