Просмотр исходного кода

edited hardcoded template name stuff

Sean Rhee 5 лет назад
Родитель
Сommit
3f4841ace1

+ 2 - 7
dashboard/src/main/home/templates/Templates.tsx

@@ -9,17 +9,12 @@ import TabSelector from '../../../components/TabSelector';
 import ExpandedTemplate from './expanded-template/ExpandedTemplate';
 import Loading from '../../../components/Loading';
 
+import hardcodedNames from './hardcodedNameDict';
+
 const tabOptions = [
   { label: 'Community Templates', value: 'community' }
 ];
 
-// TODO: read in from metadata
-const hardcodedNames: any = {
-  'postgresql': 'PostgreSQL',
-  'docker': 'Docker',
-  'https-issuer': 'HTTPS Issuer'
-};
-
 type PropsType = {
   setCurrentView: (x: string) => void, // Link to add integration from source selector
 };

+ 1 - 5
dashboard/src/main/home/templates/expanded-template/TemplateInfo.tsx

@@ -9,11 +9,7 @@ import Loading from '../../../../components/Loading';
 import { PorterTemplate } from '../../../../shared/types';
 import Helper from '../../../../components/values-form/Helper';
 
-// TODO: read in from metadata
-const hardcodedNames: any = {
-  'postgresql': 'PostgreSQL',
-  'docker': 'Docker',
-};
+import hardcodedNames from '../hardcodedNameDict';
 
 type PropsType = {
   currentTemplate: any,

+ 12 - 0
dashboard/src/main/home/templates/hardcodedNameDict.tsx

@@ -0,0 +1,12 @@
+const hardcodedNames: any = {
+  'docker': 'Docker',
+  'https-issuer': 'HTTPS Issuer',
+  'metabase': 'Metabase',
+  'mongodb': 'MongoDB',
+  'mysql': 'MySQL',
+  'postgresql': 'PostgreSQL',
+  'redis': 'Redis',
+  'ubuntu': 'Ubuntu',
+};
+
+export default hardcodedNames;