Skip to content

Commit e1a31b7

Browse files
authored
Merge pull request #460 from mycontroller-org/development
1.3.0.Final version changes
2 parents a10694f + 04c6819 commit e1a31b7

File tree

521 files changed

+6485
-1688
lines changed

Some content is hidden

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

521 files changed

+6485
-1688
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
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
99

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

dist/locale_fix.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
#
3-
# Copyright 2015-2017 Jeeva Kandasamy ([email protected])
3+
# Copyright 2015-2018 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");

dist/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>org.mycontroller.standalone</groupId>
2323
<artifactId>mycontroller-standalone-parent</artifactId>
24-
<version>1.2.0.Final</version>
24+
<version>1.3.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>16</mc.gui.version>
35+
<mc.gui.version>20</mc.gui.version>
3636
</properties>
3737

3838
<dependencies>

dist/src/main/assembly/binary-deployment.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
3-
Copyright 2015-2017 Jeeva Kandasamy ([email protected])
3+
Copyright 2015-2018 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");

dist/src/main/package/bin/start.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@REM
2-
@REM Copyright 2015-2017 Jeeva Kandasamy ([email protected])
2+
@REM Copyright 2015-2018 Jeeva Kandasamy ([email protected])
33
@REM and other contributors as indicated by the @author tags.
44
@REM
55
@REM Licensed under the Apache License, Version 2.0 (the "License");

dist/src/main/package/bin/start.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
#
3-
# Copyright 2015-2017 Jeeva Kandasamy ([email protected])
3+
# Copyright 2015-2018 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");

dist/src/main/package/bin/stop.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
#
3-
# Copyright 2015-2017 Jeeva Kandasamy ([email protected])
3+
# Copyright 2015-2018 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");

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2017 Jeeva Kandasamy ([email protected])
2+
* Copyright 2015-2018 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");

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

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2017 Jeeva Kandasamy ([email protected])
2+
* Copyright 2015-2018 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");
@@ -43,19 +43,20 @@ var myControllerModule = angular.module('myController',[
4343
'angularMoment',
4444
'adf',
4545
'adf.structures.base',
46-
'adf.widget.myc-sen-vars',
4746
'adf.widget.myc-a-sensor-graph',
48-
'adf.widget.myc-sensors-grouped-graph',
49-
'adf.widget.myc-sensors-mixed-graph',
50-
'adf.widget.myc-sensors-bullet-graph',
51-
'adf.widget.myc-heat-map',
52-
'adf.widget.myc-custom-buttons',
47+
'adf.widget.myc-custom-widget',
5348
'adf.widget.myc-dsi',
49+
'adf.widget.myc-sensors-grouped-graph',
5450
'adf.widget.myc-groups',
51+
'adf.widget.myc-heat-map',
52+
'adf.widget.myc-sensors-mixed-graph',
5553
'adf.widget.myc-time',
56-
'adf.widget.myc-sunrisetime',
5754
'adf.widget.news',
58-
'adf.widget.myc-custom-widget',
55+
'adf.widget.myc-os-commands',
56+
'adf.widget.myc-custom-buttons',
57+
'adf.widget.myc-sen-vars',
58+
'adf.widget.myc-sensors-bullet-graph',
59+
'adf.widget.myc-sunrisetime',
5960
'ngMap',
6061
'kubernetesUI',
6162
]);

dist/src/main/package/www/controllers/additional-headers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2017 Jeeva Kandasamy ([email protected])
2+
* Copyright 2015-2018 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");

dist/src/main/package/www/controllers/adf-widgets/adf-myc-asg/adf-myc-a-sensor-graph.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2017 Jeeva Kandasamy ([email protected])
2+
* Copyright 2015-2018 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");

dist/src/main/package/www/controllers/adf-widgets/adf-myc-cb/adf-myc-custom-buttons.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2017 Jeeva Kandasamy ([email protected])
2+
* Copyright 2015-2018 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");

