cob-cli 2.25.0 → 2.26.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 (215) hide show
  1. package/bin/cob-cli.js +3 -1
  2. package/bin/handleAutoComplete.js +1 -4
  3. package/lib/commands/customize.js +213 -66
  4. package/package.json +3 -2
  5. package/.vscode/launch.json +0 -106
  6. package/customizations/backend.email.js +0 -10
  7. package/customizations/backend.js +0 -14
  8. package/customizations/backend.updateField.js +0 -11
  9. package/customizations/backend.vuepress.js +0 -35
  10. package/customizations/dashboard.dash.js +0 -14
  11. package/customizations/dashboard.js +0 -14
  12. package/customizations/dashboard.simple.js +0 -12
  13. package/customizations/dashboard.vue.empty.js +0 -12
  14. package/customizations/dashboard.vue.grid.js +0 -10
  15. package/customizations/dashboard.vue.js +0 -14
  16. package/customizations/dashboard.vue.menuAndGrid.js +0 -10
  17. package/customizations/frontend.common.js +0 -16
  18. package/customizations/frontend.easy.js +0 -16
  19. package/customizations/frontend.formatList.currency.js +0 -17
  20. package/customizations/frontend.formatList.js +0 -13
  21. package/customizations/frontend.js +0 -14
  22. package/customizations/importer.js +0 -10
  23. package/customizations/keywords.audit.js +0 -18
  24. package/customizations/keywords.calc.js +0 -18
  25. package/customizations/keywords.image.js +0 -16
  26. package/customizations/keywords.js +0 -17
  27. package/customizations/keywords.kibana.js +0 -16
  28. package/customizations/keywords.log.js +0 -18
  29. package/customizations/keywords.styleResults.js +0 -18
  30. package/templates/backend/vuepress/integrationm/actions/getVuePressDoc.groovy +0 -74
  31. package/templates/backend/vuepress/integrationm/actions/getVuePressSidebarConfig.groovy +0 -42
  32. package/templates/backend/vuepress/integrationm/actions/getVuePressSidebarRootElements.groovy +0 -17
  33. package/templates/backend/vuepress/others/vuepress/definition_contents_v234.json +0 -619
  34. package/templates/backend/vuepress/others/vuepress/nginx/README.md +0 -28
  35. package/templates/backend/vuepress/others/vuepress/package-lock.json +0 -29656
  36. package/templates/backend/vuepress/others/vuepress/package.json +0 -24
  37. package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/DescriptVideo.vue +0 -22
  38. package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/Graph.vue +0 -124
  39. package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/ReadingTime.vue +0 -26
  40. package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/References.vue +0 -228
  41. package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/RestrictedContent.vue +0 -77
  42. package/templates/backend/vuepress/others/vuepress/src/.vuepress/config.js +0 -101
  43. package/templates/backend/vuepress/others/vuepress/src/.vuepress/config.json +0 -31
  44. package/templates/backend/vuepress/others/vuepress/src/.vuepress/enhanceApp.js +0 -14
  45. package/templates/backend/vuepress/others/vuepress/src/.vuepress/nav/getNavTranslated.js +0 -52
  46. package/templates/backend/vuepress/others/vuepress/src/.vuepress/plugins/References.js +0 -96
  47. package/templates/backend/vuepress/others/vuepress/src/.vuepress/public/Logo-Cult-of-Bits-400x400-1.png +0 -0
  48. package/templates/backend/vuepress/others/vuepress/src/.vuepress/public/favicon-cob.png +0 -0
  49. package/templates/backend/vuepress/others/vuepress/src/.vuepress/public/logo.png +0 -0
  50. package/templates/backend/vuepress/others/vuepress/src/.vuepress/styles/index.styl +0 -39
  51. package/templates/backend/vuepress/others/vuepress/src/.vuepress/styles/palette.styl +0 -17
  52. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/LICENSE +0 -21
  53. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/README.md +0 -11
  54. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/AlgoliaSearchBox.vue +0 -172
  55. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/DropdownLink.vue +0 -252
  56. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/DropdownTransition.vue +0 -33
  57. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Home.vue +0 -134
  58. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/NavLink.vue +0 -98
  59. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/NavLinks.vue +0 -165
  60. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Navbar.vue +0 -140
  61. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Page.vue +0 -31
  62. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/PageEdit.vue +0 -119
  63. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/PageNav.vue +0 -163
  64. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Sidebar.vue +0 -64
  65. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarButton.vue +0 -40
  66. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarGroup.vue +0 -144
  67. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarLink.vue +0 -140
  68. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarLinks.vue +0 -114
  69. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/global-components/Badge.vue +0 -44
  70. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/global-components/CodeBlock.vue +0 -41
  71. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/global-components/CodeGroup.vue +0 -120
  72. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/index.js +0 -59
  73. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/layouts/404.vue +0 -30
  74. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/layouts/Layout.vue +0 -151
  75. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/noopModule.js +0 -1
  76. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/package.json +0 -44
  77. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/arrow.styl +0 -22
  78. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/code.styl +0 -137
  79. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/config.styl +0 -1
  80. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/custom-blocks.styl +0 -44
  81. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/index.styl +0 -202
  82. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/mobile.styl +0 -37
  83. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/toc.styl +0 -3
  84. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/wrapper.styl +0 -10
  85. package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/util/index.js +0 -244
  86. package/templates/dashboards/cob-dashboard-html/demoDashboard.html +0 -18
  87. package/templates/dashboards/cob-dashboard-vue/package-lock.json +0 -25020
  88. package/templates/dashboards/cob-dashboard-vue/package.json +0 -21
  89. package/templates/dashboards/cob-dashboard-vue/src/App.vue +0 -26
  90. package/templates/dashboards/cob-dashboard-vue/src/dashboard.html +0 -31
  91. package/templates/dashboards/cob-dashboard-vue/src/main.js +0 -12
  92. package/templates/dashboards/cob-dashboard-vue/src/plugins/cobUiVueComponents.js +0 -6
  93. package/templates/dashboards/cob-dashboard-vue/src/plugins/vuetify.js +0 -9
  94. package/templates/dashboards/cob-dashboard-vue/vue.config.js +0 -104
  95. package/templates/dashboards/dash/dist/css/app.7b16c01a.css +0 -11
  96. package/templates/dashboards/dash/dist/dashboard.html +0 -25
  97. package/templates/dashboards/dash/dist/fonts/fa-brands-400.a78ffbbe.ttf +0 -0
  98. package/templates/dashboards/dash/dist/fonts/fa-brands-400.cd2b4095.woff2 +0 -0
  99. package/templates/dashboards/dash/dist/fonts/fa-regular-400.b1a1bebb.ttf +0 -0
  100. package/templates/dashboards/dash/dist/fonts/fa-regular-400.e8a1ba41.woff2 +0 -0
  101. package/templates/dashboards/dash/dist/fonts/fa-solid-900.55b416a8.woff2 +0 -0
  102. package/templates/dashboards/dash/dist/fonts/fa-solid-900.73820155.ttf +0 -0
  103. package/templates/dashboards/dash/dist/fonts/fa-v4compatibility.0d6f5f18.ttf +0 -0
  104. package/templates/dashboards/dash/dist/fonts/fa-v4compatibility.786e6b33.woff2 +0 -0
  105. package/templates/dashboards/dash/dist/js/app.13b950c8.js +0 -199
  106. package/templates/dashboards/dash/dist/js/app.13b950c8.js.map +0 -1
  107. package/templates/dashboards/dash/package-lock.json +0 -22646
  108. package/templates/dashboards/dash/package.json +0 -27
  109. package/templates/dashboards/dash/src/App.vue +0 -124
  110. package/templates/dashboards/dash/src/assets/css/all.min.css +0 -6
  111. package/templates/dashboards/dash/src/assets/webfonts/fa-brands-400.ttf +0 -0
  112. package/templates/dashboards/dash/src/assets/webfonts/fa-brands-400.woff2 +0 -0
  113. package/templates/dashboards/dash/src/assets/webfonts/fa-regular-400.ttf +0 -0
  114. package/templates/dashboards/dash/src/assets/webfonts/fa-regular-400.woff2 +0 -0
  115. package/templates/dashboards/dash/src/assets/webfonts/fa-solid-900.ttf +0 -0
  116. package/templates/dashboards/dash/src/assets/webfonts/fa-solid-900.woff2 +0 -0
  117. package/templates/dashboards/dash/src/assets/webfonts/fa-v4compatibility.ttf +0 -0
  118. package/templates/dashboards/dash/src/assets/webfonts/fa-v4compatibility.woff2 +0 -0
  119. package/templates/dashboards/dash/src/collector.js +0 -222
  120. package/templates/dashboards/dash/src/components/Attention.vue +0 -30
  121. package/templates/dashboards/dash/src/components/Board.vue +0 -35
  122. package/templates/dashboards/dash/src/components/Calendar.vue +0 -422
  123. package/templates/dashboards/dash/src/components/Dashboard.vue +0 -27
  124. package/templates/dashboards/dash/src/components/Filter.vue +0 -68
  125. package/templates/dashboards/dash/src/components/Kibana.vue +0 -138
  126. package/templates/dashboards/dash/src/components/Label.vue +0 -15
  127. package/templates/dashboards/dash/src/components/Menu.vue +0 -44
  128. package/templates/dashboards/dash/src/components/Totals.vue +0 -49
  129. package/templates/dashboards/dash/src/components/TotalsValue.vue +0 -59
  130. package/templates/dashboards/dash/src/components/shared/Instance.vue +0 -64
  131. package/templates/dashboards/dash/src/components/shared/Waiting.vue +0 -25
  132. package/templates/dashboards/dash/src/dashboard.html +0 -39
  133. package/templates/dashboards/dash/src/definition_dashboard_v0.json +0 -924
  134. package/templates/dashboards/dash/src/definition_dashboard_v1.json +0 -1
  135. package/templates/dashboards/dash/src/input.css +0 -9
  136. package/templates/dashboards/dash/src/main.js +0 -11
  137. package/templates/dashboards/dash/src/model/ComponentStatePersistence.js +0 -66
  138. package/templates/dashboards/dash/src/output.css +0 -314245
  139. package/templates/dashboards/dash/src/test_collector.js +0 -3719
  140. package/templates/dashboards/dash/src/utils/EsInstanceUtils.js +0 -8
  141. package/templates/dashboards/dash/tailwind.config.js +0 -12
  142. package/templates/dashboards/dash/vue.config.js +0 -104
  143. package/templates/frontend/common/templates/frontend/common/css/_dualColumn.css +0 -46
  144. package/templates/frontend/common/templates/frontend/common/css/_global.css +0 -19
  145. package/templates/frontend/common/templates/frontend/common/css/_hidden.css +0 -13
  146. package/templates/frontend/common/templates/frontend/common/css/_history.css +0 -13
  147. package/templates/frontend/common/templates/frontend/common/css/_mobile.css +0 -125
  148. package/templates/frontend/common/templates/frontend/common/css/customizations.__MERGE__.css +0 -5
  149. package/templates/frontend/common/templates/frontend/common/js/cob/_disable_save_onSubdetail.js +0 -11
  150. package/templates/frontend/common/templates/frontend/common/js/cob/_group_references.js +0 -22
  151. package/templates/frontend/common/templates/frontend/common/js/cob/_show_hidden.js +0 -35
  152. package/templates/frontend/common/templates/frontend/common/js/customizations2.__MERGE__.js +0 -3
  153. package/templates/frontend/common/templates/frontend/common/package.json +0 -3
  154. package/templates/frontend/easy/css/_easy/googlefonts.css +0 -360
  155. package/templates/frontend/easy/css/_easy/vuetify.cob-scoped.css +0 -10488
  156. package/templates/frontend/easy/js/_easy/lib/axios.min.js +0 -9
  157. package/templates/frontend/easy/js/_easy/lib/marked.min.js +0 -6
  158. package/templates/frontend/easy/js/_easy/lib/vue.js +0 -11912
  159. package/templates/frontend/easy/js/_easy/lib/vue.min.js +0 -6
  160. package/templates/frontend/easy/js/_easy/lib/vuetify.min.js +0 -6
  161. package/templates/frontend/easy/js/customizations2.__MERGE__.js +0 -22
  162. package/templates/frontend/easy/webapp/.browserslistrc +0 -2
  163. package/templates/frontend/easy/webapp/.eslintrc.js +0 -17
  164. package/templates/frontend/easy/webapp/README.md +0 -60
  165. package/templates/frontend/easy/webapp/babel.config.js +0 -5
  166. package/templates/frontend/easy/webapp/dist/css/app.a4fb91f8.css +0 -1
  167. package/templates/frontend/easy/webapp/dist/dashboard.html +0 -13
  168. package/templates/frontend/easy/webapp/dist/js/app.63a57dcd.js +0 -2
  169. package/templates/frontend/easy/webapp/dist/js/app.63a57dcd.js.map +0 -1
  170. package/templates/frontend/easy/webapp/package-lock.json +0 -32986
  171. package/templates/frontend/easy/webapp/package.json +0 -32
  172. package/templates/frontend/easy/webapp/postcss.config.js +0 -5
  173. package/templates/frontend/easy/webapp/public/dashboard.html +0 -13
  174. package/templates/frontend/easy/webapp/src/App.vue +0 -181
  175. package/templates/frontend/easy/webapp/src/assets/logo.png +0 -0
  176. package/templates/frontend/easy/webapp/src/components/HelloWorld.vue +0 -59
  177. package/templates/frontend/easy/webapp/src/components/PermBuilder.vue +0 -163
  178. package/templates/frontend/easy/webapp/src/components/PlanExecutor.vue +0 -225
  179. package/templates/frontend/easy/webapp/src/components/ProductPermBuilder.vue +0 -95
  180. package/templates/frontend/easy/webapp/src/components/RmDefinitionChooser.vue +0 -59
  181. package/templates/frontend/easy/webapp/src/components/RmDomainChooser.vue +0 -60
  182. package/templates/frontend/easy/webapp/src/components/RoleBuilder.vue +0 -73
  183. package/templates/frontend/easy/webapp/src/main.js +0 -19
  184. package/templates/frontend/easy/webapp/src/perm-templates.js +0 -189
  185. package/templates/frontend/easy/webapp/src/perms.js +0 -197
  186. package/templates/frontend/easy/webapp/vue.config.js +0 -66
  187. package/templates/frontend/formatList/currency/css/_format_currency.css +0 -11
  188. package/templates/frontend/formatList/currency/css/customizations.__MERGE__.css +0 -1
  189. package/templates/frontend/formatList/currency/js/cob/_format_currency.js +0 -11
  190. package/templates/frontend/formatList/currency/js/customizations2.__MERGE__.js +0 -1
  191. package/templates/frontend/formatList/currency/package.json +0 -3
  192. package/templates/gitignore +0 -14
  193. package/templates/keywords/audit/backend/scripts/_audit.groovy +0 -78
  194. package/templates/keywords/audit/frontend/js/cob/_audit.js +0 -24
  195. package/templates/keywords/audit/frontend/js/customizations2.__MERGE__.js +0 -1
  196. package/templates/keywords/audit/package.json +0 -3
  197. package/templates/keywords/calc/backend/scripts/_calc.groovy +0 -151
  198. package/templates/keywords/calc/frontend/js/cob/_calc.js +0 -193
  199. package/templates/keywords/calc/frontend/js/customizations2.__MERGE__.js +0 -1
  200. package/templates/keywords/calc/package.json +0 -3
  201. package/templates/keywords/image/frontend/js/cob/_image.js +0 -30
  202. package/templates/keywords/image/frontend/js/customizations2.__MERGE__.js +0 -1
  203. package/templates/keywords/image/package.json +0 -3
  204. package/templates/keywords/kibana/frontend/js/cob/_kibana.js +0 -58
  205. package/templates/keywords/kibana/frontend/js/customizations2.__MERGE__.js +0 -1
  206. package/templates/keywords/kibana/package.json +0 -3
  207. package/templates/keywords/log/backend/scripts/_log.groovy +0 -95
  208. package/templates/keywords/log/frontend/css/_log.css +0 -5
  209. package/templates/keywords/log/frontend/css/customizations.__MERGE__.css +0 -1
  210. package/templates/keywords/log/package.json +0 -3
  211. package/templates/keywords/styleResults/frontend/css/_styleResults.css +0 -86
  212. package/templates/keywords/styleResults/frontend/css/customizations.__MERGE__.css +0 -1
  213. package/templates/keywords/styleResults/frontend/js/cob/_styleResults.js +0 -38
  214. package/templates/keywords/styleResults/frontend/js/customizations2.__MERGE__.js +0 -1
  215. package/templates/keywords/styleResults/package.json +0 -3
