cob-cli 2.25.0 → 2.27.1
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.
- package/bin/cob-cli.js +6 -7
- package/bin/handleAutoComplete.js +3 -4
- package/lib/commands/customize.js +216 -63
- package/package.json +3 -2
- package/.gitmodules +0 -27
- package/.vscode/launch.json +0 -106
- package/README.Development.md +0 -294
- package/README.publish.md +0 -10
- package/customizations/backend.email.js +0 -10
- package/customizations/backend.js +0 -14
- package/customizations/backend.updateField.js +0 -11
- package/customizations/backend.vuepress.js +0 -35
- package/customizations/dashboard.dash.js +0 -14
- package/customizations/dashboard.js +0 -14
- package/customizations/dashboard.simple.js +0 -12
- package/customizations/dashboard.vue.empty.js +0 -12
- package/customizations/dashboard.vue.grid.js +0 -10
- package/customizations/dashboard.vue.js +0 -14
- package/customizations/dashboard.vue.menuAndGrid.js +0 -10
- package/customizations/frontend.common.js +0 -16
- package/customizations/frontend.easy.js +0 -16
- package/customizations/frontend.formatList.currency.js +0 -17
- package/customizations/frontend.formatList.js +0 -13
- package/customizations/frontend.js +0 -14
- package/customizations/importer.js +0 -10
- package/customizations/keywords.audit.js +0 -18
- package/customizations/keywords.calc.js +0 -18
- package/customizations/keywords.image.js +0 -16
- package/customizations/keywords.js +0 -17
- package/customizations/keywords.kibana.js +0 -16
- package/customizations/keywords.log.js +0 -18
- package/customizations/keywords.styleResults.js +0 -18
- package/lib/task_lists/customize_copy.js +0 -51
- package/lib/task_lists/customize_mergeFiles.js +0 -42
- package/lib/task_lists/customize_questions.js +0 -40
- package/templates/backend/vuepress/integrationm/actions/getVuePressDoc.groovy +0 -74
- package/templates/backend/vuepress/integrationm/actions/getVuePressSidebarConfig.groovy +0 -42
- package/templates/backend/vuepress/integrationm/actions/getVuePressSidebarRootElements.groovy +0 -17
- package/templates/backend/vuepress/others/vuepress/definition_contents_v234.json +0 -619
- package/templates/backend/vuepress/others/vuepress/nginx/README.md +0 -28
- package/templates/backend/vuepress/others/vuepress/package-lock.json +0 -29656
- package/templates/backend/vuepress/others/vuepress/package.json +0 -24
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/DescriptVideo.vue +0 -22
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/Graph.vue +0 -124
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/ReadingTime.vue +0 -26
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/References.vue +0 -228
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/RestrictedContent.vue +0 -77
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/config.js +0 -101
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/config.json +0 -31
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/enhanceApp.js +0 -14
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/nav/getNavTranslated.js +0 -52
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/plugins/References.js +0 -96
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/public/Logo-Cult-of-Bits-400x400-1.png +0 -0
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/public/favicon-cob.png +0 -0
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/public/logo.png +0 -0
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/styles/index.styl +0 -39
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/styles/palette.styl +0 -17
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/LICENSE +0 -21
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/README.md +0 -11
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/AlgoliaSearchBox.vue +0 -172
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/DropdownLink.vue +0 -252
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/DropdownTransition.vue +0 -33
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Home.vue +0 -134
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/NavLink.vue +0 -98
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/NavLinks.vue +0 -165
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Navbar.vue +0 -140
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Page.vue +0 -31
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/PageEdit.vue +0 -119
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/PageNav.vue +0 -163
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Sidebar.vue +0 -64
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarButton.vue +0 -40
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarGroup.vue +0 -144
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarLink.vue +0 -140
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarLinks.vue +0 -114
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/global-components/Badge.vue +0 -44
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/global-components/CodeBlock.vue +0 -41
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/global-components/CodeGroup.vue +0 -120
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/index.js +0 -59
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/layouts/404.vue +0 -30
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/layouts/Layout.vue +0 -151
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/noopModule.js +0 -1
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/package.json +0 -44
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/arrow.styl +0 -22
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/code.styl +0 -137
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/config.styl +0 -1
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/custom-blocks.styl +0 -44
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/index.styl +0 -202
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/mobile.styl +0 -37
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/toc.styl +0 -3
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/wrapper.styl +0 -10
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/util/index.js +0 -244
- package/templates/dashboards/cob-dashboard-html/demoDashboard.html +0 -18
- package/templates/dashboards/cob-dashboard-vue/package-lock.json +0 -25020
- package/templates/dashboards/cob-dashboard-vue/package.json +0 -21
- package/templates/dashboards/cob-dashboard-vue/src/App.vue +0 -26
- package/templates/dashboards/cob-dashboard-vue/src/dashboard.html +0 -31
- package/templates/dashboards/cob-dashboard-vue/src/main.js +0 -12
- package/templates/dashboards/cob-dashboard-vue/src/plugins/cobUiVueComponents.js +0 -6
- package/templates/dashboards/cob-dashboard-vue/src/plugins/vuetify.js +0 -9
- package/templates/dashboards/cob-dashboard-vue/vue.config.js +0 -104
- package/templates/dashboards/dash/dist/css/app.7b16c01a.css +0 -11
- package/templates/dashboards/dash/dist/dashboard.html +0 -25
- package/templates/dashboards/dash/dist/fonts/fa-brands-400.a78ffbbe.ttf +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-brands-400.cd2b4095.woff2 +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-regular-400.b1a1bebb.ttf +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-regular-400.e8a1ba41.woff2 +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-solid-900.55b416a8.woff2 +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-solid-900.73820155.ttf +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-v4compatibility.0d6f5f18.ttf +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-v4compatibility.786e6b33.woff2 +0 -0
- package/templates/dashboards/dash/dist/js/app.13b950c8.js +0 -199
- package/templates/dashboards/dash/dist/js/app.13b950c8.js.map +0 -1
- package/templates/dashboards/dash/package-lock.json +0 -22646
- package/templates/dashboards/dash/package.json +0 -27
- package/templates/dashboards/dash/src/App.vue +0 -124
- package/templates/dashboards/dash/src/assets/css/all.min.css +0 -6
- package/templates/dashboards/dash/src/assets/webfonts/fa-brands-400.ttf +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-brands-400.woff2 +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-regular-400.ttf +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-regular-400.woff2 +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-solid-900.ttf +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-solid-900.woff2 +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-v4compatibility.ttf +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-v4compatibility.woff2 +0 -0
- package/templates/dashboards/dash/src/collector.js +0 -222
- package/templates/dashboards/dash/src/components/Attention.vue +0 -30
- package/templates/dashboards/dash/src/components/Board.vue +0 -35
- package/templates/dashboards/dash/src/components/Calendar.vue +0 -422
- package/templates/dashboards/dash/src/components/Dashboard.vue +0 -27
- package/templates/dashboards/dash/src/components/Filter.vue +0 -68
- package/templates/dashboards/dash/src/components/Kibana.vue +0 -138
- package/templates/dashboards/dash/src/components/Label.vue +0 -15
- package/templates/dashboards/dash/src/components/Menu.vue +0 -44
- package/templates/dashboards/dash/src/components/Totals.vue +0 -49
- package/templates/dashboards/dash/src/components/TotalsValue.vue +0 -59
- package/templates/dashboards/dash/src/components/shared/Instance.vue +0 -64
- package/templates/dashboards/dash/src/components/shared/Waiting.vue +0 -25
- package/templates/dashboards/dash/src/dashboard.html +0 -39
- package/templates/dashboards/dash/src/definition_dashboard_v0.json +0 -924
- package/templates/dashboards/dash/src/definition_dashboard_v1.json +0 -1
- package/templates/dashboards/dash/src/input.css +0 -9
- package/templates/dashboards/dash/src/main.js +0 -11
- package/templates/dashboards/dash/src/model/ComponentStatePersistence.js +0 -66
- package/templates/dashboards/dash/src/output.css +0 -314245
- package/templates/dashboards/dash/src/test_collector.js +0 -3719
- package/templates/dashboards/dash/src/utils/EsInstanceUtils.js +0 -8
- package/templates/dashboards/dash/tailwind.config.js +0 -12
- package/templates/dashboards/dash/vue.config.js +0 -104
- package/templates/frontend/common/templates/frontend/common/css/_dualColumn.css +0 -46
- package/templates/frontend/common/templates/frontend/common/css/_global.css +0 -19
- package/templates/frontend/common/templates/frontend/common/css/_hidden.css +0 -13
- package/templates/frontend/common/templates/frontend/common/css/_history.css +0 -13
- package/templates/frontend/common/templates/frontend/common/css/_mobile.css +0 -125
- package/templates/frontend/common/templates/frontend/common/css/customizations.__MERGE__.css +0 -5
- package/templates/frontend/common/templates/frontend/common/js/cob/_disable_save_onSubdetail.js +0 -11
- package/templates/frontend/common/templates/frontend/common/js/cob/_group_references.js +0 -22
- package/templates/frontend/common/templates/frontend/common/js/cob/_show_hidden.js +0 -35
- package/templates/frontend/common/templates/frontend/common/js/customizations2.__MERGE__.js +0 -3
- package/templates/frontend/common/templates/frontend/common/package.json +0 -3
- package/templates/frontend/easy/css/_easy/googlefonts.css +0 -360
- package/templates/frontend/easy/css/_easy/vuetify.cob-scoped.css +0 -10488
- package/templates/frontend/easy/js/_easy/lib/axios.min.js +0 -9
- package/templates/frontend/easy/js/_easy/lib/marked.min.js +0 -6
- package/templates/frontend/easy/js/_easy/lib/vue.js +0 -11912
- package/templates/frontend/easy/js/_easy/lib/vue.min.js +0 -6
- package/templates/frontend/easy/js/_easy/lib/vuetify.min.js +0 -6
- package/templates/frontend/easy/js/customizations2.__MERGE__.js +0 -22
- package/templates/frontend/easy/webapp/.browserslistrc +0 -2
- package/templates/frontend/easy/webapp/.eslintrc.js +0 -17
- package/templates/frontend/easy/webapp/README.md +0 -60
- package/templates/frontend/easy/webapp/babel.config.js +0 -5
- package/templates/frontend/easy/webapp/dist/css/app.a4fb91f8.css +0 -1
- package/templates/frontend/easy/webapp/dist/dashboard.html +0 -13
- package/templates/frontend/easy/webapp/dist/js/app.63a57dcd.js +0 -2
- package/templates/frontend/easy/webapp/dist/js/app.63a57dcd.js.map +0 -1
- package/templates/frontend/easy/webapp/package-lock.json +0 -32986
- package/templates/frontend/easy/webapp/package.json +0 -32
- package/templates/frontend/easy/webapp/postcss.config.js +0 -5
- package/templates/frontend/easy/webapp/public/dashboard.html +0 -13
- package/templates/frontend/easy/webapp/src/App.vue +0 -181
- package/templates/frontend/easy/webapp/src/assets/logo.png +0 -0
- package/templates/frontend/easy/webapp/src/components/HelloWorld.vue +0 -59
- package/templates/frontend/easy/webapp/src/components/PermBuilder.vue +0 -163
- package/templates/frontend/easy/webapp/src/components/PlanExecutor.vue +0 -225
- package/templates/frontend/easy/webapp/src/components/ProductPermBuilder.vue +0 -95
- package/templates/frontend/easy/webapp/src/components/RmDefinitionChooser.vue +0 -59
- package/templates/frontend/easy/webapp/src/components/RmDomainChooser.vue +0 -60
- package/templates/frontend/easy/webapp/src/components/RoleBuilder.vue +0 -73
- package/templates/frontend/easy/webapp/src/main.js +0 -19
- package/templates/frontend/easy/webapp/src/perm-templates.js +0 -189
- package/templates/frontend/easy/webapp/src/perms.js +0 -197
- package/templates/frontend/easy/webapp/vue.config.js +0 -66
- package/templates/frontend/formatList/currency/css/_format_currency.css +0 -11
- package/templates/frontend/formatList/currency/css/customizations.__MERGE__.css +0 -1
- package/templates/frontend/formatList/currency/js/cob/_format_currency.js +0 -11
- package/templates/frontend/formatList/currency/js/customizations2.__MERGE__.js +0 -1
- package/templates/frontend/formatList/currency/package.json +0 -3
- package/templates/gitignore +0 -14
- package/templates/keywords/audit/backend/scripts/_audit.groovy +0 -78
- package/templates/keywords/audit/frontend/js/cob/_audit.js +0 -24
- package/templates/keywords/audit/frontend/js/customizations2.__MERGE__.js +0 -1
- package/templates/keywords/audit/package.json +0 -3
- package/templates/keywords/calc/backend/scripts/_calc.groovy +0 -151
- package/templates/keywords/calc/frontend/js/cob/_calc.js +0 -193
- package/templates/keywords/calc/frontend/js/customizations2.__MERGE__.js +0 -1
- package/templates/keywords/calc/package.json +0 -3
- package/templates/keywords/image/frontend/js/cob/_image.js +0 -30
- package/templates/keywords/image/frontend/js/customizations2.__MERGE__.js +0 -1
- package/templates/keywords/image/package.json +0 -3
- package/templates/keywords/kibana/frontend/js/cob/_kibana.js +0 -58
- package/templates/keywords/kibana/frontend/js/customizations2.__MERGE__.js +0 -1
- package/templates/keywords/kibana/package.json +0 -3
- package/templates/keywords/log/backend/scripts/_log.groovy +0 -95
- package/templates/keywords/log/frontend/css/_log.css +0 -5
- package/templates/keywords/log/frontend/css/customizations.__MERGE__.css +0 -1
- package/templates/keywords/log/package.json +0 -3
- package/templates/keywords/styleResults/frontend/css/_styleResults.css +0 -86
- package/templates/keywords/styleResults/frontend/css/customizations.__MERGE__.css +0 -1
- package/templates/keywords/styleResults/frontend/js/cob/_styleResults.js +0 -38
- package/templates/keywords/styleResults/frontend/js/customizations2.__MERGE__.js +0 -1
- package/templates/keywords/styleResults/package.json +0 -3
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
//----------------- $kibana ------------------------
|
|
2
|
-
cob.custom.customize.push(function (core, utils, ui) {
|
|
3
|
-
core.customizeAllInstances((instance, presenter) =>
|
|
4
|
-
{
|
|
5
|
-
if (instance.isNew() || presenter.isGroupEdit()) return;
|
|
6
|
-
|
|
7
|
-
let iFramesFPs = presenter.findFieldPs((fp) =>
|
|
8
|
-
/[$]kibana\(.+\)/.exec(fp.field.fieldDefinition.description)
|
|
9
|
-
);
|
|
10
|
-
iFramesFPs.forEach((fp) => {
|
|
11
|
-
let matcher = /[$]kibana\(([^,]+),([^,]+)(,([^,]+))??\)/;
|
|
12
|
-
let args = fp.field.fieldDefinition.description.match(matcher);
|
|
13
|
-
let dashboardKibana = args[1];
|
|
14
|
-
let query = args[2];
|
|
15
|
-
let height = args[4] || "300";
|
|
16
|
-
|
|
17
|
-
let varsMatcher = /{{(.+)}}/;
|
|
18
|
-
let vars = query.match(varsMatcher);
|
|
19
|
-
|
|
20
|
-
for (let i = 1; i < vars.length; i++) {
|
|
21
|
-
let varValue =
|
|
22
|
-
instance.findFields(vars[i]) &&
|
|
23
|
-
instance.findFields(vars[i])[0].value;
|
|
24
|
-
query = query.replaceAll(
|
|
25
|
-
"{{" + vars[i] + "}}",
|
|
26
|
-
'"' + varValue + '"'
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (
|
|
31
|
-
!$("#" + dashboardKibana).length &&
|
|
32
|
-
!instance.isNew() &&
|
|
33
|
-
!presenter.isGroupEdit()
|
|
34
|
-
) {
|
|
35
|
-
let $kibana = $(
|
|
36
|
-
'<li id="' +
|
|
37
|
-
dashboardKibana +
|
|
38
|
-
'" style="margin:0;">' +
|
|
39
|
-
"<iframe " +
|
|
40
|
-
'src="/kibana/app/dashboards#/view/' +
|
|
41
|
-
dashboardKibana +
|
|
42
|
-
"?embed=true" +
|
|
43
|
-
"&hide-filter-bar=true" +
|
|
44
|
-
"&_a=(query:(language:lucene,query:'" +
|
|
45
|
-
encodeURI(query) +
|
|
46
|
-
"'))\" " +
|
|
47
|
-
'height="' +
|
|
48
|
-
height +
|
|
49
|
-
'" ' +
|
|
50
|
-
'width="99.6%" style="border: 1px solid lightgray;">' +
|
|
51
|
-
"</iframe>" +
|
|
52
|
-
"</li>"
|
|
53
|
-
);
|
|
54
|
-
fp.content()[0].append($kibana[0]);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
})
|
|
58
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import("./cob/_kibana.js");
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import groovy.transform.Field
|
|
2
|
-
import org.codehaus.jettison.json.JSONObject
|
|
3
|
-
|
|
4
|
-
import com.google.common.cache.*
|
|
5
|
-
import java.util.concurrent.TimeUnit
|
|
6
|
-
|
|
7
|
-
// ========================================================================================================
|
|
8
|
-
if (msg.product != "recordm-definition" && msg.product != "recordm" ) return
|
|
9
|
-
|
|
10
|
-
@Field static cacheOfLogFieldsForDefinition = CacheBuilder.newBuilder()
|
|
11
|
-
.expireAfterWrite(5, TimeUnit.MINUTES)
|
|
12
|
-
.build();
|
|
13
|
-
|
|
14
|
-
if (msg.product == "recordm-definition") cacheOfLogFieldsForDefinition.invalidate(msg.type)
|
|
15
|
-
|
|
16
|
-
// ========================================================================================================
|
|
17
|
-
def logFields = cacheOfLogFieldsForDefinition.get(msg.type, { getLogFields(msg.type) })
|
|
18
|
-
if( logFields.size() > 0
|
|
19
|
-
&& msg.product == "recordm"
|
|
20
|
-
&& msg.user != "integrationm"
|
|
21
|
-
&& msg.action =~ "add|update"
|
|
22
|
-
) {
|
|
23
|
-
def updates = getLogUpdates(logFields)
|
|
24
|
-
def result = recordm.update(messageMap.type, "recordmInstanceId:" + messageMap.instance.id, updates);
|
|
25
|
-
if (updates) log.info("[\$log] UPDATE '${msg.type}' id:${msg.instance.id}, updates: ${updates}, result:${result} ");
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// ========================================================================================================
|
|
29
|
-
|
|
30
|
-
def getLogUpdates(logFields){
|
|
31
|
-
def updates = [:]
|
|
32
|
-
def currentUser = actionPacks.get("userm").getUser(msg.user).data.name;
|
|
33
|
-
|
|
34
|
-
logFields.each { logField ->
|
|
35
|
-
def commentLogs = msg.value(logField.name);
|
|
36
|
-
def newComment = msg.value(logField.sourceField);
|
|
37
|
-
def fieldMsg = getFieldMessage(logField.stateField);
|
|
38
|
-
|
|
39
|
-
if( newComment != null || msg.field(logField.stateField).changed() ){
|
|
40
|
-
def newLogEntry = "#### " + (new Date()).format('yyyy-MM-dd HH:mm:ss').toString() + " - " + currentUser;
|
|
41
|
-
newLogEntry += " [$fieldMsg] "
|
|
42
|
-
newLogEntry +="\n\n";
|
|
43
|
-
newLogEntry += newComment != null ? newComment : "";
|
|
44
|
-
newLogEntry +="\n\n";
|
|
45
|
-
|
|
46
|
-
if(commentLogs!=null) {
|
|
47
|
-
newLogEntry += "======================================================================\n";
|
|
48
|
-
}
|
|
49
|
-
updates << [(logField.name) : "" + newLogEntry + (commentLogs ?: "")];
|
|
50
|
-
updates << [(logField.sourceField) : ""];
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return updates
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
def getFieldMessage(field){
|
|
57
|
-
String newValue = msg.value(field) ?: "";
|
|
58
|
-
if( msg.field(field).changed() ){
|
|
59
|
-
String oldValue = msg.oldInstance.value(field) ?: "";
|
|
60
|
-
return "$field: $oldValue -> $newValue";
|
|
61
|
-
} else {
|
|
62
|
-
return "$field: $newValue";
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
def getLogFields(definitionName) {
|
|
67
|
-
// Obtém detalhes da definição
|
|
68
|
-
def definitionEncoded = URLEncoder.encode(definitionName, "utf-8").replace("+", "%20")
|
|
69
|
-
def resp = actionPacks.rmRest.get( "recordm/definitions/name/${definitionEncoded}".toString(), [:], "");
|
|
70
|
-
JSONObject definition = new JSONObject(resp);
|
|
71
|
-
|
|
72
|
-
def fieldsSize = definition.fieldDefinitions.length();
|
|
73
|
-
|
|
74
|
-
def fields = [:]
|
|
75
|
-
(0..fieldsSize-1).each { index ->
|
|
76
|
-
def fieldDefinition = definition.fieldDefinitions.getJSONObject(index)
|
|
77
|
-
def fieldDescription = fieldDefinition.get("description")
|
|
78
|
-
def fieldDefId = fieldDefinition.get("id")
|
|
79
|
-
def fieldName = fieldDefinition.get("name");
|
|
80
|
-
fields[fieldDefId] = [name:fieldName, description: fieldDescription]
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// Finalmente obtém a lista de campos que é necessário calcular
|
|
84
|
-
def auditFields = [];
|
|
85
|
-
fields.each { fieldId,field ->
|
|
86
|
-
def matcher = field.description.toString() =~ /[$]log\(([^(]+),\s*([^(]+)\)/
|
|
87
|
-
if(matcher) {
|
|
88
|
-
def sourceField = matcher[0][1]
|
|
89
|
-
def stateField = matcher[0][2]
|
|
90
|
-
auditFields << [name: field.name, sourceField : sourceField, stateField : stateField]
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
log.info("[\$log] Update 'logFields' for '$definitionName': $auditFields");
|
|
94
|
-
return auditFields
|
|
95
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import "_log.css";
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/* Font color Classes */
|
|
2
|
-
.DimRed a,
|
|
3
|
-
.DimGreen a,
|
|
4
|
-
.DimBlue a {
|
|
5
|
-
color:#a7c7d7;
|
|
6
|
-
}
|
|
7
|
-
.DimRed {
|
|
8
|
-
color:#fbb;
|
|
9
|
-
}
|
|
10
|
-
.DimGreen {
|
|
11
|
-
color:#9c9;
|
|
12
|
-
}
|
|
13
|
-
.DimBlue {
|
|
14
|
-
color:rgb(191, 200, 243);
|
|
15
|
-
}
|
|
16
|
-
.DimOrange {
|
|
17
|
-
color:rgb(255, 222, 187);
|
|
18
|
-
}
|
|
19
|
-
.DimGray {
|
|
20
|
-
color:#bebebe;
|
|
21
|
-
}
|
|
22
|
-
.Red {
|
|
23
|
-
color: red
|
|
24
|
-
}
|
|
25
|
-
.Green {
|
|
26
|
-
color:green;
|
|
27
|
-
}
|
|
28
|
-
.Blue {
|
|
29
|
-
color:blue
|
|
30
|
-
}
|
|
31
|
-
.Orange {
|
|
32
|
-
color:orange;
|
|
33
|
-
}
|
|
34
|
-
.Gray {
|
|
35
|
-
color:gray;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
/* Background Color Classes */
|
|
40
|
-
.BgRed {
|
|
41
|
-
background-color: red;
|
|
42
|
-
}
|
|
43
|
-
.BgGreen {
|
|
44
|
-
background-color: green;
|
|
45
|
-
}
|
|
46
|
-
.BgBlue{
|
|
47
|
-
background-color: blue;
|
|
48
|
-
}
|
|
49
|
-
.BgOrange{
|
|
50
|
-
background-color: orange;
|
|
51
|
-
}
|
|
52
|
-
.BgGray {
|
|
53
|
-
background-color:gray;
|
|
54
|
-
}
|
|
55
|
-
.BgDimRed {
|
|
56
|
-
background-color:lightpink;
|
|
57
|
-
}
|
|
58
|
-
.BgDimGreen {
|
|
59
|
-
background-color:#C1FA77;
|
|
60
|
-
}
|
|
61
|
-
.BgDimBlue {
|
|
62
|
-
background-color:#def4f9;
|
|
63
|
-
}
|
|
64
|
-
.BgDimOrange {
|
|
65
|
-
background-color:#FFE0D2;
|
|
66
|
-
}
|
|
67
|
-
.BgDimGray {
|
|
68
|
-
background-color:#bebebe;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
.BgRed,
|
|
73
|
-
.BgGreen,
|
|
74
|
-
.BgBlue,
|
|
75
|
-
.BgOrange,
|
|
76
|
-
.BgGray {
|
|
77
|
-
color: white;
|
|
78
|
-
text-align: center;
|
|
79
|
-
}
|
|
80
|
-
.BgDimRed,
|
|
81
|
-
.BgDimGreen,
|
|
82
|
-
.BgDimBlue,
|
|
83
|
-
.BgDimOrange,
|
|
84
|
-
.BgDimGray {
|
|
85
|
-
text-align: center;
|
|
86
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import "_styleResults.css";
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
cob.custom.customize.push(function (core, utils, ui) {
|
|
2
|
-
const toES = (name) => name.toLowerCase().replace(/ /g, '_')
|
|
3
|
-
|
|
4
|
-
core.customizeColumn("*","*",function(node, esDoc, fieldInfo){
|
|
5
|
-
// Check $styleResultColumn
|
|
6
|
-
const matchColumnRegex = /\$styleResultColumn\((.*)\)/
|
|
7
|
-
let styleColField = matchColumnRegex.exec(fieldInfo.fieldDefDescription)
|
|
8
|
-
if(styleColField) {
|
|
9
|
-
const fieldValue = esDoc[toES(fieldInfo.name)] && esDoc[toES(fieldInfo.name)][0];
|
|
10
|
-
const relevantMapping = styleColField[1].split(",")
|
|
11
|
-
|
|
12
|
-
for(let mapping of relevantMapping) {
|
|
13
|
-
let [styleValue, styleClass] = mapping.split(":")
|
|
14
|
-
if( styleValue.trim() == fieldValue
|
|
15
|
-
|| styleValue.trim() == "" && fieldValue == undefined
|
|
16
|
-
) {
|
|
17
|
-
node.classList.add(styleClass.trim())
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}),
|
|
22
|
-
|
|
23
|
-
core.customizeAllColumns("*",function(node, esDoc, fieldInfo){
|
|
24
|
-
// Finds $styleResultRows -> ATTENTION: only first occurrence, subsequent $styleResultRows will be ignore
|
|
25
|
-
// TODO: remove dependency of $styleResultsRow HAVING TO HAVE ALSO $instanceDescription
|
|
26
|
-
const matchRowsRegex = /\$styleResultRows\((.*)\)/
|
|
27
|
-
let firstStyleResultsField = esDoc._definitionInfo.instanceDescription.find( field => matchRowsRegex.exec(field.description))
|
|
28
|
-
if(firstStyleResultsField) {
|
|
29
|
-
const fieldValue = esDoc[toES(firstStyleResultsField.name)] && esDoc[toES(firstStyleResultsField.name)][0];
|
|
30
|
-
const relevantMapping = matchRowsRegex.exec(firstStyleResultsField.description)[1].split(",")
|
|
31
|
-
|
|
32
|
-
for(let mapping of relevantMapping) {
|
|
33
|
-
let [styleValue, styleClass] = mapping.split(":")
|
|
34
|
-
if(styleValue.trim() == fieldValue) node.classList.add(styleClass.trim())
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
})
|
|
38
|
-
})
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import("./cob/_styleResults.js");
|