Enums.js 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. define([ "require", "backbone" ], function(require) {
  2. "use strict";
  3. var Enums = {};
  4. Enums.auditAction = {
  5. ENTITY_CREATE: "Entity Created",
  6. ENTITY_UPDATE: "Entity Updated",
  7. ENTITY_DELETE: "Entity Deleted",
  8. CLASSIFICATION_ADD: "Classification Added",
  9. CLASSIFICATION_DELETE: "Classification Deleted",
  10. CLASSIFICATION_UPDATE: "Classification Updated",
  11. PROPAGATED_CLASSIFICATION_ADD: "Propagated Classification Added",
  12. PROPAGATED_CLASSIFICATION_DELETE: "Propagated Classification Deleted",
  13. PROPAGATED_CLASSIFICATION_UPDATE: "Propagated Classification Updated",
  14. ENTITY_IMPORT_CREATE: "Entity Created by import",
  15. ENTITY_IMPORT_UPDATE: "Entity Updated by import",
  16. ENTITY_IMPORT_DELETE: "Entity Deleted by import",
  17. TERM_ADD: "Term Added",
  18. TERM_DELETE: "Term Deleted",
  19. LABEL_ADD: "Label(s) Added",
  20. LABEL_DELETE: "Label(s) Deleted",
  21. ENTITY_PURGE: "Entity Purged",
  22. BUSINESS_ATTRIBUTE_ADD: "Business Attribute(s) Added",
  23. BUSINESS_ATTRIBUTE_UPDATE: "Business Attribute(s) Updated",
  24. BUSINESS_ATTRIBUTE_DELETE: "Business Attribute(s) Deleted",
  25. CUSTOM_ATTRIBUTE_UPDATE: "User-defined Attribute(s) Updated",
  26. TYPE_DEF_UPDATE: "Type Updated",
  27. TYPE_DEF_CREATE: "Type Created",
  28. TYPE_DEF_DELETE: "Type Deleted",
  29. IMPORT: "Import",
  30. EXPORT: "Export"
  31. }, Enums.serverAudits = {
  32. SERVER_START: "Server Start",
  33. SERVER_STOP: "Server End",
  34. SERVER_STATE_ACTIVE: "Server State Active",
  35. SERVER_STATE_PASSIVE: "Server State Passive"
  36. }, Enums.category = {
  37. PRIMITIVE: "Primitive",
  38. OBJECT_ID_TYPE: "Object Id type",
  39. ENUM: "Enum",
  40. STRUCT: "Struct",
  41. CLASSIFICATION: "Classification",
  42. ENTITY: "Entity",
  43. ARRAY: "Array",
  44. MAP: "Map",
  45. RELATIONSHIP: "Relationship",
  46. BUSINESS_METADATA: "Business Metadata",
  47. PURGE: "Purge Entities",
  48. IMPORT: "Import Entities",
  49. EXPORT: "Export Entities"
  50. }, Enums.entityStateReadOnly = {
  51. ACTIVE: !1,
  52. DELETED: !0,
  53. STATUS_ACTIVE: !1,
  54. STATUS_DELETED: !0
  55. }, Enums.isEntityPurged = {
  56. PURGED: !0
  57. }, Enums.lineageUrlType = {
  58. INPUT: "inputs",
  59. OUTPUT: "outputs",
  60. SCHEMA: "schema"
  61. }, Enums.searchUrlType = {
  62. DSL: "dsl",
  63. FULLTEXT: "basic"
  64. }, Enums.profileTabType = {
  65. "count-frequency": "Count Frequency Distribution",
  66. "decile-frequency": "Decile Frequency Distribution",
  67. annual: "Annual Distribution"
  68. }, Enums.extractFromUrlForSearch = {
  69. searchParameters: {
  70. pageLimit: "limit",
  71. type: "typeName",
  72. tag: "classification",
  73. query: "query",
  74. pageOffset: "offset",
  75. includeDE: "excludeDeletedEntities",
  76. excludeST: "includeSubTypes",
  77. excludeSC: "includeSubClassifications",
  78. tagFilters: "tagFilters",
  79. entityFilters: "entityFilters",
  80. attributes: "attributes",
  81. term: "termName"
  82. },
  83. uiParameters: "uiParameters"
  84. }, Enums.regex = {
  85. RANGE_CHECK: {
  86. byte: {
  87. min: -128,
  88. max: 127
  89. },
  90. short: {
  91. min: -32768,
  92. max: 32767
  93. },
  94. int: {
  95. min: -2147483648,
  96. max: 2147483647
  97. },
  98. long: {
  99. min: -0x8000000000000000,
  100. max: 0x8000000000000000
  101. },
  102. float: {
  103. min: -3.4028235e38,
  104. max: 3.4028235e38
  105. },
  106. double: {
  107. min: -1.7976931348623157e308,
  108. max: 1.7976931348623157e308
  109. }
  110. }
  111. }, Enums.graphIcon = {};
  112. var getTermRelationAttributes = function() {
  113. return {
  114. description: null,
  115. expression: null,
  116. steward: null,
  117. source: null
  118. };
  119. };
  120. return Enums.termRelationAttributeList = {
  121. seeAlso: getTermRelationAttributes(),
  122. synonyms: getTermRelationAttributes(),
  123. antonyms: getTermRelationAttributes(),
  124. preferredTerms: getTermRelationAttributes(),
  125. preferredToTerms: getTermRelationAttributes(),
  126. replacementTerms: getTermRelationAttributes(),
  127. replacedBy: getTermRelationAttributes(),
  128. translationTerms: getTermRelationAttributes(),
  129. translatedTerms: getTermRelationAttributes(),
  130. isA: getTermRelationAttributes(),
  131. classifies: getTermRelationAttributes(),
  132. validValues: getTermRelationAttributes(),
  133. validValuesFor: getTermRelationAttributes()
  134. }, Enums.addOnClassification = [ "_ALL_CLASSIFICATION_TYPES", "_CLASSIFIED", "_NOT_CLASSIFIED" ],
  135. Enums.addOnEntities = [ "_ALL_ENTITY_TYPES" ], Enums.stats = {
  136. generalData: {
  137. collectionTime: "day"
  138. },
  139. Server: {
  140. startTimeStamp: "day",
  141. activeTimeStamp: "day",
  142. upTime: "none"
  143. },
  144. ConnectionStatus: {
  145. statusBackendStore: "status-html",
  146. statusIndexStore: "status-html"
  147. },
  148. Notification: {
  149. currentDay: "number",
  150. currentDayAvgTime: "number",
  151. currentDayEntityCreates: "number",
  152. currentDayEntityDeletes: "number",
  153. currentDayEntityUpdates: "number",
  154. currentDayFailed: "number",
  155. currentDayStartTime: "day",
  156. currentHour: "number",
  157. currentHourAvgTime: "millisecond",
  158. currentHourEntityCreates: "number",
  159. currentHourEntityDeletes: "number",
  160. currentHourEntityUpdates: "number",
  161. currentHourFailed: "number",
  162. currentHourStartTime: "day",
  163. lastMessageProcessedTime: "day",
  164. offsetCurrent: "number",
  165. offsetStart: "number",
  166. previousDay: "number",
  167. previousDayAvgTime: "millisecond",
  168. previousDayEntityCreates: "number",
  169. previousDayEntityDeletes: "number",
  170. previousDayEntityUpdates: "number",
  171. previousDayFailed: "number",
  172. previousHour: "number",
  173. previousHourAvgTime: "millisecond",
  174. previousHourEntityCreates: "number",
  175. previousHourEntityDeletes: "number",
  176. previousHourEntityUpdates: "number",
  177. previousHourFailed: "number",
  178. total: "number",
  179. totalAvgTime: "millisecond",
  180. totalCreates: "number",
  181. totalDeletes: "number",
  182. totalFailed: "number",
  183. totalUpdates: "number",
  184. processedMessageCount: "number",
  185. failedMessageCount: "number"
  186. }
  187. }, Enums.systemAttributes = {
  188. __classificationNames: "Classification(s)",
  189. __createdBy: "Created By User",
  190. __customAttributes: "User-defined Properties",
  191. __guid: "Guid",
  192. __isIncomplete: "IsIncomplete",
  193. __labels: "Label(s)",
  194. __modificationTimestamp: "Last Modified Timestamp",
  195. __modifiedBy: "Last Modified User",
  196. __propagatedClassificationNames: "Propagated Classification(s)",
  197. __state: "Status",
  198. __entityStatus: "Entity Status",
  199. __timestamp: "Created Timestamp",
  200. __typeName: "Type Name"
  201. }, Enums.__isIncomplete = {
  202. 0: "false",
  203. 1: "true"
  204. }, Enums.queryBuilderUIOperatorToAPI = {
  205. "=": "eq",
  206. "!=": "neq",
  207. "<": "lt",
  208. "<=": "lte",
  209. ">": "gt",
  210. ">=": "gte",
  211. begins_with: "startsWith",
  212. ends_with: "endsWith",
  213. not_null: "notNull",
  214. is_null: "isNull",
  215. TIME_RANGE: "timerange"
  216. }, Enums.queryBuilderApiOperatorToUI = _.invert(Enums.queryBuilderUIOperatorToAPI),
  217. Enums.queryBuilderDateRangeUIValueToAPI = {
  218. Today: "TODAY",
  219. Yesterday: "YESTERDAY",
  220. "Last 7 Days": "LAST_7_DAYS",
  221. "Last 30 Days": "LAST_30_DAYS",
  222. "This Month": "THIS_MONTH",
  223. "Last Month": "LAST_MONTH",
  224. "This Quarter": "THIS_QUARTER",
  225. "Last Quarter": "LAST_QUARTER",
  226. "This Year": "THIS_YEAR",
  227. "Last Year": "LAST_YEAR",
  228. "Last 3 Months": "LAST_3_MONTHS",
  229. "Last 6 Months": "LAST_6_MONTHS",
  230. "Last 12 Months": "LAST_12_MONTHS"
  231. }, Enums.queryBuilderDateRangeAPIValueToUI = _.invert(Enums.queryBuilderDateRangeUIValueToAPI),
  232. Enums;
  233. });