cob-cli 2.8.0 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/customizations/dashboard.dash.js +11 -0
  2. package/customizations/dashboard.js +1 -0
  3. package/customizations/dashboard.simple.js +1 -1
  4. package/customizations/dashboard.vue.empty.js +1 -1
  5. package/customizations/frontend.easy.js +16 -0
  6. package/lib/task_lists/customize_copy.js +7 -6
  7. package/package.json +1 -1
  8. package/templates/{cob-dashboard-html → dashboards/cob-dashboard-html}/demoDashboard.html +0 -0
  9. package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/package-lock.json +0 -0
  10. package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/package.json +0 -0
  11. package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/src/App.vue +0 -0
  12. package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/src/dashboard.html +0 -0
  13. package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/src/main.js +0 -0
  14. package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/src/plugins/cobUiVueComponents.js +0 -0
  15. package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/src/plugins/vuetify.js +0 -0
  16. package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/vue.config.js +0 -0
  17. package/templates/dashboards/dash/dist/css/app.3140d0d1.css +8 -0
  18. package/templates/dashboards/dash/dist/dashboard.html +20 -0
  19. package/templates/dashboards/dash/dist/fonts/fa-brands-400.a78ffbbe.ttf +0 -0
  20. package/templates/dashboards/dash/dist/fonts/fa-brands-400.cd2b4095.woff2 +0 -0
  21. package/templates/dashboards/dash/dist/fonts/fa-regular-400.b1a1bebb.ttf +0 -0
  22. package/templates/dashboards/dash/dist/fonts/fa-regular-400.e8a1ba41.woff2 +0 -0
  23. package/templates/dashboards/dash/dist/fonts/fa-solid-900.55b416a8.woff2 +0 -0
  24. package/templates/dashboards/dash/dist/fonts/fa-solid-900.73820155.ttf +0 -0
  25. package/templates/dashboards/dash/dist/fonts/fa-v4compatibility.0d6f5f18.ttf +0 -0
  26. package/templates/dashboards/dash/dist/fonts/fa-v4compatibility.786e6b33.woff2 +0 -0
  27. package/templates/dashboards/dash/dist/js/app.a65a4c2c.js +188 -0
  28. package/templates/dashboards/dash/dist/js/app.a65a4c2c.js.map +1 -0
  29. package/templates/dashboards/dash/package-lock.json +24340 -0
  30. package/templates/dashboards/dash/package.json +19 -0
  31. package/templates/dashboards/dash/src/App.vue +257 -0
  32. package/templates/dashboards/dash/src/Dashboard.vue +46 -0
  33. package/templates/dashboards/dash/src/assets/css/all.min.css +6 -0
  34. package/templates/dashboards/dash/src/assets/webfonts/fa-brands-400.ttf +0 -0
  35. package/templates/dashboards/dash/src/assets/webfonts/fa-brands-400.woff2 +0 -0
  36. package/templates/dashboards/dash/src/assets/webfonts/fa-regular-400.ttf +0 -0
  37. package/templates/dashboards/dash/src/assets/webfonts/fa-regular-400.woff2 +0 -0
  38. package/templates/dashboards/dash/src/assets/webfonts/fa-solid-900.ttf +0 -0
  39. package/templates/dashboards/dash/src/assets/webfonts/fa-solid-900.woff2 +0 -0
  40. package/templates/dashboards/dash/src/assets/webfonts/fa-v4compatibility.ttf +0 -0
  41. package/templates/dashboards/dash/src/assets/webfonts/fa-v4compatibility.woff2 +0 -0
  42. package/templates/dashboards/dash/src/collector.js +3782 -0
  43. package/templates/dashboards/dash/src/components/Board.vue +61 -0
  44. package/templates/dashboards/dash/src/components/BoardsNav.vue +23 -0
  45. package/templates/dashboards/dash/src/components/BoardsPage.vue +36 -0
  46. package/templates/dashboards/dash/src/components/Menu.vue +19 -0
  47. package/templates/dashboards/dash/src/components/Title.vue +13 -0
  48. package/templates/dashboards/dash/src/components/Totals.vue +53 -0
  49. package/templates/dashboards/dash/src/components/TotalsBadge.vue +69 -0
  50. package/templates/dashboards/dash/src/dashboard.html +34 -0
  51. package/templates/dashboards/dash/src/input.css +9 -0
  52. package/templates/dashboards/dash/src/main.js +11 -0
  53. package/templates/dashboards/dash/src/output.css +45836 -0
  54. package/templates/dashboards/dash/tailwind.config.js +18 -0
  55. package/templates/dashboards/dash/vue.config.js +104 -0
  56. package/templates/frontend/common/css/_dashboard.css +7 -0
  57. package/templates/frontend/common/css/_global.css +3 -1
  58. package/templates/frontend/easy/css/_easy/googlefonts.css +360 -0
  59. package/templates/frontend/easy/css/_easy/vuetify.cob-scoped.css +10488 -0
  60. package/templates/frontend/easy/js/_easy/lib/axios.min.js +9 -0
  61. package/templates/frontend/easy/js/_easy/lib/marked.min.js +6 -0
  62. package/templates/frontend/easy/js/_easy/lib/vue.js +11912 -0
  63. package/templates/frontend/easy/js/_easy/lib/vue.min.js +6 -0
  64. package/templates/frontend/easy/js/_easy/lib/vuetify.min.js +6 -0
  65. package/templates/frontend/easy/js/customizations2.__MERGE__.js +22 -0
  66. package/templates/frontend/easy/webapp/.browserslistrc +2 -0
  67. package/templates/frontend/easy/webapp/.eslintrc.js +17 -0
  68. package/templates/frontend/easy/webapp/README.md +60 -0
  69. package/templates/frontend/easy/webapp/babel.config.js +5 -0
  70. package/templates/frontend/easy/webapp/dist/css/app.a4fb91f8.css +1 -0
  71. package/templates/frontend/easy/webapp/dist/dashboard.html +13 -0
  72. package/templates/frontend/easy/webapp/dist/js/app.63a57dcd.js +2 -0
  73. package/templates/frontend/easy/webapp/dist/js/app.63a57dcd.js.map +1 -0
  74. package/templates/frontend/easy/webapp/package-lock.json +32986 -0
  75. package/templates/frontend/easy/webapp/package.json +32 -0
  76. package/templates/frontend/easy/webapp/postcss.config.js +5 -0
  77. package/templates/frontend/easy/webapp/public/dashboard.html +13 -0
  78. package/templates/frontend/easy/webapp/src/App.vue +181 -0
  79. package/templates/frontend/easy/webapp/src/assets/logo.png +0 -0
  80. package/templates/frontend/easy/webapp/src/components/HelloWorld.vue +59 -0
  81. package/templates/frontend/easy/webapp/src/components/PermBuilder.vue +163 -0
  82. package/templates/frontend/easy/webapp/src/components/PlanExecutor.vue +225 -0
  83. package/templates/frontend/easy/webapp/src/components/ProductPermBuilder.vue +95 -0
  84. package/templates/frontend/easy/webapp/src/components/RmDefinitionChooser.vue +59 -0
  85. package/templates/frontend/easy/webapp/src/components/RmDomainChooser.vue +60 -0
  86. package/templates/frontend/easy/webapp/src/components/RoleBuilder.vue +73 -0
  87. package/templates/frontend/easy/webapp/src/main.js +19 -0
  88. package/templates/frontend/easy/webapp/src/perm-templates.js +189 -0
  89. package/templates/frontend/easy/webapp/src/perms.js +197 -0
  90. package/templates/frontend/easy/webapp/vue.config.js +66 -0
  91. package/templates/keywords/audit/frontend/js/cob/_audit.js +4 -1
