diff --git a/app/scripts/modules/core/src/pipeline/config/actions/PipelineConfigAction.tsx b/app/scripts/modules/core/src/pipeline/config/actions/PipelineConfigAction.tsx
new file mode 100644
index 00000000000..f7f1be47fbc
--- /dev/null
+++ b/app/scripts/modules/core/src/pipeline/config/actions/PipelineConfigAction.tsx
@@ -0,0 +1,16 @@
+import * as React from 'react';
+
+interface IPipelineConfigActionProps {
+ action?: () => void;
+ name: string;
+}
+
+export function PipelineConfigAction(props: IPipelineConfigActionProps) {
+ return (
+
+
+ {props.name}
+
+
+ );
+}
diff --git a/app/scripts/modules/core/src/pipeline/config/actions/PipelineConfigActions.tsx b/app/scripts/modules/core/src/pipeline/config/actions/PipelineConfigActions.tsx
new file mode 100644
index 00000000000..f6e7b5d8b60
--- /dev/null
+++ b/app/scripts/modules/core/src/pipeline/config/actions/PipelineConfigActions.tsx
@@ -0,0 +1,65 @@
+import * as React from 'react';
+import { Dropdown } from 'react-bootstrap';
+
+import { IPipeline } from 'core/domain';
+import { SETTINGS } from 'core/config/settings';
+import { PipelineConfigAction } from './PipelineConfigAction';
+
+export interface IPipelineConfigActionsProps {
+ hasHistory: boolean;
+ loadingHistory: boolean;
+ pipeline: IPipeline;
+ renamePipeline: () => void;
+ deletePipeline: () => void;
+ enablePipeline: () => void;
+ disablePipeline: () => void;
+ lockPipeline: () => void;
+ unlockPipeline: () => void;
+ editPipelineJson: () => void;
+ showHistory: () => void;
+ exportPipelineTemplate: () => void;
+}
+
+export function PipelineConfigActions(props: IPipelineConfigActionsProps) {
+ const {
+ hasHistory,
+ loadingHistory,
+ pipeline,
+ renamePipeline,
+ deletePipeline,
+ enablePipeline,
+ disablePipeline,
+ lockPipeline,
+ unlockPipeline,
+ editPipelineJson,
+ showHistory,
+ exportPipelineTemplate,
+ } = props;
+ const managedPipelineTemplatesV2UI = SETTINGS.feature.managedPipelineTemplatesV2UI;
+
+ return (
+
+
+ {pipeline.strategy === true ? 'Strategy' : 'Pipeline'} Actions
+
+
+ {!pipeline.locked && }
+ {!pipeline.locked && }
+ {!pipeline.locked && pipeline.disabled && }
+ {!pipeline.locked && !pipeline.disabled && }
+ {!pipeline.locked && }
+ {pipeline.locked && pipeline.locked.allowUnlockUi && (
+
+ )}
+ {pipeline.locked && }
+ {!pipeline.locked && }
+ {loadingHistory && }
+ {!loadingHistory && hasHistory && }
+ {!loadingHistory && !hasHistory && }
+ {managedPipelineTemplatesV2UI && (
+
+ )}
+
+
+ );
+}
diff --git a/app/scripts/modules/core/src/pipeline/config/actions/pipelineConfigActions.html b/app/scripts/modules/core/src/pipeline/config/actions/pipelineConfigActions.html
deleted file mode 100644
index fe2f3f79bbc..00000000000
--- a/app/scripts/modules/core/src/pipeline/config/actions/pipelineConfigActions.html
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
diff --git a/app/scripts/modules/core/src/pipeline/config/actions/pipelineConfigActions.module.ts b/app/scripts/modules/core/src/pipeline/config/actions/pipelineConfigActions.module.ts
new file mode 100644
index 00000000000..8ddca0bfc69
--- /dev/null
+++ b/app/scripts/modules/core/src/pipeline/config/actions/pipelineConfigActions.module.ts
@@ -0,0 +1,21 @@
+import { module } from 'angular';
+import { react2angular } from 'react2angular';
+import { PipelineConfigActions } from './PipelineConfigActions';
+export const PIPELINE_CONFIG_ACTIONS = 'pinnaker.core.pipeline.config.actions';
+module(PIPELINE_CONFIG_ACTIONS, []).component(
+ 'pipelineConfigActions',
+ react2angular(PipelineConfigActions, [
+ 'hasHistory',
+ 'loadingHistory',
+ 'pipeline',
+ 'renamePipeline',
+ 'deletePipeline',
+ 'enablePipeline',
+ 'disablePipeline',
+ 'lockPipeline',
+ 'unlockPipeline',
+ 'editPipelineJson',
+ 'showHistory',
+ 'exportPipelineTemplate',
+ ]),
+);
diff --git a/app/scripts/modules/core/src/pipeline/config/pipelineConfigurer.html b/app/scripts/modules/core/src/pipeline/config/pipelineConfigurer.html
index 21c6f8ffc56..954265dc228 100644
--- a/app/scripts/modules/core/src/pipeline/config/pipelineConfigurer.html
+++ b/app/scripts/modules/core/src/pipeline/config/pipelineConfigurer.html
@@ -34,7 +34,20 @@
diff --git a/app/scripts/modules/core/src/pipeline/config/pipelineConfigurer.js b/app/scripts/modules/core/src/pipeline/config/pipelineConfigurer.js
index d9c67306e71..9fcecd79cec 100644
--- a/app/scripts/modules/core/src/pipeline/config/pipelineConfigurer.js
+++ b/app/scripts/modules/core/src/pipeline/config/pipelineConfigurer.js
@@ -9,6 +9,7 @@ import { ReactModal } from 'core/presentation';
const angular = require('angular');
import { OVERRIDE_REGISTRY } from 'core/overrideRegistry/override.registry';
+import { PIPELINE_CONFIG_ACTIONS } from 'core/pipeline/config/actions/pipelineConfigActions.module';
import { PipelineConfigValidator } from './validation/PipelineConfigValidator';
import { EXECUTION_BUILD_TITLE } from '../executionBuild/ExecutionBuildTitle';
import { PipelineConfigService } from 'core/pipeline/config/services/PipelineConfigService';
@@ -26,7 +27,11 @@ import { PipelineTemplateV2Service } from 'core/pipeline';
import { PipelineTemplateWriter } from 'core/pipeline/config/templates/PipelineTemplateWriter';
module.exports = angular
- .module('spinnaker.core.pipeline.config.pipelineConfigurer', [OVERRIDE_REGISTRY, EXECUTION_BUILD_TITLE])
+ .module('spinnaker.core.pipeline.config.pipelineConfigurer', [
+ OVERRIDE_REGISTRY,
+ PIPELINE_CONFIG_ACTIONS,
+ EXECUTION_BUILD_TITLE,
+ ])
.directive('pipelineConfigurer', function() {
return {
restrict: 'E',
@@ -58,10 +63,6 @@ module.exports = angular
$scope.renderablePipeline = $scope.plan || $scope.pipeline;
// Watch for non-reference changes to renderablePipline and make them reference changes to make React happy
$scope.$watch('renderablePipeline', (newValue, oldValue) => newValue !== oldValue && this.updatePipeline(), true);
- this.actionsTemplateUrl = overrideRegistry.getTemplate(
- 'pipelineConfigActions',
- require('./actions/pipelineConfigActions.html'),
- );
this.warningsPopover = require('./warnings.popover.html');