@spinnaker/core 0.14.1 → 0.16.0
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 -1
- 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 -3
- 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 +102 -70
- 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/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 +6 -6
- 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
package/src/config/settings.ts
CHANGED
|
@@ -78,7 +78,7 @@ export interface IManagedDeliveryURLs {
|
|
|
78
78
|
|
|
79
79
|
export interface ISpinnakerSettings {
|
|
80
80
|
[key: string]: any;
|
|
81
|
-
|
|
81
|
+
accountTagLimit?: number;
|
|
82
82
|
analytics: {
|
|
83
83
|
customConfig?: {
|
|
84
84
|
siteSpeedSampleRate?: number;
|
|
@@ -150,7 +150,6 @@ export interface ISpinnakerSettings {
|
|
|
150
150
|
triggerTypes: string[];
|
|
151
151
|
useClassicFirewallLabels: boolean;
|
|
152
152
|
kubernetesAdHocInfraWritesEnabled: boolean;
|
|
153
|
-
awsAdHocInfraWritesEnabled: boolean;
|
|
154
153
|
changelogUrl: string;
|
|
155
154
|
}
|
|
156
155
|
|
|
@@ -160,7 +159,6 @@ export const SETTINGS: ISpinnakerSettings = (window as any).spinnakerSettings ||
|
|
|
160
159
|
SETTINGS.feature = SETTINGS.feature || {};
|
|
161
160
|
SETTINGS.feature.roscoMode = SETTINGS.feature.roscoMode ?? true;
|
|
162
161
|
SETTINGS.kubernetesAdHocInfraWritesEnabled = SETTINGS.kubernetesAdHocInfraWritesEnabled ?? true;
|
|
163
|
-
SETTINGS.awsAdHocInfraWritesEnabled = SETTINGS.awsAdHocInfraWritesEnabled ?? true;
|
|
164
162
|
SETTINGS.analytics = SETTINGS.analytics || {};
|
|
165
163
|
SETTINGS.providers = SETTINGS.providers || {};
|
|
166
164
|
SETTINGS.defaultTimeZone = SETTINGS.defaultTimeZone || 'America/Los_Angeles';
|
package/src/core.module.ts
CHANGED
|
@@ -12,7 +12,7 @@ import 'react-virtualized/styles.css';
|
|
|
12
12
|
import 'react-virtualized-select/styles.css';
|
|
13
13
|
import 'ui-select/dist/select.css';
|
|
14
14
|
import '@spinnaker/styleguide/public/styleguide.min.css';
|
|
15
|
-
import '
|
|
15
|
+
import 'select2/select2.css';
|
|
16
16
|
import 'select2-bootstrap-css/select2-bootstrap.css';
|
|
17
17
|
import 'source-sans/source-sans-3.css';
|
|
18
18
|
import './fonts/icons.css';
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Dictionary } from 'lodash';
|
|
2
|
+
import { groupBy } from 'lodash';
|
|
3
|
+
|
|
4
|
+
import type { Application } from '../../application/application.model';
|
|
2
5
|
import { ApplicationModelBuilder } from '../../application/applicationModel.builder';
|
|
6
|
+
import type { IFunction } from '../../domain';
|
|
3
7
|
import { FunctionState } from '../../state';
|
|
4
|
-
import { groupBy, Dictionary } from 'lodash';
|
|
5
|
-
import { IFunction } from '@spinnaker/core';
|
|
6
8
|
// Most of this logic has been moved to filter.model.service.js, so these act more as integration tests
|
|
7
9
|
describe('Service: functionFilterService', function () {
|
|
8
10
|
const debounceTimeout = 30;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { mockHttpClient } from '../api/mock/jasmine';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import type { MockHttpClient } from '../api/mock/mockHttpClient';
|
|
3
|
+
import type { IFunctionTransformer } from './function.transformer';
|
|
4
|
+
import type { IFunctionSourceData } from '../index';
|
|
5
|
+
import { FunctionReader } from '../index';
|
|
5
6
|
|
|
6
7
|
function flush<T>(http: MockHttpClient, promise: PromiseLike<T>): Promise<T> {
|
|
7
8
|
return http.flush().then(() => promise);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { shallow } from 'enzyme';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
|
|
4
|
+
import { CustomBanner } from './CustomBanner';
|
|
4
5
|
import { Application } from '../../application/application.model';
|
|
5
|
-
import { ICustomBannerConfig } from '../../application/config/customBanner/CustomBannerConfig';
|
|
6
|
+
import type { ICustomBannerConfig } from '../../application/config/customBanner/CustomBannerConfig';
|
|
6
7
|
import { getTestBannerConfigs } from '../../application/config/customBanner/CustomBannerConfig.spec';
|
|
7
8
|
|
|
8
|
-
import { CustomBanner } from './CustomBanner';
|
|
9
|
-
|
|
10
9
|
describe('<CustomBanner />', () => {
|
|
11
10
|
let application: Application;
|
|
12
11
|
let wrapper: any;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { mount, shallow } from 'enzyme';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
|
|
4
4
|
import { HealthCounts } from './HealthCounts';
|
|
5
|
-
import { IInstanceCounts } from '../domain';
|
|
5
|
+
import type { IInstanceCounts } from '../domain';
|
|
6
6
|
|
|
7
7
|
describe('<HealthCounts />', () => {
|
|
8
8
|
it('displays nothing when container has no health info', () => {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { range, some } from 'lodash';
|
|
2
2
|
|
|
3
|
+
import type { ICache } from '../cache/deckCacheFactory';
|
|
4
|
+
import { DeckCacheFactory } from '../cache/deckCacheFactory';
|
|
3
5
|
import { RecentHistoryService } from '../history/recentHistory.service';
|
|
4
|
-
import { DeckCacheFactory, ICache } from '../cache/deckCacheFactory';
|
|
5
6
|
|
|
6
7
|
describe('recent history service', () => {
|
|
7
8
|
let backingCache: ICache;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { mock } from 'angular';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { CacheInitializerService } from '../cache/cacheInitializer.service';
|
|
2
|
+
import type { IModalService } from 'angular-ui-bootstrap';
|
|
3
|
+
import type { ReactWrapper } from 'enzyme';
|
|
4
|
+
import { mount } from 'enzyme';
|
|
5
|
+
import React from 'react';
|
|
8
6
|
import { Button } from 'react-bootstrap';
|
|
9
7
|
|
|
8
|
+
import type { IInsightMenuProps, IInsightMenuState } from './InsightMenu';
|
|
9
|
+
import { InsightMenu } from './InsightMenu';
|
|
10
|
+
import type { CacheInitializerService } from '../cache/cacheInitializer.service';
|
|
11
|
+
import { OverrideRegistry } from '../overrideRegistry/override.registry';
|
|
12
|
+
|
|
10
13
|
beforeEach(() => {
|
|
11
14
|
mock.module(($provide: any) => {
|
|
12
15
|
$provide.value('$uibModal', {} as IModalService);
|
|
@@ -56,6 +56,9 @@ export class InsightMenu extends React.Component<IInsightMenuProps, IInsightMenu
|
|
|
56
56
|
'createApplicationModal',
|
|
57
57
|
require('../application/modal/newapplication.html'),
|
|
58
58
|
),
|
|
59
|
+
resolve: {
|
|
60
|
+
name: () => '',
|
|
61
|
+
},
|
|
59
62
|
controller: this.overrideRegistry.getController('CreateApplicationModalCtrl'),
|
|
60
63
|
controllerAs: 'newAppModal',
|
|
61
64
|
})
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { mock } from 'angular';
|
|
2
2
|
|
|
3
|
+
import type { Application } from '../application/application.model';
|
|
4
|
+
import { ApplicationModelBuilder } from '../application/applicationModel.builder';
|
|
3
5
|
import { PROVIDER_SERVICE_DELEGATE } from '../cloudProvider';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
+
import type { IInstance, IServerGroup } from '../domain';
|
|
7
|
+
import type { IMultiInstanceGroup } from './instance.write.service';
|
|
8
|
+
import { InstanceWriter } from './instance.write.service';
|
|
6
9
|
import { REACT_MODULE } from '../reactShims';
|
|
7
|
-
import { ApplicationModelBuilder } from '../application/applicationModel.builder';
|
|
8
|
-
import { IInstance, IServerGroup } from '../domain';
|
|
9
|
-
import * as State from '../state';
|
|
10
|
-
|
|
11
10
|
import { ServerGroupReader } from '../serverGroup/serverGroupReader.service';
|
|
12
|
-
import
|
|
11
|
+
import * as State from '../state';
|
|
12
|
+
import type { IJob, ITaskCommand } from '../task/taskExecutor';
|
|
13
|
+
import { TaskExecutor } from '../task/taskExecutor';
|
|
13
14
|
|
|
14
15
|
describe('Service: instance writer', function () {
|
|
15
16
|
let $q: ng.IQService;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { module } from 'angular';
|
|
2
|
+
import { uniq } from 'lodash';
|
|
2
3
|
import type { ProviderServiceDelegate } from '../cloudProvider/providerService.delegate';
|
|
3
4
|
import { PROVIDER_SERVICE_DELEGATE } from '../cloudProvider/providerService.delegate';
|
|
4
5
|
|
|
@@ -15,8 +16,8 @@ export interface IInstanceTypesByRegion {
|
|
|
15
16
|
|
|
16
17
|
export interface IInstanceStorage {
|
|
17
18
|
type: string;
|
|
18
|
-
size
|
|
19
|
-
count
|
|
19
|
+
size?: number;
|
|
20
|
+
count?: number;
|
|
20
21
|
isDefault?: boolean;
|
|
21
22
|
}
|
|
22
23
|
|
|
@@ -81,6 +82,15 @@ export class InstanceTypeService {
|
|
|
81
82
|
});
|
|
82
83
|
}
|
|
83
84
|
|
|
85
|
+
public getCategoryForMultipleInstanceTypes(cloudProvider: string, instanceTypes: string[]) {
|
|
86
|
+
const promises = instanceTypes.map((it) => this.getCategoryForInstanceType(cloudProvider, it));
|
|
87
|
+
|
|
88
|
+
return Promise.all(promises).then((categories: string[]) => {
|
|
89
|
+
const distinctCategories = uniq(categories);
|
|
90
|
+
return distinctCategories.length === 1 ? distinctCategories[0] : 'custom';
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
84
94
|
public getInstanceTypeDetails(cloudProvider: string, instanceType: string): PromiseLike<IPreferredInstanceType> {
|
|
85
95
|
return this.getInstanceTypeCategory(cloudProvider, instanceType).then((category: IInstanceTypeCategory) => {
|
|
86
96
|
if (category && category.families && category.families.length && category.families[0].instanceTypes) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { mock } from 'angular';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import type { IInstanceTypeCategory, InstanceTypeService } from './instanceType.service';
|
|
4
|
+
import { INSTANCE_TYPE_SERVICE } from './instanceType.service';
|
|
4
5
|
|
|
5
6
|
describe('Service: instanceTypeService', function () {
|
|
6
7
|
let instanceTypeService: InstanceTypeService, $q: ng.IQService, $scope: ng.IScope;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IQService, IScope } from 'angular';
|
|
2
|
+
import { mock } from 'angular';
|
|
3
|
+
import type { ReactWrapper } from 'enzyme';
|
|
4
|
+
import { mount } from 'enzyme';
|
|
2
5
|
import React from 'react';
|
|
3
|
-
import { ReactWrapper, mount } from 'enzyme';
|
|
4
6
|
|
|
5
|
-
import { Application } from '../application/application.model';
|
|
6
|
-
import { ApplicationModelBuilder } from '../application/applicationModel.builder';
|
|
7
|
-
import { ILoadBalancersTagProps } from './LoadBalancersTagWrapper';
|
|
8
7
|
import { LoadBalancersTag } from './LoadBalancersTag';
|
|
9
|
-
import {
|
|
8
|
+
import type { ILoadBalancersTagProps } from './LoadBalancersTagWrapper';
|
|
9
|
+
import type { Application } from '../application/application.model';
|
|
10
|
+
import { ApplicationModelBuilder } from '../application/applicationModel.builder';
|
|
11
|
+
import type { IServerGroup } from '../domain';
|
|
10
12
|
import { HoverablePopover } from '../presentation';
|
|
11
13
|
|
|
12
14
|
describe('<LoadBalancersTag />', () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Application } from '../../application/application.model';
|
|
1
|
+
import type { Application } from '../../application/application.model';
|
|
2
2
|
import { ApplicationModelBuilder } from '../../application/applicationModel.builder';
|
|
3
|
-
import { ILoadBalancer,
|
|
3
|
+
import type { ILoadBalancer, ILoadBalancerGroup, IManagedResourceSummary, IServerGroup } from '../../domain';
|
|
4
4
|
import { LoadBalancerState } from '../../state';
|
|
5
5
|
|
|
6
6
|
// Most of this logic has been moved to filter.model.service.js, so these act more as integration tests
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.
|
|
1
|
+
.Environments {
|
|
2
2
|
width: 100%;
|
|
3
3
|
padding: 0 var(--l-spacing);
|
|
4
|
-
--base-horizontal-padding:
|
|
4
|
+
--base-horizontal-padding: 20px;
|
|
5
5
|
|
|
6
6
|
@media (max-width: 768px) {
|
|
7
7
|
padding: 0;
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
display: grid;
|
|
56
56
|
gap: var(--m-spacing);
|
|
57
57
|
align-items: flex-start;
|
|
58
|
-
--row-element-icon-width:
|
|
58
|
+
--row-element-icon-width: 32px;
|
|
59
59
|
|
|
60
60
|
&.grid-view {
|
|
61
61
|
gap: var(--xl-spacing) var(--m-spacing);
|
|
62
|
-
--row-element-icon-width:
|
|
62
|
+
--row-element-icon-width: 26px;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -31,7 +31,7 @@ export const Environments = () => {
|
|
|
31
31
|
}, [params]);
|
|
32
32
|
|
|
33
33
|
return (
|
|
34
|
-
<div className="vertical
|
|
34
|
+
<div className="vertical Environments">
|
|
35
35
|
<HorizontalTabs
|
|
36
36
|
tabs={tabs}
|
|
37
37
|
rightElement={!state.name?.endsWith('.config') ? <EnvironmentsDirectionController /> : undefined}
|
|
@@ -31,6 +31,13 @@ export const DurationRender: React.FC<{ startedAt: string; completedAt?: string
|
|
|
31
31
|
return <>{timeDiffToString(startAtDateTime, endTime)}</>;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
+
const toDateTime = (timestamp: DateTime | string | number) =>
|
|
35
|
+
typeof timestamp === 'number'
|
|
36
|
+
? DateTime.fromMillis(timestamp)
|
|
37
|
+
: typeof timestamp === 'string'
|
|
38
|
+
? DateTime.fromISO(timestamp)
|
|
39
|
+
: timestamp;
|
|
40
|
+
|
|
34
41
|
export const formatToRelativeTimestamp = (timestamp: DateTime, withSuffix: boolean) => {
|
|
35
42
|
const distance = getDistanceFromNow(timestamp);
|
|
36
43
|
const suffix = withSuffix ? ' ago' : '';
|
|
@@ -68,12 +75,7 @@ export const RelativeTimestamp = memo(
|
|
|
68
75
|
removeStyles,
|
|
69
76
|
withSuffix = false,
|
|
70
77
|
}: IRelativeTimestampProps) => {
|
|
71
|
-
const dateTimeTimestamp =
|
|
72
|
-
typeof originalTimestamp === 'number'
|
|
73
|
-
? DateTime.fromMillis(originalTimestamp)
|
|
74
|
-
: typeof originalTimestamp === 'string'
|
|
75
|
-
? DateTime.fromISO(originalTimestamp)
|
|
76
|
-
: originalTimestamp;
|
|
78
|
+
const dateTimeTimestamp = toDateTime(originalTimestamp);
|
|
77
79
|
const timestamp = TIMEZONE ? dateTimeTimestamp.setZone(TIMEZONE) : dateTimeTimestamp;
|
|
78
80
|
const [formattedTimestamp, setFormattedTimestamp] = useState(formatToRelativeTimestamp(timestamp, withSuffix));
|
|
79
81
|
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import classnames from 'classnames';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Dropdown, MenuItem } from 'react-bootstrap';
|
|
4
|
+
|
|
5
|
+
import { ACTION_BUTTON_CLASS_NAME } from '../utils/defaults';
|
|
6
|
+
import { useLogEvent } from '../utils/logging';
|
|
7
|
+
import type { ICompareLinks } from '../versionMetadata/MetadataComponents';
|
|
8
|
+
|
|
9
|
+
export interface VersionAction {
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
href?: string;
|
|
12
|
+
content: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface IArtifactActionsProps {
|
|
17
|
+
actions?: VersionAction[];
|
|
18
|
+
version: string;
|
|
19
|
+
buildNumber?: string;
|
|
20
|
+
compareLinks?: ICompareLinks;
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const ArtifactActions = ({ version, buildNumber, actions, compareLinks, className }: IArtifactActionsProps) => {
|
|
25
|
+
const compareActions: VersionAction[] = [
|
|
26
|
+
{ content: 'Current version', href: compareLinks?.current, disabled: !compareLinks?.current },
|
|
27
|
+
{ content: 'Previous version', href: compareLinks?.previous, disabled: !compareLinks?.previous },
|
|
28
|
+
];
|
|
29
|
+
return (
|
|
30
|
+
<div className={classnames('horizontal md-actions-gap', className)}>
|
|
31
|
+
{actions?.map((action) => (
|
|
32
|
+
<button
|
|
33
|
+
key={action.content}
|
|
34
|
+
className={ACTION_BUTTON_CLASS_NAME}
|
|
35
|
+
disabled={action.disabled}
|
|
36
|
+
onClick={action.onClick}
|
|
37
|
+
>
|
|
38
|
+
{action.content}
|
|
39
|
+
</button>
|
|
40
|
+
))}
|
|
41
|
+
<CompareToMenu id={`${version}-${buildNumber}-compare`} title="Compare to" actions={compareActions} />
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export interface ICompareToMenuProps {
|
|
47
|
+
id: string;
|
|
48
|
+
actions: VersionAction[];
|
|
49
|
+
title: string;
|
|
50
|
+
className?: string;
|
|
51
|
+
pullRight?: boolean;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const CompareToMenu = ({ id, title, actions, className, pullRight }: ICompareToMenuProps) => {
|
|
55
|
+
const logEvent = useLogEvent('ArtifactActions');
|
|
56
|
+
return (
|
|
57
|
+
<Dropdown id={id} className={classnames('ArtifactActionsMenu', className)} pullRight={pullRight}>
|
|
58
|
+
<Dropdown.Toggle className="md-btn md-action-button">{title}</Dropdown.Toggle>
|
|
59
|
+
<Dropdown.Menu>
|
|
60
|
+
{actions.map((action, index) => (
|
|
61
|
+
<MenuItem
|
|
62
|
+
key={index}
|
|
63
|
+
disabled={action.disabled}
|
|
64
|
+
onClick={() => {
|
|
65
|
+
action.onClick?.();
|
|
66
|
+
logEvent({ action: `Compare to - ${action.content}` });
|
|
67
|
+
}}
|
|
68
|
+
href={action.href}
|
|
69
|
+
target="_blank"
|
|
70
|
+
>
|
|
71
|
+
{action.content}
|
|
72
|
+
</MenuItem>
|
|
73
|
+
))}
|
|
74
|
+
</Dropdown.Menu>
|
|
75
|
+
</Dropdown>
|
|
76
|
+
);
|
|
77
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { GroupRange } from './AllowedTimes';
|
|
2
|
+
import { groupConsecutiveNumbers, groupDays, groupHours } from './AllowedTimes';
|
|
2
3
|
|
|
3
4
|
describe('days and hours grouping', () => {
|
|
4
5
|
it('test grouping', () => {
|
|
@@ -29,6 +29,7 @@ export interface IConstraintHandler<K = string> {
|
|
|
29
29
|
/** The icon can be a string (from IconNames) or a partial map from statuses to IconNames */
|
|
30
30
|
iconName: IconNames | { [status in ConstraintStatus | 'DEFAULT']?: IconNames };
|
|
31
31
|
|
|
32
|
+
/** Stricter format of the title */
|
|
32
33
|
displayTitle?: {
|
|
33
34
|
/** A user friendly name of the constraint */
|
|
34
35
|
displayName: string;
|
|
@@ -37,7 +38,7 @@ export interface IConstraintHandler<K = string> {
|
|
|
37
38
|
displayStatus: (props: { constraint: RelaxedConstraint }) => string;
|
|
38
39
|
};
|
|
39
40
|
|
|
40
|
-
/** Render function of the constraint title. If displayTitle exists it takes precedence */
|
|
41
|
+
/** DEPRECATED - Render function of the constraint title. If displayTitle exists it takes precedence */
|
|
41
42
|
titleRender?: React.ComponentType<{ constraint: RelaxedConstraint }>;
|
|
42
43
|
|
|
43
44
|
/** Optional render function of the constraint description */
|
|
@@ -45,6 +46,12 @@ export interface IConstraintHandler<K = string> {
|
|
|
45
46
|
|
|
46
47
|
/** Display actions to override the constraint - (fail or pass) */
|
|
47
48
|
overrideActions?: { [status in ConstraintStatus]?: IConstraintOverrideAction[] };
|
|
49
|
+
|
|
50
|
+
/** determines when to show the restart constraint button. By default, only when the status is FAIL */
|
|
51
|
+
restartProps?: {
|
|
52
|
+
isVisible?: (props: { constraint: RelaxedConstraint }) => boolean;
|
|
53
|
+
displayName?: string;
|
|
54
|
+
};
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
class ConstraintsManager extends BasePluginManager<IConstraintHandler> {
|
|
@@ -107,6 +114,19 @@ class ConstraintsManager extends BasePluginManager<IConstraintHandler> {
|
|
|
107
114
|
const actions = this.getHandler(constraint.type)?.overrideActions;
|
|
108
115
|
return actions?.[constraint.status];
|
|
109
116
|
}
|
|
117
|
+
|
|
118
|
+
private defaultShowRestart = ({ constraint }: { constraint: RelaxedConstraint }) => {
|
|
119
|
+
return constraint.status === 'FAIL';
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
isRestartVisible(constraint: IConstraint): boolean {
|
|
123
|
+
const showRestartFunc = this.getHandler(constraint.type)?.restartProps?.isVisible || this.defaultShowRestart;
|
|
124
|
+
return showRestartFunc({ constraint });
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
getRestartDisplayName(constraint: IConstraint): string {
|
|
128
|
+
return this.getHandler(constraint.type)?.restartProps?.displayName || 'Reset';
|
|
129
|
+
}
|
|
110
130
|
}
|
|
111
131
|
|
|
112
132
|
const baseHandlers: Array<IConstraintHandler<IConstraint['type']>> = [
|
|
@@ -126,6 +146,9 @@ const baseHandlers: Array<IConstraintHandler<IConstraint['type']>> = [
|
|
|
126
146
|
},
|
|
127
147
|
],
|
|
128
148
|
},
|
|
149
|
+
restartProps: {
|
|
150
|
+
isVisible: () => false,
|
|
151
|
+
},
|
|
129
152
|
},
|
|
130
153
|
{
|
|
131
154
|
kind: 'depends-on',
|
|
@@ -134,6 +157,9 @@ const baseHandlers: Array<IConstraintHandler<IConstraint['type']>> = [
|
|
|
134
157
|
displayName: 'Depends on',
|
|
135
158
|
displayStatus: getDependsOnStatus,
|
|
136
159
|
},
|
|
160
|
+
restartProps: {
|
|
161
|
+
isVisible: () => false,
|
|
162
|
+
},
|
|
137
163
|
},
|
|
138
164
|
{
|
|
139
165
|
kind: 'manual-judgement',
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
justify-content: center;
|
|
16
16
|
padding: var(--m-spacing) var(--base-horizontal-padding);
|
|
17
|
-
color: var(--color-
|
|
18
|
-
background-color: var(--color-
|
|
17
|
+
color: var(--color-white);
|
|
18
|
+
background-color: var(--color-primary-g1);
|
|
19
19
|
border-radius: @borderRadius @borderRadius 0 0;
|
|
20
20
|
|
|
21
21
|
.env-link {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
&:not(.preview-env) {
|
|
36
36
|
text-transform: uppercase;
|
|
37
37
|
}
|
|
38
|
-
font-size:
|
|
38
|
+
font-size: 20px;
|
|
39
39
|
font-weight: 700;
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -6,12 +6,14 @@ import { IconTooltip } from '../../presentation';
|
|
|
6
6
|
|
|
7
7
|
import { TOOLTIP_DELAY_SHOW } from '../utils/defaults';
|
|
8
8
|
|
|
9
|
-
interface IEnvironmentItemProps {
|
|
9
|
+
export interface IEnvironmentItemProps {
|
|
10
10
|
title: string | React.ReactElement;
|
|
11
11
|
className?: string;
|
|
12
12
|
iconTooltip: string;
|
|
13
13
|
iconName: IIconProps['name'];
|
|
14
|
+
withPadding?: boolean;
|
|
14
15
|
size?: 'regular' | 'small';
|
|
16
|
+
rightElement?: React.ReactElement;
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
export const EnvironmentItem: React.FC<IEnvironmentItemProps> = ({
|
|
@@ -20,21 +22,26 @@ export const EnvironmentItem: React.FC<IEnvironmentItemProps> = ({
|
|
|
20
22
|
iconName,
|
|
21
23
|
iconTooltip,
|
|
22
24
|
className,
|
|
25
|
+
rightElement,
|
|
26
|
+
withPadding = true,
|
|
23
27
|
children,
|
|
24
28
|
}) => {
|
|
25
29
|
return (
|
|
26
|
-
<div className={classnames(className, 'environment-row-element')}>
|
|
30
|
+
<div className={classnames(className, 'environment-row-element', { 'with-padding': withPadding })}>
|
|
27
31
|
<div className={classnames('row-icon', size)}>
|
|
28
32
|
<IconTooltip
|
|
29
33
|
tooltip={iconTooltip}
|
|
30
34
|
name={iconName}
|
|
31
35
|
color="primary-g1"
|
|
32
|
-
size={size === 'regular' ? '
|
|
36
|
+
size={size === 'regular' ? '17px' : '15px'}
|
|
33
37
|
delayShow={TOOLTIP_DELAY_SHOW}
|
|
34
38
|
/>
|
|
35
39
|
</div>
|
|
36
40
|
<div className="row-details">
|
|
37
|
-
<div className={classnames('row-title', size)}>
|
|
41
|
+
<div className={classnames('row-title', size)}>
|
|
42
|
+
{title}
|
|
43
|
+
{rightElement && <div>{rightElement}</div>}
|
|
44
|
+
</div>
|
|
38
45
|
{children}
|
|
39
46
|
</div>
|
|
40
47
|
</div>
|