Enums.js 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  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. "参考": getTermRelationAttributes(),
  122. "不是": getTermRelationAttributes(),
  123. synonyms: getTermRelationAttributes(),
  124. antonyms: getTermRelationAttributes(),
  125. preferredTerms: getTermRelationAttributes(),
  126. preferredToTerms: getTermRelationAttributes(),
  127. replacementTerms: getTermRelationAttributes(),
  128. replacedBy: getTermRelationAttributes(),
  129. translationTerms: getTermRelationAttributes(),
  130. translatedTerms: getTermRelationAttributes(),
  131. isA: getTermRelationAttributes(),
  132. classifies: getTermRelationAttributes(),
  133. validValues: getTermRelationAttributes(),
  134. validValuesFor: getTermRelationAttributes()
  135. }, Enums.addOnClassification = [ "_ALL_CLASSIFICATION_TYPES", "_CLASSIFIED", "_NOT_CLASSIFIED" ],
  136. Enums.addOnEntities = [ "_ALL_ENTITY_TYPES" ], Enums.stats = {
  137. generalData: {
  138. collectionTime: "day"
  139. },
  140. Server: {
  141. startTimeStamp: "day",
  142. activeTimeStamp: "day",
  143. upTime: "none"
  144. },
  145. ConnectionStatus: {
  146. statusBackendStore: "status-html",
  147. statusIndexStore: "status-html"
  148. },
  149. Notification: {
  150. currentDay: "number",
  151. currentDayAvgTime: "number",
  152. currentDayEntityCreates: "number",
  153. currentDayEntityDeletes: "number",
  154. currentDayEntityUpdates: "number",
  155. currentDayFailed: "number",
  156. currentDayStartTime: "day",
  157. currentHour: "number",
  158. currentHourAvgTime: "millisecond",
  159. currentHourEntityCreates: "number",
  160. currentHourEntityDeletes: "number",
  161. currentHourEntityUpdates: "number",
  162. currentHourFailed: "number",
  163. currentHourStartTime: "day",
  164. lastMessageProcessedTime: "day",
  165. offsetCurrent: "number",
  166. offsetStart: "number",
  167. previousDay: "number",
  168. previousDayAvgTime: "millisecond",
  169. previousDayEntityCreates: "number",
  170. previousDayEntityDeletes: "number",
  171. previousDayEntityUpdates: "number",
  172. previousDayFailed: "number",
  173. previousHour: "number",
  174. previousHourAvgTime: "millisecond",
  175. previousHourEntityCreates: "number",
  176. previousHourEntityDeletes: "number",
  177. previousHourEntityUpdates: "number",
  178. previousHourFailed: "number",
  179. total: "number",
  180. totalAvgTime: "millisecond",
  181. totalCreates: "number",
  182. totalDeletes: "number",
  183. totalFailed: "number",
  184. totalUpdates: "number",
  185. processedMessageCount: "number",
  186. failedMessageCount: "number"
  187. }
  188. }, Enums.systemAttributes = {
  189. __classificationNames: "分类",
  190. __createdBy: "创建者",
  191. __customAttributes: "用户自定义属性",
  192. __guid: "Guid",
  193. __isIncomplete: "未完成",
  194. __labels: "标签",
  195. __modificationTimestamp: "最终修改时间",
  196. __modifiedBy: "最后修改者",
  197. __propagatedClassificationNames: "传播的分类",
  198. __state: "状态",
  199. __entityStatus: "实体状态",
  200. __timestamp: "创建时间戳",
  201. __typeName: "类型名称"
  202. }, Enums.__isIncomplete = {
  203. 0: "false",
  204. 1: "true"
  205. }, Enums.queryBuilderUIOperatorToAPI = {
  206. "=": "eq",
  207. "!=": "neq",
  208. "<": "lt",
  209. "<=": "lte",
  210. ">": "gt",
  211. ">=": "gte",
  212. begins_with: "startsWith",
  213. ends_with: "endsWith",
  214. not_null: "notNull",
  215. is_null: "isNull",
  216. TIME_RANGE: "timerange"
  217. }, Enums.queryBuilderApiOperatorToUI = _.invert(Enums.queryBuilderUIOperatorToAPI),
  218. Enums.queryBuilderDateRangeUIValueToAPI = {
  219. Today: "今日内",
  220. Yesterday: "昨日内",
  221. "Last 7 Days": "七天以内",
  222. "Last 30 Days": "30天以内",
  223. "This Month": "这个月内",
  224. "Last Month": "上个月内",
  225. "This Quarter": "THIS_QUARTER",
  226. "Last Quarter": "LAST_QUARTER",
  227. "This Year": "THIS_YEAR",
  228. "Last Year": "LAST_YEAR",
  229. "Last 3 Months": "LAST_3_MONTHS",
  230. "Last 6 Months": "LAST_6_MONTHS",
  231. "Last 12 Months": "LAST_12_MONTHS"
  232. }, Enums.queryBuilderDateRangeAPIValueToUI = _.invert(Enums.queryBuilderDateRangeUIValueToAPI),
  233. Enums;
  234. });