This commit is contained in:
@@ -273,7 +273,7 @@ export default {
|
|||||||
return this.$store.state.navItems;
|
return this.$store.state.navItems;
|
||||||
},
|
},
|
||||||
helpUrl() {
|
helpUrl() {
|
||||||
return this.$store.state.helpUrl;
|
return window.$gz.api.helpUrl();
|
||||||
},
|
},
|
||||||
titleDisplay() {
|
titleDisplay() {
|
||||||
if (this.appBar.title == null || this.appBar.title == "") {
|
if (this.appBar.title == null || this.appBar.title == "") {
|
||||||
|
|||||||
@@ -269,36 +269,23 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
APIUrl(apiPath) {
|
APIUrl(apiPath) {
|
||||||
if ("" == window.$gz.store.state.apiUrl) {
|
return (
|
||||||
//construct the api url and store it
|
window.location.protocol +
|
||||||
//development location?
|
"//" +
|
||||||
if (
|
window.location.host +
|
||||||
(window.location.hostname == "localhost" ||
|
"/api/v8.0/" +
|
||||||
window.location.hostname == "192.168.1.56") &&
|
apiPath
|
||||||
window.location.port == "8080"
|
);
|
||||||
) {
|
},
|
||||||
window.$gz.store.commit("setAPIURL", "http://localhost:7575/api/v8.0/");
|
helpUrl() {
|
||||||
window.$gz.store.commit("setHelpURL", "http://localhost:7575/docs/");
|
return window.location.protocol + "//" + window.location.host + "/docs/";
|
||||||
} else {
|
|
||||||
//production location <protocol>//<hostname>:<port>/
|
|
||||||
window.$gz.store.commit(
|
|
||||||
"setHelpURL",
|
|
||||||
window.location.protocol + "//" + window.location.host + "/docs/"
|
|
||||||
);
|
|
||||||
window.$gz.store.commit(
|
|
||||||
"setAPIURL",
|
|
||||||
window.location.protocol + "//" + window.location.host + "/api/v8.0/"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return window.$gz.store.state.apiUrl + apiPath;
|
|
||||||
},
|
},
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// Just the server itself
|
// Just the server itself
|
||||||
// used by profiler etc
|
// used by profiler etc
|
||||||
//
|
//
|
||||||
ServerBaseUrl() {
|
ServerBaseUrl() {
|
||||||
return window.$gz.store.state.helpUrl.replace("/docs/", "/");
|
return this.helpUrl().replace("/docs/", "/");
|
||||||
},
|
},
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// generic routed download URL
|
// generic routed download URL
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ export default {
|
|||||||
if (!item.disabled && item.owner == "app") {
|
if (!item.disabled && item.owner == "app") {
|
||||||
switch (item.key) {
|
switch (item.key) {
|
||||||
case "help":
|
case "help":
|
||||||
window.open(vm.$store.state.helpUrl + item.data, "_blank");
|
window.open(window.$gz.api.helpUrl() + item.data, "_blank");
|
||||||
break;
|
break;
|
||||||
case "search":
|
case "search":
|
||||||
vm.$router.push({
|
vm.$router.push({
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goHelp() {
|
goHelp() {
|
||||||
window.open(this.$store.state.helpUrl + "ay-ex-delete", "_blank");
|
window.open(window.$gz.api.helpUrl() + "ay-ex-delete", "_blank");
|
||||||
},
|
},
|
||||||
canDoAction() {
|
canDoAction() {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export default {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
goHelp() {
|
goHelp() {
|
||||||
window.open(this.$store.state.helpUrl + "ay-ex-export", "_blank");
|
window.open(window.$gz.api.helpUrl() + "ay-ex-export", "_blank");
|
||||||
},
|
},
|
||||||
|
|
||||||
async doAction() {
|
async doAction() {
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goHelp() {
|
goHelp() {
|
||||||
window.open(this.$store.state.helpUrl + "ay-ex-tags", "_blank");
|
window.open(window.$gz.api.helpUrl() + "ay-ex-tags", "_blank");
|
||||||
},
|
},
|
||||||
canDoAction() {
|
canDoAction() {
|
||||||
const vm = this;
|
const vm = this;
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ export default {
|
|||||||
),
|
),
|
||||||
null,
|
null,
|
||||||
"error",
|
"error",
|
||||||
`${this.$store.state.helpUrl}/ay-report-timeout`
|
`${window.$gz.api.helpUrl()}/ay-report-timeout`
|
||||||
);
|
);
|
||||||
//we're done here
|
//we're done here
|
||||||
return this.reject(this.$ay.t("JobFailed"));
|
return this.reject(this.$ay.t("JobFailed"));
|
||||||
|
|||||||
@@ -414,7 +414,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goHelp() {
|
goHelp() {
|
||||||
window.open(this.$store.state.helpUrl + "ay-start-form-wiki", "_blank");
|
window.open(window.$gz.api.helpUrl() + "ay-start-form-wiki", "_blank");
|
||||||
},
|
},
|
||||||
compiledOutput() {
|
compiledOutput() {
|
||||||
if (!this.localVal) {
|
if (!this.localVal) {
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ export default new Vuex.Store({
|
|||||||
state: {
|
state: {
|
||||||
lastClientVersion: "",
|
lastClientVersion: "",
|
||||||
authenticated: false,
|
authenticated: false,
|
||||||
apiUrl: "",
|
|
||||||
helpUrl: "",
|
|
||||||
apiToken: "-",
|
apiToken: "-",
|
||||||
downloadToken: "-",
|
downloadToken: "-",
|
||||||
l: false, //license lockout flag
|
l: false, //license lockout flag
|
||||||
@@ -128,7 +126,6 @@ export default new Vuex.Store({
|
|||||||
state.translationText = {};
|
state.translationText = {};
|
||||||
state.enums = {};
|
state.enums = {};
|
||||||
state.formCustomTemplate = {};
|
state.formCustomTemplate = {};
|
||||||
state.apiUrl = "";
|
|
||||||
state.userOptions.languageOverride = "en-US";
|
state.userOptions.languageOverride = "en-US";
|
||||||
state.userOptions.timeZoneOverride = null;
|
state.userOptions.timeZoneOverride = null;
|
||||||
state.userOptions.currencyName = "USD";
|
state.userOptions.currencyName = "USD";
|
||||||
@@ -168,12 +165,6 @@ export default new Vuex.Store({
|
|||||||
setEnum(state, data) {
|
setEnum(state, data) {
|
||||||
state.enums[data.enumKey] = data.items;
|
state.enums[data.enumKey] = data.items;
|
||||||
},
|
},
|
||||||
setAPIURL(state, data) {
|
|
||||||
state.apiUrl = data;
|
|
||||||
},
|
|
||||||
setHelpURL(state, data) {
|
|
||||||
state.helpUrl = data;
|
|
||||||
},
|
|
||||||
logItem(state, msg) {
|
logItem(state, msg) {
|
||||||
msg = new Date().toLocaleString("sv-SE") + "|" + msg;
|
msg = new Date().toLocaleString("sv-SE") + "|" + msg;
|
||||||
state.logArray.push(msg);
|
state.logArray.push(msg);
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ export default {
|
|||||||
"UserCountExceeded",
|
"UserCountExceeded",
|
||||||
null,
|
null,
|
||||||
"error",
|
"error",
|
||||||
this.$store.state.helpUrl + "adm-license#user-count-exceeded"
|
window.$gz.api.helpUrl() + "adm-license#user-count-exceeded"
|
||||||
);
|
);
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -560,10 +560,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goHelp() {
|
goHelp() {
|
||||||
window.open(
|
window.open(window.$gz.api.helpUrl() + "ay-start-localization", "_blank");
|
||||||
this.$store.state.helpUrl + "ay-start-localization",
|
|
||||||
"_blank"
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
canSave: function() {
|
canSave: function() {
|
||||||
return this.formState.valid && this.formState.dirty;
|
return this.formState.valid && this.formState.dirty;
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
<v-subheader>{{ $ay.t("Server") }}</v-subheader>
|
<v-subheader>{{ $ay.t("Server") }}</v-subheader>
|
||||||
<div>
|
<div>
|
||||||
<span class="ml-6 text-body-1">{{ $ay.t("ServerAddress") }}: </span>
|
<span class="ml-6 text-body-1">{{ $ay.t("ServerAddress") }}: </span>
|
||||||
<span class="text-body-2">{{ $store.state.apiUrl }}</span>
|
<span class="text-body-2">{{ apiUrl }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="ml-6 text-body-1">{{ $ay.t("Version") }}: </span>
|
<span class="ml-6 text-body-1">{{ $ay.t("Version") }}: </span>
|
||||||
@@ -158,6 +158,11 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
apiUrl() {
|
||||||
|
return window.$gz.api.APIUrl("");
|
||||||
|
}
|
||||||
|
},
|
||||||
async created() {
|
async created() {
|
||||||
const vm = this;
|
const vm = this;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -561,10 +561,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goHelp() {
|
goHelp() {
|
||||||
window.open(
|
window.open(window.$gz.api.helpUrl() + "ay-start-localization", "_blank");
|
||||||
this.$store.state.helpUrl + "ay-start-localization",
|
|
||||||
"_blank"
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
canSave: function() {
|
canSave: function() {
|
||||||
return this.formState.valid && this.formState.dirty;
|
return this.formState.valid && this.formState.dirty;
|
||||||
|
|||||||
@@ -292,10 +292,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goHelp() {
|
goHelp() {
|
||||||
window.open(
|
window.open(window.$gz.api.helpUrl() + "ay-start-localization", "_blank");
|
||||||
this.$store.state.helpUrl + "ay-start-localization",
|
|
||||||
"_blank"
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
translation() {
|
translation() {
|
||||||
return window.$gz.translation;
|
return window.$gz.translation;
|
||||||
|
|||||||
Reference in New Issue
Block a user