- change env variable VUE_APP_PORTAL to VUE_API
- added .env.example file
This commit is contained in:
parent
a85debca92
commit
59a83c1978
4
.env.example
Normal file
4
.env.example
Normal file
|
@ -0,0 +1,4 @@
|
|||
APP_URL=//tethys.at
|
||||
VUE_API=//www.tethys.at
|
||||
SOLR_HOST=tethys.at
|
||||
SOLR_CORE=rdr_data
|
|
@ -11,7 +11,7 @@ import ContactViewComponent from "./views/contact-view/contact-view-component.vu
|
|||
import SitelinkViewComponent from "./views/sitelink-view/sitelink-view-component.vue";
|
||||
import ImprintViewComponent from "./views/imprint-view/imprint-view-component.vue";
|
||||
import TermsViewComponent from "./views/terms-view/terms-view-component";
|
||||
import { VUE_APP_PORTAL } from "./constants";
|
||||
import { VUE_API } from "./constants";
|
||||
// import VsInput from "./components/vs-input/vs-input.vue";
|
||||
// import VsResult from "./components/vs-result/vs-result.vue";
|
||||
// import FacetCategory from "./components/face-category/facet-category.vue";
|
||||
|
@ -46,7 +46,7 @@ import { VUE_APP_PORTAL } from "./constants";
|
|||
})
|
||||
export default class App extends Vue {
|
||||
public active = false;
|
||||
public portal = VUE_APP_PORTAL + "/login";
|
||||
public portal = VUE_API + "/login";
|
||||
|
||||
mounted(): void {
|
||||
// const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll(".navbar-burger"), 0);
|
||||
|
|
|
@ -10,7 +10,7 @@ import ContactViewComponent from "./views/contact-view/contact-view-component.vu
|
|||
import SitelinkViewComponent from "./views/sitelink-view/sitelink-view-component.vue";
|
||||
import ImprintViewComponent from "./views/imprint-view/imprint-view-component.vue";
|
||||
import TermsViewComponent from "./views/terms-view/terms-view-component";
|
||||
import { APP_URL, VUE_APP_PORTAL } from "./constants";
|
||||
import { APP_URL, VUE_API } from "./constants";
|
||||
// import VsInput from "./components/vs-input/vs-input.vue";
|
||||
// import VsResult from "./components/vs-result/vs-result.vue";
|
||||
// import FacetCategory from "./components/face-category/facet-category.vue";
|
||||
|
@ -44,7 +44,7 @@ import { APP_URL, VUE_APP_PORTAL } from "./constants";
|
|||
})
|
||||
export default class App2 extends Vue {
|
||||
public active = false;
|
||||
public portal = VUE_APP_PORTAL + "/login";
|
||||
public portal = VUE_API + "/login";
|
||||
public app_url = APP_URL;
|
||||
public search_url = APP_URL + "/search";
|
||||
public service_url = APP_URL + "/services";
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
// declare const POINT_URL: string;
|
||||
// declare const EDGE_URL: string;
|
||||
declare const APP_URL: string;
|
||||
declare const VUE_APP_PORTAL: string;
|
||||
declare const VUE_API: string;
|
||||
declare const SOLR_HOST: string;
|
||||
declare const SOLR_CORE: string;
|
||||
|
||||
// const _EDGE_URL = EDGE_URL;
|
||||
// const _POINT_URL = POINT_URL;
|
||||
const _APP_URL = APP_URL;
|
||||
const _VUE_APP_PORTAL = VUE_APP_PORTAL;
|
||||
const _VUE_API = VUE_API;
|
||||
const _SOLR_HOST = SOLR_HOST;
|
||||
const _SOLR_CORE = SOLR_CORE;
|
||||
|
||||
// export { _EDGE_URL as EDGE_URL };
|
||||
// export { _POINT_URL as POINT_URL };
|
||||
export { _APP_URL as APP_URL };
|
||||
export { _VUE_APP_PORTAL as VUE_APP_PORTAL };
|
||||
export { _VUE_API as VUE_API };
|
||||
export { _SOLR_HOST as SOLR_HOST };
|
||||
export { _SOLR_CORE as SOLR_CORE };
|
||||
|
|
|
@ -119,7 +119,7 @@ const NodePolyfillPlugin = require("node-polyfill-webpack-plugin");
|
|||
configureWebpack: {
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
VUE_APP_PORTAL: JSON.stringify(process.env.VUE_APP_PORTAL),
|
||||
VUE_API: JSON.stringify(process.env.VUE_API),
|
||||
SOLR_HOST: JSON.stringify(process.env.SOLR_HOST),
|
||||
SOLR_CORE: JSON.stringify(process.env.SOLR_CORE),
|
||||
}),
|
||||
|
|
|
@ -5,7 +5,7 @@ import { map } from "rxjs/operators";
|
|||
import { Dataset, DbDataset, Suggestion } from "@/models/dataset";
|
||||
import { SolrResponse } from "@/models/headers";
|
||||
import { ActiveFilterCategories } from "@/models/solr";
|
||||
import { VUE_APP_PORTAL } from "@/constants";
|
||||
import { VUE_API } from "@/constants";
|
||||
// import { deserialize, instanceToInstance } from "class-transformer";
|
||||
import { deserialize } from "class-transformer";
|
||||
// import { OAI_DATASETS } from "./mock-oai-datasets";
|
||||
|
@ -171,8 +171,8 @@ class DatasetService {
|
|||
|
||||
public getYears(): Observable<string[]> {
|
||||
// const heroes = of(HEROES);
|
||||
// const host = "https:" + VUE_APP_PORTAL;
|
||||
const host = VUE_APP_PORTAL;
|
||||
// const host = "https:" + VUE_API;
|
||||
const host = VUE_API;
|
||||
const path = "/api/years";
|
||||
const base = host + path;
|
||||
|
||||
|
@ -182,8 +182,8 @@ class DatasetService {
|
|||
}
|
||||
|
||||
public getDocuments(year: string): Observable<Array<DbDataset>> {
|
||||
// const host = "https:" + VUE_APP_PORTAL;
|
||||
const host = VUE_APP_PORTAL;
|
||||
// const host = "https:" + VUE_API;
|
||||
const host = VUE_API;
|
||||
const path = "/api/sitelinks/" + year;
|
||||
const base = host + path;
|
||||
|
||||
|
@ -193,8 +193,8 @@ class DatasetService {
|
|||
}
|
||||
|
||||
public getDataset(id: number): Observable<DbDataset> {
|
||||
// const host = "https:" + VUE_APP_PORTAL;
|
||||
const host = VUE_APP_PORTAL;
|
||||
// const host = "https:" + VUE_API;
|
||||
const host = VUE_API;
|
||||
const path = "/api/dataset/" + id;
|
||||
const apiUrl = host + path;
|
||||
const dataset = api.get<DbDataset>(apiUrl).pipe(map((res) => this.prepareDataset(res)));
|
||||
|
@ -205,8 +205,8 @@ class DatasetService {
|
|||
}
|
||||
|
||||
public getDatasetByDoi(doi: string): Observable<DbDataset> {
|
||||
// const host = "https:" + VUE_APP_PORTAL;
|
||||
const host = VUE_APP_PORTAL;
|
||||
// const host = "https:" + VUE_API;
|
||||
const host = VUE_API;
|
||||
const path = "/api/dataset/10.24341/tethys." + doi;
|
||||
const apiUrl = host + path;
|
||||
const dataset = api.get<DbDataset>(apiUrl).pipe(map((res) => this.prepareDataset(res)));
|
||||
|
|
|
@ -8,7 +8,7 @@ import advancedFormat from "dayjs/plugin/advancedFormat";
|
|||
// import SimpleSearchComponent from "@/components/simple-search/simple-search-component.vue";
|
||||
import VsInput from "@/components/vs-input/vs-input.vue";
|
||||
import { Suggestion } from "@/models/dataset";
|
||||
import { VUE_APP_PORTAL } from "@/constants";
|
||||
import { VUE_API } from "@/constants";
|
||||
// import DataMetricsBadge from "data-metrics-badge/dist/data-metrics-badge.js";
|
||||
// import DataMetricsBadge from "@/components/datacite/DataMetricsBadge.vue";
|
||||
|
||||
|
@ -33,7 +33,7 @@ export default class DatasetDetailComponent extends Vue {
|
|||
private error = "";
|
||||
public loaded = false;
|
||||
public openAccessLicences: Array<string> = ["CC-BY-4.0", "CC-BY-SA-4.0"];
|
||||
public portal = VUE_APP_PORTAL + "/api/file/download/";
|
||||
public portal = VUE_API + "/api/file/download/";
|
||||
|
||||
public post = {
|
||||
views: 25,
|
||||
|
|
|
@ -15,7 +15,7 @@ module.exports = {
|
|||
// .tap(args => {
|
||||
// args[0] = {
|
||||
// ...args[0],
|
||||
// VUE_APP_PORTAL: JSON.stringify(process.env.PORTAL),
|
||||
// VUE_API: JSON.stringify(process.env.PORTAL),
|
||||
// // other stuff
|
||||
// }
|
||||
// return args
|
||||
|
@ -87,7 +87,7 @@ module.exports = {
|
|||
__VUE_PROD_DEVTOOLS__: "false",
|
||||
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: "false",
|
||||
APP_URL: JSON.stringify(process.env.APP_URL),
|
||||
VUE_APP_PORTAL: JSON.stringify(process.env.VUE_APP_PORTAL),
|
||||
VUE_API: JSON.stringify(process.env.VUE_API),
|
||||
SOLR_HOST: JSON.stringify(process.env.SOLR_HOST),
|
||||
SOLR_CORE: JSON.stringify(process.env.SOLR_CORE),
|
||||
}),
|
||||
|
|
Loading…
Reference in New Issue
Block a user