Compare commits
17 Commits
feature/wo
...
73994d3a4e
| Author | SHA1 | Date | |
|---|---|---|---|
| 73994d3a4e | |||
| dddba981c0 | |||
| ac2f974e5a | |||
| b17275a623 | |||
| c1adce5a9e | |||
| cd25d23246 | |||
| 8e53d3b306 | |||
| 421a350f57 | |||
| eaeb625d51 | |||
| dfa991b90a | |||
| 3b40250488 | |||
| 8e8992f534 | |||
| 076efda195 | |||
| 5c1e802a6f | |||
| 750e0f16e1 | |||
| c06083476f | |||
| f784ec6109 |
@@ -14,8 +14,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build docker image
|
- name: Build docker image
|
||||||
run: |
|
run: docker build -t umbrella .
|
||||||
docker build -t umbrella .
|
|
||||||
|
|
||||||
- name: Store tag date
|
- name: Store tag date
|
||||||
run: |
|
run: |
|
||||||
@@ -41,3 +40,32 @@ jobs:
|
|||||||
TAG=$(cat /tmp/tag)
|
TAG=$(cat /tmp/tag)
|
||||||
docker push ${{ secrets.REGISTRY_PATH }}/umbrella:${{ gitea.ref_name }}
|
docker push ${{ secrets.REGISTRY_PATH }}/umbrella:${{ gitea.ref_name }}
|
||||||
docker push ${{ secrets.REGISTRY_PATH }}/umbrella:$TAG
|
docker push ${{ secrets.REGISTRY_PATH }}/umbrella:$TAG
|
||||||
|
|
||||||
|
Clean-Registry:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Get tag list
|
||||||
|
run: |
|
||||||
|
TAGS="$(curl -s -u "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASS }}" https://${{ secrets.REGISTRY_PATH }}/v2/umbrella/tags/list | jq -r ".tags[]")"
|
||||||
|
COUNT=$(echo "$TAGS" | wc -l)
|
||||||
|
if [ $COUNT -gt 10 ]; then
|
||||||
|
REMAIN=$((COUNT - 10))
|
||||||
|
echo "$TAGS" | head -n $REMAIN > /tmp/old_tags
|
||||||
|
else
|
||||||
|
echo less than 10 tags, skipping cleanup
|
||||||
|
echo "" > /tmp/old_tags
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Remove tags
|
||||||
|
run: |
|
||||||
|
cat /tmp/old_tags | while read TAG; do
|
||||||
|
if [ -n "$TAG" ]; then
|
||||||
|
DIGEST=$(curl -u "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASS }}" -sS -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' -o /dev/null -w '%header{Docker-Content-Digest}' https://${{ secrets.REGISTRY_PATH }}/v2/umbrella/manifests/$TAG)
|
||||||
|
if [ -n "$DIGEST" ]; then
|
||||||
|
echo about to delete $TAG
|
||||||
|
curl -u "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASS }}" -sS -X DELETE https://${{ secrets.REGISTRY_PATH }}/v2/umbrella/manifests/$DIGEST
|
||||||
|
else
|
||||||
|
echo failed to get digest for $TAG
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|||||||
@@ -8,9 +8,6 @@ WORKDIR /home/svelte/Umbrella/frontend
|
|||||||
RUN npm install && npm run build
|
RUN npm install && npm run build
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FROM alpine AS java_build
|
FROM alpine AS java_build
|
||||||
RUN apk add bash git gradle fontconfig font-opensans openjdk21-jre
|
RUN apk add bash git gradle fontconfig font-opensans openjdk21-jre
|
||||||
ADD . /Umbrella
|
ADD . /Umbrella
|
||||||
@@ -19,9 +16,6 @@ COPY --from=svelte_build /home/svelte/Umbrella/frontend/dist web/src/main/resour
|
|||||||
RUN gradle --no-daemon build
|
RUN gradle --no-daemon build
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FROM alpine
|
FROM alpine
|
||||||
RUN apk add bash fontconfig font-opensans graphviz openjdk21-jre weasyprint
|
RUN apk add bash fontconfig font-opensans graphviz openjdk21-jre weasyprint
|
||||||
RUN adduser -D umbrella
|
RUN adduser -D umbrella
|
||||||
@@ -33,4 +27,3 @@ WORKDIR /home/umbrella
|
|||||||
RUN mkdir .config && ln -s /host/config.json .config/Umbrella.json
|
RUN mkdir .config && ln -s /host/config.json .config/Umbrella.json
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
CMD java -jar jar/backend.jar
|
CMD java -jar jar/backend.jar
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
let projects = {};
|
let projects = {};
|
||||||
let project_filter = $state(null);
|
let project_filter = $state(null);
|
||||||
if (router.hasQueryParam('project')) project_filter = router.getQueryParam('project');
|
if (router.hasQueryParam('project')) project_filter = router.getQueryParam('project');
|
||||||
let sortedTimes = $derived.by(() => Object.values(times).map(time => ({
|
let sortedTimes = $derived.by(() => Object.values(times).filter(match_prj_filter).map(time => ({
|
||||||
...time,
|
...time,
|
||||||
start: display(time.start_time),
|
start: display(time.start_time),
|
||||||
end: display(time.end_time),
|
end: display(time.end_time),
|
||||||
@@ -52,6 +52,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function calcYearMap(){
|
function calcYearMap(){
|
||||||
|
console.log('calcYearMap called');
|
||||||
let result = {
|
let result = {
|
||||||
months : {},
|
months : {},
|
||||||
years : {}
|
years : {}
|
||||||
@@ -123,7 +124,7 @@
|
|||||||
function match_prj_filter(time){
|
function match_prj_filter(time){
|
||||||
if (!project_filter) return true;
|
if (!project_filter) return true;
|
||||||
for (var tid of time.task_ids){
|
for (var tid of time.task_ids){
|
||||||
if (project_filter == tasks[tid].project_id) return true;
|
if (tasks[tid] && project_filter == tasks[tid].project_id) return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -258,7 +259,6 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{#each sortedTimes as time,line}
|
{#each sortedTimes as time,line}
|
||||||
{#if match_prj_filter(time)}
|
|
||||||
<tr class={selected[time.id]?'selected':''}>
|
<tr class={selected[time.id]?'selected':''}>
|
||||||
{#if timeMap.years[line]}
|
{#if timeMap.years[line]}
|
||||||
<td class="year" rowspan={timeMap.years[line]} onclick={e => toggleRange(time.start.substring(0,4))} title={time.start.substring(0,4)} >
|
<td class="year" rowspan={timeMap.years[line]} onclick={e => toggleRange(time.start.substring(0,4))} title={time.start.substring(0,4)} >
|
||||||
@@ -321,7 +321,6 @@
|
|||||||
</td>
|
</td>
|
||||||
{/if}
|
{/if}
|
||||||
</tr>
|
</tr>
|
||||||
{/if}
|
|
||||||
{/each}
|
{/each}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Reference in New Issue
Block a user