Enums.js 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. define([ "require", "backbone" ], function(require) {
  2. "use strict";
  3. var Enums = {};
  4. Enums.auditAction = {
  5. ENTITY_CREATE: "已创建实体",
  6. ENTITY_UPDATE: "已更新实体",
  7. ENTITY_DELETE: "已删除实体",
  8. CLASSIFICATION_ADD: "已添加分类",
  9. CLASSIFICATION_DELETE: "已删除分类",
  10. CLASSIFICATION_UPDATE: "已更新分类",
  11. PROPAGATED_CLASSIFICATION_ADD: "已添加传播的分类",
  12. PROPAGATED_CLASSIFICATION_DELETE: "已删除传播的分类",
  13. PROPAGATED_CLASSIFICATION_UPDATE: "已更新传播的分类",
  14. ENTITY_IMPORT_CREATE: "已通过导入创建实体",
  15. ENTITY_IMPORT_UPDATE: "已通过导入更新实体",
  16. ENTITY_IMPORT_DELETE: "已通过导入删除实体",
  17. TERM_ADD: "已添加术语",
  18. TERM_DELETE: "已删除术语",
  19. LABEL_ADD: "已添加标签",
  20. LABEL_DELETE: "删除标签",
  21. ENTITY_PURGE: "实体已清除",
  22. BUSINESS_ATTRIBUTE_ADD: "已添加业务元数据",
  23. BUSINESS_ATTRIBUTE_UPDATE: "已更新业务元数据",
  24. BUSINESS_ATTRIBUTE_DELETE: "已删除业务元数据",
  25. CUSTOM_ATTRIBUTE_UPDATE: "已更新用户自定义属性",
  26. TYPE_DEF_UPDATE: "已更新类型",
  27. TYPE_DEF_CREATE: "已创建类型",
  28. TYPE_DEF_DELETE: "已删除类型",
  29. IMPORT: "导入",
  30. 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: "标识符",
  193. __isIncomplete: "未完成",
  194. __labels: "标签",
  195. __modificationTimestamp: "最终修改时间",
  196. __modifiedBy: "最后修改者",
  197. __propagatedClassificationNames: "传播的分类",
  198. __state: "状态",
  199. __entityStatus: "实体状态",
  200. __timestamp: "创建时间戳",
  201. __typeName: "类型名称",
  202. __pendingTasks: "待完成的任务",
  203. }, Enums.__isIncomplete = {
  204. 0: "false",
  205. 1: "true"
  206. }, Enums.queryBuilderUIOperatorToAPI = {
  207. "=": "eq",
  208. "!=": "neq",
  209. "<": "lt",
  210. "<=": "lte",
  211. ">": "gt",
  212. ">=": "gte",
  213. begins_with: "startsWith",
  214. ends_with: "endsWith",
  215. not_null: "notNull",
  216. is_null: "isNull",
  217. TIME_RANGE: "timerange"
  218. }, Enums.queryBuilderApiOperatorToUI = _.invert(Enums.queryBuilderUIOperatorToAPI),
  219. Enums.queryBuilderDateRangeUIValueToAPI = {
  220. Today: "今日内",
  221. Yesterday: "昨日内",
  222. "Last 7 Days": "七天以内",
  223. "Last 30 Days": "30天以内",
  224. "This Month": "这个月内",
  225. "Last Month": "上个月内",
  226. "This Quarter": "THIS_QUARTER",
  227. "Last Quarter": "LAST_QUARTER",
  228. "This Year": "THIS_YEAR",
  229. "Last Year": "LAST_YEAR",
  230. "Last 3 Months": "LAST_3_MONTHS",
  231. "Last 6 Months": "LAST_6_MONTHS",
  232. "Last 12 Months": "LAST_12_MONTHS"
  233. }, Enums.queryBuilderDateRangeAPIValueToUI = _.invert(Enums.queryBuilderDateRangeUIValueToAPI),
  234. Enums;
  235. });