Skip to content

Commit 828633c

Browse files
authored
Merge pull request #491 from mycontroller-org/development
1.4.0.Final version changes
2 parents e1a31b7 + 628a608 commit 828633c

File tree

153 files changed

+4736
-1732
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+4736
-1732
lines changed

dist/.tx/config

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ host = https://www.transifex.com
55
source_file = src/main/package/www/languages/mc_locale_gui_source_en.json
66
source_lang = en
77
file_filter = src/main/package/www/languages/mc_locale_gui-<lang>.json
8-
lang_map = en_US:en_us, de_DE:de_de, ru_RU:ru_ru, ta_IN:ta_in, hi_IN:hi_in, pt_PT:pt_pt, es_AR:es_ar, ca_ES:ca_es, es_ES:es_es, nl_NL:nl_nl, da_DK:da_dk, pt_BR:pt_br, fr_FR:fr_fr, mk_MK:mk_mk, ro_RO:ro_ro, zh_CN:zh_cn, cs_CZ:cs_cz, hu_HU:hu_hu, it_IT:it_it, sk_SK:sk_sk, no_NO:no_no, he_IL:he_il, el_GR:el_gr, pl_PL:pl_pl, id_ID:id_id
8+
lang_map = en_US:en_us, de_DE:de_de, ru_RU:ru_ru, ta_IN:ta_in, hi_IN:hi_in, pt_PT:pt_pt, es_AR:es_ar, ca_ES:ca_es, es_ES:es_es, nl_NL:nl_nl, da_DK:da_dk, pt_BR:pt_br, fr_FR:fr_fr, mk_MK:mk_mk, ro_RO:ro_ro, zh_CN:zh_cn, cs_CZ:cs_cz, hu_HU:hu_hu, it_IT:it_it, sk_SK:sk_sk, no_NO:no_no, he_IL:he_il, el_GR:el_gr, pl_PL:pl_pl, id_ID:id_id, zh_TW:zh_tw
99

1010
[multi-locale.mc_locale_java]
1111
source_file = src/main/resources/mc_locale/mc_locale_java-source_en.properties

dist/pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
3-
Copyright 2015-2018 Jeeva Kandasamy ([email protected])
3+
Copyright 2015-2019 Jeeva Kandasamy ([email protected])
44
and other contributors as indicated by the @author tags.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>org.mycontroller.standalone</groupId>
2323
<artifactId>mycontroller-standalone-parent</artifactId>
24-
<version>1.3.0.Final</version>
24+
<version>1.4.0.Final</version>
2525
</parent>
2626

2727
<artifactId>mycontroller-dist</artifactId>
@@ -32,7 +32,7 @@
3232
<properties>
3333
<mc.dist.finalName>${project.artifactId}-standalone-${project.version}</mc.dist.finalName>
3434
<mc.dist.jar.finalName>${mc.dist.finalName}-single</mc.dist.jar.finalName>
35-
<mc.gui.version>20</mc.gui.version>
35+
<mc.gui.version>29</mc.gui.version>
3636
</properties>
3737

3838
<dependencies>
10 Bytes
Binary file not shown.

dist/src/main/package/conf/logback.xml

+29-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<encoder>
2424
<!-- <pattern>%date %level [%thread] [%logger:%line] %msg%n</pattern> -->
2525
<!-- Replace CR(\r) with string \r and LF(\n) with string \n-->
26-
<pattern>%date %level [%thread] [%logger:%line] %replace(%replace(%msg){'\r', '\\r'}){'\n', '\\n'}%n</pattern>
26+
<pattern>%date %level [%thread] [%logger:%line] %replace(%msg){'\r', '\\r'}%n</pattern>
2727
</encoder>
2828
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
2929
<FileNamePattern>../logs/mycontroller_%i.log.zip</FileNamePattern>
@@ -41,6 +41,29 @@
4141
</encoder>
4242
</appender>
4343

44+
<appender name="GATEWAY_RAW_MESSAGE_APPENDER" class="ch.qos.logback.classic.sift.SiftingAppender">
45+
<discriminator>
46+
<key>gateway_reference</key>
47+
<defaultValue>0_default</defaultValue>
48+
</discriminator>
49+
<sift>
50+
<appender name="fileAppender" class="ch.qos.logback.core.FileAppender">
51+
<file>../logs/raw_message_gw_${gateway_reference}.log</file>
52+
<encoder>
53+
<pattern>%date %replace(%replace(%msg){'\r', '\\r'}){'\n', '\\n'}%n</pattern>
54+
</encoder>
55+
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
56+
<FileNamePattern>../logs/raw_message_gw_${gateway_reference}%i.log.zip</FileNamePattern>
57+
<MinIndex>1</MinIndex>
58+
<MaxIndex>5</MaxIndex>
59+
</rollingPolicy>
60+
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
61+
<MaxFileSize>5MB</MaxFileSize>
62+
</triggeringPolicy>
63+
</appender>
64+
</sift>
65+
</appender>
66+
4467
<logger level="INFO" name="com.j256.ormlite" />
4568
<logger level="INFO" name="org.apache.http" />
4669
<logger level="INFO" name="org.jboss.resteasy.core" />
@@ -94,4 +117,9 @@
94117
<root level="WARN">
95118
<appender-ref ref="FILE" />
96119
</root>
120+
121+
<logger name="RAW_MESSAGE_LOGGER" level="INFO" additivity="false">
122+
<appender-ref ref="GATEWAY_RAW_MESSAGE_APPENDER" />
123+
</logger>
124+
97125
</configuration>