@@ -1,44 +0,0 @@
1
- <template>
2
- <div :class="classes">
3
- <a v-for="(line, i) in lines"
4
- :key="i"
5
- :class="line.classes"
6
- :href="line.link"
7
- >
8
- <span>
9
- <i v-if="line.icon" :class="line.icon" style="margin-right:4px"></i>
10
- <span v-html="line.text"></span>
11
- </span>
12
- <Attention class="absolute right-1" :attentionInfo="line.attention"/>
13
- </a>
14
- </div>
15
- </template>
16
-
17
- <script>
18
- import Attention from './Attention.vue'
19
-
20
- export default {
21
- components: { Attention },
22
- props: {
23
- component: Object,
24
- userInfo: Object
25
- },
26
- computed: {
27
- options() { return this.component['MenuCustomize'][0] },
28
- classes() { return this.options['MenuClasses'] || "flex flex-col gap-y-2" },
29
- lines() {
30
- let lines = this.component['Text'].map( line => ({
31
- classes: line["TextCustomize"][0]['TextClasses'] || "transition ease-in-out duration-300 rounded-md border border-gray-300 border-l-2 border-l-sky-600 shadow-sm transform hover:translate-x-0.5 p-2 bg-white",
32
- icon: line["TextCustomize"][0]['Icon'] || "",
33
- text: line['Text'] || "",
34
- link: line['Link'] && line['Link'].replace(/__USERNAME__/g, this.userInfo.username) || "",
35
- groups: line["TextCustomize"][0]['GroupVisibility'].map(g => g["GroupVisibility"] && g["GroupVisibility"] ).filter(g => g) || [],
36
- attention: line["TextCustomize"][0]['AttentionInfo'],
37
- }))
38
- // Filter out lines that have groupVisibility AND the user does not have any of the groups
39
- let userGroups = this.component.userInfo.groups.map(g => g.name)
40
- return lines.filter(l => l.groups.length === 0 || l.groups.filter(g => userGroups.includes(g)).length !== 0 )
41
- }
42
- }
43
- }
44
- </script>
@@ -1,49 +0,0 @@
1
- <template>
2
- <table :class="classes">
3
- <tr v-for="(line, i) in lines" :key="'line'+i" :class="line.lineClasses">
4
- <td :class="line.titleClasses">
5
- {{ line.title }}
6
- </td>
7
- <td v-for="(value, j) in line.values" :key="'value'+i+'-'+j">
8
- <TotalsValue :value-data="value"/>
9
- </td>
10
- </tr>
11
- </table>
12
- </template>
13
-
14
- <script>
15
- import TotalsValue from './TotalsValue.vue'
16
-
17
- export default {
18
- components: { TotalsValue },
19
- props: {
20
- component: Object,
21
- userInfo: Object
22
- },
23
- computed: {
24
- options() { return this.component['TotalsCustomize'][0] },
25
- classes() { return this.options['TotalsClasses'] || "w-full table-auto" },
26
- inputs() { return this.options['InputVarTotals'].map(v => v['InputVarTotals']) },
27
- inputFilter() { return this.inputs.filter(v => this.component.vars[v]).map(v => this.component.vars[v]).join(" ")},
28
- lines() {
29
- return this.component['Line'].map( l => ({
30
- title : l['Line'] || "",
31
- lineClasses: l["LineCustomize"][0]["LineClasses"] || "text-right transition ease-in-out ring-sky-600 ring-offset-1 hover:ring-2 rounded-md",
32
- titleClasses: l["LineCustomize"][0]["TitleClasses"] || "text-left p-2",
33
- values: l['Value']
34
- }))}
35
- },
36
- watch: {
37
- inputFilter(newValue) {
38
- if(newValue === "") return //PRESSUPOSTO IMPORTANTE: se newValue é vazio é porque estamos em transições (porque usamos sempre um valor, nem que seja *) e o melhor é usar o valor antigo para o valor não mudar momentaneamente (e ainda desperdicar uma pesquisa). Se o pressuposto for quebrado vamos impedir a actualização do inputFilter quando o valor é ""
39
- this.lines.forEach(l => {
40
- l.values.forEach(v => {
41
- let arg = (v.Arg[1] instanceof Object ? v.Arg[1].Arg : v.Arg[1])
42
- let newFilter = ((arg || "") + " " + newValue.trim()) || "*"
43
- if (v.dash_info) v.dash_info.changeArgs({query: newFilter.replaceAll("__USERNAME__",this.userInfo.username)})
44
- });
45
- });
46
- }
47
- }
48
- }
49
- </script>
@@ -1,59 +0,0 @@
1
- <template>
2
- <a v-if="state" :href="link" :class="expandedClasses">
3
-
4
- <Attention :attentionInfo="attention" :classes="attentionClasses" />
5
-
6
- <span v-html="value"/><span class="" >{{unit}}</span>
7
-
8
- <svg v-if="updating" class="absolute animate-spin -top-1 -right-1 h-2 w-2" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
9
- <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
10
- <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
11
- </svg>
12
- </a>
13
- </template>
14
-
15
- <script>
16
- import Attention from './Attention.vue'
17
- const specialClasses = {
18
- "Info": "border border-sky-600 bg-sky-200/10 ring-sky-600 bg-white ",
19
- "Success": "border border-lime-500 bg-lime-200/10 ring-lime-500 bg-white ",
20
- "Warning": "border border-amber-500 bg-amber-200/10 ring-amber-500 bg-white ",
21
- "Important": "border border-rose-600 bg-rose-200/10 ring-rose-600 bg-white ",
22
- "Gray": "text-gray-400 border-gray-200 bg-gray-200/10 ring-gray-200 bg-white ",
23
- "Default": "inline-block " // para poder conter internamente o Attention sem ser noutra linha
24
- +"bg-white " // Para ficar legível
25
- +"whitespace-nowrap " // Para não partir o texto + attention
26
- +"font-mono font-semibold " // Estilo default para o texto
27
- +"px-2 py-1 " // Espaçamento horizontal e vertical
28
- +"rounded-md " // Border arrendondada
29
- +"transition ease-in-out ring-sky-600 ring-offset-1 hover:ring-2 ", // Estilo para hover (só funciona em localhost, não sei porquê)
30
- "S_loading": "border border-amber-500 bg-amber-200/10 ring-amber-500 ", // Igual a Warning
31
- "S_error": "border border-rose-600 bg-rose-200/10 ring-rose-600 ", // Igual a Important
32
- }
33
-
34
- export default {
35
- components: { Attention },
36
- props: { valueData: Object },
37
- computed: {
38
- options() { return this.valueData['ValueCustomize'][0] },
39
- view() { return this.options['View'] },
40
- attention() { return this.options['AttentionInfo'] },
41
- attentionClasses() { return this.options['ValueAttentionClasses'] },
42
- unit() { return this.options['Unit'] },
43
- state() { return this.valueData.dash_info && this.valueData.dash_info.state || "" },
44
- updating() { return this.state === "updating" || this.state === "loading" },
45
- classes() { return (this.options['ValueClasses'] || "Default Info") + " S_"+this.valueData.dash_info.state },
46
- link() { return this.valueData.dash_info.href + (this.view ? "?av=" + this.view : "") },
47
- expandedClasses() { return this.classes.split(/\s/).map(c => specialClasses[c] || c ).join(" ") },
48
- value() {
49
- if(this.valueData.dash_info.state === "loading") return "L"
50
- if(this.valueData.dash_info.state === "error") return "E"
51
- if(isNaN(this.valueData.dash_info.value)) {
52
- return this.valueData.dash_info.value
53
- } else {
54
- return new Intl.NumberFormat('en-US', {maximumFractionDigits: 0}).format(this.valueData.dash_info.value)
55
- }
56
- }
57
- }
58
- }
59
- </script>
@@ -1,64 +0,0 @@
1
- <template>
2
- <div class='flex flex-col p-4 rounded border-2 border-zinc-300 bg-zinc-50 calendar-tooltip'>
3
- <a :href='instanceUrl' class='max-w-fit mb-4 text-sky-500 uppercase no-underline hover:underline js-instance-label main-info'>
4
- {{ instanceLabel }}
5
- </a>
6
- <div class='details flex flex-col flex-wrap justify-start'>
7
- <div class='flex flex-row mr-4 field-group max-w-xs'
8
- v-for='(description,i) in instanceDescriptions'
9
- :key="i"
10
- >
11
- <div class='whitespace-nowrap mr-1 text-gray-400 field'>{{ description.name }}:</div>
12
- <div class='whitespace-nowrap text-ellipsis overflow-hidden value' v-html="description.value"></div>
13
- </div>
14
- </div>
15
- </div>
16
- </template>
17
-
18
- <script>
19
- import {toEsFieldName} from "@cob/rest-api-wrapper/src/utils/ESHelper";
20
- import {getValue} from "@/utils/EsInstanceUtils";
21
-
22
- export default {
23
- props: {
24
- esInstance: Object
25
- },
26
-
27
- computed: {
28
- instanceUrl() {
29
- return `#/instance/${this.esInstance.id}`
30
- },
31
-
32
- instanceLabel() {
33
- if (!this.esInstance._definitionInfo.instanceLabel || !this.esInstance._definitionInfo.instanceLabel.length) {
34
- return this.esInstance.id
35
- } else {
36
- const fieldDefinition = this.esInstance._definitionInfo.instanceLabel[0];
37
- return getValue(this.esInstance, fieldDefinition)[0]
38
- }
39
- },
40
-
41
- instanceDescriptions() {
42
- if (!this.esInstance._definitionInfo.instanceDescription) {
43
- return null
44
-
45
- } else {
46
- return this.esInstance._definitionInfo.instanceDescription
47
- .filter(fieldDefinition => this.esInstance[toEsFieldName(fieldDefinition.name)])
48
- .map(fieldDefinition => {
49
- let value = getValue(this.esInstance, fieldDefinition).join(', ')
50
- if(fieldDefinition.description.indexOf("$date")>=0) {
51
- value = (new Date(value*1)).toISOString().split('T')[0]
52
- } else if(fieldDefinition.description.indexOf("$link")>=0) {
53
- value = "<a href='"+getValue(this.esInstance, fieldDefinition)+"'>link</a>"
54
- }
55
- return {
56
- name: fieldDefinition.name,
57
- value: value
58
- }
59
- });
60
- }
61
- },
62
- }
63
- }
64
- </script>
@@ -1,25 +0,0 @@
1
- <template>
2
- <div v-show="active" :class="['z-40 absolute inset-0 w-full h-full opacity-75', {'pointer-events-none':interactable}]">
3
- <div class="absolute inset-0 bg-white opacity-50"></div>
4
- <div class="flex p-4">
5
- <i class="fas fa-spinner fa-spin fa-2x text-slate-700"></i>
6
- </div>
7
- </div>
8
- </template>
9
-
10
- <script>
11
- export default {
12
- props: {
13
- active: {
14
- /* If true show overlay */
15
- type: Boolean,
16
- default: false
17
- },
18
- interactable: {
19
- /* If true it will allow interaction with elements bellow */
20
- type: Boolean,
21
- default: false
22
- }
23
- }
24
- }
25
- </script>
@@ -1,39 +0,0 @@
1
- <% if (htmlWebpackPlugin.options.rmIntegrated == false) { %>
2
- <!DOCTYPE html>
3
- <html lang="en">
4
- <head>
5
- <meta charset="utf-8">
6
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
7
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
8
-
9
- <% } %>
10
- <% for (var css in htmlWebpackPlugin.files.css) { %>
11
- <link href="<%= htmlWebpackPlugin.files.css[css] %>" rel="preload" as="style">
12
- <link href="<%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet">
13
- <% } %>
14
- <% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
15
- <link href="<%= htmlWebpackPlugin.files.chunks[chunk].entry %>" rel="preload" as="script">
16
- <% } %>
17
- <% if (htmlWebpackPlugin.options.rmIntegrated == false) { %>
18
- </head>
19
- <body>
20
- <% } %>
21
- <style>section.custom-resource{visibility: hidden;opacity:0;top:63px;left:0;right:0;bottom:0;padding:0;}</style>
22
- <div id="app"></div>
23
- <script>
24
- // mimes: .cob-app tem estilos globais que se aplicam a elementos vuetify que mudam o aspecto previsto
25
- let section = document.getElementsByClassName("custom-resource")[0];
26
- section && section.classList.remove("cob-app"); //TODO: validar que isto é a melhor opção (considerar remover class na ui-all)
27
-
28
- // se header não está visivel posiciona o top a 0
29
- if(document.getElementById("header").style['display'] == 'none') {
30
- section.style['top'] = "0px"
31
- }
32
- </script>
33
- <% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
34
- <script type="text/javascript" src="<%= htmlWebpackPlugin.files.chunks[chunk].entry %>"></script>
35
- <% } %>
36
- <% if (htmlWebpackPlugin.options.rmIntegrated == false) { %>
37
- </body>
38
- </html>
39
- <% } %>