Skip to content

Commit

Permalink
Merge pull request #378 from openaddresses/job-history
Browse files Browse the repository at this point in the history
Job history
  • Loading branch information
ingalls authored Mar 25, 2024
2 parents 89ec2b1 + bcae460 commit f073e87
Show file tree
Hide file tree
Showing 8 changed files with 120 additions and 112 deletions.
8 changes: 4 additions & 4 deletions api/schema/collections.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"id": {
"$ref": "./collections/id.json"
},
"size": {
"$ref": "./collections/size.json"
},
"name": {
"$ref": "./collections/name.json"
},
Expand All @@ -17,16 +14,19 @@
"created": {
"$ref": "./collections/created.json"
},
"size": {
"$ref": "./collections/size.json"
},
"human": {
"$ref": "./collections/human.json"
}
},
"required": [
"id",
"size",
"name",
"sources",
"created",
"size",
"human"
]
}
18 changes: 9 additions & 9 deletions api/schema/job.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
"id": {
"$ref": "./job/id.json"
},
"size": {
"$ref": "./job/size.json"
},
"license": {
"$ref": "./job/license.json"
},
"run": {
"$ref": "./job/run.json"
},
Expand Down Expand Up @@ -52,12 +46,16 @@
},
"version": {
"$ref": "./job/version.json"
},
"size": {
"$ref": "./job/size.json"
},
"license": {
"$ref": "./job/license.json"
}
},
"required": [
"id",
"size",
"license",
"run",
"map",
"created",
Expand All @@ -71,6 +69,8 @@
"stats",
"count",
"bounds",
"version"
"version",
"size",
"license"
]
}
10 changes: 5 additions & 5 deletions api/schema/results.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"id": {
"$ref": "./results/id.json"
},
"fabric": {
"$ref": "./results/fabric.json"
},
"source": {
"$ref": "./results/source.json"
},
Expand All @@ -22,15 +19,18 @@
},
"job": {
"$ref": "./results/job.json"
},
"fabric": {
"$ref": "./results/fabric.json"
}
},
"required": [
"id",
"fabric",
"source",
"updated",
"layer",
"name",
"job"
"job",
"fabric"
]
}
18 changes: 9 additions & 9 deletions api/schema/users.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
"id": {
"$ref": "./users/id.json"
},
"created": {
"$ref": "./users/created.json"
},
"level": {
"$ref": "./users/level.json"
},
"access": {
"$ref": "./users/access.json"
},
Expand All @@ -26,19 +20,25 @@
"password": {
"$ref": "./users/password.json"
},
"created": {
"$ref": "./users/created.json"
},
"validated": {
"$ref": "./users/validated.json"
},
"level": {
"$ref": "./users/level.json"
}
},
"required": [
"id",
"created",
"level",
"access",
"flags",
"username",
"email",
"password",
"validated"
"created",
"validated",
"level"
]
}
85 changes: 42 additions & 43 deletions api/web/src/components/Data.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
<h3 class='card-title'>New Features</h3>
</div>
<div class='card-body row'>
<div class='col-4 d-flex justify-content-center'>
<LayerIcon layer='buildings'/>
<div class='col-4 d-flex justify-content-center align-items-center'>
<LayerIcon layer='buildings' size='32'/>
Buildings
</div>
<div class='col-4 d-flex justify-content-center'>
<LayerIcon layer='addresses'/>
<div class='col-4 d-flex justify-content-center align-items-center'>
<LayerIcon layer='addresses' size='32'/>
Addresses
</div>
<div class='col-4 d-flex justify-content-center'>
<LayerIcon layer='parcels'/>
<div class='col-4 d-flex justify-content-center align-items-center'>
<LayerIcon layer='parcels' size='32'/>
Parcels
</div>
<div class='col-12'>
Expand All @@ -36,7 +36,7 @@
<h2 class='card-title'>Data Collections</h2>

<div class='ms-auto btn-list'>
<RefreshIcon @click='fetchCollections' class='cursor-pointer'/>
<IconRefresh @click='fetchCollections' class='cursor-pointer' size='32'/>
</div>
</div>

Expand All @@ -56,10 +56,9 @@
<td class='d-flex'>
<span v-text='size(c.size)'/>
<div class='ms-auto btn-list'>
<DownloadIcon v-on:click.stop.prevent='collectionpls(c)' class='cursor-pointer'/>
<IconDownload v-on:click.stop.prevent='collectionpls(c)' class='cursor-pointer' size='32'/>
</div>
</td>

</tr>
</tbody>
</table>
Expand All @@ -72,13 +71,13 @@
<h2 class='card-title'>Individual Sources</h2>

<div class='ms-auto btn-list'>
<ArrowsMaximizeIcon @click='fullscreen = true' v-if='!fullscreen' class='cursor-pointer'/>
<ArrowsMinimizeIcon @click='fullscreen = false' v-else class='cursor-pointer'/>
<IconArrowsMaximize @click='fullscreen = true' v-if='!fullscreen' class='cursor-pointer' size='32'/>
<IconArrowsMinimize @click='fullscreen = false' v-else class='cursor-pointer' size='32'/>

