Rename managed_by_tower to managed

This commit is contained in:
Christian M. Adams
2021-06-17 12:54:06 -04:00
committed by Shane McDonald
parent 6db4732bf3
commit 06b04007a0
53 changed files with 190 additions and 273 deletions

View File

@@ -38,7 +38,7 @@ const mockCredentialResults = {
description: '',
kind: 'ssh',
namespace: 'ssh',
managed_by_tower: true,
managed: true,
inputs: {
fields: [
{

View File

@@ -63,7 +63,7 @@ function CredentialDetail({ credential }) {
useCallback(async () => {
const [
{
data: { inputs: credentialTypeInputs, managed_by_tower },
data: { inputs: credentialTypeInputs, managed },
},
{
data: { results: loadedInputSources },
@@ -74,7 +74,7 @@ function CredentialDetail({ credential }) {
]);
return {
fields: credentialTypeInputs.fields || [],
managedByTower: managed_by_tower,
managedByTower: managed,
inputSources: loadedInputSources.reduce(
(inputSourcesMap, inputSource) => {
inputSourcesMap[inputSource.input_field_name] = inputSource;

View File

@@ -158,7 +158,7 @@ const mockCredentialResults = {
description: '',
kind: 'ssh',
namespace: 'ssh',
managed_by_tower: true,
managed: true,
inputs: {
fields: [
{
@@ -238,7 +238,7 @@ const mockCredentialResults = {
description: '',
kind: 'cloud',
namespace: 'gce',
managed_by_tower: true,
managed: true,
inputs: {
fields: [
{

View File

@@ -47,7 +47,7 @@ const mockCredentialTypeDetail = {
description: '',
kind: 'external',
namespace: 'conjur',
managed_by_tower: true,
managed: true,
inputs: {
fields: [
{ id: 'url', label: 'Conjur URL', type: 'string', format: 'url' },

View File

@@ -19,7 +19,7 @@
"description": "",
"kind": "cloud",
"namespace": "aws",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -65,7 +65,7 @@
"description": "",
"kind": "cloud",
"namespace": "tower",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -130,7 +130,7 @@
"description": "",
"kind": "cloud",
"namespace": "gce",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -179,7 +179,7 @@
"description": "",
"kind": "cloud",
"namespace": "azure_rm",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -246,7 +246,7 @@
"description": "",
"kind": "cloud",
"namespace": "openstack",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -318,7 +318,7 @@
"description": "",
"kind": "cloud",
"namespace": "satellite6",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -363,7 +363,7 @@
"description": "",
"kind": "cloud",
"namespace": "rhv",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -424,7 +424,7 @@
"description": "",
"kind": "cloud",
"namespace": "vmware",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -469,7 +469,7 @@
"description": "",
"kind": "external",
"namespace": "aim",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -550,7 +550,7 @@
"description": "",
"kind": "external",
"namespace": "conjur",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -620,7 +620,7 @@
"description": "",
"kind": "external",
"namespace": "hashivault_kv",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -723,7 +723,7 @@
"description": "",
"kind": "external",
"namespace": "hashivault_ssh",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -819,7 +819,7 @@
"description": "",
"kind": "external",
"namespace": "azure_kv",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -895,7 +895,7 @@
"description": "",
"kind": "insights",
"namespace": "insights",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -939,7 +939,7 @@
"description": "",
"kind": "kubernetes",
"namespace": "kubernetes_bearer_token",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -992,7 +992,7 @@
"description": "",
"kind": "net",
"namespace": "net",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -1059,7 +1059,7 @@
"description": "",
"kind": "scm",
"namespace": "scm",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -1111,7 +1111,7 @@
"description": "",
"kind": "ssh",
"namespace": "ssh",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -1190,7 +1190,7 @@
"description": "",
"kind": "token",
"namespace": "github_token",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -1225,7 +1225,7 @@
"description": "",
"kind": "token",
"namespace": "gitlab_token",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -1260,7 +1260,7 @@
"description": "",
"kind": "vault",
"namespace": "vault",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{
@@ -1302,7 +1302,7 @@
"description": "",
"kind": "galaxy",
"namespace": "galaxy_api_token",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{

View File

@@ -19,7 +19,7 @@
"description": "",
"kind": "ssh",
"namespace": "ssh",
"managed_by_tower": true,
"managed": true,
"inputs": {
"fields": [
{

View File

@@ -78,7 +78,7 @@
"description": "Bar",
"organization": 1,
"credential_type": 42,
"managed_by_tower": false,
"managed": false,
"inputs": {
"url": "https://localhost.com",
"auth_url": ""

View File

@@ -73,7 +73,7 @@
"description": "",
"organization": null,
"credential_type": 16,
"managed_by_tower": false,
"managed": false,
"inputs": {
"host": "https://localhost",
"username": "",

View File

@@ -23,7 +23,7 @@ import CredentialTypeListItem from './CredentialTypeListItem';
const QS_CONFIG = getQSConfig('credential-type', {
page: 1,
page_size: 20,
managed_by_tower: false,
managed: false,
});
function CredentialTypeList() {

View File

@@ -34,7 +34,7 @@ const credentialType = {
description: 'Jenkins Credential',
kind: 'cloud',
namespace: null,
managed_by_tower: false,
managed: false,
inputs: JSON.stringify({
fields: [
{

View File

@@ -33,7 +33,7 @@
"description": "Jenkins Credential",
"kind": "cloud",
"namespace": null,
"managed_by_tower": false,
"managed": false,
"inputs": {
"fields": [
{

View File

@@ -27,7 +27,7 @@ function ExecutionEnvironmentDetails({ executionEnvironment }) {
pull,
organization,
summary_fields,
managed_by_tower: managedByTower,
managed: managedByTower,
} = executionEnvironment;
const {
@@ -64,7 +64,7 @@ function ExecutionEnvironmentDetails({ executionEnvironment }) {
dataCy="execution-environment-detail-description"
/>
<Detail
label={t`Managed by Tower`}
label={t`Managed`}
value={managedByTower ? t`True` : t`False`}
dataCy="execution-environment-managed-by-tower"
/>

View File

@@ -53,7 +53,7 @@ const executionEnvironment = {
description: 'Foo',
organization: null,
image: 'https://localhost:90/12345/ma',
managed_by_tower: false,
managed: false,
credential: 4,
};
@@ -82,7 +82,7 @@ describe('<ExecutionEnvironmentDetails/>', () => {
wrapper.find('Detail[label="Credential"]').prop('value').props.children
).toEqual(executionEnvironment.summary_fields.credential.name);
expect(
wrapper.find('Detail[label="Managed by Tower"]').prop('value')
wrapper.find('Detail[label="Managed"]').prop('value')
).toEqual('False');
const dates = wrapper.find('UserDateDetail');
expect(dates).toHaveLength(2);
@@ -153,13 +153,13 @@ describe('<ExecutionEnvironmentDetails/>', () => {
expect(history.location.pathname).toBe('/execution_environments');
});
test('should render action buttons to ee managed by tower', async () => {
test('should render action buttons to managed ee', async () => {
await act(async () => {
wrapper = mountWithContexts(
<ExecutionEnvironmentDetails
executionEnvironment={{
...executionEnvironment,
managed_by_tower: true,
managed: true,
}}
/>
);
@@ -179,7 +179,7 @@ describe('<ExecutionEnvironmentDetails/>', () => {
wrapper.find('Detail[label="Credential"]').prop('value').props.children
).toEqual(executionEnvironment.summary_fields.credential.name);
expect(
wrapper.find('Detail[label="Managed by Tower"]').prop('value')
wrapper.find('Detail[label="Managed"]').prop('value')
).toEqual('True');
const dates = wrapper.find('UserDateDetail');
expect(dates).toHaveLength(2);

View File

@@ -23,7 +23,7 @@ describe('<ExecutionEnvironmentListItem/>', () => {
summary_fields: {
user_capabilities: { edit: true, copy: true, delete: true },
},
managed_by_tower: false,
managed: false,
};
test('should mount successfully', async () => {
@@ -146,7 +146,7 @@ describe('<ExecutionEnvironmentListItem/>', () => {
expect(wrapper.find('CopyButton').length).toBe(0);
});
test('should not render the pencil action for ee managed by tower', async () => {
test('should not render the pencil action for managed ee', async () => {
await act(async () => {
wrapper = mountWithContexts(
<table>
@@ -155,7 +155,7 @@ describe('<ExecutionEnvironmentListItem/>', () => {
executionEnvironment={{
...executionEnvironment,
summary_fields: { user_capabilities: { edit: false } },
managed_by_tower: true,
managed: true,
}}
detailUrl="execution_environments/1/details"
isSelected={false}

View File

@@ -50,7 +50,7 @@ const executionEnvironment = {
description: 'A simple EE',
organization: 1,
image: 'https://registry.com/image/container',
managed_by_tower: false,
managed: false,
credential: 4,
};
@@ -84,7 +84,7 @@ const globallyAvailableEE = {
description: 'A simple EE',
organization: null,
image: 'https://registry.com/image/container',
managed_by_tower: false,
managed: false,
credential: 4,
};

View File

@@ -23,7 +23,7 @@ function OrganizationAdd() {
data: { results },
} = await CredentialsAPI.read({
credential_type__kind: 'galaxy',
managed_by_tower: true,
managed: true,
});
return results[0] || null;

View File

@@ -20,7 +20,7 @@ describe('<OrganizationAdd />', () => {
type: 'credential',
name: 'Ansible Galaxy',
credential_type: 18,
managed_by_tower: true,
managed: true,
kind: 'galaxy_api_token',
},
],

View File

@@ -24,7 +24,7 @@ const executionEnvironments = {
},
organization: 1,
image: 'https://localhost.com/image/disk',
managed_by_tower: false,
managed: false,
credential: null,
},
{
@@ -36,7 +36,7 @@ const executionEnvironments = {
},
organization: 1,
image: 'test/image123',
managed_by_tower: false,
managed: false,
credential: null,
},
{
@@ -48,7 +48,7 @@ const executionEnvironments = {
},
organization: 1,
image: 'test/test',
managed_by_tower: false,
managed: false,
credential: null,
},
],

View File

@@ -60,7 +60,7 @@ describe('<OrganizationForm />', () => {
type: 'credential',
name: 'Ansible Galaxy',
credential_type: 18,
managed_by_tower: true,
managed: true,
kind: 'galaxy_api_token',
}}
/>,