dist/src/main/package/www/controllers/adf-widgets/adf-myc-cw/adf-myc-custom-widget.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2017 Jeeva Kandasamy ([email protected])
2+
* Copyright 2015-2018 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");

dist/src/main/package/www/controllers/adf-widgets/adf-myc-dsi/adf-myc-display-static-image.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2017 Jeeva Kandasamy ([email protected])
2+
* Copyright 2015-2018 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");

dist/src/main/package/www/controllers/adf-widgets/adf-myc-groups/adf-myc-groups.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2017 Jeeva Kandasamy ([email protected])
2+
* Copyright 2015-2018 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");

dist/src/main/package/www/controllers/adf-widgets/adf-myc-hm/adf-myc-heat-map.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2017 Jeeva Kandasamy ([email protected])
2+
* Copyright 2015-2018 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");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/*
2+
* Copyright 2015-2018 Jeeva Kandasamy ([email protected])
3+
* and other contributors as indicated by the @author tags.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
// don't forget to declare this service module as a dependency in your main app constructor!
18+
//http://js2.coffee/#coffee2js
19+
//https://coderwall.com/p/r_bvhg/angular-ui-bootstrap-alert-service-for-angular-js
20+
21+
'use strict';
22+
23+
angular.module('adf.widget.myc-os-commands', [])
24+
.config(function(dashboardProvider){
25+
dashboardProvider
26+
.widget('mycOsCommands', {
27+
title: 'OS Commands',
28+
description: 'Create buttons to run Operating System Commands',
29+
templateUrl: 'controllers/adf-widgets/adf-myc-os/view.html?mcv=${mc.gui.version}',
30+
controller: 'mycOsCommandController',
31+
controllerAs: 'mycOsBtns',
32+
config: {
33+
minBtnHeight:30,
34+
minBtnWidth:90,
35+
buttonsJson:"[\n]",
36+
},
37+
edit: {
38+
templateUrl: 'controllers/adf-widgets/adf-myc-os/edit.html?mcv=${mc.gui.version}',
39+
controller: 'mycOsCommandEditController',
40+
controllerAs: 'mycOsBtnsEdit',
41+
}
42+
});
43+
})
44+
.controller('mycOsCommandController', function($scope, $interval, config, mchelper, $uibModal, $filter, OSCommandFactory, CommonServices){
45+
var mycOsBtns = this;
46+
47+
mycOsBtns.showLoading = false;
48+
$scope.tooltipEnabled = false;
49+
$scope.cs = CommonServices;
50+
mycOsBtns.buttons = angular.fromJson(config.buttonsJson);
51+
52+
// execute OS command directly
53+
$scope.executeOsCommandDirect = function(button){
54+
var request = {};
55+
request.os = button.os;
56+
request.command = button.command;
57+
OSCommandFactory.execute(request, function(response){
58+
if(response.error === undefined){
59+
alertService.success(response.result);
60+
}else {
61+
alertService.danger(angular.toJson(response));
62+
}
63+
},function(error){
64+
displayRestError.display(error);
65+
});
66+
};
67+
68+
// execute OS command with confirmation check
69+
$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}
75+
});
76+
77+
addModalInstance.result.then(function () {
78+
$scope.executeOsCommandDirect(button);
79+
}),
80+
function () {
81+
//console.log('Modal dismissed at: ' + new Date());
82+
}
83+
} else {
84+
$scope.executeOsCommandDirect(button);
85+
}
86+
};
87+
88+
89+
}).controller('mycOsCommandEditController', function($scope, $interval, config, mchelper, $filter, CommonServices){
90+
var mycOsBtnsEdit = this;
91+
mycOsBtnsEdit.cs = CommonServices;
92+
93+
}).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+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!--
2+
3+
Copyright (C) 2015-2016 Jeeva Kandasamy ([email protected])
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
17+
-->
18+
<div>
19+
20+
<div class="modal-header">
21+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="cancel()">
22+
<span class="pficon pficon-close"></span>
23+
</button>
24+
<div class="modal-title"><b>{{header}}</b></div>
25+
</div>
26+
27+
<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>
31+
</div>
32+
33+
<div class="modal-footer">
34+
<button class="btn btn-default" ng-click="cancel()"><i class="fa fa-close"></i> {{ 'CANCEL' | translate }}</button>
35+
<button class="btn btn-primary" ng-click="reboot()"><i class="fa fa-check"></i> {{ 'CONTINUE' | translate }}</button>
36+
</div>
37+
38+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!--
2+
3+
Copyright (C) 2015-2016 Jeeva Kandasamy ([email protected])
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
17+
-->
18+
<form role="form">
19+
<legend><small>{{ 'BUTTON_SETTINGS' | translate }}</small></legend>
20+
21+
<div class="form-group">
22+
<label class="mc-margin-right">{{ 'MINIMUM_HEIGHT' | translate }}</label>
23+
<input type="text" id="height-min" class="mc-margin-right" placeholder="{{'MINIMUM_HEIGHT' | translate}}" ng-model="config.minBtnHeight" pf-validation="mycOsBtnsEdit.cs.isNumber(input)" required>
24+
<span class="help-block">{{ 'VALIDATION_ERROR_NUMBER' | translate }}</span>
25+
<label class="mc-margin-right">{{ 'MINIMUM_WIDTH' | translate }}</label>
26+
<input type="text" id="width-min" placeholder="{{'MINIMUM_WIDTH' | translate}}" ng-model="config.minBtnWidth" pf-validation="mycOsBtnsEdit.cs.isNumber(input)" required>
27+
<span class="help-block">{{ 'VALIDATION_ERROR_NUMBER' | translate }}</span>
28+
</div>
29+
30+
<div class="form-group">
31+
<label>{{ 'JSON' | translate }}</label>
32+
<textarea class="form-control" rows="12" style="resize:none" ng-model="config.buttonsJson" required ></textarea>
33+
</div>
34+
35+
</form>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!--
2+
3+
Copyright (C) 2015-2016 Jeeva Kandasamy ([email protected])
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
17+
-->
18+
<!-- Loading icon disaplay -->
19+
<div ng-show="mycOsBtns.showLoading">
20+
<div ng-include src="'partials/common-html/loading-sm.html'"></div>
21+
</div>
22+
23+
<div ng-hide="mycOsBtns.showLoading">
24+
<div ng-if="config.buttonsJson" >
25+
<div id="custom-buttons-wrapper" class="row-fluid">
26+
<button ng-repeat="button in mycOsBtns.buttons track by $index" ng-click="executeOsCommand(button)" class="btn"
27+
ng-class="button.btnType ? 'btn-{{button.btnType}}' : 'btn-default'"
28+
ng-style="{'min-width':'{{config.minBtnWidth}}px', 'min-height':'{{config.minBtnHeight}}px'}"
29+
ng-bind-html="button.name"></button>
30+
</div>
31+
</div>
32+
<!-- display no items configured -->
33+
<div ng-if="config.buttonsJson.length < 5" ng-include src="'partials/common-html/no-items-filter-sm.html'"></div>
34+
</div>

dist/src/main/package/www/controllers/adf-widgets/adf-myc-sbg/adf-myc-sensors-bullet-graph.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2017 Jeeva Kandasamy ([email protected])
2+
* Copyright 2015-2018 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");

dist/src/main/package/www/controllers/adf-widgets/adf-myc-sen-vars/adf-myc-sen-vars.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2017 Jeeva Kandasamy ([email protected])
2+
* Copyright 2015-2018 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");

dist/src/main/package/www/controllers/adf-widgets/adf-myc-sgg/adf-myc-sensors-grouped-graph.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2017 Jeeva Kandasamy ([email protected])
2+
* Copyright 2015-2018 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");

dist/src/main/package/www/controllers/adf-widgets/adf-myc-smg/adf-myc-sensors-mixed-graph.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2017 Jeeva Kandasamy ([email protected])
2+
* Copyright 2015-2018 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");

0 commit comments

Comments
 (0)