From 055b58106a8e08344e990552f49dceb204040799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Thu, 25 Jan 2018 17:30:01 +0000 Subject: [PATCH] fix(my-joy-beta): hide special tags and metadata fixes #1106 fixes #1107 --- packages/my-joy-beta/src/containers/instances/metadata.js | 4 +++- packages/my-joy-beta/src/containers/instances/tags.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/my-joy-beta/src/containers/instances/metadata.js b/packages/my-joy-beta/src/containers/instances/metadata.js index 3245186f..21e51457 100644 --- a/packages/my-joy-beta/src/containers/instances/metadata.js +++ b/packages/my-joy-beta/src/containers/instances/metadata.js @@ -151,7 +151,9 @@ export default compose( const { name } = variables; const instance = find(get(rest, 'machines', []), ['name', name]); - const values = get(instance, 'metadata', []); + const values = get(instance, 'metadata', []).filter( + ({ name = '' }) => name !== 'user-script' + ); const metadata = values.map(({ name, value }) => ({ form: METADATA_FORM_KEY(name), diff --git a/packages/my-joy-beta/src/containers/instances/tags.js b/packages/my-joy-beta/src/containers/instances/tags.js index bf79a295..55c3088b 100644 --- a/packages/my-joy-beta/src/containers/instances/tags.js +++ b/packages/my-joy-beta/src/containers/instances/tags.js @@ -150,7 +150,9 @@ export default compose( const { name } = variables; const instance = find(get(rest, 'machines', []), ['name', name]); - const tags = get(instance, 'tags', []); + const tags = get(instance, 'tags', []).filter( + ({ name = '' }) => !/^triton\.cns\./i.test(name) + ); return { tags,