IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
407B

  1. const typeIdToName = {
  2. 'tpzed': 'user',
  3. 'j7d0g': 'group',
  4. 'xvhdp': 'container_request',
  5. 'dz642': 'container',
  6. '7fd4e': 'workflow',
  7. 'ozdt8': 'api_client',
  8. '4zz18': 'collection'
  9. };
  10. function arvadosTypeName(id) {
  11. if (!id)
  12. return;
  13. if (id.length === 5)
  14. return typeIdToName[id];
  15. else
  16. return typeIdToName[id.split('-')[1]];
  17. }
  18. export default arvadosTypeName;