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
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: build

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '12.x'
- run: npm install
- run: npm run build
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,27 @@ npm run lint
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

# Registry, Flask, Vue and You
### Proxying the live api for testing

At present the vue application is set to build into the flask application at the default folders in the subdirectory `vue-build`.
You can run the vue application for development as above (i.e. `npm run serve`), but you can also do a production build into the flask application and run it through flask as per the root `README.md`.
For testing purposes you may want to use the live api. A possible approach for this is to use a reverse proxy.

Apache2 Example:

```apache2
<VirtualHost *:443>
...
SSLProxyEngine on
ProxyPass "/datastore" "https://store.data.threesixtygiving.org"
ProxyPassReverse "/datastore" "https://store.data.threesixtygiving.org"
Header set Access-Control-Allow-Origin "*"
...
</VirtualHost>
```

(requires mod_ssl, mod_proxy, mod_headers)

Then:
```
$ export VUE_APP_DATASTORE_API=https://localhost/datastore/api/dashboard/
$ npm run serve
```
7 changes: 6 additions & 1 deletion src/components/publishers/parts/FileSummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@
</div>

<div class="spacer-3"></div>
<div v-if="!file.datagetter_data.downloads"><p>The file "{{ file.title }}" could not be downloaded. The last download attempt was made on the {{ (new Date(file.datagetter_data.datetime_downloaded)).toUTCString().substr(4) }}.</p></div>
<div v-if="!file.datagetter_data.downloads"><p><strong>Note: </strong>file "{{ file.title }}" could not be downloaded.</p></div>
<div><p>Last downloaded {{ new Date(file.datagetter_data.datetime_downloaded).toDateString() }}.</p>
<p v-if="(new Date(file.datagetter_data.datetime_downloaded).getTime() + (25 * 60 * 60 * 1000)) < Date.now() ">
<strong>Note:</strong> Our last attempt to load this file failed. The information shown here is based on the previously accessed version of the file.
</p>
</div>
<hr class="separator-light">
</div>
</template>
Expand Down