Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ img/schedules/*.png

# Ignore node_modules dependencies
node_modules/*
package-lock.json

# Ignore built files
assets/prod/*
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM docker.io/node:12-buster-slim as builder
LABEL author="Devin Matte <matted@csh.rit.edu>"

WORKDIR /usr/src/schedule
COPY package.json ./
COPY package.json package-lock.json ./

RUN npm install

Expand All @@ -11,10 +11,10 @@ COPY assets ./assets
RUN npm run-script build


FROM docker.io/php:7.3-apache
FROM docker.io/php:8.4-apache
LABEL author="Devin Matte <matted@csh.rit.edu>"

RUN echo "deb-src http://archive.debian.org/debian buster main" >> /etc/apt/sources.list
RUN echo "deb-src http://deb.debian.org/debian trixie main" >> /etc/apt/sources.list

RUN apt-get -yq update && \
apt-get -yq install \
Expand All @@ -36,6 +36,7 @@ RUN apt-get -yq update && \
libxml2-dev \
unzip \
wget \
fonts-roboto \
--no-install-recommends

RUN apt-get -yq build-dep imagemagick
Expand All @@ -44,10 +45,9 @@ RUN wget https://github.com/ImageMagick/ImageMagick6/archive/6.9.11-22.tar.gz &&
tar -xzvf 6.9.11-22.tar.gz && \
cd ImageMagick6-6.9.11-22 && \
./configure && \
make && \
make -j16 && \
make install && \
ldconfig /usr/local/lib && \
make check
ldconfig /usr/local/lib

RUN docker-php-ext-install mysqli && \
yes '' | pecl install imagick && docker-php-ext-enable imagick
Expand Down
2 changes: 1 addition & 1 deletion api/entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"id" => $department['id'],
"title" => $department['title'],
"code" => isset($department['code']) ? $department['code'] : null,
"number" => trim($department['number'], " ,")
"number" => $department['number'] ? trim($department['number'], " ,") : null,
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ angular.module('sm').directive('scheduleActions', function ($http, $q, shareServ
const popup = openPopup(true)

getSavedInfo().then(function (data) {
popup.location = ('http://' + window.location.hostname +
popup.location = (window.location.origin +
'/img/schedules/' + parseInt(data.id, 16) + '.png')
})
},
Expand All @@ -174,7 +174,7 @@ angular.module('sm').directive('scheduleActions', function ($http, $q, shareServ

popup.localStorage.setItem('reloadSchedule', angular.toJson(reloadSchedule))
popup.document.title = 'My Schedule'
popup.location = 'http://' + window.location.hostname + '/schedule/render/print'
popup.location = window.location.origin + '/schedule/render/print'
},

hide: function () {
Expand Down
Loading
Loading