Skip to content

Commit 2a05c0e

Browse files
authored
Merge pull request #76 from nsimakov/xdmod9.0/appkernel-data-aggregation-for-hichart
Xdmod9.0/appkernel data aggregation for hichart
2 parents a4a9529 + d3bb41c commit 2a05c0e

Some content is hidden

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

70 files changed

+7740
-3487
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ logs
139139
*.log
140140
npm-debug.log*
141141
node_modules/
142+
/package-lock.json
142143

143144
# Runtime data
144145
pids
@@ -310,3 +311,6 @@ configuration/aggregation_meta/
310311

311312
# External QA assets
312313
/.qa/
314+
/phpcs.xml
315+
316+
/shippable

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ env:
1414
- XDMOD_TEST_ARTIFACTS_MIRROR="$HOME/xdmod-test-artifacts.git"
1515
- XDMOD_MODULE_DIR="appkernels"
1616
- XDMOD_MODULE_NAME="Application Kernels"
17+
- XDMOD_MAIN_BRANCH=xdmod9.0
1718

1819
# Add dependency directories to the Travis cache
1920
cache:

Dockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM tas-tools-ext-01.ccr.xdmod.org/centos7_6-open8.5.1:latest
2+
3+
# install python3 for akrr build
4+
RUN yum -y update && \
5+
yum -y install --setopt=tsflags=nodocs python3 && \
6+
yum -y clean all

Tests.Dockerfile

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Perform shippable-like tests locally
2+
# with xdebug on
3+
4+
FROM tas-tools-ext-01.ccr.xdmod.org/centos7_6-open8.5.1:latest
5+
6+
RUN yum -y install --setopt=tsflags=nodocs python3 openssh-server && \
7+
yum clean all
8+
9+
COPY . /root/src/ubccr/xdmod-appkernels
10+
WORKDIR /root/src/ubccr/xdmod-appkernels
11+
12+
COPY ./tests/utils/cmd_setup ./tests/utils/cmd_start ./tests/utils/cmd_stop /usr/local/sbin/
13+
14+
15+
COPY ./tests/artifacts/sshd/ssh_host_ecdsa_key \
16+
./tests/artifacts/sshd/ssh_host_ecdsa_key.pub \
17+
./tests/artifacts/sshd/ssh_host_ed25519_key \
18+
./tests/artifacts/sshd/ssh_host_ed25519_key.pub \
19+
./tests/artifacts/sshd/ssh_host_rsa_key \
20+
./tests/artifacts/sshd/ssh_host_rsa_key.pub \
21+
/etc/ssh/
22+
23+
24+
RUN /usr/local/sbin/cmd_setup xdebug sshd && echo 'root:root' |chpasswd && \
25+
wget -O /usr/local/bin/phpunit https://phar.phpunit.de/phpunit-4.phar && \
26+
chmod 755 /usr/local/bin/phpunit && \
27+
cp /usr/local/bin/phpunit /usr/local/bin/phpunit.phar
28+
29+
EXPOSE 22
30+
31+
ENV COMPOSER_ALLOW_SUPERUSER=1
32+
33+
ENTRYPOINT ["/usr/local/sbin/cmd_start"]
34+
CMD ["-set-no-exit-on-fail", "sshd", "/root/src/ubccr/xdmod-appkernels/tests/runtests.sh", "bash"]

bin/appkernel_reports_manager

+4-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
*/
99
require_once __DIR__ . '/../configuration/linker.php';
1010

11-
1211
use CCR\DB;
1312
use CCR\Log;
1413
use AppKernel\AppKernelDb;
@@ -171,16 +170,16 @@ $lastDayOfTheMonth = intval($end_date->format('t'));
171170
$dayOfTheMonth = intval($end_date->format('j'));
172171
if ($lastDayOfTheMonth == $dayOfTheMonth) {
173172
$monthlyDeliveries = $db->query(
174-
'SELECT
175-
user_id, send_report_daily, send_report_weekly,
173+
'SELECT
174+
user_id, send_report_daily, send_report_weekly,
176175
send_report_monthly, settings
177176
FROM report
178177
WHERE send_report_monthly >= :dayOfTheMonth',
179178
array(':dayOfTheMonth' => $dayOfTheMonth)
180179
);
181180
} else {
182181
$monthlyDeliveries = $db->query(
183-
'SELECT
182+
'SELECT
184183
user_id, send_report_daily, send_report_weekly,
185184
send_report_monthly, settings
186185
FROM report
@@ -258,7 +257,7 @@ foreach ($allGroupDeliveries as $groupDeliveries) {
258257
'user' => $user
259258
));
260259

261-
$report->send_report_to_email($user_email);
260+
$report->sendReportToEmail($user_email);
262261
} catch (Exception $e) {
263262
$logger->err(array(
264263
'message' =>

0 commit comments

Comments
 (0)