mirror of
https://github.com/fleetbase/fleetbase.git
synced 2026-02-19 07:13:54 +00:00
Compare commits
202 Commits
dev-v0.7.2
...
cloud
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f55462ee9c | ||
|
|
43f9914afa | ||
|
|
cbcf7a239b | ||
|
|
58686b9d77 | ||
|
|
979b451130 | ||
|
|
9d4b1167ab | ||
|
|
98cde6795a | ||
|
|
3a70c42054 | ||
|
|
becf73a83e | ||
|
|
f5c16ffe60 | ||
|
|
4b3d23c0b9 | ||
|
|
7ba7b62096 | ||
|
|
8d8c1d2253 | ||
|
|
0e4baa34e0 | ||
|
|
d6d078df62 | ||
|
|
7252a95805 | ||
|
|
7ba7821fed | ||
|
|
af3c60fc7c | ||
|
|
a372b515da | ||
|
|
f8b9c0415b | ||
|
|
b525ad4b1a | ||
|
|
b161b415d0 | ||
|
|
e444d7994c | ||
|
|
0e44375d32 | ||
|
|
a9bb2f0166 | ||
|
|
ac02a6b6e0 | ||
|
|
4a640561d6 | ||
|
|
5957bc6339 | ||
|
|
9b15a6856f | ||
|
|
0a4e5b31cc | ||
|
|
0d47ffc785 | ||
|
|
3f2c739810 | ||
|
|
6b2ab28ec9 | ||
|
|
42df48c9b0 | ||
|
|
268749fcd9 | ||
|
|
50ae560409 | ||
|
|
2e48024949 | ||
|
|
908f60aaac | ||
|
|
a1f2992f18 | ||
|
|
0252b387e2 | ||
|
|
12e1ec2cac | ||
|
|
5f2003eec5 | ||
|
|
e05d12dd87 | ||
|
|
86378d3ede | ||
|
|
1d36bf144b | ||
|
|
293f67d6d1 | ||
|
|
01e8298968 | ||
|
|
094d1d375e | ||
|
|
8a1dee0cbd | ||
|
|
df2da8cea1 | ||
|
|
ced5e6b6fd | ||
|
|
de2cbd2ded | ||
|
|
894f4348dd | ||
|
|
2030a72a71 | ||
|
|
41d20c41c5 | ||
|
|
9976075843 | ||
|
|
b26f735fee | ||
|
|
791cc7283d | ||
|
|
21601737a1 | ||
|
|
0cd9e076b8 | ||
|
|
5fe799b708 | ||
|
|
878a70d328 | ||
|
|
4c5487b6bb | ||
|
|
599fd0e8f7 | ||
|
|
64561c85a8 | ||
|
|
c8d8be11d2 | ||
|
|
12847437b0 | ||
|
|
53eadee8a6 | ||
|
|
657de6c99d | ||
|
|
db601606c5 | ||
|
|
6ec176011a | ||
|
|
d416baf3cc | ||
|
|
d80b968eaa | ||
|
|
eef6847919 | ||
|
|
2ad569eaf6 | ||
|
|
dc18b48f6a | ||
|
|
3e93e161dc | ||
|
|
fac29308fd | ||
|
|
7b62e992eb | ||
|
|
18af3b4515 | ||
|
|
264c564ad6 | ||
|
|
dbf9a37ae9 | ||
|
|
46c4ac9dda | ||
|
|
e692bc3365 | ||
|
|
0b807011a3 | ||
|
|
80d84e1c3b | ||
|
|
08c722359a | ||
|
|
ebd9b0d8cb | ||
|
|
ec5ace214c | ||
|
|
396e0cbf36 | ||
|
|
3faac3481f | ||
|
|
36f837a4af | ||
|
|
094bd6c8ce | ||
|
|
aea35f6f5f | ||
|
|
96fa0294bc | ||
|
|
72ed388cd6 | ||
|
|
5a79a06642 | ||
|
|
010a6b0d05 | ||
|
|
6d138761ee | ||
|
|
1f59d8831b | ||
|
|
746b2142f0 | ||
|
|
343e07e24d | ||
|
|
d6094b8e29 | ||
|
|
59d7fa3de9 | ||
|
|
14c05a6c6a | ||
|
|
5c12254a58 | ||
|
|
65416833ca | ||
|
|
40e0de6e6b | ||
|
|
5986ced2c0 | ||
|
|
ca260bb94c | ||
|
|
95ef8ef3c9 | ||
|
|
df8513cf7b | ||
|
|
e2c544b0c9 | ||
|
|
77b39fccf9 | ||
|
|
eaa448f762 | ||
|
|
627522d61c | ||
|
|
201ac84dc9 | ||
|
|
78b1f31053 | ||
|
|
63cf8128c0 | ||
|
|
5d66c7a35f | ||
|
|
0603888393 | ||
|
|
cd50d349f8 | ||
|
|
e478767a60 | ||
|
|
17cb0cd274 | ||
|
|
a3289ddd41 | ||
|
|
ff8986541c | ||
|
|
04d0c126de | ||
|
|
ad43f74d5c | ||
|
|
3c013a3817 | ||
|
|
4392c7e3ff | ||
|
|
97dfbedd1a | ||
|
|
6d13f22a98 | ||
|
|
2c09c87bb6 | ||
|
|
f7f6991ef3 | ||
|
|
73acd4833c | ||
|
|
1c3c4c16a5 | ||
|
|
5d01438dc9 | ||
|
|
9d004410ee | ||
|
|
3a396f3b54 | ||
|
|
e86b970fc8 | ||
|
|
122a0d186a | ||
|
|
7e258f698f | ||
|
|
65ef642315 | ||
|
|
d79f034dbd | ||
|
|
05b7d5e112 | ||
|
|
61779ab102 | ||
|
|
a287c05380 | ||
|
|
ecc41e587e | ||
|
|
166529f9b4 | ||
|
|
189547f9de | ||
|
|
90a42e8a93 | ||
|
|
d28b1d41fb | ||
|
|
b056ef62b0 | ||
|
|
e70cbacbc2 | ||
|
|
fbd4a7490a | ||
|
|
b9b0eb308b | ||
|
|
48e1b89ec8 | ||
|
|
5e02c95b66 | ||
|
|
db8b5c4d6a | ||
|
|
aa214ccad7 | ||
|
|
cdd5524cf3 | ||
|
|
d99cefd2a4 | ||
|
|
1c58fd43c3 | ||
|
|
9226394159 | ||
|
|
9b23b39f32 | ||
|
|
5310fc3ff3 | ||
|
|
9569053f50 | ||
|
|
b08c054b99 | ||
|
|
2e517f2f95 | ||
|
|
7038d375b0 | ||
|
|
d5ea7f7790 | ||
|
|
4eb4b04121 | ||
|
|
24c5b93005 | ||
|
|
80610b9a48 | ||
|
|
9e5551972e | ||
|
|
b784f890f3 | ||
|
|
797a3d61fe | ||
|
|
d2f0bfe83e | ||
|
|
f28ad85c1a | ||
|
|
d7b0826f3f | ||
|
|
dd6008a8aa | ||
|
|
6671fefaaa | ||
|
|
7136f6195c | ||
|
|
2384887620 | ||
|
|
a2778f1552 | ||
|
|
acfda5ed1a | ||
|
|
e08255007a | ||
|
|
41761ea50e | ||
|
|
5c623819ed | ||
|
|
2bd885b1a2 | ||
|
|
88c3842441 | ||
|
|
2c2a4121a8 | ||
|
|
aadd03f14b | ||
|
|
706e94270d | ||
|
|
1dabc375f9 | ||
|
|
0efec46155 | ||
|
|
8bb2c6b65d | ||
|
|
1c0af1a119 | ||
|
|
dd65ee619b | ||
|
|
e790a0e123 | ||
|
|
723e3ca3d1 | ||
|
|
4eb706d33e |
4
.github/workflows/cd.yml
vendored
4
.github/workflows/cd.yml
vendored
@@ -240,10 +240,6 @@ jobs:
|
||||
set -u
|
||||
|
||||
DEPLOY_BUCKET=${STATIC_DEPLOY_BUCKET:-${{ env.PROJECT }}-${{ env.STACK }}}
|
||||
NEW_BUCKET="${PROJECT}-${STACK}-console"
|
||||
if aws s3api head-bucket --bucket "$NEW_BUCKET" 2>/dev/null; then
|
||||
DEPLOY_BUCKET="$NEW_BUCKET"
|
||||
fi
|
||||
|
||||
# this value will come from the dotenv above
|
||||
echo "Deploying to $DEPLOY_BUCKET"
|
||||
|
||||
@@ -24,6 +24,15 @@
|
||||
"fleetbase/fleetops-api": "^0.6.35",
|
||||
"fleetbase/registry-bridge": "^0.1.5",
|
||||
"fleetbase/storefront-api": "^0.4.13",
|
||||
"fleetbase/aws-marketplace": "^0.0.8",
|
||||
"fleetbase/billing-api": "^0.1.20",
|
||||
"fleetbase/customer-portal-api": "^0.0.10",
|
||||
"fleetbase/flespi-integration": "^0.1.16",
|
||||
"fleetbase/internals-api": "^0.0.27",
|
||||
"fleetbase/samsara-api": "^0.0.3",
|
||||
"fleetbase/solid-api": "^0.0.7",
|
||||
"fleetbase/valhalla-api": "^0.0.3",
|
||||
"fleetbase/vroom-api": "^0.0.3",
|
||||
"guzzlehttp/guzzle": "^7.0.1",
|
||||
"laravel/framework": "^10.0",
|
||||
"laravel/octane": "^2.3",
|
||||
@@ -52,6 +61,14 @@
|
||||
{
|
||||
"type": "composer",
|
||||
"url": "https://registry.fleetbase.io"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/fleetbase/aws-marketplace"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/fleetbase/internals"
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
|
||||
1495
api/composer.lock
generated
1495
api/composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,6 @@ import Component from '@glimmer/component';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { isArray } from '@ember/array';
|
||||
import { debug } from '@ember/debug';
|
||||
import { storageFor } from 'ember-local-storage';
|
||||
import { add, isPast } from 'date-fns';
|
||||
import { task } from 'ember-concurrency';
|
||||
|
||||
@@ -6,110 +6,20 @@ const KEYS_INDEX = `${CONTEXT_PREFIX}__keys__`;
|
||||
|
||||
export default class OnboardingContextService extends Service {
|
||||
@service appCache;
|
||||
@service notifications;
|
||||
@tracked data = {};
|
||||
@tracked quotaExceeded = false;
|
||||
@tracked usingMemoryFallback = false;
|
||||
|
||||
// In-memory fallback storage for when localStorage is full
|
||||
_memoryCache = new Map();
|
||||
|
||||
/**
|
||||
* Safe wrapper for appCache.set with quota error handling
|
||||
*
|
||||
* @param {string} key - The key to set
|
||||
* @param {*} value - The value to store
|
||||
* @returns {Object} Result object with success status and storage type
|
||||
*/
|
||||
_safeSet(key, value) {
|
||||
try {
|
||||
this.appCache.set(key, value);
|
||||
return { success: true, storage: 'localStorage' };
|
||||
} catch (error) {
|
||||
if (this._isQuotaError(error)) {
|
||||
console.warn(`[OnboardingContext] localStorage quota exceeded, using memory fallback for key: ${key}`);
|
||||
|
||||
// Store in memory as fallback
|
||||
this._memoryCache.set(key, value);
|
||||
|
||||
// Mark that we're using fallback and notify user (only once)
|
||||
if (!this.quotaExceeded) {
|
||||
this.quotaExceeded = true;
|
||||
this.usingMemoryFallback = true;
|
||||
this._notifyUser();
|
||||
}
|
||||
|
||||
return { success: true, storage: 'memory', warning: 'Using memory fallback' };
|
||||
}
|
||||
|
||||
// Re-throw non-quota errors
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Safe wrapper for appCache.get with memory fallback
|
||||
*
|
||||
* @param {string} key - The key to retrieve
|
||||
* @returns {*} The stored value or undefined
|
||||
*/
|
||||
_safeGet(key) {
|
||||
try {
|
||||
const value = this.appCache.get(key);
|
||||
if (value !== undefined) {
|
||||
return value;
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn(`[OnboardingContext] Error reading from appCache: ${error.message}`);
|
||||
}
|
||||
|
||||
// Fallback to memory cache
|
||||
return this._memoryCache.get(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if error is a quota exceeded error
|
||||
*
|
||||
* @param {Error} error - The error to check
|
||||
* @returns {boolean} True if it's a quota error
|
||||
*/
|
||||
_isQuotaError(error) {
|
||||
return (
|
||||
error instanceof DOMException &&
|
||||
(error.code === 22 ||
|
||||
error.code === 1014 ||
|
||||
error.name === 'QuotaExceededError' ||
|
||||
error.name === 'NS_ERROR_DOM_QUOTA_REACHED')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify user about storage issues (only called once)
|
||||
*/
|
||||
_notifyUser() {
|
||||
if (this.notifications) {
|
||||
this.notifications.warning(
|
||||
'Your browser storage is full. Your onboarding progress will be saved temporarily but may be lost if you close this tab. Please complete the onboarding process in this session.',
|
||||
{
|
||||
timeout: 10000,
|
||||
clearDuration: 300
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a value from in-memory state first, then fallback to cache
|
||||
*/
|
||||
get(key) {
|
||||
return this.data[key] ?? this._safeGet(`${CONTEXT_PREFIX}${key}`);
|
||||
return this.data[key] ?? this.appCache.get(`${CONTEXT_PREFIX}${key}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a value directly from cache
|
||||
*/
|
||||
getFromCache(key) {
|
||||
return this._safeGet(`${CONTEXT_PREFIX}${key}`);
|
||||
return this.appCache.get(`${CONTEXT_PREFIX}${key}`);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -118,11 +28,11 @@ export default class OnboardingContextService extends Service {
|
||||
* @returns {Object}
|
||||
*/
|
||||
restore() {
|
||||
const keys = this._safeGet(KEYS_INDEX) ?? [];
|
||||
const keys = this.appCache.get(KEYS_INDEX) ?? [];
|
||||
const persisted = {};
|
||||
|
||||
for (const key of keys) {
|
||||
const value = this._safeGet(`${CONTEXT_PREFIX}${key}`);
|
||||
const value = this.appCache.get(`${CONTEXT_PREFIX}${key}`);
|
||||
if (value !== undefined) {
|
||||
persisted[key] = value;
|
||||
}
|
||||
@@ -153,14 +63,14 @@ export default class OnboardingContextService extends Service {
|
||||
this.data = { ...this.data, ...filteredData };
|
||||
|
||||
if (options.persist === true) {
|
||||
const keys = new Set(this._safeGet(KEYS_INDEX) ?? []);
|
||||
const keys = new Set(this.appCache.get(KEYS_INDEX) ?? []);
|
||||
|
||||
for (const key of Object.keys(filteredData)) {
|
||||
keys.add(key);
|
||||
this._safeSet(`${CONTEXT_PREFIX}${key}`, this.data[key]);
|
||||
this.appCache.set(`${CONTEXT_PREFIX}${key}`, this.data[key]);
|
||||
}
|
||||
|
||||
this._safeSet(KEYS_INDEX, [...keys]);
|
||||
this.appCache.set(KEYS_INDEX, [...keys]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,11 +88,11 @@ export default class OnboardingContextService extends Service {
|
||||
this.data = { ...this.data, [key]: value };
|
||||
|
||||
if (options.persist === true) {
|
||||
const keys = new Set(this._safeGet(KEYS_INDEX) ?? []);
|
||||
const keys = new Set(this.appCache.get(KEYS_INDEX) ?? []);
|
||||
keys.add(key);
|
||||
|
||||
this._safeSet(`${CONTEXT_PREFIX}${key}`, value);
|
||||
this._safeSet(KEYS_INDEX, [...keys]);
|
||||
this.appCache.set(`${CONTEXT_PREFIX}${key}`, value);
|
||||
this.appCache.set(KEYS_INDEX, [...keys]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,44 +110,24 @@ export default class OnboardingContextService extends Service {
|
||||
const { [key]: _removed, ...rest } = this.data; // eslint-disable-line no-unused-vars
|
||||
this.data = rest;
|
||||
|
||||
const keys = new Set(this._safeGet(KEYS_INDEX) ?? []);
|
||||
const keys = new Set(this.appCache.get(KEYS_INDEX) ?? []);
|
||||
keys.delete(key);
|
||||
|
||||
this._safeSet(`${CONTEXT_PREFIX}${key}`, undefined);
|
||||
this._safeSet(KEYS_INDEX, [...keys]);
|
||||
|
||||
// Also remove from memory cache
|
||||
this._memoryCache.delete(`${CONTEXT_PREFIX}${key}`);
|
||||
this.appCache.set(`${CONTEXT_PREFIX}${key}`, undefined);
|
||||
this.appCache.set(KEYS_INDEX, [...keys]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fully reset onboarding context (memory + persistence)
|
||||
*/
|
||||
reset() {
|
||||
const keys = this._safeGet(KEYS_INDEX) ?? [];
|
||||
const keys = this.appCache.get(KEYS_INDEX) ?? [];
|
||||
|
||||
for (const key of keys) {
|
||||
this._safeSet(`${CONTEXT_PREFIX}${key}`, undefined);
|
||||
this._memoryCache.delete(`${CONTEXT_PREFIX}${key}`);
|
||||
this.appCache.set(`${CONTEXT_PREFIX}${key}`, undefined);
|
||||
}
|
||||
|
||||
this._safeSet(KEYS_INDEX, []);
|
||||
this._memoryCache.clear();
|
||||
this.appCache.set(KEYS_INDEX, []);
|
||||
this.data = {};
|
||||
this.quotaExceeded = false;
|
||||
this.usingMemoryFallback = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get storage status for debugging
|
||||
*
|
||||
* @returns {Object} Storage status information
|
||||
*/
|
||||
getStorageStatus() {
|
||||
return {
|
||||
quotaExceeded: this.quotaExceeded,
|
||||
usingMemoryFallback: this.usingMemoryFallback,
|
||||
memoryItemCount: this._memoryCache.size
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
API_HOST=
|
||||
API_HOST=https://api.fleetbase.io
|
||||
API_NAMESPACE=int/v1
|
||||
API_SECURE=true
|
||||
SOCKETCLUSTER_PATH=/socketcluster/
|
||||
SOCKETCLUSTER_HOST=
|
||||
SOCKETCLUSTER_HOST=socket.fleetbase.io
|
||||
SOCKETCLUSTER_SECURE=true
|
||||
SOCKETCLUSTER_PORT=38000
|
||||
OSRM_HOST=https://router.project-osrm.org
|
||||
SOCKETCLUSTER_PORT=8000
|
||||
OSRM_HOST=https://router.project-osrm.org
|
||||
DISABLE_RUNTIME_CONFIG=true
|
||||
9
console/environments/.env.qa
Normal file
9
console/environments/.env.qa
Normal file
@@ -0,0 +1,9 @@
|
||||
API_HOST=https://api.qa.fleetbase.io
|
||||
API_NAMESPACE=int/v1
|
||||
API_SECURE=true
|
||||
SOCKETCLUSTER_PATH=/socketcluster/
|
||||
SOCKETCLUSTER_HOST=socket.qa.fleetbase.io
|
||||
SOCKETCLUSTER_SECURE=true
|
||||
SOCKETCLUSTER_PORT=8000
|
||||
OSRM_HOST=https://router.project-osrm.org
|
||||
DISABLE_RUNTIME_CONFIG=true
|
||||
@@ -33,15 +33,24 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@ember/legacy-built-in-components": "^0.4.2",
|
||||
"@fleetbase/aws-marketplace": "^0.0.8",
|
||||
"@fleetbase/billing-engine": "^0.1.20",
|
||||
"@fleetbase/customer-portal-engine": "^0.0.10",
|
||||
"@fleetbase/dev-engine": "^0.2.12",
|
||||
"@fleetbase/ember-core": "^0.3.10",
|
||||
"@fleetbase/ember-ui": "^0.3.18",
|
||||
"@fleetbase/fleetops-data": "^0.1.25",
|
||||
"@fleetbase/fleetops-engine": "^0.6.35",
|
||||
"@fleetbase/flespi-engine": "^0.1.16",
|
||||
"@fleetbase/iam-engine": "^0.1.6",
|
||||
"@fleetbase/internals-engine": "^0.0.27",
|
||||
"@fleetbase/leaflet-routing-machine": "^3.2.17",
|
||||
"@fleetbase/registry-bridge-engine": "^0.1.5",
|
||||
"@fleetbase/samsara-engine": "^0.0.3",
|
||||
"@fleetbase/solid-engine": "^0.0.7",
|
||||
"@fleetbase/storefront-engine": "^0.4.13",
|
||||
"@fleetbase/valhalla-engine": "^0.0.3",
|
||||
"@fleetbase/vroom-engine": "^0.0.3",
|
||||
"@formatjs/intl-datetimeformat": "^6.18.2",
|
||||
"@formatjs/intl-numberformat": "^8.15.6",
|
||||
"@formatjs/intl-pluralrules": "^5.4.6",
|
||||
|
||||
1235
console/pnpm-lock.yaml
generated
1235
console/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Submodule packages/core-api updated: a2e70e1eec...04ae1ac455
Submodule packages/dev-engine updated: f11d032cb8...64a379ce12
Submodule packages/ember-core updated: c0c1941b98...54a45bbdaa
Submodule packages/ember-ui updated: 379d0a7921...c6694206e9
Submodule packages/fleetbase-extensions-indexer updated: db26b8add3...a6f2b4cde9
Submodule packages/fleetops updated: 05503cee9f...09487c1c50
Submodule packages/fleetops-data updated: 332dc428de...08520b3981
Submodule packages/iam-engine updated: 5b12288f5b...99698152e2
Submodule packages/pallet updated: b343c621f1...9e7592eddb
Submodule packages/storefront updated: aa2a2bc0bd...b5776acef6
Reference in New Issue
Block a user