dist/src/main/package/conf/mycontroller.properties

+11
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@
2121
# Mycontroller.org server restart is required, to apply new configuration
2222
#========================================================================
2323

24+
#=========================================================================================================
25+
# Data Processing Agreement
26+
# -------------------------
27+
# By using this software you agree that the following non-PII (non personally identifiable information)
28+
# data will be collected, processed and used by MyController.org for the purpose of improving quality of
29+
# MyController software.
30+
# If you do not like to share setup anonymous data, disable it here, by setting false
31+
# restart the server and logout and login in the UI
32+
#=========================================================================================================
33+
mcc.collect.anonymous.data=true
34+
2435
#========================================================================
2536
# Application temporary location
2637
#========================================================================
+3-13
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.mycontroller.standalone.db.dao;
1817

19-
import java.util.List;
20-
21-
import org.mycontroller.standalone.db.tables.SystemJob;
22-
23-
/**
24-
* @author Jeeva Kandasamy (jkandasa)
25-
* @since 0.0.1
26-
*/
27-
public interface SystemJobDao extends BaseDao<SystemJob, Integer> {
28-
29-
List<SystemJob> getAllEnabled();
30-
}
18+
//set the window.name to signal AangularJS to delay bootstrapping until resumeBootstrap() is called
19+
//see: https://docs.angularjs.org/guide/bootstrap
20+
window.name = 'NG_DEFER_BOOTSTRAP! ' + window.name;

dist/src/main/package/www/app.css

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2018 Jeeva Kandasamy ([email protected])
2+
* Copyright 2015-2019 Jeeva Kandasamy ([email protected])
33
* and other contributors as indicated by the @author tags.
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -323,6 +323,10 @@ input.mc-color-steel-blue{
323323
}
324324

325325

326+
.mc-model-text-margin {
327+
margin-top:5px;
328+
margin-bottom:5px;
329+
}
326330

327331
/* on angular-patternfly upgrade from 2.x to 3.x introduced issue on sensors-action page.
328332
* To overcome this issue copied style from old version.
@@ -639,7 +643,6 @@ input.mc-color-steel-blue{
639643
margin-bottom:5px;
640644
}
641645

642-
643646
/* ADF Table widget */
644647
.adf-table > tbody > tr > td{
645648
padding-left: 2px;

dist/src/main/package/www/app.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ myControllerModule.controller('McNavBarCtrl', function($scope, $location, $trans
620620
};
621621
});
622622

