common.tsx 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. import aws from "../assets/aws.png";
  2. import digitalOcean from "../assets/do.png";
  3. import gcp from "../assets/gcp.png";
  4. import github from "../assets/github.png";
  5. export const infraNames: any = {
  6. ecr: "Elastic Container Registry (ECR)",
  7. eks: "Elastic Kubernetes Service (EKS)",
  8. gcr: "Google Container Registry (GCR)",
  9. gke: "Google Kubernetes Engine (GKE)",
  10. docr: "DigitalOcean Container Registry",
  11. doks: "DigitalOcean Kubernetes Service",
  12. };
  13. export const integrationList: any = {
  14. kubernetes: {
  15. icon:
  16. "https://uxwing.com/wp-content/themes/uxwing/download/10-brands-and-social-media/kubernetes.png",
  17. label: "Kubernetes",
  18. buttonText: "Add a Cluster",
  19. },
  20. repo: {
  21. icon: "https://git-scm.com/images/logos/downloads/Git-Icon-1788C.png",
  22. label: "Git Repository",
  23. buttonText: "Link a Github Account",
  24. },
  25. slack: {
  26. icon:
  27. "https://user-images.githubusercontent.com/5147537/54070671-0a173780-4263-11e9-8946-09ac0e37d8c6.png",
  28. label: "Slack",
  29. buttonText: "Install Application",
  30. },
  31. registry: {
  32. icon:
  33. "https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/97_Docker_logo_logos-512.png",
  34. label: "Docker Registry",
  35. buttonText: "Add a Registry",
  36. },
  37. gke: {
  38. icon: "https://sysdig.com/wp-content/uploads/2016/08/GKE_color.png",
  39. label: "Google Kubernetes Engine (GKE)",
  40. },
  41. eks: {
  42. icon: "https://img.stackshare.io/service/7991/amazon-eks.png",
  43. label: "Amazon Elastic Kubernetes Service (EKS)",
  44. },
  45. test: {
  46. icon:
  47. "https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/97_Docker_logo_logos-512.png",
  48. label: "Testing",
  49. },
  50. kube: {
  51. icon:
  52. "https://uxwing.com/wp-content/themes/uxwing/download/10-brands-and-social-media/kubernetes.png",
  53. label: "Upload Kubeconfig",
  54. },
  55. dockerhub: {
  56. icon:
  57. "https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/97_Docker_logo_logos-512.png",
  58. label: "Docker Hub",
  59. },
  60. gcr: {
  61. icon:
  62. "https://carlossanchez.files.wordpress.com/2019/06/21046548.png?w=640",
  63. label: "Google Container Registry (GCR)",
  64. },
  65. ecr: {
  66. icon:
  67. "https://avatars2.githubusercontent.com/u/52505464?s=400&u=da920f994c67665c7ad6c606a5286557d4f8555f&v=4",
  68. label: "Elastic Container Registry (ECR)",
  69. },
  70. doks: {
  71. icon:
  72. "https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/97_Docker_logo_logos-512.png",
  73. label: "Digital Ocean Kubernetes Service (DOKS)",
  74. },
  75. docr: {
  76. icon:
  77. "https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/97_Docker_logo_logos-512.png",
  78. label: "Digital Ocean Container Registry (DOCR)",
  79. },
  80. aks: {
  81. icon:
  82. "https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/97_Docker_logo_logos-512.png",
  83. label: "Azure Kubernetes Service (AKS)",
  84. },
  85. acr: {
  86. icon:
  87. "https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/97_Docker_logo_logos-512.png",
  88. label: "Azure Container Registry (ACR)",
  89. },
  90. aws: {
  91. icon: aws,
  92. label: "AWS",
  93. },
  94. gcp: {
  95. icon: gcp,
  96. label: "GCP",
  97. },
  98. do: {
  99. icon: digitalOcean,
  100. label: "DigitalOcean",
  101. },
  102. github: {
  103. icon: github,
  104. label: "GitHub",
  105. },
  106. gitlab: {
  107. icon: "https://about.gitlab.com/images/press/logo/png/gitlab-icon-rgb.png",
  108. label: "Gitlab",
  109. buttonText: "Add instance",
  110. },
  111. rds: {
  112. icon:
  113. "https://cdn2.iconfinder.com/data/icons/amazon-aws-stencils/100/Database_copy_Amazon_RDS-512.png",
  114. label: "Amazon Relational Database Service",
  115. },
  116. s3: {
  117. icon:
  118. "https://cdn2.iconfinder.com/data/icons/amazon-aws-stencils/100/Database_copy_Amazon_RDS-512.png",
  119. label: "Amazon S3 Bucket",
  120. },
  121. };
  122. export const isAlphanumeric = (x: string | null) => {
  123. let re = /^[a-z0-9-]+$/;
  124. if (!x || x.length == 0 || x.search(re) === -1) {
  125. return false;
  126. }
  127. return true;
  128. };
  129. export const getIgnoreCase = (object: any, key: string) => {
  130. return object[
  131. Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase())
  132. ];
  133. };