<SearchIcon @click='showFilter = !showFilter' v-if='!showFilter' class='cursor-pointer'/>
<XIcon @click='showFilter = !showFilter' v-else class='cursor-pointer'/>
<IconSearch @click='showFilter = !showFilter' v-if='!showFilter' class='cursor-pointer' size='32'/>
<IconX @click='showFilter = !showFilter' v-else class='cursor-pointer' size='32'/>

<RefreshIcon @click='fetchData' class='cursor-pointer'/>
<IconRefresh @click='fetchData' class='cursor-pointer' size='32'/>
</div>
</div>

Expand Down Expand Up @@ -127,26 +126,26 @@
<tr>
<td @click='d._open = !d._open' v-text='d.source' class='cursor-pointer'></td>
<td @click='d._open = !d._open' class='cursor-pointer'>
<LayerIcon v-if='d.has.buildings' layer='buildings'/>
<LayerIcon v-if='d.has.addresses' layer='addresses'/>
<LayerIcon v-if='d.has.parcels' layer='parcels'/>
<LayerIcon v-if='d.has.buildings' layer='buildings' size='32'/>
<LayerIcon v-if='d.has.addresses' layer='addresses' size='32'/>
<LayerIcon v-if='d.has.parcels' layer='parcels' size='32'/>
</td>
<td>
<div class='d-flex'>
<div class='ms-auto btn-list'>
<MapIcon v-if='d.map' @click='$router.push(`/location/${d.map}`)' class='cursor-pointer'/>
<IconMap v-if='d.map' @click='$router.push(`/location/${d.map}`)' class='cursor-pointer' size='32'/>
</div>
</div>
</td>
</tr>
<template v-if='d._open' :key='job.id' v-for='job in d.sources'>
<tr><td colspan='3' class='cursor-pointer'>
<div class='row'>
<div @click='emitjob(job.job)' class='col-5'>
<span v-text='job.layer'/> - <span v-text='job.name'/>
<div @click='emitjob(job.job)' class='col-5 d-flex align-items-center'>
<span v-text='job.layer'/>&nbsp;-&nbsp;<span v-text='job.name'/>

</div>
<div @click='emitjob(job.job)' class='col-2'>
<div @click='emitjob(job.job)' class='col-2 d-flex align-items-center'>
<span v-text='fmt(job.updated)'/>
</div>
<div class='col-5 d-flex'>
Expand All @@ -156,7 +155,7 @@
<template v-if='auth && auth.access === "admin"'>
<TablerDropdown>
<slot>
<SettingsIcon class='cursor-pointer'/>
<IconSettings class='cursor-pointer' size='32'/>
</slot>
<template #dropdown>
<TablerToggle @change='updateData(job)' v-model='job.fabric' label='Fabric'/>
Expand All @@ -165,7 +164,7 @@
</TablerDropdown>
</template>

<HistoryIcon @click='$router.push(`/data/${job.id}/history`)' class='cursor-pointer'/>
<IconHistory @click='$router.push(`/data/${job.id}/history`)' class='cursor-pointer' size='32'/>
</div>
</div>
</div>
Expand All @@ -185,24 +184,24 @@
</template>

<script>
import {
ArrowsMaximizeIcon,
ArrowsMinimizeIcon,
SettingsIcon,
DownloadIcon,
HistoryIcon,
RefreshIcon,
SearchIcon,
MapIcon,
XIcon,
} from 'vue-tabler-icons';
import LayerIcon from './util/LayerIcon.vue';
import MustLogin from './util/MustLogin.vue';
import Download from './util/Download.vue';
import Coverage from './util/Coverage.vue';
import QuerySource from './query/Source.vue';
import QueryLayer from './query/Layer.vue';
import moment from 'moment-timezone';
import {
IconArrowsMaximize,
IconArrowsMinimize,
IconSettings,
IconDownload,
IconHistory,
IconRefresh,
IconSearch,
IconMap,
IconX,
} from '@tabler/icons-vue';
import {
TablerLoading,
TablerDropdown,
Expand Down Expand Up @@ -376,20 +375,20 @@ export default {
},
components: {
MustLogin,
ArrowsMaximizeIcon,
ArrowsMinimizeIcon,
IconArrowsMaximize,
IconArrowsMinimize,
IconSettings,
IconDownload,
IconHistory,
IconRefresh,
IconSearch,
IconMap,
IconX,
Coverage,
QuerySource,
QueryLayer,
Download,
SettingsIcon,
DownloadIcon,
RefreshIcon,
HistoryIcon,
TablerLoading,
SearchIcon,
XIcon,
MapIcon,
TablerInput,
TablerToggle,
TablerDropdown,
Expand Down
Loading

0 comments on commit f073e87

Please sign in to comment.