catalog-model: Remove target from EntityRelation type.
Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
committed by
Fredrik Adelöw
parent
165cabfeb6
commit
d3e9ec43b7
@@ -94,11 +94,6 @@ describe('<ConsumedApisCard />', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'api',
|
||||
namespace: 'my-namespace',
|
||||
name: 'target-name',
|
||||
},
|
||||
targetRef: 'api:my-namespace/target-name',
|
||||
type: RELATION_CONSUMES_API,
|
||||
},
|
||||
|
||||
@@ -94,11 +94,6 @@ describe('<HasApisCard />', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'api',
|
||||
namespace: 'my-namespace',
|
||||
name: 'target-name',
|
||||
},
|
||||
targetRef: 'api:my-namespace/target-name',
|
||||
type: RELATION_HAS_PART,
|
||||
},
|
||||
|
||||
@@ -94,11 +94,6 @@ describe('<ProvidedApisCard />', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'api',
|
||||
namespace: 'my-namespace',
|
||||
name: 'target-name',
|
||||
},
|
||||
targetRef: 'api:my-namespace/target-name',
|
||||
type: RELATION_PROVIDES_API,
|
||||
},
|
||||
|
||||
@@ -97,11 +97,6 @@ describe('<ConsumingComponentsCard />', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'component',
|
||||
namespace: 'my-namespace',
|
||||
name: 'target-name',
|
||||
},
|
||||
targetRef: 'component:my-namespace/target-name',
|
||||
type: RELATION_API_CONSUMED_BY,
|
||||
},
|
||||
|
||||
@@ -97,11 +97,6 @@ describe('<ProvidingComponentsCard />', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'component',
|
||||
namespace: 'my-namespace',
|
||||
name: 'target-name',
|
||||
},
|
||||
targetRef: 'component:my-namespace/target-name',
|
||||
type: RELATION_API_PROVIDED_BY,
|
||||
},
|
||||
|
||||
@@ -80,11 +80,6 @@ describe('CatalogIdentityClient', () => {
|
||||
{
|
||||
type: RELATION_MEMBER_OF,
|
||||
targetRef: 'group:default/team-a',
|
||||
target: {
|
||||
kind: 'group',
|
||||
namespace: 'default',
|
||||
name: 'team-a',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -102,11 +97,6 @@ describe('CatalogIdentityClient', () => {
|
||||
{
|
||||
type: RELATION_MEMBER_OF,
|
||||
targetRef: 'group:reality/screen-actors-guild',
|
||||
target: {
|
||||
kind: 'group',
|
||||
namespace: 'reality',
|
||||
name: 'screen-actors-guild',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -30,11 +30,6 @@ describe('isEntityOwner', () => {
|
||||
{
|
||||
type: 'ownedBy',
|
||||
targetRef: 'user:default/spiderman',
|
||||
target: {
|
||||
kind: 'user',
|
||||
namespace: 'default',
|
||||
name: 'spiderman',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -54,11 +49,6 @@ describe('isEntityOwner', () => {
|
||||
{
|
||||
type: 'ownedBy',
|
||||
targetRef: 'user:default/green-goblin',
|
||||
target: {
|
||||
kind: 'user',
|
||||
namespace: 'default',
|
||||
name: 'green-goblin',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -14,11 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
Entity,
|
||||
parseEntityRef,
|
||||
stringifyEntityRef,
|
||||
} from '@backstage/catalog-model';
|
||||
import { Entity, stringifyEntityRef } from '@backstage/catalog-model';
|
||||
import { InputError, NotFoundError } from '@backstage/errors';
|
||||
import { Knex } from 'knex';
|
||||
import lodash from 'lodash';
|
||||
@@ -204,27 +200,6 @@ export class DefaultEntitiesCatalog implements EntitiesCatalog {
|
||||
entities = entities.map(e => request.fields!(e));
|
||||
}
|
||||
|
||||
// TODO(freben): This is added as a compatibility guarantee, until we can be
|
||||
// sure that all adopters have re-stitched their entities so that the new
|
||||
// targetRef field is present on them, and that they have stopped consuming
|
||||
// the now-removed old field
|
||||
for (const entity of entities) {
|
||||
if (entity.relations) {
|
||||
for (const relation of entity.relations) {
|
||||
if (!relation.targetRef && relation.target) {
|
||||
// This is the case where an old-form entity, not yet stitched with
|
||||
// the updated code, was in the database
|
||||
relation.targetRef = stringifyEntityRef(relation.target);
|
||||
} else if (!relation.target && relation.targetRef) {
|
||||
// This is the case where a new-form entity, stitched with the
|
||||
// updated code, was in the database but we still want to produce
|
||||
// the old data shape as well for compatibility reasons
|
||||
relation.target = parseEntityRef(relation.targetRef);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
entities,
|
||||
pageInfo,
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
import { ENTITY_STATUS_CATALOG_PROCESSING_TYPE } from '@backstage/catalog-client';
|
||||
import {
|
||||
AlphaEntity,
|
||||
parseEntityRef,
|
||||
EntityRelation,
|
||||
EntityStatusItem,
|
||||
} from '@backstage/catalog-model';
|
||||
@@ -186,8 +185,6 @@ export class Stitcher {
|
||||
.filter(row => row.relationType /* exclude null row, if relevant */)
|
||||
.map<EntityRelation>(row => ({
|
||||
type: row.relationType!,
|
||||
// TODO(freben): This field is deprecated and should be removed in a future release
|
||||
target: parseEntityRef(row.relationTarget!),
|
||||
targetRef: row.relationTarget!,
|
||||
}));
|
||||
if (statusItems.length) {
|
||||
|
||||
@@ -143,12 +143,10 @@ describe('buildEntitySearch', () => {
|
||||
{
|
||||
type: 't1',
|
||||
targetRef: 'k:ns/a',
|
||||
target: { kind: 'k', namespace: 'ns', name: 'a' },
|
||||
},
|
||||
{
|
||||
type: 't2',
|
||||
targetRef: 'k:ns/b',
|
||||
target: { kind: 'k', namespace: 'ns', name: 'b' },
|
||||
},
|
||||
],
|
||||
apiVersion: 'a',
|
||||
@@ -192,12 +190,10 @@ describe('buildEntitySearch', () => {
|
||||
{
|
||||
type: 'dup',
|
||||
targetRef: 'k:ns/a',
|
||||
target: { kind: 'k', namespace: 'ns', name: 'a' },
|
||||
},
|
||||
{
|
||||
type: 'DUP',
|
||||
targetRef: 'k:ns/b',
|
||||
target: { kind: 'k', namespace: 'ns', name: 'b' },
|
||||
},
|
||||
],
|
||||
apiVersion: 'a',
|
||||
|
||||
-40
@@ -49,20 +49,10 @@ describe('<EntityRelationsGraph/>', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'k',
|
||||
name: 'a1',
|
||||
namespace: 'd',
|
||||
},
|
||||
targetRef: 'k:d/a1',
|
||||
type: RELATION_OWNER_OF,
|
||||
},
|
||||
{
|
||||
target: {
|
||||
kind: 'b',
|
||||
name: 'c1',
|
||||
namespace: 'd',
|
||||
},
|
||||
targetRef: 'b:d/c1',
|
||||
type: RELATION_HAS_PART,
|
||||
},
|
||||
@@ -77,20 +67,10 @@ describe('<EntityRelationsGraph/>', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'b',
|
||||
name: 'c',
|
||||
namespace: 'd',
|
||||
},
|
||||
targetRef: 'b:d/c',
|
||||
type: RELATION_OWNED_BY,
|
||||
},
|
||||
{
|
||||
target: {
|
||||
kind: 'b',
|
||||
name: 'c1',
|
||||
namespace: 'd',
|
||||
},
|
||||
targetRef: 'b:d/c1',
|
||||
type: RELATION_OWNED_BY,
|
||||
},
|
||||
@@ -105,29 +85,14 @@ describe('<EntityRelationsGraph/>', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'b',
|
||||
name: 'c',
|
||||
namespace: 'd',
|
||||
},
|
||||
targetRef: 'b:d/c',
|
||||
type: RELATION_PART_OF,
|
||||
},
|
||||
{
|
||||
target: {
|
||||
kind: 'k',
|
||||
name: 'a1',
|
||||
namespace: 'd',
|
||||
},
|
||||
targetRef: 'k:d/a1',
|
||||
type: RELATION_OWNER_OF,
|
||||
},
|
||||
{
|
||||
target: {
|
||||
kind: 'b',
|
||||
name: 'c2',
|
||||
namespace: 'd',
|
||||
},
|
||||
targetRef: 'b:d/c2',
|
||||
type: RELATION_HAS_PART,
|
||||
},
|
||||
@@ -142,11 +107,6 @@ describe('<EntityRelationsGraph/>', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'b',
|
||||
name: 'c1',
|
||||
namespace: 'd',
|
||||
},
|
||||
targetRef: 'b:d/c1',
|
||||
type: RELATION_PART_OF,
|
||||
},
|
||||
|
||||
-40
@@ -44,20 +44,10 @@ describe('useEntityRelationNodesAndEdges', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'k',
|
||||
name: 'a1',
|
||||
namespace: 'd',
|
||||
},
|
||||
targetRef: 'k:d/a1',
|
||||
type: RELATION_OWNER_OF,
|
||||
},
|
||||
{
|
||||
target: {
|
||||
kind: 'b',
|
||||
name: 'c1',
|
||||
namespace: 'd',
|
||||
},
|
||||
targetRef: 'b:d/c1',
|
||||
type: RELATION_HAS_PART,
|
||||
},
|
||||
@@ -72,20 +62,10 @@ describe('useEntityRelationNodesAndEdges', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'b',
|
||||
name: 'c',
|
||||
namespace: 'd',
|
||||
},
|
||||
targetRef: 'b:d/c',
|
||||
type: RELATION_OWNED_BY,
|
||||
},
|
||||
{
|
||||
target: {
|
||||
kind: 'b',
|
||||
name: 'c1',
|
||||
namespace: 'd',
|
||||
},
|
||||
targetRef: 'b:d/c1',
|
||||
type: RELATION_OWNED_BY,
|
||||
},
|
||||
@@ -100,29 +80,14 @@ describe('useEntityRelationNodesAndEdges', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'b',
|
||||
name: 'c',
|
||||
namespace: 'd',
|
||||
},
|
||||
targetRef: 'b:d/c',
|
||||
type: RELATION_PART_OF,
|
||||
},
|
||||
{
|
||||
target: {
|
||||
kind: 'k',
|
||||
name: 'a1',
|
||||
namespace: 'd',
|
||||
},
|
||||
targetRef: 'k:d/a1',
|
||||
type: RELATION_OWNER_OF,
|
||||
},
|
||||
{
|
||||
target: {
|
||||
kind: 'b',
|
||||
name: 'c2',
|
||||
namespace: 'd',
|
||||
},
|
||||
targetRef: 'b:d/c2',
|
||||
type: RELATION_HAS_PART,
|
||||
},
|
||||
@@ -137,11 +102,6 @@ describe('useEntityRelationNodesAndEdges', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'b',
|
||||
name: 'c1',
|
||||
namespace: 'd',
|
||||
},
|
||||
targetRef: 'b:d/c1',
|
||||
type: RELATION_PART_OF,
|
||||
},
|
||||
|
||||
@@ -32,20 +32,10 @@ const sampleEntities: Entity[] = [
|
||||
{
|
||||
type: 'ownedBy',
|
||||
targetRef: 'group:default/some-owner',
|
||||
target: {
|
||||
name: 'some-owner',
|
||||
namespace: 'default',
|
||||
kind: 'Group',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'ownedBy',
|
||||
targetRef: 'group:default/some-owner-2',
|
||||
target: {
|
||||
name: 'some-owner-2',
|
||||
namespace: 'default',
|
||||
kind: 'Group',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -59,11 +49,6 @@ const sampleEntities: Entity[] = [
|
||||
{
|
||||
type: 'ownedBy',
|
||||
targetRef: 'group:default/another-owner',
|
||||
target: {
|
||||
name: 'another-owner',
|
||||
namespace: 'default',
|
||||
kind: 'Group',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -77,11 +62,6 @@ const sampleEntities: Entity[] = [
|
||||
{
|
||||
type: 'ownedBy',
|
||||
targetRef: 'group:default/some-owner',
|
||||
target: {
|
||||
name: 'some-owner',
|
||||
namespace: 'default',
|
||||
kind: 'Group',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -45,20 +45,10 @@ describe('systemEntityColumns', () => {
|
||||
{
|
||||
type: RELATION_PART_OF,
|
||||
targetRef: 'domain:my-namespace/my-domain',
|
||||
target: {
|
||||
kind: 'domain',
|
||||
name: 'my-domain',
|
||||
namespace: 'my-namespace',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: 'group:default/test',
|
||||
target: {
|
||||
kind: 'group',
|
||||
name: 'test',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -107,20 +97,10 @@ describe('componentEntityColumns', () => {
|
||||
{
|
||||
type: RELATION_PART_OF,
|
||||
targetRef: 'system:my-namespace/my-system',
|
||||
target: {
|
||||
kind: 'system',
|
||||
name: 'my-system',
|
||||
namespace: 'my-namespace',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: 'group:default/test',
|
||||
target: {
|
||||
kind: 'group',
|
||||
name: 'test',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -104,7 +104,6 @@ const backendEntities: Entity[] = [
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: 'user:default/testuser',
|
||||
target: { kind: 'User', namespace: 'default', name: 'testUser' },
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -138,7 +137,6 @@ const backendEntities: Entity[] = [
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: 'user:default/testuser',
|
||||
target: { kind: 'User', namespace: 'default', name: 'testUser' },
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -46,11 +46,6 @@ const entities: Entity[] = [
|
||||
{
|
||||
type: 'ownedBy',
|
||||
targetRef: 'user:default/guest',
|
||||
target: {
|
||||
name: 'guest',
|
||||
namespace: 'default',
|
||||
kind: 'User',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -62,12 +62,10 @@ describe('useEntityOwnership', () => {
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: 'user:default/user1',
|
||||
target: { kind: 'User', namespace: 'default', name: 'user1' },
|
||||
},
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: 'group:default/group1',
|
||||
target: { kind: 'Group', namespace: 'default', name: 'group1' },
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -32,7 +32,6 @@ describe('getEntityRelations', () => {
|
||||
{
|
||||
type: RELATION_MEMBER_OF,
|
||||
targetRef: 'group:default/member',
|
||||
target: { kind: 'group', namespace: 'default', name: 'member' },
|
||||
},
|
||||
{
|
||||
type: RELATION_CHILD_OF,
|
||||
@@ -53,7 +52,6 @@ describe('getEntityRelations', () => {
|
||||
{
|
||||
type: RELATION_MEMBER_OF,
|
||||
targetRef: 'group:default/member',
|
||||
target: { kind: 'group', namespace: 'default', name: 'member' },
|
||||
},
|
||||
{
|
||||
type: RELATION_MEMBER_OF,
|
||||
|
||||
@@ -32,7 +32,6 @@ describe('isOwnerOf', () => {
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: 'user:default/user',
|
||||
target: { kind: 'user', namespace: 'default', name: 'user' },
|
||||
},
|
||||
],
|
||||
} as Entity;
|
||||
@@ -48,7 +47,6 @@ describe('isOwnerOf', () => {
|
||||
{
|
||||
type: RELATION_MEMBER_OF,
|
||||
targetRef: 'group:default/group',
|
||||
target: { kind: 'group', namespace: 'default', name: 'group' },
|
||||
},
|
||||
],
|
||||
} as Entity;
|
||||
@@ -57,7 +55,6 @@ describe('isOwnerOf', () => {
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: 'group:default/group',
|
||||
target: { kind: 'group', namespace: 'default', name: 'group' },
|
||||
},
|
||||
],
|
||||
} as Entity;
|
||||
|
||||
@@ -48,29 +48,14 @@ describe('<AboutContent />', () => {
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: 'user:default/o',
|
||||
target: {
|
||||
kind: 'user',
|
||||
name: 'o',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: RELATION_PART_OF,
|
||||
targetRef: 'system:default/s',
|
||||
target: {
|
||||
kind: 'system',
|
||||
name: 's',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: RELATION_PART_OF,
|
||||
targetRef: 'domain:default/d',
|
||||
target: {
|
||||
kind: 'domain',
|
||||
name: 'd',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -156,20 +141,10 @@ describe('<AboutContent />', () => {
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: 'user:default/guest',
|
||||
target: {
|
||||
kind: 'user',
|
||||
name: 'guest',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: RELATION_PART_OF,
|
||||
targetRef: 'system:default/system',
|
||||
target: {
|
||||
kind: 'system',
|
||||
name: 'system',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -263,29 +238,14 @@ describe('<AboutContent />', () => {
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: 'user:default/guest',
|
||||
target: {
|
||||
kind: 'user',
|
||||
name: 'guest',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: RELATION_PART_OF,
|
||||
targetRef: 'system:default/system',
|
||||
target: {
|
||||
kind: 'system',
|
||||
name: 'system',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: RELATION_PART_OF,
|
||||
targetRef: 'component:default/parent-software',
|
||||
target: {
|
||||
kind: 'component',
|
||||
name: 'parent-software',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -378,11 +338,6 @@ describe('<AboutContent />', () => {
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: 'user:default/guest',
|
||||
target: {
|
||||
kind: 'user',
|
||||
name: 'guest',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -538,20 +493,10 @@ describe('<AboutContent />', () => {
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: 'user:default/guest',
|
||||
target: {
|
||||
kind: 'user',
|
||||
name: 'guest',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: RELATION_PART_OF,
|
||||
targetRef: 'system:default/system',
|
||||
target: {
|
||||
kind: 'system',
|
||||
name: 'system',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -637,20 +582,10 @@ describe('<AboutContent />', () => {
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: 'user:default/guest',
|
||||
target: {
|
||||
kind: 'user',
|
||||
name: 'guest',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: RELATION_PART_OF,
|
||||
targetRef: 'domain:default/domain',
|
||||
target: {
|
||||
kind: 'domain',
|
||||
name: 'domain',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -75,7 +75,6 @@ describe('DefaultCatalogPage', () => {
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: 'group:default/tools',
|
||||
target: { kind: 'group', name: 'tools', namespace: 'default' },
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
-5
@@ -80,11 +80,6 @@ describe('<DependencyOfComponentsCard />', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'component',
|
||||
namespace: 'my-namespace',
|
||||
name: 'target-name',
|
||||
},
|
||||
targetRef: 'component:my-namespace/target-name',
|
||||
type: RELATION_DEPENDENCY_OF,
|
||||
},
|
||||
|
||||
-5
@@ -80,11 +80,6 @@ describe('<DependsOnComponentsCard />', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'component',
|
||||
namespace: 'my-namespace',
|
||||
name: 'target-name',
|
||||
},
|
||||
targetRef: 'component:my-namespace/target-name',
|
||||
type: RELATION_DEPENDS_ON,
|
||||
},
|
||||
|
||||
@@ -80,11 +80,6 @@ describe('<DependsOnResourcesCard />', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'resource',
|
||||
namespace: 'my-namespace',
|
||||
name: 'target-name',
|
||||
},
|
||||
targetRef: 'resource:my-namespace/target-name',
|
||||
type: RELATION_DEPENDS_ON,
|
||||
},
|
||||
|
||||
@@ -80,11 +80,6 @@ describe('<HasComponentsCard />', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'component',
|
||||
namespace: 'my-namespace',
|
||||
name: 'target-name',
|
||||
},
|
||||
targetRef: 'component:my-namespace/target-name',
|
||||
type: RELATION_HAS_PART,
|
||||
},
|
||||
|
||||
@@ -75,11 +75,6 @@ describe('<HasResourcesCard />', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'resource',
|
||||
namespace: 'my-namespace',
|
||||
name: 'target-name',
|
||||
},
|
||||
targetRef: 'resource:my-namespace/target-name',
|
||||
type: RELATION_HAS_PART,
|
||||
},
|
||||
|
||||
@@ -80,11 +80,6 @@ describe('<HasSubcomponentsCard />', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'component',
|
||||
namespace: 'my-namespace',
|
||||
name: 'target-name',
|
||||
},
|
||||
targetRef: 'component:my-namespace/target-name',
|
||||
type: RELATION_HAS_PART,
|
||||
},
|
||||
|
||||
@@ -78,11 +78,6 @@ describe('<HasSystemsCard />', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'system',
|
||||
namespace: 'my-namespace',
|
||||
name: 'target-name',
|
||||
},
|
||||
targetRef: 'system:my-namespace/target-name',
|
||||
type: RELATION_HAS_PART,
|
||||
},
|
||||
|
||||
@@ -102,11 +102,6 @@ describe('<SystemDiagramCard />', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'domain',
|
||||
namespace: 'namespace',
|
||||
name: 'domain',
|
||||
},
|
||||
targetRef: 'domain:namespace/domain',
|
||||
type: RELATION_PART_OF,
|
||||
},
|
||||
@@ -162,11 +157,6 @@ describe('<SystemDiagramCard />', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'Domain',
|
||||
namespace: 'namespace',
|
||||
name: 'alongdomainthatshouldgettruncated',
|
||||
},
|
||||
targetRef: 'domain:namespace/alongdomainthatshouldgettruncated',
|
||||
type: RELATION_PART_OF,
|
||||
},
|
||||
|
||||
@@ -43,7 +43,6 @@ const entity = (name?: string) =>
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: `group:default/${name}`,
|
||||
target: { kind: 'group', namespace: 'default', name },
|
||||
},
|
||||
],
|
||||
} as Entity);
|
||||
|
||||
@@ -60,11 +60,6 @@ describe('MemberTab Test', () => {
|
||||
{
|
||||
type: 'memberOf',
|
||||
targetRef: 'group:default/team-d',
|
||||
target: {
|
||||
kind: 'group',
|
||||
name: 'team-d',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
],
|
||||
spec: {
|
||||
|
||||
@@ -103,11 +103,6 @@ const items = [
|
||||
{
|
||||
type: 'ownedBy',
|
||||
targetRef: 'group:default/my-team',
|
||||
target: {
|
||||
name: 'my-team',
|
||||
namespace: 'default',
|
||||
kind: 'group',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -140,11 +135,6 @@ describe('OwnershipCard', () => {
|
||||
{
|
||||
type: 'memberOf',
|
||||
targetRef: 'group:default/examplegroup',
|
||||
target: {
|
||||
kind: 'group',
|
||||
name: 'examplegroup',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -266,11 +256,6 @@ describe('OwnershipCard', () => {
|
||||
{
|
||||
type: 'memberOf',
|
||||
targetRef: 'group:default/my-team',
|
||||
target: {
|
||||
kind: 'group',
|
||||
name: 'my-team',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -43,11 +43,6 @@ describe('UserSummary Test', () => {
|
||||
{
|
||||
type: 'memberOf',
|
||||
targetRef: 'group:default/examplegroup',
|
||||
target: {
|
||||
kind: 'group',
|
||||
name: 'ExampleGroup',
|
||||
namespace: 'default',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
-1
@@ -58,7 +58,6 @@ const defaultEntityListResponse: GetEntitiesResponse = {
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: 'group:default/my-team',
|
||||
target: { name: 'team-a', kind: 'group', namespace: 'default' },
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
-1
@@ -58,7 +58,6 @@ const defaultEntityListResponse: GetEntitiesResponse = {
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: 'group:default/team-a',
|
||||
target: { name: 'team-a', kind: 'group', namespace: 'default' },
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
-1
@@ -58,7 +58,6 @@ const defaultEntityListResponse: GetEntitiesResponse = {
|
||||
{
|
||||
type: RELATION_OWNED_BY,
|
||||
targetRef: 'group:default/team-a',
|
||||
target: { name: 'team-a', kind: 'group', namespace: 'default' },
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -61,11 +61,6 @@ describe('DocsTable test', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'user',
|
||||
namespace: 'default',
|
||||
name: 'owned',
|
||||
},
|
||||
targetRef: 'user:default/owned',
|
||||
type: 'ownedBy',
|
||||
},
|
||||
@@ -82,11 +77,6 @@ describe('DocsTable test', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'user',
|
||||
namespace: 'default',
|
||||
name: 'not-owned',
|
||||
},
|
||||
targetRef: 'user:default/not-owned',
|
||||
type: 'ownedBy',
|
||||
},
|
||||
@@ -134,11 +124,6 @@ describe('DocsTable test', () => {
|
||||
},
|
||||
relations: [
|
||||
{
|
||||
target: {
|
||||
kind: 'user',
|
||||
namespace: 'default',
|
||||
name: 'owned',
|
||||
},
|
||||
targetRef: 'user:default/owned',
|
||||
type: 'ownedBy',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user