623-
myControllerModule.run(function ($rootScope, $state, $location, $http, mchelper, $translate, editableOptions, CommonServices) {
623+
myControllerModule.run(function ($rootScope, $state, $location, $http, mchelper, $translate, editableOptions, CommonServices, $window) {
624624
//Load mchelper from cookies
625625
CommonServices.loadMchelper();
626626

@@ -633,11 +633,16 @@ myControllerModule.run(function ($rootScope, $state, $location, $http, mchelper,
633633
$translate.use(mchelper.cfg.languageId);
634634
}
635635

636-
637636
if (mchelper.internal.currentUser) {
638637
$http.defaults.headers.common['Authorization'] = 'Basic ' + mchelper.internal.currentUser.authdata; // jshint ignore:line
639638
}
640639

640+
// initialise google analytics and send browser details, if enabled
641+
if(mchelper.cfg.googleAnalyticsEnabled){
642+
$window.ga('create', mchelper.cfg.googleAnalyticsTid, 'auto');
643+
$window.ga('send', 'pageview', "/");
644+
}
645+
641646
$rootScope.$on('$stateChangeStart', function (event, toState, toParams) {
642647
//alert(angular.toJson(toState));
643648
if(toState.name.indexOf('login') === 0){
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2018 Jeeva Kandasamy ([email protected])
2+
* Copyright 2015-2019 Jeeva Kandasamy ([email protected])
33
* and other contributors as indicated by the @author tags.
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -21,7 +21,7 @@
2121
'use strict';
2222

2323
angular.module('adf.widget.myc-os-commands', [])
24-
.config(function(dashboardProvider){
24+
.config(function (dashboardProvider) {
2525
dashboardProvider
2626
.widget('mycOsCommands', {
2727
title: 'OS Commands',
@@ -30,9 +30,9 @@ angular.module('adf.widget.myc-os-commands', [])
3030
controller: 'mycOsCommandController',
3131
controllerAs: 'mycOsBtns',
3232
config: {
33-
minBtnHeight:30,
34-
minBtnWidth:90,
35-
buttonsJson:"[\n]",
33+
minBtnHeight: 30,
34+
minBtnWidth: 90,
35+
buttonsJson: "[\n]",
3636
},
3737
edit: {
3838
templateUrl: 'controllers/adf-widgets/adf-myc-os/edit.html?mcv=${mc.gui.version}',
@@ -41,7 +41,7 @@ angular.module('adf.widget.myc-os-commands', [])
4141
}
4242
});
4343
})
44-
.controller('mycOsCommandController', function($scope, $interval, config, mchelper, $uibModal, $filter, OSCommandFactory, CommonServices){
44+
.controller('mycOsCommandController', function ($scope, $interval, config, mchelper, $uibModal, $filter, OSCommandFactory, CommonServices) {
4545
var mycOsBtns = this;
4646

4747
mycOsBtns.showLoading = false;
@@ -50,49 +50,55 @@ angular.module('adf.widget.myc-os-commands', [])
5050
mycOsBtns.buttons = angular.fromJson(config.buttonsJson);
5151

5252
// execute OS command directly
53-
$scope.executeOsCommandDirect = function(button){
53+
$scope.executeOsCommandDirect = function (button) {
5454
var request = {};
5555
request.os = button.os;
5656
request.command = button.command;
57-
OSCommandFactory.execute(request, function(response){
58-
if(response.error === undefined){
57+
OSCommandFactory.execute(request, function (response) {
58+
if (response.error === undefined) {
5959
alertService.success(response.result);
60-
}else {
60+
} else {
6161
alertService.danger(angular.toJson(response));
6262
}
63-
},function(error){
63+
}, function (error) {
6464
displayRestError.display(error);
6565
});
6666
};
6767

6868
// execute OS command with confirmation check
6969
$scope.executeOsCommand = function (button) {
70-
if(button.confirmation === true){
71-
var addModalInstance = $uibModal.open({
72-
templateUrl: 'controllers/adf-widgets/adf-myc-os/confirmation-modal.html?mcv=${mc.gui.version}',
73-
controller: 'CommandConfirmationController',
74-
resolve: {button: button}
70+
if (button.confirmation === true) {
71+
var addModalInstance = $uibModal.open({
72+
templateUrl: 'controllers/adf-widgets/adf-myc-os/confirmation-modal.html?mcv=${mc.gui.version}',
73+
controller: 'CommandConfirmationController',
74+
resolve: {
75+
button: button
76+
}
7577
});
7678

7779
addModalInstance.result.then(function () {
78-
$scope.executeOsCommandDirect(button);
79-
}),
80-
function () {
81-
//console.log('Modal dismissed at: ' + new Date());
82-
}
80+
$scope.executeOsCommandDirect(button);
81+
}),
82+
function () {
83+
//console.log('Modal dismissed at: ' + new Date());
84+
}
8385
} else {
8486
$scope.executeOsCommandDirect(button);
8587
}
8688
};
8789

8890

89-
}).controller('mycOsCommandEditController', function($scope, $interval, config, mchelper, $filter, CommonServices){
91+
}).controller('mycOsCommandEditController', function ($scope, $interval, config, mchelper, $filter, CommonServices) {
9092
var mycOsBtnsEdit = this;
9193
mycOsBtnsEdit.cs = CommonServices;
9294

9395
}).controller('CommandConfirmationController', function ($scope, $uibModalInstance, $filter, button) {
94-
$scope.header = $filter('translate')('OS_COMMAND_EXECTION_CONFIRMATION_TITLE');
95-
$scope.button = button;
96-
$scope.reboot = function() {$uibModalInstance.close(); };
97-
$scope.cancel = function () { $uibModalInstance.dismiss('cancel'); }
98-
});
96+
$scope.header = $filter('translate')('OS_COMMAND_EXECTION_CONFIRMATION_TITLE');
97+
$scope.button = button;
98+
$scope.reboot = function () {
99+
$uibModalInstance.close();
100+
};
101+
$scope.cancel = function () {
102+
$uibModalInstance.dismiss('cancel');
103+
}
104+
});

dist/src/main/package/www/controllers/adf-widgets/adf-myc-os/confirmation-modal.html

+5-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@
2525
</div>
2626

2727
<div class="modal-body modal-body-text-only">
28-
{{ 'OS_COMMAND_EXECTION_CONFIRMATION_MESSAGE' | translate }}
29-
<div ng-if="button.os"> {{ 'OPERATING_SYSTEM' | translate }}: <b>{{button.os}}</b></div>
30-
<div><pre>{{button.command}}</pre></div>
28+
<div class="mc-model-text-margin">{{ 'OS_COMMAND_EXECTION_CONFIRMATION_MESSAGE' | translate }}
29+
<div ng-if="button.os"> {{ 'OPERATING_SYSTEM' | translate }}: <b>{{button.os}}</b></div>
30+
</div>
31+
32+
<div><pre> {{ 'COMMAND' | translate }}: <b>{{button.command}}</b></pre></div>
3133
</div>
3234

3335
<div class="modal-footer">

0 commit comments

Comments
 (0)