@@ -0,0 +1,66 @@
1
+ const DASH_DIR = process.env.npm_package_config_dash_dir
2
+ const SERVER = process.env.npm_config_remote_server
3
+ || ("https://" + process.env.npm_package_config_remote_server);
4
+
5
+ module.exports = {
6
+ // temos que fixar o directorio onde colocamos o build,
7
+ // para podermos usar o dashboard.html que é gerado sem o editar
8
+ // NOTA: o path relativo não funciona bem com o npm run serve
9
+ // mas queremos que o build seja relativo, para ser mais fléxivel
10
+ publicPath: process.env.NODE_ENV === 'production'
11
+ ? './localresource/' + DASH_DIR + '/dist/'
12
+ : '/' + DASH_DIR + '/',
13
+
14
+ configureWebpack: {
15
+ // deve ser igual ao que é usado no afterDeps do public/dashboard.html
16
+ externals: {
17
+ vue: 'Vue',
18
+ vuetify: 'Vuetify',
19
+ axios: 'axios',
20
+ marked: 'marked'
21
+ }
22
+ },
23
+
24
+ // seguindo https://cli.vuejs.org/guide/webpack.html
25
+ chainWebpack: config => {
26
+ // para não termos chunks
27
+ config.optimization.delete('splitChunks');
28
+ // fazemos assim em vez de usar o pages, que confunde o publicPath
29
+ config
30
+ .plugin('html')
31
+ .tap(args => {
32
+ args[0].template = 'public/dashboard.html'
33
+ args[0].filename = 'dashboard.html'
34
+ args[0].inject = false
35
+ args[0].minify = false
36
+ return args
37
+ })
38
+ },
39
+
40
+ devServer: {
41
+ proxy: {
42
+ [`^/userm/localresource/${DASH_DIR}`]: {
43
+ //logLevel: 'debug',
44
+ target: "http://localhost:8080",
45
+ pathRewrite: path =>
46
+ path.replace(
47
+ "/userm/localresource/" + DASH_DIR,
48
+ "/" + DASH_DIR
49
+ )
50
+ },
51
+ "^/userm|^/recordm|^/es|^/logm|^/kibana": {
52
+ //logLevel: 'debug',
53
+ target: SERVER,
54
+ ws: true,
55
+ changeOrigin: true
56
+ },
57
+ "/get_user_lang|/security|/localresource|/userm|/user|/reportm|/cas": {
58
+ //logLevel: 'debug',
59
+ target: SERVER,
60
+ ws: true,
61
+ changeOrigin: true,
62
+ pathRewrite: path => path.replace("/userm/userm", "/userm")
63
+ }
64
+ }
65
+ }
66
+ }
@@ -5,7 +5,10 @@ cob.custom.customize.push(function (core, utils, ui) {
5
5
  let userFPs = presenter.findFieldPs( fp => /[$]audit\.(creator|updater)\.(username|uri|time)/.exec(fp.field.fieldDefinition.description) )
6
6
  userFPs.forEach( fp => {
7
7
  fp.disable()
8
- if(fp.getValue() && (!instance.isNew() || presenter.isGroupEdit())) return //Don't do nothing if field is not empty AND it's an update interface (updates will only be changed by the backend)
8
+ if( presenter.isGroupEdit() ) return; // Don't do nothing in group edit
9
+ if(/[$]audit\.updater\./.exec(fp.field.fieldDefinition.description) && !instance.isNew()) return //Don't do nothing if $audit.updater.* and it's an update interface (updates will only be changed by the backend)
10
+ if(fp.isVisible() && /[$]audit\.creator\./.exec(fp.field.fieldDefinition.description) && !instance.isNew()) return //Se campo visível e é um creator não faz nada
11
+
9
12
  if(/[$]audit\.(creator|updater)\.username/.exec(fp.field.fieldDefinition.description)) {
10
13
  fp.setValue(core.getCurrentLoggedInUser())
11
14
  }