Use relative URLs throughout the UI

To allow serving from a subdirectory using a reverse proxy.
This commit is contained in:
Zaid Abdulla committed 2020-07-22 11:07:32 -07:00
1 parent c2c24f5c24
commit 5a9e03db2c
12 files changed
+30 -30

No files matched your search

+3 -3
View File
@@ -134,7 +134,7 @@ const formData = {
const getDownloadUrl = memoize(filter => {
const cols = {};
for (const attr of attributes) cols[attr.label] = attr.id;
return `/api/presets.csv?${m.buildQueryString({
return `api/presets.csv?${m.buildQueryString({
filter: stringify(filter),
columns: JSON.stringify(cols)
})}`;
@@ -240,7 +240,7 @@ export const component: ClosureComponent = (): Component => {
const valueCallback = (attr, preset): {} => {
if (attr.id === "precondition") {
let devicesUrl = "/#!/devices";
let devicesUrl = "#!/devices";
if (preset["precondition"].length) {
devicesUrl += `?${m.buildQueryString({
filter: preset["precondition"]
@@ -259,7 +259,7 @@ export const component: ClosureComponent = (): Component => {
return m(
"a",
{
href: `/#!/admin/provisions?${m.buildQueryString({
href: `#!/admin/provisions?${m.buildQueryString({
filter: `Q("ID", "${preset["provision"]}")`
})}`
},