Skip to content

Commit

Permalink
Merge pull request #76 from nsimakov/xdmod9.0/appkernel-data-aggregat…
Browse files Browse the repository at this point in the history
…ion-for-hichart

Xdmod9.0/appkernel data aggregation for hichart
  • Loading branch information
nsimakov authored Jul 6, 2020
2 parents a4a9529 + d3bb41c commit 2a05c0e
Show file tree
Hide file tree
Showing 70 changed files with 7,740 additions and 3,487 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ logs
*.log
npm-debug.log*
node_modules/
/package-lock.json

# Runtime data
pids
Expand Down Expand Up @@ -310,3 +311,6 @@ configuration/aggregation_meta/

# External QA assets
/.qa/
/phpcs.xml

/shippable
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:
- XDMOD_TEST_ARTIFACTS_MIRROR="$HOME/xdmod-test-artifacts.git"
- XDMOD_MODULE_DIR="appkernels"
- XDMOD_MODULE_NAME="Application Kernels"
- XDMOD_MAIN_BRANCH=xdmod9.0

# Add dependency directories to the Travis cache
cache:
Expand Down
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM tas-tools-ext-01.ccr.xdmod.org/centos7_6-open8.5.1:latest

# install python3 for akrr build
RUN yum -y update && \
yum -y install --setopt=tsflags=nodocs python3 && \
yum -y clean all
34 changes: 34 additions & 0 deletions Tests.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Perform shippable-like tests locally
# with xdebug on

FROM tas-tools-ext-01.ccr.xdmod.org/centos7_6-open8.5.1:latest

RUN yum -y install --setopt=tsflags=nodocs python3 openssh-server && \
yum clean all

COPY . /root/src/ubccr/xdmod-appkernels
WORKDIR /root/src/ubccr/xdmod-appkernels

COPY ./tests/utils/cmd_setup ./tests/utils/cmd_start ./tests/utils/cmd_stop /usr/local/sbin/


COPY ./tests/artifacts/sshd/ssh_host_ecdsa_key \
./tests/artifacts/sshd/ssh_host_ecdsa_key.pub \
./tests/artifacts/sshd/ssh_host_ed25519_key \
./tests/artifacts/sshd/ssh_host_ed25519_key.pub \
./tests/artifacts/sshd/ssh_host_rsa_key \
./tests/artifacts/sshd/ssh_host_rsa_key.pub \
/etc/ssh/


RUN /usr/local/sbin/cmd_setup xdebug sshd && echo 'root:root' |chpasswd && \
wget -O /usr/local/bin/phpunit https://phar.phpunit.de/phpunit-4.phar && \
chmod 755 /usr/local/bin/phpunit && \
cp /usr/local/bin/phpunit /usr/local/bin/phpunit.phar

EXPOSE 22

ENV COMPOSER_ALLOW_SUPERUSER=1

ENTRYPOINT ["/usr/local/sbin/cmd_start"]
CMD ["-set-no-exit-on-fail", "sshd", "/root/src/ubccr/xdmod-appkernels/tests/runtests.sh", "bash"]
9 changes: 4 additions & 5 deletions bin/appkernel_reports_manager
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/
require_once __DIR__ . '/../configuration/linker.php';


use CCR\DB;
use CCR\Log;
use AppKernel\AppKernelDb;
Expand Down Expand Up @@ -171,16 +170,16 @@ $lastDayOfTheMonth = intval($end_date->format('t'));
$dayOfTheMonth = intval($end_date->format('j'));
if ($lastDayOfTheMonth == $dayOfTheMonth) {
$monthlyDeliveries = $db->query(
'SELECT
user_id, send_report_daily, send_report_weekly,
'SELECT
user_id, send_report_daily, send_report_weekly,
send_report_monthly, settings
FROM report
WHERE send_report_monthly >= :dayOfTheMonth',
array(':dayOfTheMonth' => $dayOfTheMonth)
);
} else {
$monthlyDeliveries = $db->query(
'SELECT
'SELECT
user_id, send_report_daily, send_report_weekly,
send_report_monthly, settings
FROM report
Expand Down Expand Up @@ -258,7 +257,7 @@ foreach ($allGroupDeliveries as $groupDeliveries) {
'user' => $user
));

$report->send_report_to_email($user_email);
$report->sendReportToEmail($user_email);
} catch (Exception $e) {
$logger->err(array(
'message' =>
Expand Down
Loading

0 comments on commit 2a05c0e

Please sign in to comment.