mirror of
https://github.com/fleetbase/fleetbase.git
synced 2026-01-05 22:05:50 +00:00
Compare commits
54 Commits
v0.7.5
...
ron/dev-v0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b98eb3adf5 | ||
|
|
5473b50c40 | ||
|
|
d9f415528e | ||
|
|
76b0bfbfcd | ||
|
|
0432003163 | ||
|
|
da420f0b4a | ||
|
|
e923a89719 | ||
|
|
0742603b43 | ||
|
|
e1788a4ad6 | ||
|
|
7cb4654c86 | ||
|
|
a17aa3f5cc | ||
|
|
0bf1a7fadd | ||
|
|
aa1ea2de89 | ||
|
|
235f1ce80c | ||
|
|
5aa50504a4 | ||
|
|
5d1b2e1939 | ||
|
|
fc5d90189c | ||
|
|
2fee78e534 | ||
|
|
83fc794702 | ||
|
|
66f669ad80 | ||
|
|
a11b77592c | ||
|
|
e5156829dc | ||
|
|
6cd7ddffcb | ||
|
|
cbdf1d489b | ||
|
|
785bc55bb7 | ||
|
|
d171d02aac | ||
|
|
dfd4ee37df | ||
|
|
27c063fbfb | ||
|
|
8e85dcff83 | ||
|
|
e38923c461 | ||
|
|
9911c96c09 | ||
|
|
284c62cd06 | ||
|
|
f8fd9f76fa | ||
|
|
67aa793537 | ||
|
|
5d0ae16cfd | ||
|
|
1d003ee31e | ||
|
|
9c9f3a994e | ||
|
|
b0ae302e81 | ||
|
|
205fcf1480 | ||
|
|
23bf7c5ac8 | ||
|
|
ada7e0df92 | ||
|
|
f3bc42ace5 | ||
|
|
b91cbed080 | ||
|
|
9870b11a71 | ||
|
|
1d62dbca6b | ||
|
|
db3bf46a02 | ||
|
|
ec053f1d13 | ||
|
|
030ec2494d | ||
|
|
fe56bcac85 | ||
|
|
8b118d1ad9 | ||
|
|
724c1b49ab | ||
|
|
8e5b2e1ae3 | ||
|
|
e141d4d3a3 | ||
|
|
ab2e102e28 |
60
.github/workflows/cd.yml
vendored
60
.github/workflows/cd.yml
vendored
@@ -58,6 +58,43 @@ jobs:
|
||||
files: |
|
||||
./docker-bake.hcl
|
||||
|
||||
- name: Resolve ECS Targets
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
# Detect naming scheme by checking if new cluster exists
|
||||
NEW_CLUSTER="${PROJECT}-${STACK}-cluster"
|
||||
if aws ecs describe-clusters --region "${AWS_REGION}" --clusters "${NEW_CLUSTER}" \
|
||||
--query "clusters[?status=='ACTIVE'].clusterArn" --output text 2>/dev/null | grep -q .; then
|
||||
# New scheme: use cluster suffix and service prefixes
|
||||
CLUSTER="${NEW_CLUSTER}"
|
||||
SERVICE_PREFIX="${PROJECT}-${STACK}-"
|
||||
SERVICE_BASE="api"
|
||||
else
|
||||
# Legacy scheme: no suffixes/prefixes
|
||||
CLUSTER="${PROJECT}-${STACK}"
|
||||
SERVICE_PREFIX=""
|
||||
SERVICE_BASE="app"
|
||||
fi
|
||||
|
||||
# Build service names
|
||||
API_SERVICE="${SERVICE_PREFIX}${SERVICE_BASE}"
|
||||
SCHEDULER_SERVICE="${SERVICE_PREFIX}scheduler"
|
||||
EVENTS_SERVICE="${SERVICE_PREFIX}events"
|
||||
TASK_DEF="${PROJECT}-${STACK}-${SERVICE_BASE}"
|
||||
|
||||
# Get container name from task definition
|
||||
CONTAINER_NAME="$(aws ecs describe-task-definition --task-definition "$TASK_DEF" \
|
||||
--query 'taskDefinition.containerDefinitions[0].name' --output text 2>/dev/null || echo "$SERVICE_BASE")"
|
||||
|
||||
{
|
||||
echo "CLUSTER=$CLUSTER"
|
||||
echo "API_SERVICE=$API_SERVICE"
|
||||
echo "SCHEDULER_SERVICE=$SCHEDULER_SERVICE"
|
||||
echo "EVENTS_SERVICE=$EVENTS_SERVICE"
|
||||
echo "TASK_DEF=$TASK_DEF"
|
||||
echo "CONTAINER_NAME=$CONTAINER_NAME"
|
||||
} >> "$GITHUB_ENV"
|
||||
- name: Download ecs-tool
|
||||
run: |
|
||||
wget -O ecs-tool.tar.gz https://github.com/springload/ecs-tool/releases/download/1.9.6/ecs-tool_1.9.6_linux_amd64.tar.gz && tar -xvf ecs-tool.tar.gz ecs-tool
|
||||
@@ -65,9 +102,21 @@ jobs:
|
||||
- name: Deploy the images 🚀
|
||||
run: |-
|
||||
set -eu
|
||||
# run deploy.sh script before deployments
|
||||
env "ECS_RUN.SERVICE=app" "ECS_RUN.LAUNCH_TYPE=FARGATE" ./ecs-tool run -l "ecs-tool" --image_tag '{container_name}-${{ env.VERSION }}' --cluster ${{ env.PROJECT }}-${{ env.STACK }} --task_definition ${{ env.PROJECT }}-${{ env.STACK }}-app --container_name app ./deploy.sh
|
||||
./ecs-tool deploy --image_tag '{container_name}-${{ env.VERSION }}' --cluster ${{ env.PROJECT }}-${{ env.STACK }} -s app -s scheduler -s events
|
||||
|
||||
# Run deploy.sh script before deployments
|
||||
env "ECS_RUN.SERVICE=${API_SERVICE}" "ECS_RUN.LAUNCH_TYPE=FARGATE" \
|
||||
./ecs-tool run -l "ecs-tool" \
|
||||
--image_tag '{container_name}-${{ env.VERSION }}' \
|
||||
--cluster "${CLUSTER}" \
|
||||
--task_definition "${TASK_DEF}" \
|
||||
--container_name "${CONTAINER_NAME}" \
|
||||
./deploy.sh
|
||||
|
||||
# Deploy services
|
||||
./ecs-tool deploy \
|
||||
--image_tag '{container_name}-${{ env.VERSION }}' \
|
||||
--cluster "${CLUSTER}" \
|
||||
-s "${API_SERVICE}" -s "${SCHEDULER_SERVICE}" -s "${EVENTS_SERVICE}"
|
||||
|
||||
build_frontend:
|
||||
name: Build and Deploy the Console
|
||||
@@ -175,6 +224,11 @@ 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"
|
||||
wget -O- https://github.com/bep/s3deploy/releases/download/v2.11.0/s3deploy_2.11.0_linux-amd64.tar.gz | tar xzv -f - s3deploy
|
||||
|
||||
80
.github/workflows/publish-docker-images.yml
vendored
80
.github/workflows/publish-docker-images.yml
vendored
@@ -1,50 +1,50 @@
|
||||
name: Fleetbase Docker Images
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Branch to build from'
|
||||
required: false
|
||||
default: 'main'
|
||||
version:
|
||||
description: 'Image version tag (e.g., v0.7.1-beta)'
|
||||
required: false
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Branch to build from'
|
||||
required: false
|
||||
default: 'main'
|
||||
version:
|
||||
description: 'Image version tag (e.g., v0.7.1-beta)'
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
docker-release:
|
||||
name: Build and Push Docker Images
|
||||
runs-on: ubuntu-latest
|
||||
docker-release:
|
||||
name: Build and Push Docker Images
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
REGISTRY: fleetbase
|
||||
VERSION: ${{ github.event.inputs.version || (github.ref_type == 'tag' && startsWith(github.ref_name, 'v') && github.ref_name) || 'manual' }}
|
||||
env:
|
||||
REGISTRY: fleetbase
|
||||
VERSION: ${{ github.event.inputs.version || (github.ref_type == 'tag' && startsWith(github.ref_name, 'v') && github.ref_name) || 'manual' }}
|
||||
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.inputs.branch || github.ref_name }}
|
||||
submodules: recursive
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.inputs.branch || github.ref_name }}
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||
|
||||
- name: Build and Push Console & API Images
|
||||
uses: docker/bake-action@v2
|
||||
with:
|
||||
push: true
|
||||
targets: |
|
||||
fleetbase-console
|
||||
fleetbase-api
|
||||
files: |
|
||||
./docker-bake.hcl
|
||||
- name: Build and Push Console & API Images
|
||||
uses: docker/bake-action@v2
|
||||
with:
|
||||
push: true
|
||||
targets: |
|
||||
fleetbase-console
|
||||
fleetbase-api
|
||||
files: |
|
||||
./docker-bake.hcl
|
||||
|
||||
11
.gitignore
vendored
11
.gitignore
vendored
@@ -3,6 +3,7 @@
|
||||
.env.backup
|
||||
.phpunit.result.cache
|
||||
.pnpm-store
|
||||
.tool-versions
|
||||
docker-compose.override.yml
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
@@ -16,6 +17,8 @@ api/composer.dev.json
|
||||
api/composer-install-dev.sh
|
||||
api/auth.json
|
||||
api/crontab
|
||||
api/go-crond
|
||||
api/.fleetbase-id
|
||||
act.sh
|
||||
composer-auth.json
|
||||
docker/database/*
|
||||
@@ -31,8 +34,14 @@ packages/loconav
|
||||
packages/internals
|
||||
packages/projectargus-engine
|
||||
packages/customer-portal
|
||||
# wip
|
||||
packages/solid
|
||||
packages/aws-marketplace
|
||||
packages/countries
|
||||
packages/fliit
|
||||
packages/samsara
|
||||
packages/solid*
|
||||
packages/valhalla
|
||||
packages/vroom
|
||||
solid
|
||||
verdaccio
|
||||
# asdf
|
||||
|
||||
71
README.md
71
README.md
@@ -7,11 +7,11 @@
|
||||
<p align="center" dir="auto">
|
||||
Modular logistics and supply chain operating system
|
||||
<br>
|
||||
<a href="https://docs.fleetbase.io/" rel="nofollow">Documentation</a>
|
||||
<a href="https://docs.fleetbase.io/" rel="nofollow" target="_fleetbase_docs">Documentation</a>
|
||||
·
|
||||
<a href="https://console.fleetbase.io" rel="nofollow">Cloud Version</a>
|
||||
<a href="https://console.fleetbase.io" rel="nofollow" target="_fleetbase_console">Cloud Version</a>
|
||||
·
|
||||
<a href="https://fleetbase.apichecker.com" target="_api_status" rel="nofollow">API Status</a>
|
||||
<a href="https://console.fleetbase.io/aws-marketplace" rel="nofollow" target="_aws_marketplace">Deploy on AWS</a>
|
||||
·
|
||||
<a href="https://tally.so/r/3NBpAW" rel="nofollow">Book a Demo</a>
|
||||
·
|
||||
@@ -25,7 +25,34 @@
|
||||
Fleetbase is a modular logistics and supply chain operating system designed to streamline management, planning, optimization, and operational control across various sectors of the supply chain industry.
|
||||
|
||||
<p align="center" dir="auto">
|
||||
<img src="https://github.com/fleetbase/fleetbase/assets/816371/125348c9-c88a-49fe-b098-9abec9d7dff8" alt="Fleetbase Console" width="1200" style="max-width: 100%;" />
|
||||
<img src="https://flb-assets.s3.ap-southeast-1.amazonaws.com/static/fleetbase_overview.png" alt="Fleetbase Console" width="1200" style="max-width: 100%;" />
|
||||
</p>
|
||||
|
||||
## Visual Feature Showcase
|
||||
|
||||
<p align="center" dir="auto">
|
||||
<img src="https://flb-assets.s3.ap-southeast-1.amazonaws.com/static/order-board-kanban.png" alt="Fleetbase Order Board" width="1200" style="max-width: 100%;" />
|
||||
<em>Visualize and manage your orders with a dynamic Kanban board.</em>
|
||||
</p>
|
||||
|
||||
<p align="center" dir="auto">
|
||||
<img src="https://flb-assets.s3.ap-southeast-1.amazonaws.com/static/order-workflow-config.png" alt="Fleetbase Order Workflow Configuration" width="1200" style="max-width: 100%;" />
|
||||
<em>Create custom order flows and automation with the intuitive workflow builder.</em>
|
||||
</p>
|
||||
|
||||
<p align="center" dir="auto">
|
||||
<img src="https://flb-assets.s3.ap-southeast-1.amazonaws.com/static/order-map-view.png" alt="Fleetbase Order Map View" width="1200" style="max-width: 100%;" />
|
||||
<em>Track individual orders in real-time on an interactive map.</em>
|
||||
</p>
|
||||
|
||||
<p align="center" dir="auto">
|
||||
<img src="https://flb-assets.s3.ap-southeast-1.amazonaws.com/static/live-map-tracking.png" alt="Fleetbase Live Map Tracking" width="1200" style="max-width: 100%;" />
|
||||
<em>Get a complete overview of your fleet and active orders on a live map.</em>
|
||||
</p>
|
||||
|
||||
<p align="center" dir="auto">
|
||||
<img src="https://flb-assets.s3.ap-southeast-1.amazonaws.com/static/fleet-map-zones.png" alt="Fleetbase Fleet Map with Zones" width="1200" style="max-width: 100%;" />
|
||||
<em>Define and manage service areas and zones for your fleet.</em>
|
||||
</p>
|
||||
|
||||
**Quickstart**
|
||||
@@ -39,6 +66,7 @@ cd fleetbase && ./scripts/docker-install.sh
|
||||
|
||||
- [Features](#-features)
|
||||
- [Install](#-install)
|
||||
- [Deploy on AWS](#-deploy-on-aws-in-one-click)
|
||||
- [Extensions](#-extensions)
|
||||
- [Apps](#-apps)
|
||||
- [Roadmap](#-roadmap)
|
||||
@@ -117,6 +145,36 @@ services:
|
||||
|
||||
You can learn more about full installation, and configuration in the [official documentation](https://docs.fleetbase.io/getting-started/install).
|
||||
|
||||
## 🚀 Deploy on AWS in One Click
|
||||
|
||||
Deploy your complete Fleetbase logistics platform on AWS with enterprise-grade security, scalability, and reliability. No DevOps expertise required!
|
||||
|
||||
[](https://console.fleetbase.io/aws-marketplace)
|
||||
|
||||
### ✨ What You Get
|
||||
|
||||
- **Complete AWS Infrastructure**: ECS Fargate, RDS MySQL, ElastiCache Redis, S3, CloudFront, and more
|
||||
- **25-Minute Setup**: From zero to production-ready logistics platform
|
||||
- **Enterprise Security**: VPC isolation, encrypted storage, secrets management
|
||||
- **Auto-Scaling**: Handle traffic spikes with ECS Fargate auto-scaling
|
||||
- **High Availability**: Multi-AZ deployment with 99.9% uptime SLA
|
||||
- **Cost Optimized**: Pay-as-you-use with optimized resource allocation
|
||||
|
||||
### 🏗️ Infrastructure Included
|
||||
|
||||
Your AWS deployment includes a complete, production-ready infrastructure stack:
|
||||
|
||||
- **Compute**: ECS Fargate cluster with auto-scaling services
|
||||
- **Database**: RDS MySQL 8.0 with automated backups and Multi-AZ support
|
||||
- **Cache**: ElastiCache Redis for high-performance caching
|
||||
- **Storage**: S3 object storage with CloudFront CDN for global distribution
|
||||
- **Networking**: VPC with private subnets, NAT gateways, and security groups
|
||||
- **Load Balancing**: Application Load Balancer with SSL certificates
|
||||
- **Monitoring**: CloudWatch logs, container insights, and health monitoring
|
||||
- **Messaging**: SQS message queues for background job processing
|
||||
|
||||
[**🚀 Deploy Now**](https://console.fleetbase.io/aws-marketplace) | [**📖 Learn More**](https://docs.fleetbase.io/category/deploying/aws)
|
||||
|
||||
# 🧩 Extensions
|
||||
|
||||
Extensions are modular components that enhance the functionality of your Fleetbase instance. They allow you to add new features, customize existing behavior, or integrate with external systems.
|
||||
@@ -149,8 +207,8 @@ Fleetbase offers a few open sourced apps which are built on Fleetbase which can
|
||||
## 🛣️ Roadmap
|
||||
1. **Inventory and Warehouse Management** ~ Pallet will be Fleetbase’s first official extension for WMS & Inventory.
|
||||
2. **Accounting and Invoicing** ~ Ledger will be Fleetbase’s first official extension accounting and invoicing.
|
||||
3. **Fleetbase for Desktop** ~ Desktop builds for OSX and Windows.
|
||||
4. **Custom Maps and Routing Engines** ~ Feature to enable easy integrations with custom maps and routing engines like Google Maps or Mapbox etc…
|
||||
3. **AI** ~ AI Agent intrgation for system and workflows.
|
||||
4. **Dynamic Rules System** ~ Trigger events, tasks jobs from a rule builder on resources.
|
||||
|
||||
## 🪲 Bugs and 💡 Feature Requests
|
||||
|
||||
@@ -186,3 +244,4 @@ Get updates on Fleetbase's development and chat with the project maintainers and
|
||||
# License & Copyright
|
||||
|
||||
Fleetbase is made available under the terms of the <a href="https://www.gnu.org/licenses/agpl-3.0.html" target="_blank">GNU Affero General Public License 3.0 (AGPL 3.0)</a>. For other licenses <a href="mailto:hello@fleetbase.io" target="_blank">contact us</a>.
|
||||
|
||||
|
||||
16
RELEASE.md
16
RELEASE.md
@@ -1,20 +1,19 @@
|
||||
# 🚀 Fleetbase v0.7.5 — 2025-05-30
|
||||
# 🚀 Fleetbase v0.7.18 — 2025-11-10
|
||||
|
||||
> “Route optimization and routing control advancements”
|
||||
> "Hotfix IAM user validation, make online/offline toggle silent"
|
||||
|
||||
---
|
||||
|
||||
## ✨ Highlights
|
||||
- Added route optimization and routing control services for registering additional routing engines and route optimization services.
|
||||
- Added settings for Routing (Next release will be able to set unit "Miles" or "Kilometers")
|
||||
- Improved and optimized environment and settings mapper.
|
||||
- Added entity activity events
|
||||
- Patched multiple waypoint order creation via API
|
||||
- Hotfix validateRequest implementation to not rewrite request params
|
||||
- Hotfix user validation password optional for creation
|
||||
- Made online/offline endpoint for drivers silent
|
||||
- Hotfix QPay payment gateway on Storefront + ebarimt reciept fix
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ Breaking Changes
|
||||
- None 🙂
|
||||
- None
|
||||
|
||||
---
|
||||
|
||||
@@ -24,6 +23,7 @@
|
||||
git pull origin main --no-rebase
|
||||
|
||||
# Update docker
|
||||
docker compose pull
|
||||
docker compose down && docker compose up -d
|
||||
|
||||
# Run deploy script
|
||||
|
||||
@@ -40,7 +40,6 @@ class Kernel extends HttpKernel
|
||||
],
|
||||
|
||||
'api' => [
|
||||
// \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
|
||||
'throttle:api',
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
|
||||
@@ -2,10 +2,8 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Cache\RateLimiting\Limit;
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\RateLimiter;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
class RouteServiceProvider extends ServiceProvider
|
||||
@@ -17,17 +15,15 @@ class RouteServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->configureRateLimiting();
|
||||
|
||||
$this->routes(
|
||||
function () {
|
||||
Route::get(
|
||||
'/status',
|
||||
function () {
|
||||
'/health',
|
||||
function (Request $request) {
|
||||
return response()->json(
|
||||
[
|
||||
'status' => 'ok',
|
||||
'time' => microtime(true) - LARAVEL_START
|
||||
'time' => microtime(true) - $request->attributes->get('request_start_time')
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -35,19 +31,4 @@ class RouteServiceProvider extends ServiceProvider
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the rate limiters for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function configureRateLimiting()
|
||||
{
|
||||
RateLimiter::for(
|
||||
'api',
|
||||
function (Request $request) {
|
||||
return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,31 +7,45 @@
|
||||
"laravel"
|
||||
],
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fleetbase Pte Ltd.",
|
||||
"email": "hello@fleetbase.io"
|
||||
},
|
||||
{
|
||||
"name": "Ronald A. Richardson",
|
||||
"email": "ron@fleetbase.io"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^8.0",
|
||||
"appstract/laravel-opcache": "^4.0",
|
||||
"fleetbase/core-api": "^1.6.11",
|
||||
"fleetbase/fleetops-api": "^0.6.14",
|
||||
"fleetbase/registry-bridge": "^0.0.19",
|
||||
"fleetbase/storefront-api": "^0.4.0",
|
||||
"fleetbase/billing-api": "^0.1.10",
|
||||
"fleetbase/core-api": "^1.6.24",
|
||||
"fleetbase/fleetops-api": "^0.6.25",
|
||||
"fleetbase/fliit-api": "^0.0.1",
|
||||
"fleetbase/internals-api": "^0.0.21",
|
||||
"fleetbase/registry-bridge": "^0.1.0",
|
||||
"fleetbase/storefront-api": "^0.4.6",
|
||||
"guzzlehttp/guzzle": "^7.0.1",
|
||||
"laravel/framework": "^10.0",
|
||||
"laravel/octane": "^2.3",
|
||||
"laravel/tinker": "^2.9",
|
||||
"league/flysystem-aws-s3-v3": "^3.0",
|
||||
"maatwebsite/excel": "^3.1",
|
||||
"maennchen/zipstream-php": "3.1.2",
|
||||
"phpoffice/phpspreadsheet": "^1.28",
|
||||
"predis/predis": "^2.1",
|
||||
"psr/http-factory-implementation": "*",
|
||||
"resend/resend-php": "^0.14.0",
|
||||
"s-ichikawa/laravel-sendgrid-driver": "^4.0",
|
||||
"stripe/stripe-php": "13.13.0",
|
||||
"symfony/mailgun-mailer": "^7.1",
|
||||
"symfony/postmark-mailer": "^7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"spatie/laravel-ignition": "^2.0",
|
||||
"fakerphp/faker": "^1.9.1",
|
||||
"kitloong/laravel-migrations-generator": "^6.10",
|
||||
"laravel/sail": "^1.0.1",
|
||||
"mockery/mockery": "^1.4.4",
|
||||
"nunomaduro/collision": "^7.0",
|
||||
@@ -41,6 +55,30 @@
|
||||
{
|
||||
"type": "composer",
|
||||
"url": "https://registry.fleetbase.io"
|
||||
},
|
||||
{
|
||||
"type": "path",
|
||||
"url": "../packages/core-api"
|
||||
},
|
||||
{
|
||||
"type": "path",
|
||||
"url": "../packages/fleetops"
|
||||
},
|
||||
{
|
||||
"type": "path",
|
||||
"url": "../packages/storefront"
|
||||
},
|
||||
{
|
||||
"type": "path",
|
||||
"url": "../packages/fliit"
|
||||
},
|
||||
{
|
||||
"type": "path",
|
||||
"url": "../packages/internals"
|
||||
},
|
||||
{
|
||||
"type": "path",
|
||||
"url": "../packages/billing"
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
@@ -78,15 +116,6 @@
|
||||
],
|
||||
"clean-logs": [
|
||||
"composer run-script clear-logs"
|
||||
],
|
||||
"dock": [
|
||||
"docker exec -it fleetbase_os_application_1 /usr/bin/tmux -u new"
|
||||
],
|
||||
"dock-server": [
|
||||
"docker exec -it fleetbase_os_httpd_1 /bin/sh"
|
||||
],
|
||||
"tunnel": [
|
||||
"ngrok http --region=ap --hostname=fleetbase.ap.ngrok.io 8000"
|
||||
]
|
||||
},
|
||||
"extra": {
|
||||
|
||||
3237
api/composer.lock
generated
3237
api/composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -17,7 +17,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'paths' => ['/*', 'sanctum/csrf-cookie'],
|
||||
'paths' => ['*', 'sanctum/csrf-cookie'],
|
||||
|
||||
'allowed_methods' => ['*'],
|
||||
|
||||
|
||||
@@ -66,6 +66,18 @@ return [
|
||||
|
||||
'resend' => [],
|
||||
|
||||
'microsoft-graph' => [
|
||||
'transport' => 'microsoft-graph',
|
||||
'client_id' => env('MICROSOFT_GRAPH_CLIENT_ID'),
|
||||
'client_secret' => env('MICROSOFT_GRAPH_CLIENT_SECRET'),
|
||||
'tenant_id' => env('MICROSOFT_GRAPH_TENANT_ID'),
|
||||
'from' => [
|
||||
'address' => env('MAIL_FROM_ADDRESS', 'hello@fleetbase.io'),
|
||||
'name' => env('MAIL_FROM_NAME', env('APP_NAME', 'Fleetbase')),
|
||||
],
|
||||
'save_to_sent_items' => env('MAIL_SAVE_TO_SENT_ITEMS', false),
|
||||
],
|
||||
|
||||
'sendmail' => [
|
||||
'transport' => 'sendmail',
|
||||
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -t -i'),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
FROM --platform=linux/amd64 dunglas/frankenphp:static-builder
|
||||
# FROM --platform=linux/amd64 dunglas/frankenphp:static-builder
|
||||
FROM --platform=linux/amd64 docker.io/dunglas/frankenphp:static-builder@sha256:821526b776a26502735d83890cc0a0d579348c510ba6c777df0762cb1c50d967
|
||||
|
||||
WORKDIR /go/src/app
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ export CMAKE_OSX_ARCHITECTURES=arm64
|
||||
STATIC_PHP_CLI_DIR="$OSX_DIR/frankenphp/dist/static-php-cli"
|
||||
if [ ! -d "$STATIC_PHP_CLI_DIR" ]; then
|
||||
log "Cloning static-php-cli into dist/..."
|
||||
git clone https://github.com/crazywhalecc/static-php-cli.git "$STATIC_PHP_CLI_DIR"
|
||||
git clone --depth 1 --branch 2.5.2 https://github.com/crazywhalecc/static-php-cli.git "$STATIC_PHP_CLI_DIR"
|
||||
else
|
||||
log_warn "static-php-cli already exists in dist/. Skipping clone."
|
||||
fi
|
||||
|
||||
@@ -5,6 +5,7 @@ import config from '@fleetbase/console/config/environment';
|
||||
import loadExtensions from '@fleetbase/ember-core/utils/load-extensions';
|
||||
import mapEngines from '@fleetbase/ember-core/utils/map-engines';
|
||||
import loadRuntimeConfig from '@fleetbase/console/utils/runtime-config';
|
||||
import applyRouterFix from './utils/router-refresh-patch';
|
||||
|
||||
export default class App extends Application {
|
||||
modulePrefix = config.modulePrefix;
|
||||
@@ -14,6 +15,7 @@ export default class App extends Application {
|
||||
engines = {};
|
||||
|
||||
async ready() {
|
||||
applyRouterFix(this);
|
||||
const extensions = await loadExtensions();
|
||||
|
||||
this.extensions = extensions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<ContentPanel @title="Filesystem" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title="Filesystem" @open={{true}} @wrapperClass="bordered-classic">
|
||||
<InputGroup @name="Driver" @helpText="Select the default filesystem driver for Fleetbase to use.">
|
||||
<Select @options={{this.disks}} @value={{this.driver}} @onSelect={{this.setDriver}} @placeholder="Select filesystem driver" class="w-full" disabled={{this.isLoading}} />
|
||||
</InputGroup>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<ContentPanel @title="Mail" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title="Mail" @open={{true}} @wrapperClass="bordered-classic">
|
||||
<InputGroup @name="Mailer" @helpText="Select the default mailer for Fleetbase to use.">
|
||||
<Select @options={{this.mailers}} @value={{this.mailer}} @onSelect={{this.setMailer}} @placeholder="Select mailer" class="w-full" />
|
||||
</InputGroup>
|
||||
@@ -13,6 +13,14 @@
|
||||
<InputGroup @name="SMTP Timeout" @value={{this.smtpTimeout}} disabled={{this.loadConfigValues.isRunning}} />
|
||||
<InputGroup @name="SMTP Auth Mode" @value={{this.smtpAuth_mode}} disabled={{this.loadConfigValues.isRunning}} />
|
||||
{{/if}}
|
||||
{{#if (eq this.mailer "microsoft-graph")}}
|
||||
<InputGroup @name="Client ID" @value={{this.microsoftGraphClient_id}} disabled={{this.loadConfigValues.isRunning}} />
|
||||
<InputGroup @name="Client Secret" @value={{this.microsoftGraphClient_secret}} disabled={{this.loadConfigValues.isRunning}} />
|
||||
<InputGroup @name="Tenant ID" @value={{this.microsoftGraphTenant_id}} disabled={{this.loadConfigValues.isRunning}} />
|
||||
<InputGroup>
|
||||
<Toggle @isToggled={{this.microsoftGraphSave_to_sent_items}} @onToggle={{fn (mut this.microsoftGraphSave_to_sent_items)}} @label="Save to sent items" />
|
||||
</InputGroup>
|
||||
{{/if}}
|
||||
{{#if (eq this.mailer "mailgun")}}
|
||||
<InputGroup @name="Mailgun Domain" @value={{this.mailgunDomain}} disabled={{this.loadConfigValues.isRunning}} />
|
||||
<InputGroup @name="Mailgun Endpoint" @value={{this.mailgunEndpoint}} disabled={{this.loadConfigValues.isRunning}} />
|
||||
|
||||
@@ -26,6 +26,10 @@ export default class ConfigureMailComponent extends Component {
|
||||
@tracked postmarkToken = null;
|
||||
@tracked sendgridApi_key = null;
|
||||
@tracked resendKey = null;
|
||||
@tracked microsoftGraphClient_id = null;
|
||||
@tracked microsoftGraphClient_secret = null;
|
||||
@tracked microsoftGraphTenant_id = null;
|
||||
@tracked microsoftGraphSave_to_sent_items = false;
|
||||
|
||||
/**
|
||||
* Creates an instance of ConfigureFilesystemComponent.
|
||||
@@ -64,6 +68,19 @@ export default class ConfigureMailComponent extends Component {
|
||||
};
|
||||
}
|
||||
|
||||
@action serializeMicrosoftGraphConfig() {
|
||||
return {
|
||||
client_id: this.microsoftGraphClient_id,
|
||||
client_secret: this.microsoftGraphClient_secret,
|
||||
tenant_id: this.microsoftGraphTenant_id,
|
||||
save_to_sent_items: this.microsoftGraphSave_to_sent_items,
|
||||
from: {
|
||||
address: this.fromAddress,
|
||||
name: this.fromName,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@action serializeMailgunConfig() {
|
||||
return {
|
||||
domain: this.mailgunDomain,
|
||||
@@ -112,6 +129,7 @@ export default class ConfigureMailComponent extends Component {
|
||||
postmark: this.serializePostmarkConfig(),
|
||||
sendgrid: this.serializeSendgridConfig(),
|
||||
resend: this.serializeResendConfig(),
|
||||
microsoftGraph: this.serializeMicrosoftGraphConfig(),
|
||||
});
|
||||
} catch (error) {
|
||||
this.notifications.serverError(error);
|
||||
@@ -131,6 +149,7 @@ export default class ConfigureMailComponent extends Component {
|
||||
postmark: this.serializePostmarkConfig(),
|
||||
sendgrid: this.serializeSendgridConfig(),
|
||||
resend: this.serializeResendConfig(),
|
||||
microsoftGraph: this.serializeMicrosoftGraphConfig(),
|
||||
});
|
||||
this.notifications.success('Mail configuration saved.');
|
||||
} catch (error) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<ContentPanel @title="APN Configutation" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title="APN Configutation" @open={{true}} @wrapperClass="bordered-classic">
|
||||
<InputGroup @name="APN Key ID" @value={{this.apn.key_id}} disabled={{this.isLoading}} />
|
||||
<InputGroup @name="APN Team ID" @value={{this.apn.team_id}} disabled={{this.isLoading}} />
|
||||
<InputGroup @name="APN App Bundle ID" @value={{this.apn.app_bundle_id}} disabled={{this.isLoading}} />
|
||||
@@ -20,7 +20,7 @@
|
||||
</InputGroup>
|
||||
</ContentPanel>
|
||||
|
||||
<ContentPanel @title="Firebase Configutation" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title="Firebase Configutation" @open={{true}} @wrapperClass="bordered-classic">
|
||||
<InputGroup @wrapperClass="flex flex-row items-center mb-0i">
|
||||
<UploadButton @name="firebase-service-account" @accept="text/plain,text/javascript,application/json" @onFileAdded={{this.uploadFirebaseCredentials}} @buttonText="Upload Service Account JSON" @icon="upload" class="w-auto m-0i mt-0i" />
|
||||
{{#if this.firebase.credentials_file}}
|
||||
@@ -33,7 +33,7 @@
|
||||
</InputGroup>
|
||||
</ContentPanel>
|
||||
|
||||
<ContentPanel @title="Test Push Notification" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-900">
|
||||
<ContentPanel @title="Test Push Notification" @open={{true}} @wrapperClass="bordered-classic">
|
||||
{{#if this.testResponse}}
|
||||
<div class="flex flex-row items-center rounded-lg border {{if (eq this.testResponse.status 'error') 'border-red-900 bg-red-800 text-red-100' 'border-green-900 bg-green-800 text-green-100'}} shadow-sm my-2 px-4 py-2">
|
||||
<FaIcon @icon={{if (eq this.testResponse.status 'error') 'triangle-exclamation' 'circle-check'}} class="mr-1.5 {{if (eq this.testResponse.status 'error') 'text-red-200' 'text-green-200'}}" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<ContentPanel @title="Queue" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title="Queue" @open={{true}} @wrapperClass="bordered-classic">
|
||||
<InputGroup @name="Driver" @helpText="Select the default queue driver for Fleetbase to use.">
|
||||
<Select @options={{this.connections}} @value={{this.driver}} @onSelect={{this.setDriver}} @placeholder="Select queue driver" disabled={{this.isLoading}} class="w-full" />
|
||||
</InputGroup>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<ContentPanel @title="AWS" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title="AWS" @open={{true}} @wrapperClass="bordered-classic">
|
||||
<InputGroup @name="AWS Access Key" @value={{this.awsKey}} disabled={{this.isLoading}} />
|
||||
<InputGroup @name="AWS Access Secret" @value={{this.awsSecret}} disabled={{this.isLoading}} />
|
||||
<InputGroup @name="AWS Region" @value={{this.awsRegion}} disabled={{this.isLoading}} />
|
||||
</ContentPanel>
|
||||
|
||||
<ContentPanel @title="Google Maps" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title="Google Maps" @open={{true}} @wrapperClass="bordered-classic">
|
||||
<InputGroup @name="Google Maps API Key" @value={{this.googleMapsApiKey}} disabled={{this.isLoading}} />
|
||||
<InputGroup @name="Google Maps Locale" @value={{this.googleMapsLocale}} disabled={{this.isLoading}} />
|
||||
</ContentPanel>
|
||||
|
||||
<ContentPanel @title="Twilio" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title="Twilio" @open={{true}} @wrapperClass="bordered-classic">
|
||||
<InputGroup @name="Twilio SID" @value={{this.twilioSid}} disabled={{this.isLoading}} />
|
||||
<InputGroup @name="Twilio Token" @value={{this.twilioToken}} disabled={{this.isLoading}} />
|
||||
<InputGroup @name="Twilio From" @value={{this.twilioFrom}} disabled={{this.isLoading}} />
|
||||
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
</ContentPanel>
|
||||
|
||||
<ContentPanel @title="Sentry" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title="Sentry" @open={{true}} @wrapperClass="bordered-classic">
|
||||
<InputGroup @name="Sentry DSN" @value={{this.sentryDsn}} disabled={{this.isLoading}} />
|
||||
{{#if this.sentryTestResponse}}
|
||||
<div class="flex flex-row items-center rounded-lg border {{if (eq this.sentryTestResponse.status 'error') 'border-red-900 bg-red-800 text-red-100' 'border-green-900 bg-green-800 text-green-100'}} shadow-sm my-2 px-4 py-2">
|
||||
@@ -36,7 +36,7 @@
|
||||
<Button @wrapperClass="mt-3" @icon="plug" @text="Test Sentry Config" @onClick={{perform this.testSentry}} @isLoading={{this.testSentry.isRunning}} @disabled={{not this.sentryDsn}} />
|
||||
</ContentPanel>
|
||||
|
||||
<ContentPanel @title="IP Info" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title="IP Info" @open={{true}} @wrapperClass="bordered-classic">
|
||||
<InputGroup @name="IP Info API Key" @value={{this.ipinfoApiKey}} disabled={{this.isLoading}} />
|
||||
</ContentPanel>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<ContentPanel @title="SocketCluster Connection" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title="SocketCluster Connection" @open={{true}} @wrapperClass="bordered-classic">
|
||||
<p class="mb-4">The SocketCluster configuration cannot be changed at this time.</p>
|
||||
<div id="output" class="font-mono rounded-lg max-h-full px-6 py-4 overflow-y-scroll bg-black shadow-inner dark:shadow-none">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
|
||||
42
console/app/components/onboarding/form.hbs
Normal file
42
console/app/components/onboarding/form.hbs
Normal file
@@ -0,0 +1,42 @@
|
||||
<div class="bg-white dark:bg-gray-800 py-5 px-4 shadow rounded-lg w-full">
|
||||
<div class="mb-4">
|
||||
<Image src={{@brand.logo_url}} @fallbackSrc="/images/fleetbase-logo-svg.svg" alt={{t "app.name"}} height="56" class="h-10 object-contain mx-auto" />
|
||||
<div class="mt-2">
|
||||
<h2 class="text-center text-lg font-extrabold text-gray-900 dark:text-white truncate">
|
||||
{{t "onboard.index.title"}}
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex px-3 py-2 mb-4 rounded-md shadow-sm bg-blue-200">
|
||||
<div>
|
||||
<FaIcon @icon="hand-spock" @size="lg" class="text-blue-900 mr-4" />
|
||||
</div>
|
||||
<p class="flex-1 text-sm text-blue-900 dark:text-blue-900">
|
||||
{{t "onboard.index.welcome-title" htmlSafe=true companyName=(t "app.name")}}
|
||||
{{t "onboard.index.welcome-text"}}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form {{on "submit" (perform this.onboard)}}>
|
||||
{{#if this.error}}
|
||||
<InfoBlock @icon="exclamation-triangle" @text={{this.error}} class="mb-6 px-3 py-2 bg-red-300 text-red-900" @textClass="text-red-900" />
|
||||
{{/if}}
|
||||
<InputGroup @name={{t "onboard.index.full-name"}} @value={{this.name}} @helpText={{t "onboard.index.full-name-help-text"}} @inputClass="input-lg" />
|
||||
<InputGroup @name={{t "onboard.index.your-email"}} @type="email" @value={{this.email}} @helpText={{t "onboard.index.your-email-help-text"}} @inputClass="input-lg" />
|
||||
<InputGroup @name={{t "onboard.index.phone"}} @helpText={{t "onboard.index.phone-help-text"}}>
|
||||
<PhoneInput @onInput={{fn (mut this.phone)}} class="form-input input-lg w-full" />
|
||||
</InputGroup>
|
||||
<InputGroup @name={{t "onboard.index.organization-name"}} @value={{this.organization_name}} @helpText={{t "onboard.index.organization-help-text"}} @inputClass="input-lg" />
|
||||
<InputGroup @name={{t "onboard.index.password"}} @value={{this.password}} @type="password" @helpText={{t "onboard.index.password-help-text"}} @inputClass="input-lg" />
|
||||
<InputGroup @name={{t "onboard.index.confirm-password"}} @value={{this.password_confirmation}} @type="password" @helpText={{t "onboard.index.confirm-password-help-text"}} @inputClass="input-lg" />
|
||||
|
||||
<div class="flex items-center justify-end mt-5">
|
||||
<Button @buttonType="submit" @icon="check" @iconPrefix="fas" @type="primary" @size="lg" @text={{t "onboard.index.continue-button-text"}} @isLoading={{this.onboard.isRunning}} @disabled={{not this.filled}} />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<RegistryYield @registry="onboard" as |YieldedComponent ctx|>
|
||||
<YieldedComponent @context={{ctx}} />
|
||||
</RegistryYield>
|
||||
</div>
|
||||
77
console/app/components/onboarding/form.js
Normal file
77
console/app/components/onboarding/form.js
Normal file
@@ -0,0 +1,77 @@
|
||||
import Component from '@glimmer/component';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
import { action, getProperties } from '@ember/object';
|
||||
import { isBlank } from '@ember/utils';
|
||||
import { task } from 'ember-concurrency';
|
||||
import OnboardValidations from '../../validations/onboard';
|
||||
import lookupValidator from 'ember-changeset-validations';
|
||||
import Changeset from 'ember-changeset';
|
||||
|
||||
export default class OnboardingFormComponent extends Component {
|
||||
@service fetch;
|
||||
@service session;
|
||||
@service router;
|
||||
@service notifications;
|
||||
@service urlSearchParams;
|
||||
@tracked name;
|
||||
@tracked email;
|
||||
@tracked phone;
|
||||
@tracked organization_name;
|
||||
@tracked password;
|
||||
@tracked password_confirmation;
|
||||
@tracked error;
|
||||
|
||||
get filled() {
|
||||
// eslint-disable-next-line ember/no-get
|
||||
const input = getProperties(this, 'name', 'email', 'phone', 'organization_name', 'password', 'password_confirmation');
|
||||
return Object.values(input).every((val) => !isBlank(val));
|
||||
}
|
||||
|
||||
@task *onboard(event) {
|
||||
event?.preventDefault?.();
|
||||
|
||||
// eslint-disable-next-line ember/no-get
|
||||
const input = getProperties(this, 'name', 'email', 'phone', 'organization_name', 'password', 'password_confirmation');
|
||||
const changeset = new Changeset(input, lookupValidator(OnboardValidations), OnboardValidations);
|
||||
|
||||
yield changeset.validate();
|
||||
|
||||
if (changeset.get('isInvalid')) {
|
||||
const errorMessage = changeset.errors.firstObject.validation.firstObject;
|
||||
|
||||
this.notifications.error(errorMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
// Set user timezone
|
||||
input.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
|
||||
try {
|
||||
const { status, skipVerification, token, session } = yield this.fetch.post('onboard/create-account', input);
|
||||
if (status !== 'success') {
|
||||
this.notifications.error('Onboard failed');
|
||||
return;
|
||||
}
|
||||
|
||||
// save session
|
||||
this.args.context.persist('session', session);
|
||||
|
||||
if (skipVerification === true && token) {
|
||||
// only manually authenticate if skip verification
|
||||
this.session.isOnboarding().manuallyAuthenticate(token);
|
||||
|
||||
yield this.router.transitionTo('console');
|
||||
return this.notifications.success('Welcome to Fleetbase!');
|
||||
} else {
|
||||
this.args.orchestrator.next();
|
||||
this.urlSearchParams.setParamsToCurrentUrl({
|
||||
step: this.args.orchestrator?.current?.id,
|
||||
session,
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
this.notifications.serverError(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
78
console/app/components/onboarding/verify-email.hbs
Normal file
78
console/app/components/onboarding/verify-email.hbs
Normal file
@@ -0,0 +1,78 @@
|
||||
{{page-title (t "onboard.verify-email.header-title")}}
|
||||
|
||||
{{#if this.initialized}}
|
||||
<div class="bg-white dark:bg-gray-800 py-8 px-4 shadow rounded-lg w-full">
|
||||
<div class="mb-6">
|
||||
<LinkTo @route="console" class="flex items-center justify-center">
|
||||
<LogoIcon @size="12" class="rounded-md" />
|
||||
</LinkTo>
|
||||
<h2 class="mt-6 text-center text-lg font-extrabold text-gray-900 dark:text-white truncate">
|
||||
{{t "onboard.verify-email.title"}}
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<InfoBlock @type="info" @icon="shield-halved" @iconSize="lg">
|
||||
{{t "onboard.verify-email.message-text" htmlSafe=true}}
|
||||
</InfoBlock>
|
||||
|
||||
<form class="mt-8 space-y-6" {{on "submit" (perform this.verify)}}>
|
||||
<InputGroup
|
||||
@type="tel"
|
||||
@name={{t "onboard.verify-email.verification-input-label"}}
|
||||
@value={{this.code}}
|
||||
@helpText={{t "onboard.verify-email.verification-code-text"}}
|
||||
@inputClass="input-lg"
|
||||
{{on "input" this.verification.validateInput}}
|
||||
{{did-insert this.verification.validateInput}}
|
||||
/>
|
||||
|
||||
<div class="flex flex-row items-center space-x-4">
|
||||
<Button
|
||||
@icon="check"
|
||||
@iconPrefix="fas"
|
||||
@buttonType="submit"
|
||||
@type="primary"
|
||||
@size="lg"
|
||||
@text="Verify & Continue"
|
||||
@isLoading={{this.verify.isRunning}}
|
||||
@disabled={{not this.verification.ready}}
|
||||
/>
|
||||
<a href="#" {{on "click" this.verification.didntReceiveCode}} class="text-sm text-blue-400 hover:text-blue-300">{{t "onboard.verify-email.didnt-receive-a-code"}}</a>
|
||||
</div>
|
||||
|
||||
{{#if this.verification.waiting}}
|
||||
<div class="flex flex-col flex-grow-0 flex-shrink-0 text-sm bg-yellow-800 border border-yellow-600 px-2 py-2 rounded-md text-yellow-100 my-4 transition-all">
|
||||
<div class="flex flex-row items-start mb-2">
|
||||
<div class="w-8 flex-grow-0 flex-shrink-0">
|
||||
<FaIcon @icon="triangle-exclamation" @size="xl" class="pt-1" />
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<div class="flex-1 text-sm text-yellow-100">
|
||||
<div>{{t "auth.verification.didnt-receive-a-code" htmlSafe=true}}</div>
|
||||
<div>{{t "auth.verification.not-sent.alternative-choice" htmlSafe=true}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center space-x-2">
|
||||
<Button
|
||||
@text={{t "auth.verification.not-sent.resend-email"}}
|
||||
@buttonType="button"
|
||||
@type="link"
|
||||
class="text-yellow-100"
|
||||
@wrapperClass="px-4 py-2 bg-gray-900 bg-opacity-25 hover:opacity-50"
|
||||
@onClick={{this.verification.resendEmail}}
|
||||
/>
|
||||
<Button
|
||||
@text={{t "auth.verification.not-sent.send-by-sms"}}
|
||||
@buttonType="button"
|
||||
@type="link"
|
||||
class="text-yellow-100"
|
||||
@wrapperClass="px-4 py-2 bg-gray-900 bg-opacity-25 hover:opacity-50"
|
||||
@onClick={{this.verification.resendBySms}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</form>
|
||||
</div>
|
||||
{{/if}}
|
||||
53
console/app/components/onboarding/verify-email.js
Normal file
53
console/app/components/onboarding/verify-email.js
Normal file
@@ -0,0 +1,53 @@
|
||||
import Component from '@glimmer/component';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
import { action } from '@ember/object';
|
||||
import { later, next } from '@ember/runloop';
|
||||
import { not } from '@ember/object/computed';
|
||||
import { task } from 'ember-concurrency';
|
||||
|
||||
export default class OnboardingVerifyEmailComponent extends Component {
|
||||
@service('session') authSession;
|
||||
@service('user-verification') verification;
|
||||
@service fetch;
|
||||
@service notifications;
|
||||
@service router;
|
||||
@service urlSearchParams;
|
||||
@tracked code;
|
||||
@tracked session;
|
||||
@tracked initialized = false;
|
||||
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
next(() => this.#initialize());
|
||||
}
|
||||
|
||||
#initialize() {
|
||||
this.code = this.urlSearchParams.get('code');
|
||||
this.session = this.args.context.get('session') ?? this.urlSearchParams.get('session');
|
||||
this.initialized = true;
|
||||
this.verification.start();
|
||||
}
|
||||
|
||||
@task *verify(event) {
|
||||
event?.preventDefault?.();
|
||||
|
||||
try {
|
||||
const { status, token } = yield this.fetch.post('onboard/verify-email', { session: this.session, code: this.code });
|
||||
if (status === 'ok') {
|
||||
this.notifications.success('Email successfully verified!');
|
||||
|
||||
if (token) {
|
||||
this.notifications.info('Welcome to Fleetbase!');
|
||||
this.authSession.manuallyAuthenticate(token);
|
||||
|
||||
return this.router.transitionTo('console');
|
||||
}
|
||||
|
||||
return this.router.transitionTo('auth.login');
|
||||
}
|
||||
} catch (error) {
|
||||
this.notifications.serverError(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
console/app/components/onboarding/yield.hbs
Normal file
11
console/app/components/onboarding/yield.hbs
Normal file
@@ -0,0 +1,11 @@
|
||||
<section class="onboarding step-host">
|
||||
{{#if this.initialized}}
|
||||
{{#if this.currentComponent}}
|
||||
{{component this.currentComponent context=this.context orchestrator=this.orchestrator brand=@brand}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<div class="flex items-center justify-center min-h-24">
|
||||
<Spinner />
|
||||
</div>
|
||||
{{/if}}
|
||||
</section>
|
||||
27
console/app/components/onboarding/yield.js
Normal file
27
console/app/components/onboarding/yield.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import Component from '@glimmer/component';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { next } from '@ember/runloop';
|
||||
|
||||
export default class OnboardingYieldComponent extends Component {
|
||||
@service('onboarding-orchestrator') orchestrator;
|
||||
@service('onboarding-context') context;
|
||||
@tracked initialized = false;
|
||||
|
||||
get currentComponent() {
|
||||
return this.orchestrator.current && this.orchestrator.current.component;
|
||||
}
|
||||
|
||||
constructor(owner, { step, session, code }) {
|
||||
super(...arguments);
|
||||
next(() => this.#initialize(step, session, code));
|
||||
}
|
||||
|
||||
#initialize(step, session, code) {
|
||||
if (step) this.orchestrator.goto(step);
|
||||
if (session) this.context.persist('session', session);
|
||||
if (code) this.context.set('code', code);
|
||||
|
||||
this.initialized = true;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import { inject as service } from '@ember/service';
|
||||
import { later } from '@ember/runloop';
|
||||
import { action } from '@ember/object';
|
||||
import { isArray } from '@ember/array';
|
||||
import { dasherize } from '@ember/string';
|
||||
import first from '@fleetbase/ember-core/utils/first';
|
||||
|
||||
export default class ConsoleController extends Controller {
|
||||
@@ -16,67 +17,19 @@ export default class ConsoleController extends Controller {
|
||||
@service intl;
|
||||
@service universe;
|
||||
@service abilities;
|
||||
|
||||
/**
|
||||
* Authenticated user organizations.
|
||||
*
|
||||
* @var {Array}
|
||||
*/
|
||||
@service sidebar;
|
||||
@tracked organizations = [];
|
||||
|
||||
/**
|
||||
* Sidebar Context Controls
|
||||
*
|
||||
* @var {SidebarContext}
|
||||
*/
|
||||
@tracked sidebarContext;
|
||||
|
||||
/**
|
||||
* State of sidebar toggle icon
|
||||
*
|
||||
* @var {SidebarContext}
|
||||
*/
|
||||
@tracked sidebarToggleEnabled = true;
|
||||
|
||||
/**
|
||||
* The sidebar toggle state.
|
||||
*
|
||||
* @var {SidebarContext}
|
||||
*/
|
||||
@tracked sidebarToggleState = {};
|
||||
|
||||
/**
|
||||
* Routes which should hide the sidebar menu.
|
||||
*
|
||||
* @var {Array}
|
||||
*/
|
||||
@tracked hiddenSidebarRoutes = ['console.home', 'console.notifications', 'console.virtual'];
|
||||
|
||||
/**
|
||||
* Menu items to be added to the main header navigation bar.
|
||||
*
|
||||
* @memberof ConsoleController
|
||||
*/
|
||||
@tracked menuItems = [];
|
||||
|
||||
/**
|
||||
* Menu items to be added to the user dropdown menu located in the header.
|
||||
*
|
||||
* @memberof ConsoleController
|
||||
*/
|
||||
@tracked userMenuItems = [];
|
||||
|
||||
/**
|
||||
* Menu items to be added to the organization dropdown menu located in the header.
|
||||
*
|
||||
* @memberof ConsoleController
|
||||
*/
|
||||
@tracked organizationMenuItems = [];
|
||||
|
||||
/**
|
||||
* Creates an instance of ConsoleController.
|
||||
* @memberof ConsoleController
|
||||
*/
|
||||
get currentRouteClass() {
|
||||
return dasherize(this.router.currentRouteName.replace(/\./g, ' '));
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.router.on('routeDidChange', (transition) => {
|
||||
@@ -89,17 +42,17 @@ export default class ConsoleController extends Controller {
|
||||
|
||||
// Hide the sidebar if the current route is in hiddenSidebarRoutes
|
||||
if (shouldHideSidebar) {
|
||||
this.sidebarContext.hideNow();
|
||||
this.sidebar.hideNow();
|
||||
this.sidebarToggleEnabled = false;
|
||||
return; // Exit early as no further action is required
|
||||
}
|
||||
|
||||
// If the sidebar was manually closed and not on a hidden route, keep it closed
|
||||
if (isSidebarManuallyClosed) {
|
||||
this.sidebarContext.hideNow();
|
||||
this.sidebar.hideNow();
|
||||
} else {
|
||||
// Otherwise, show the sidebar
|
||||
this.sidebarContext.show();
|
||||
this.sidebar.show();
|
||||
}
|
||||
|
||||
// Ensure toggle is enabled unless on a hidden route
|
||||
@@ -134,7 +87,7 @@ export default class ConsoleController extends Controller {
|
||||
this.universe.trigger('sidebarContext.available', sidebarContext);
|
||||
|
||||
if (this.hiddenSidebarRoutes.includes(this.router.currentRouteName)) {
|
||||
this.sidebarContext.hideNow();
|
||||
this.sidebar.hideNow();
|
||||
this.sidebarToggleEnabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,151 +1,8 @@
|
||||
import Controller from '@ember/controller';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
import { action, getProperties } from '@ember/object';
|
||||
import OnboardValidations from '../../validations/onboard';
|
||||
import lookupValidator from 'ember-changeset-validations';
|
||||
import Changeset from 'ember-changeset';
|
||||
|
||||
export default class OnboardIndexController extends Controller {
|
||||
/**
|
||||
* Inject the `fetch` service
|
||||
*
|
||||
* @memberof OnboardIndexController
|
||||
*/
|
||||
@service fetch;
|
||||
|
||||
/**
|
||||
* Inject the `session` service
|
||||
*
|
||||
* @memberof OnboardIndexController
|
||||
*/
|
||||
@service session;
|
||||
|
||||
/**
|
||||
* Inject the `router` service
|
||||
*
|
||||
* @memberof OnboardIndexController
|
||||
*/
|
||||
@service router;
|
||||
|
||||
/**
|
||||
* Inject the `notifications` service
|
||||
*
|
||||
* @memberof OnboardIndexController
|
||||
*/
|
||||
@service notifications;
|
||||
|
||||
/**
|
||||
* The name input field.
|
||||
*
|
||||
* @memberof OnboardIndexController
|
||||
*/
|
||||
@tracked name;
|
||||
|
||||
/**
|
||||
* The email input field.
|
||||
*
|
||||
* @memberof OnboardIndexController
|
||||
*/
|
||||
@tracked email;
|
||||
|
||||
/**
|
||||
* The phone input field.
|
||||
*
|
||||
* @memberof OnboardIndexController
|
||||
*/
|
||||
@tracked phone;
|
||||
|
||||
/**
|
||||
* The organization_name input field.
|
||||
*
|
||||
* @memberof OnboardIndexController
|
||||
*/
|
||||
@tracked organization_name;
|
||||
|
||||
/**
|
||||
* The password input field.
|
||||
*
|
||||
* @memberof OnboardIndexController
|
||||
*/
|
||||
@tracked password;
|
||||
|
||||
/**
|
||||
* The name password confirmation field.
|
||||
*
|
||||
* @memberof OnboardIndexController
|
||||
*/
|
||||
@tracked password_confirmation;
|
||||
|
||||
/**
|
||||
* The property for error message.
|
||||
*
|
||||
* @memberof OnboardIndexController
|
||||
*/
|
||||
@tracked error;
|
||||
|
||||
/**
|
||||
* The loading state of the onboard request.
|
||||
*
|
||||
* @memberof OnboardIndexController
|
||||
*/
|
||||
@tracked isLoading = false;
|
||||
|
||||
/**
|
||||
* The ready state for the form.
|
||||
*
|
||||
* @memberof OnboardIndexController
|
||||
*/
|
||||
@tracked readyToSubmit = false;
|
||||
|
||||
/**
|
||||
* Start the onboard process.
|
||||
*
|
||||
* @return {Promise}
|
||||
* @memberof OnboardIndexController
|
||||
*/
|
||||
@action async startOnboard(event) {
|
||||
event.preventDefault();
|
||||
|
||||
// eslint-disable-next-line ember/no-get
|
||||
const input = getProperties(this, 'name', 'email', 'phone', 'organization_name', 'password', 'password_confirmation');
|
||||
const changeset = new Changeset(input, lookupValidator(OnboardValidations), OnboardValidations);
|
||||
|
||||
await changeset.validate();
|
||||
|
||||
if (changeset.get('isInvalid')) {
|
||||
const errorMessage = changeset.errors.firstObject.validation.firstObject;
|
||||
|
||||
this.notifications.error(errorMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
// Set user timezone
|
||||
input.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
|
||||
this.isLoading = true;
|
||||
|
||||
return this.fetch
|
||||
.post('onboard/create-account', input)
|
||||
.then(({ status, skipVerification, token, session }) => {
|
||||
if (status === 'success') {
|
||||
if (skipVerification === true && token) {
|
||||
// only manually authenticate if skip verification
|
||||
this.session.isOnboarding().manuallyAuthenticate(token);
|
||||
|
||||
return this.router.transitionTo('console').then(() => {
|
||||
this.notifications.success('Welcome to Fleetbase!');
|
||||
});
|
||||
}
|
||||
|
||||
return this.router.transitionTo('onboard.verify-email', { queryParams: { hello: session } });
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
this.notifications.serverError(error);
|
||||
})
|
||||
.finally(() => {
|
||||
this.isLoading = false;
|
||||
});
|
||||
}
|
||||
@tracked step;
|
||||
@tracked session;
|
||||
@tracked code;
|
||||
}
|
||||
|
||||
41
console/app/initializers/load-intl-polyfills.js
Normal file
41
console/app/initializers/load-intl-polyfills.js
Normal file
@@ -0,0 +1,41 @@
|
||||
import translations from 'ember-intl/translations';
|
||||
import { all } from 'rsvp';
|
||||
|
||||
const isBrowser = typeof window !== 'undefined';
|
||||
|
||||
function langOf(tag = 'en') {
|
||||
return String(tag).toLowerCase().split('-')[0];
|
||||
}
|
||||
|
||||
async function loadBasePolyfills() {
|
||||
await import('@formatjs/intl-numberformat/polyfill-force');
|
||||
await import('@formatjs/intl-pluralrules/polyfill-force');
|
||||
await import('@formatjs/intl-datetimeformat/polyfill-force');
|
||||
await import('@formatjs/intl-relativetimeformat/polyfill-force');
|
||||
}
|
||||
|
||||
async function loadLocaleData(lang) {
|
||||
return all([
|
||||
import(`@formatjs/intl-numberformat/locale-data/${lang}.js`),
|
||||
import(`@formatjs/intl-pluralrules/locale-data/${lang}.js`),
|
||||
import(`@formatjs/intl-datetimeformat/locale-data/${lang}.js`),
|
||||
import(`@formatjs/intl-relativetimeformat/locale-data/${lang}.js`),
|
||||
]);
|
||||
}
|
||||
|
||||
export function initialize(application) {
|
||||
if (!isBrowser) return;
|
||||
|
||||
// Build-time list of locales from the generated module
|
||||
const locales = translations.map(([locale]) => String(locale));
|
||||
const langs = [...new Set(locales.map(langOf))];
|
||||
|
||||
application.deferReadiness();
|
||||
(async () => {
|
||||
await loadBasePolyfills();
|
||||
await all(langs.map(loadLocaleData));
|
||||
application.advanceReadiness();
|
||||
})();
|
||||
}
|
||||
|
||||
export default { initialize };
|
||||
@@ -0,0 +1,19 @@
|
||||
export function initialize(owner) {
|
||||
const registry = owner.lookup('service:onboarding-registry');
|
||||
if (registry) {
|
||||
const defaultFlow = {
|
||||
id: 'default@v1',
|
||||
entry: 'signup',
|
||||
steps: [
|
||||
{ id: 'signup', component: 'onboarding/form', next: 'verify-email' },
|
||||
{ id: 'verify-email', component: 'onboarding/verify-email' },
|
||||
],
|
||||
};
|
||||
|
||||
registry.registerFlow(defaultFlow);
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
initialize,
|
||||
};
|
||||
20
console/app/models/activity.js
Normal file
20
console/app/models/activity.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import Model, { attr } from '@ember-data/model';
|
||||
|
||||
export default class ActivityModel extends Model {
|
||||
@attr('string') uuid;
|
||||
@attr('string') log_name;
|
||||
@attr('string') description;
|
||||
@attr('string') company_id;
|
||||
@attr('string') subject_id;
|
||||
@attr('string') subject_type;
|
||||
@attr('string') humanized_subject_type;
|
||||
@attr('string') event;
|
||||
@attr('string') causer_id;
|
||||
@attr('string') causer_type;
|
||||
@attr('string') humanized_causer_type;
|
||||
@attr('object') properties;
|
||||
@attr('object') causer;
|
||||
@attr('object') subject;
|
||||
@attr('date') created_at;
|
||||
@attr('date') updated_at;
|
||||
}
|
||||
311
console/app/models/alert.js
Normal file
311
console/app/models/alert.js
Normal file
@@ -0,0 +1,311 @@
|
||||
import Model, { attr, belongsTo } from '@ember-data/model';
|
||||
import { computed } from '@ember/object';
|
||||
import { format, formatDistanceToNow, differenceInMinutes } from 'date-fns';
|
||||
|
||||
export default class AlertModel extends Model {
|
||||
/** @attributes */
|
||||
@attr('string') type;
|
||||
@attr('string') severity;
|
||||
@attr('string') status;
|
||||
@attr('string') subject_type;
|
||||
@attr('string') subject_uuid;
|
||||
@attr('string') message;
|
||||
|
||||
/** @json attributes */
|
||||
@attr() rule;
|
||||
@attr() context;
|
||||
@attr() meta;
|
||||
|
||||
/** @dates */
|
||||
@attr('date') triggered_at;
|
||||
@attr('date') acknowledged_at;
|
||||
@attr('date') resolved_at;
|
||||
@attr('date') created_at;
|
||||
@attr('date') updated_at;
|
||||
@attr('date') deleted_at;
|
||||
|
||||
/** @relationships */
|
||||
@belongsTo('company') company;
|
||||
@belongsTo('user', { inverse: null }) acknowledgedBy;
|
||||
@belongsTo('user', { inverse: null }) resolvedBy;
|
||||
|
||||
/** @computed - Date formatting */
|
||||
@computed('triggered_at') get triggeredAgo() {
|
||||
if (!this.triggered_at) return 'Unknown';
|
||||
return formatDistanceToNow(this.triggered_at) + ' ago';
|
||||
}
|
||||
|
||||
@computed('triggered_at') get triggeredAt() {
|
||||
if (!this.triggered_at) return 'Unknown';
|
||||
return format(this.triggered_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('acknowledged_at') get acknowledgedAgo() {
|
||||
if (!this.acknowledged_at) return null;
|
||||
return formatDistanceToNow(this.acknowledged_at) + ' ago';
|
||||
}
|
||||
|
||||
@computed('acknowledged_at') get acknowledgedAt() {
|
||||
if (!this.acknowledged_at) return 'Not acknowledged';
|
||||
return format(this.acknowledged_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('resolved_at') get resolvedAgo() {
|
||||
if (!this.resolved_at) return null;
|
||||
return formatDistanceToNow(this.resolved_at) + ' ago';
|
||||
}
|
||||
|
||||
@computed('resolved_at') get resolvedAt() {
|
||||
if (!this.resolved_at) return 'Not resolved';
|
||||
return format(this.resolved_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAgo() {
|
||||
return formatDistanceToNow(this.updated_at) + ' ago';
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAt() {
|
||||
return format(this.updated_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAgo() {
|
||||
return formatDistanceToNow(this.created_at) + ' ago';
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAt() {
|
||||
return format(this.created_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
/** @computed - Status checks */
|
||||
@computed('acknowledged_at') get isAcknowledged() {
|
||||
return !!this.acknowledged_at;
|
||||
}
|
||||
|
||||
@computed('resolved_at') get isResolved() {
|
||||
return !!this.resolved_at;
|
||||
}
|
||||
|
||||
@computed('isAcknowledged', 'isResolved') get isPending() {
|
||||
return !this.isAcknowledged && !this.isResolved;
|
||||
}
|
||||
|
||||
@computed('isAcknowledged', 'isResolved') get isActive() {
|
||||
return this.isAcknowledged && !this.isResolved;
|
||||
}
|
||||
|
||||
/** @computed - Duration calculations */
|
||||
@computed('triggered_at', 'acknowledged_at') get acknowledgmentDurationMinutes() {
|
||||
if (!this.triggered_at || !this.acknowledged_at) return null;
|
||||
return differenceInMinutes(new Date(this.acknowledged_at), new Date(this.triggered_at));
|
||||
}
|
||||
|
||||
@computed('triggered_at', 'resolved_at') get resolutionDurationMinutes() {
|
||||
if (!this.triggered_at || !this.resolved_at) return null;
|
||||
return differenceInMinutes(new Date(this.resolved_at), new Date(this.triggered_at));
|
||||
}
|
||||
|
||||
@computed('triggered_at') get ageMinutes() {
|
||||
if (!this.triggered_at) return 0;
|
||||
return differenceInMinutes(new Date(), new Date(this.triggered_at));
|
||||
}
|
||||
|
||||
@computed('acknowledgmentDurationMinutes') get acknowledgmentDurationFormatted() {
|
||||
if (!this.acknowledgmentDurationMinutes) return null;
|
||||
|
||||
const minutes = this.acknowledgmentDurationMinutes;
|
||||
if (minutes < 60) return `${minutes}m`;
|
||||
if (minutes < 1440) return `${Math.floor(minutes / 60)}h ${minutes % 60}m`;
|
||||
return `${Math.floor(minutes / 1440)}d ${Math.floor((minutes % 1440) / 60)}h`;
|
||||
}
|
||||
|
||||
@computed('resolutionDurationMinutes') get resolutionDurationFormatted() {
|
||||
if (!this.resolutionDurationMinutes) return null;
|
||||
|
||||
const minutes = this.resolutionDurationMinutes;
|
||||
if (minutes < 60) return `${minutes}m`;
|
||||
if (minutes < 1440) return `${Math.floor(minutes / 60)}h ${minutes % 60}m`;
|
||||
return `${Math.floor(minutes / 1440)}d ${Math.floor((minutes % 1440) / 60)}h`;
|
||||
}
|
||||
|
||||
@computed('ageMinutes') get ageFormatted() {
|
||||
const minutes = this.ageMinutes;
|
||||
if (minutes < 60) return `${minutes}m`;
|
||||
if (minutes < 1440) return `${Math.floor(minutes / 60)}h ${minutes % 60}m`;
|
||||
return `${Math.floor(minutes / 1440)}d ${Math.floor((minutes % 1440) / 60)}h`;
|
||||
}
|
||||
|
||||
/** @computed - Severity styling */
|
||||
@computed('severity') get severityBadgeClass() {
|
||||
const severityClasses = {
|
||||
critical: 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300',
|
||||
high: 'bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-300',
|
||||
medium: 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300',
|
||||
low: 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300',
|
||||
info: 'bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300',
|
||||
};
|
||||
return severityClasses[this.severity] || severityClasses['info'];
|
||||
}
|
||||
|
||||
@computed('severity') get severityIcon() {
|
||||
const severityIcons = {
|
||||
critical: 'fas fa-exclamation-circle',
|
||||
high: 'fas fa-exclamation-triangle',
|
||||
medium: 'fas fa-exclamation',
|
||||
low: 'fas fa-info-circle',
|
||||
info: 'fas fa-info',
|
||||
};
|
||||
return severityIcons[this.severity] || severityIcons['info'];
|
||||
}
|
||||
|
||||
@computed('severity') get severityColor() {
|
||||
const severityColors = {
|
||||
critical: 'text-red-600 dark:text-red-400',
|
||||
high: 'text-orange-600 dark:text-orange-400',
|
||||
medium: 'text-yellow-600 dark:text-yellow-400',
|
||||
low: 'text-blue-600 dark:text-blue-400',
|
||||
info: 'text-gray-600 dark:text-gray-400',
|
||||
};
|
||||
return severityColors[this.severity] || severityColors['info'];
|
||||
}
|
||||
|
||||
/** @computed - Status styling */
|
||||
@computed('status', 'isAcknowledged', 'isResolved') get statusBadgeClass() {
|
||||
if (this.isResolved) {
|
||||
return 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300';
|
||||
}
|
||||
if (this.isAcknowledged) {
|
||||
return 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300';
|
||||
}
|
||||
return 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300';
|
||||
}
|
||||
|
||||
@computed('status', 'isAcknowledged', 'isResolved') get statusText() {
|
||||
if (this.isResolved) return 'Resolved';
|
||||
if (this.isAcknowledged) return 'Acknowledged';
|
||||
return 'Pending';
|
||||
}
|
||||
|
||||
@computed('status', 'isAcknowledged', 'isResolved') get statusIcon() {
|
||||
if (this.isResolved) return 'fas fa-check-circle';
|
||||
if (this.isAcknowledged) return 'fas fa-eye';
|
||||
return 'fas fa-bell';
|
||||
}
|
||||
|
||||
/** @computed - Type styling */
|
||||
@computed('type') get typeIcon() {
|
||||
const typeIcons = {
|
||||
maintenance: 'fas fa-wrench',
|
||||
temperature: 'fas fa-thermometer-half',
|
||||
fuel: 'fas fa-gas-pump',
|
||||
speed: 'fas fa-tachometer-alt',
|
||||
location: 'fas fa-map-marker-alt',
|
||||
system: 'fas fa-cog',
|
||||
security: 'fas fa-shield-alt',
|
||||
performance: 'fas fa-chart-line',
|
||||
compliance: 'fas fa-clipboard-check',
|
||||
};
|
||||
return typeIcons[this.type] || 'fas fa-bell';
|
||||
}
|
||||
|
||||
@computed('type') get typeBadgeClass() {
|
||||
const typeClasses = {
|
||||
maintenance: 'bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-300',
|
||||
temperature: 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300',
|
||||
fuel: 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300',
|
||||
speed: 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300',
|
||||
location: 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300',
|
||||
system: 'bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300',
|
||||
security: 'bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-300',
|
||||
performance: 'bg-indigo-100 text-indigo-800 dark:bg-indigo-900 dark:text-indigo-300',
|
||||
compliance: 'bg-pink-100 text-pink-800 dark:bg-pink-900 dark:text-pink-300',
|
||||
};
|
||||
return typeClasses[this.type] || 'bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300';
|
||||
}
|
||||
|
||||
/** @computed - Subject information */
|
||||
@computed('subject_type') get subjectTypeFormatted() {
|
||||
if (!this.subject_type) return 'Unknown';
|
||||
|
||||
// Convert from model class name to human readable
|
||||
const typeMap = {
|
||||
vehicle: 'Vehicle',
|
||||
driver: 'Driver',
|
||||
order: 'Order',
|
||||
device: 'Device',
|
||||
asset: 'Asset',
|
||||
maintenance: 'Maintenance',
|
||||
fuel_report: 'Fuel Report',
|
||||
};
|
||||
|
||||
return typeMap[this.subject_type] || this.subject_type.replace(/_/g, ' ').replace(/\b\w/g, (l) => l.toUpperCase());
|
||||
}
|
||||
|
||||
/** @computed - Priority and urgency */
|
||||
@computed('severity', 'ageMinutes') get urgencyLevel() {
|
||||
const severityWeight = {
|
||||
critical: 4,
|
||||
high: 3,
|
||||
medium: 2,
|
||||
low: 1,
|
||||
info: 0,
|
||||
};
|
||||
|
||||
const weight = severityWeight[this.severity] || 0;
|
||||
const ageHours = this.ageMinutes / 60;
|
||||
|
||||
// Calculate urgency based on severity and age
|
||||
if (weight >= 3 && ageHours > 1) return 'urgent';
|
||||
if (weight >= 2 && ageHours > 4) return 'urgent';
|
||||
if (weight >= 3) return 'high';
|
||||
if (weight >= 2) return 'medium';
|
||||
return 'low';
|
||||
}
|
||||
|
||||
@computed('urgencyLevel') get urgencyBadgeClass() {
|
||||
const urgencyClasses = {
|
||||
urgent: 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300 animate-pulse',
|
||||
high: 'bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-300',
|
||||
medium: 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300',
|
||||
low: 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300',
|
||||
};
|
||||
return urgencyClasses[this.urgencyLevel] || urgencyClasses['low'];
|
||||
}
|
||||
|
||||
/** @computed - Context information */
|
||||
@computed('context') get hasContext() {
|
||||
return !!(this.context && Object.keys(this.context).length > 0);
|
||||
}
|
||||
|
||||
@computed('rule') get hasRule() {
|
||||
return !!(this.rule && Object.keys(this.rule).length > 0);
|
||||
}
|
||||
|
||||
@computed('context.location') get hasLocation() {
|
||||
return !!this.context?.location;
|
||||
}
|
||||
|
||||
@computed('context.value', 'rule.{operator,threshold}') get thresholdExceeded() {
|
||||
if (!this.context?.value || !this.rule?.threshold) return null;
|
||||
|
||||
const value = parseFloat(this.context.value);
|
||||
const threshold = parseFloat(this.rule.threshold);
|
||||
const operator = this.rule.operator || '>';
|
||||
|
||||
switch (operator) {
|
||||
case '>':
|
||||
return value > threshold;
|
||||
case '<':
|
||||
return value < threshold;
|
||||
case '>=':
|
||||
return value >= threshold;
|
||||
case '<=':
|
||||
return value <= threshold;
|
||||
case '==':
|
||||
return value === threshold;
|
||||
case '!=':
|
||||
return value !== threshold;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,10 @@ export default class CategoryModel extends Model {
|
||||
@hasMany('category', { inverse: 'parent' }) subcategories;
|
||||
@tracked parent_category;
|
||||
|
||||
/** Array<CustomFieldModel> attached at runtime for rendering */
|
||||
@tracked customFields = [];
|
||||
@tracked isEditing = false;
|
||||
|
||||
/** @attributes */
|
||||
@attr('string') owner_type;
|
||||
@attr('string') name;
|
||||
@@ -46,7 +50,7 @@ export default class CategoryModel extends Model {
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAt() {
|
||||
return format(this.updated_at, 'PPP p');
|
||||
return format(this.updated_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAtShort() {
|
||||
@@ -58,7 +62,7 @@ export default class CategoryModel extends Model {
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAt() {
|
||||
return format(this.created_at, 'PPP p');
|
||||
return format(this.created_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAtShort() {
|
||||
|
||||
@@ -31,7 +31,7 @@ export default class CommentModel extends Model {
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAt() {
|
||||
return format(this.created_at, 'PPP p');
|
||||
return format(this.created_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAgo() {
|
||||
@@ -39,6 +39,6 @@ export default class CommentModel extends Model {
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAt() {
|
||||
return format(this.updated_at, 'PPP p');
|
||||
return format(this.updated_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ export default class Company extends Model {
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAt() {
|
||||
return format(this.updated_at, 'PPP p');
|
||||
return format(this.updated_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAtShort() {
|
||||
@@ -62,7 +62,7 @@ export default class Company extends Model {
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAt() {
|
||||
return format(this.created_at, 'PPP p');
|
||||
return format(this.created_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAtShort() {
|
||||
|
||||
@@ -41,7 +41,7 @@ export default class CustomFieldValueModel extends Model {
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAt() {
|
||||
return format(this.created_at, 'PPP p');
|
||||
return format(this.created_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAgo() {
|
||||
@@ -49,6 +49,6 @@ export default class CustomFieldValueModel extends Model {
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAt() {
|
||||
return format(this.updated_at, 'PPP p');
|
||||
return format(this.updated_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ export default class CustomFieldModel extends Model {
|
||||
/** @attributes */
|
||||
@attr('string') name;
|
||||
@attr('string') description;
|
||||
@attr('string') for;
|
||||
@attr('string') help_text;
|
||||
@attr('string') label;
|
||||
@attr('string') type;
|
||||
@@ -30,12 +31,20 @@ export default class CustomFieldModel extends Model {
|
||||
@attr('date') deleted_at;
|
||||
|
||||
/** @computed */
|
||||
@computed('type') get valueType() {
|
||||
if (this.type === 'file-upload') return 'file';
|
||||
if (this.type === 'date-time-input') return 'date';
|
||||
if (this.type === 'model-select') return 'model';
|
||||
|
||||
return 'text';
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAgo() {
|
||||
return formatDistanceToNow(this.created_at);
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAt() {
|
||||
return format(this.created_at, 'PPP p');
|
||||
return format(this.created_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAgo() {
|
||||
@@ -43,6 +52,6 @@ export default class CustomFieldModel extends Model {
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAt() {
|
||||
return format(this.updated_at, 'PPP p');
|
||||
return format(this.updated_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ export default class DashboardWidgetModel extends Model {
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAt() {
|
||||
return format(this.updated_at, 'PPP p');
|
||||
return format(this.updated_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAtShort() {
|
||||
@@ -37,7 +37,7 @@ export default class DashboardWidgetModel extends Model {
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAt() {
|
||||
return format(this.created_at, 'PPP p');
|
||||
return format(this.created_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAtShort() {
|
||||
|
||||
@@ -13,7 +13,11 @@ export default class DashboardModel extends Model {
|
||||
|
||||
/** @attributes */
|
||||
@attr('string') name;
|
||||
@attr('string') extension;
|
||||
@attr('boolean') is_default;
|
||||
@attr('array') tags;
|
||||
@attr('object') options;
|
||||
@attr('object') meta;
|
||||
|
||||
/** @dates */
|
||||
@attr('date') created_at;
|
||||
@@ -25,7 +29,7 @@ export default class DashboardModel extends Model {
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAt() {
|
||||
return format(this.updated_at, 'PPP p');
|
||||
return format(this.updated_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAtShort() {
|
||||
@@ -37,7 +41,7 @@ export default class DashboardModel extends Model {
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAt() {
|
||||
return format(this.created_at, 'PPP p');
|
||||
return format(this.created_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAtShort() {
|
||||
|
||||
@@ -111,7 +111,7 @@ export default class ExtensionModel extends Model {
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAt() {
|
||||
return format(this.updated_at, 'PPP p');
|
||||
return format(this.updated_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAtShort() {
|
||||
@@ -123,7 +123,7 @@ export default class ExtensionModel extends Model {
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAt() {
|
||||
return format(this.created_at, 'PPP p');
|
||||
return format(this.created_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAtShort() {
|
||||
|
||||
@@ -48,7 +48,7 @@ export default class FileModel extends Model {
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAt() {
|
||||
return format(this.created_at, 'PPP p');
|
||||
return format(this.created_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('content_type') get isVideo() {
|
||||
|
||||
@@ -26,7 +26,7 @@ export default class GroupModel extends Model {
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAt() {
|
||||
return format(this.updated_at, 'PPP p');
|
||||
return format(this.updated_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAgo() {
|
||||
@@ -34,6 +34,6 @@ export default class GroupModel extends Model {
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAt() {
|
||||
return format(this.created_at, 'PPP p');
|
||||
return format(this.created_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ export default class NotificationModel extends Model {
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAt() {
|
||||
return format(this.created_at, 'PPP p');
|
||||
return format(this.created_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('read_at') get readAt() {
|
||||
return format(this.read_at, 'PPP p');
|
||||
return format(this.read_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('read_at') get isRead() {
|
||||
|
||||
@@ -132,6 +132,6 @@ export default class PermissionModel extends Model {
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAt() {
|
||||
return format(this.created_at, 'PPP p');
|
||||
return format(this.created_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ export default class PolicyModel extends Model {
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAt() {
|
||||
return format(this.updated_at, 'PPP p');
|
||||
return format(this.updated_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAgo() {
|
||||
@@ -45,6 +45,6 @@ export default class PolicyModel extends Model {
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAt() {
|
||||
return format(this.created_at, 'PPP p');
|
||||
return format(this.created_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
}
|
||||
|
||||
519
console/app/models/report.js
Normal file
519
console/app/models/report.js
Normal file
@@ -0,0 +1,519 @@
|
||||
import Model, { attr, belongsTo, hasMany } from '@ember-data/model';
|
||||
import { computed } from '@ember/object';
|
||||
import { isArray } from '@ember/array';
|
||||
import { getOwner } from '@ember/application';
|
||||
import { isPresent, isEmpty } from '@ember/utils';
|
||||
import { format, formatDistanceToNow } from 'date-fns';
|
||||
|
||||
export default class ReportModel extends Model {
|
||||
/** @ids */
|
||||
@attr('string') public_id;
|
||||
@attr('string') company_uuid;
|
||||
@attr('string') created_by_uuid;
|
||||
@attr('string') category_uuid;
|
||||
@attr('string') subject_uuid;
|
||||
|
||||
/** @attributes */
|
||||
@attr('string') subject_type;
|
||||
@attr('string') title;
|
||||
@attr('string') description;
|
||||
@attr('date') period_start;
|
||||
@attr('date') period_end;
|
||||
@attr('date') last_executed_at;
|
||||
@attr('number') execution_time;
|
||||
@attr('number') row_count;
|
||||
@attr('boolean') is_scheduled;
|
||||
@attr('boolean') is_generated;
|
||||
@attr('string') status;
|
||||
@attr('string') type;
|
||||
@attr('raw') export_formats;
|
||||
@attr('raw') schedule_config;
|
||||
@attr('raw') data;
|
||||
@attr('raw') result_columns;
|
||||
@attr('raw') query_config;
|
||||
@attr('raw') tags;
|
||||
@attr('raw') options;
|
||||
@attr('raw') meta;
|
||||
@attr('string') status;
|
||||
|
||||
/** @dates */
|
||||
@attr('date') created_at;
|
||||
@attr('date') updated_at;
|
||||
|
||||
/** @relationships */
|
||||
// @belongsTo('company') company;
|
||||
// @belongsTo('user') createdBy;
|
||||
// @hasMany('report-execution') executions;
|
||||
// @hasMany('report-audit-log') auditLogs;
|
||||
|
||||
fillResult(result = {}) {
|
||||
this.setProperties({
|
||||
result_columns: result?.columns ?? [],
|
||||
data: result?.data ?? [],
|
||||
meta: result?.meta ?? {},
|
||||
row_count: result?.meta?.total_rows ?? 0,
|
||||
execution_time: result?.meta?.execution_time_ms ?? -1,
|
||||
last_executed_at: new Date(),
|
||||
is_generated: true,
|
||||
});
|
||||
}
|
||||
|
||||
/** @computed */
|
||||
@computed('updated_at') get updatedAgo() {
|
||||
return formatDistanceToNow(this.updated_at);
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAt() {
|
||||
return format(this.updated_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAgo() {
|
||||
return formatDistanceToNow(this.created_at);
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAt() {
|
||||
return format(this.created_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('query_config.columns.length', 'query_config.table.name') get hasValidConfig() {
|
||||
return (
|
||||
isPresent(this.query_config) &&
|
||||
isPresent(this.query_config.table) &&
|
||||
isPresent(this.query_config.table.name) &&
|
||||
isArray(this.query_config.columns) &&
|
||||
this.query_config.columns.length > 0
|
||||
);
|
||||
}
|
||||
|
||||
@computed('query_config.table.name') get tableName() {
|
||||
return this.query_config?.table?.name || '';
|
||||
}
|
||||
|
||||
@computed('query_config.table.label', 'tableName') get tableLabel() {
|
||||
return this.query_config?.table?.label || this.tableName;
|
||||
}
|
||||
|
||||
@computed('query_config.columns.[]') get selectedColumns() {
|
||||
return this.query_config?.columns || [];
|
||||
}
|
||||
|
||||
@computed('selectedColumns.[]', 'query_config.joins.[]') get totalSelectedColumns() {
|
||||
let count = this.selectedColumns.length;
|
||||
|
||||
// Add columns from joins
|
||||
if (isArray(this.query_config?.joins)) {
|
||||
this.query_config.joins.forEach((join) => {
|
||||
if (isArray(join.selectedColumns)) {
|
||||
count += join.selectedColumns.length;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
@computed('query_config.joins.[]') get hasJoins() {
|
||||
return isArray(this.query_config?.joins) && this.query_config.joins.length > 0;
|
||||
}
|
||||
|
||||
@computed('hasJoins', 'query_config.joins.[]') get joinedTables() {
|
||||
if (!this.hasJoins) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return this.query_config.joins.map((join) => ({
|
||||
table: join.table,
|
||||
label: join.label || join.table,
|
||||
type: join.type,
|
||||
columnsCount: join.selectedColumns?.length || 0,
|
||||
}));
|
||||
}
|
||||
|
||||
@computed('query_config.conditions.[]') get hasConditions() {
|
||||
return isArray(this.query_config?.conditions) && this.query_config.conditions.length > 0;
|
||||
}
|
||||
|
||||
@computed('hasConditions', 'query_config.conditions.[]') get conditionsCount() {
|
||||
if (!this.hasConditions) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return this.countConditionsRecursively(this.query_config.conditions);
|
||||
}
|
||||
|
||||
@computed('query_config.groupBy.[]') get hasGrouping() {
|
||||
return isArray(this.query_config?.groupBy) && this.query_config.groupBy.length > 0;
|
||||
}
|
||||
|
||||
@computed('query_config.sortBy.[]') get hasSorting() {
|
||||
return isArray(this.query_config?.sortBy) && this.query_config.sortBy.length > 0;
|
||||
}
|
||||
|
||||
@computed('query_config.limit') get hasLimit() {
|
||||
return isPresent(this.query_config?.limit) && this.query_config.limit > 0;
|
||||
}
|
||||
|
||||
@computed('conditionsCount', 'hasGrouping', 'hasJoins', 'joinedTables.length', 'totalSelectedColumns') get complexity() {
|
||||
let score = 0;
|
||||
|
||||
score += this.totalSelectedColumns;
|
||||
score += this.hasJoins ? this.joinedTables.length * 3 : 0;
|
||||
score += this.conditionsCount * 2;
|
||||
score += this.hasGrouping ? 5 : 0;
|
||||
|
||||
if (score < 10) {
|
||||
return 'simple';
|
||||
} else if (score < 25) {
|
||||
return 'moderate';
|
||||
} else {
|
||||
return 'complex';
|
||||
}
|
||||
}
|
||||
|
||||
@computed('complexity', 'totalSelectedColumns', 'joinedTables.length') get estimatedPerformance() {
|
||||
if (this.complexity === 'simple' && this.totalSelectedColumns <= 10) {
|
||||
return 'fast';
|
||||
} else if (this.complexity === 'moderate' && this.joinedTables.length <= 2) {
|
||||
return 'moderate';
|
||||
} else {
|
||||
return 'slow';
|
||||
}
|
||||
}
|
||||
|
||||
@computed('last_executed_at') get lastExecutedDisplay() {
|
||||
if (!this.last_executed_at) {
|
||||
return 'Never executed';
|
||||
}
|
||||
|
||||
return this.last_executed_at.toLocaleDateString() + ' ' + this.last_executed_at.toLocaleTimeString();
|
||||
}
|
||||
|
||||
@computed('average_execution_time') get averageExecutionTimeDisplay() {
|
||||
if (!this.average_execution_time) {
|
||||
return 'N/A';
|
||||
}
|
||||
|
||||
if (this.average_execution_time < 1000) {
|
||||
return `${Math.round(this.average_execution_time)}ms`;
|
||||
} else {
|
||||
return `${(this.average_execution_time / 1000).toFixed(2)}s`;
|
||||
}
|
||||
}
|
||||
|
||||
@computed('execution_count') get executionCountDisplay() {
|
||||
return this.execution_count || 0;
|
||||
}
|
||||
|
||||
@computed('last_result_count') get lastResultCountDisplay() {
|
||||
if (this.last_result_count === null || this.last_result_count === undefined) {
|
||||
return 'N/A';
|
||||
}
|
||||
|
||||
return this.last_result_count.toLocaleString();
|
||||
}
|
||||
|
||||
@computed('export_formats.[]') get availableExportFormats() {
|
||||
return this.export_formats || ['csv', 'excel', 'json'];
|
||||
}
|
||||
|
||||
@computed('tags.[]') get tagsList() {
|
||||
return this.tags || [];
|
||||
}
|
||||
|
||||
@computed('shared_with.[]') get sharedWithList() {
|
||||
return this.shared_with || [];
|
||||
}
|
||||
|
||||
@computed('is_scheduled', 'next_scheduled_run', 'schedule_frequency', 'schedule_timezone') get scheduleInfo() {
|
||||
if (!this.is_scheduled) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
frequency: this.schedule_frequency,
|
||||
nextRun: this.next_scheduled_run,
|
||||
timezone: this.schedule_timezone || 'UTC',
|
||||
};
|
||||
}
|
||||
|
||||
@computed('hasConditions', 'query_config.conditions.[]') get conditionsSummary() {
|
||||
if (!this.hasConditions) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return this.extractConditionsSummary(this.query_config.conditions);
|
||||
}
|
||||
|
||||
@computed('status') get statusDisplay() {
|
||||
const statusMap = {
|
||||
draft: 'Draft',
|
||||
active: 'Active',
|
||||
archived: 'Archived',
|
||||
error: 'Error',
|
||||
};
|
||||
|
||||
return statusMap[this.status] || this.status;
|
||||
}
|
||||
|
||||
@computed('status') get statusClass() {
|
||||
const statusClasses = {
|
||||
draft: 'status-draft',
|
||||
active: 'status-active',
|
||||
archived: 'status-archived',
|
||||
error: 'status-error',
|
||||
};
|
||||
|
||||
return statusClasses[this.status] || 'status-unknown';
|
||||
}
|
||||
|
||||
// Helper methods
|
||||
countConditionsRecursively(conditions) {
|
||||
let count = 0;
|
||||
|
||||
if (!isArray(conditions)) {
|
||||
return count;
|
||||
}
|
||||
|
||||
conditions.forEach((condition) => {
|
||||
if (condition.conditions) {
|
||||
count += this.countConditionsRecursively(condition.conditions);
|
||||
} else {
|
||||
count++;
|
||||
}
|
||||
});
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
extractConditionsSummary(conditions, summary = []) {
|
||||
if (!isArray(conditions)) {
|
||||
return summary;
|
||||
}
|
||||
|
||||
conditions.forEach((condition) => {
|
||||
if (condition.conditions) {
|
||||
this.extractConditionsSummary(condition.conditions, summary);
|
||||
} else if (condition.field && condition.operator) {
|
||||
summary.push({
|
||||
field: condition.field.label || condition.field.name,
|
||||
operator: condition.operator.label || condition.operator.value,
|
||||
value: condition.value,
|
||||
table: condition.field.table || this.tableName,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return summary;
|
||||
}
|
||||
|
||||
// API methods for interacting with the new backend
|
||||
async execute() {
|
||||
const owner = getOwner(this);
|
||||
const fetch = owner.lookup('service:fetch');
|
||||
|
||||
try {
|
||||
const response = await fetch.post(this.id ? `reports/${this.id}/execute` : 'reports/execute-query', { query_config: this.query_config });
|
||||
return response;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
// API methods for interacting with the new backend
|
||||
async executeQuery() {
|
||||
const owner = getOwner(this);
|
||||
const fetch = owner.lookup('service:fetch');
|
||||
|
||||
try {
|
||||
const response = await fetch.post('reports/execute-query', { query_config: this.query_config });
|
||||
return response;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
async export(format = 'csv', options = {}) {
|
||||
const owner = getOwner(this);
|
||||
const fetch = owner.lookup('service:fetch');
|
||||
|
||||
try {
|
||||
const response = await fetch.post(`reports/${this.id}/export`, {
|
||||
format,
|
||||
options,
|
||||
});
|
||||
|
||||
return response;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
async validate() {
|
||||
const owner = getOwner(this);
|
||||
const fetch = owner.lookup('service:fetch');
|
||||
|
||||
try {
|
||||
const response = await fetch.post('reports/validate-query', {
|
||||
query_config: this.query_config,
|
||||
});
|
||||
|
||||
return response;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
async analyze() {
|
||||
const owner = getOwner(this);
|
||||
const fetch = owner.lookup('service:fetch');
|
||||
|
||||
try {
|
||||
const response = await fetch.post('reports/analyze-query', {
|
||||
query_config: this.query_config,
|
||||
});
|
||||
|
||||
return response;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
// Static methods for direct query operations
|
||||
static async executeQuery(queryConfig) {
|
||||
const owner = getOwner(this);
|
||||
const fetch = owner.lookup('service:fetch');
|
||||
|
||||
try {
|
||||
const response = await fetch.post('reports/execute-query', {
|
||||
query_config: queryConfig,
|
||||
});
|
||||
|
||||
return response;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
static async exportQuery(queryConfig, format = 'csv', options = {}) {
|
||||
const owner = getOwner(this);
|
||||
const fetch = owner.lookup('service:fetch');
|
||||
|
||||
try {
|
||||
const response = await fetch('reports/export-query', {
|
||||
query_config: queryConfig,
|
||||
format,
|
||||
options,
|
||||
});
|
||||
|
||||
return response;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
static async validateQuery(queryConfig) {
|
||||
const owner = getOwner(this);
|
||||
const fetch = owner.lookup('service:fetch');
|
||||
|
||||
try {
|
||||
const response = await fetch.post('reports/validate-query', { query_config: queryConfig });
|
||||
return response;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
static async analyzeQuery(queryConfig) {
|
||||
const owner = getOwner(this);
|
||||
const fetch = owner.lookup('service:fetch');
|
||||
|
||||
try {
|
||||
const response = await fetch.post('reports/analyze-query', { query_config: queryConfig });
|
||||
return response;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
static async getTables() {
|
||||
try {
|
||||
const { tables } = await fetch.get('reports/tables');
|
||||
return tables;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
static async getTableSchema(tableName) {
|
||||
const owner = getOwner(this);
|
||||
const fetch = owner.lookup('service:fetch');
|
||||
|
||||
try {
|
||||
const { schema } = await fetch.get(`reports/tables/${tableName}/schema`);
|
||||
return schema;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
static async getExportFormats() {
|
||||
const owner = getOwner(this);
|
||||
const fetch = owner.lookup('service:fetch');
|
||||
|
||||
try {
|
||||
const { formats } = await fetch.get('reports/export-formats');
|
||||
return formats;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
// Utility methods for frontend display
|
||||
getComplexityBadgeClass() {
|
||||
const complexityClasses = {
|
||||
simple: 'badge-success',
|
||||
moderate: 'badge-warning',
|
||||
complex: 'badge-danger',
|
||||
};
|
||||
|
||||
return complexityClasses[this.complexity] || 'badge-secondary';
|
||||
}
|
||||
|
||||
getPerformanceBadgeClass() {
|
||||
const performanceClasses = {
|
||||
fast: 'badge-success',
|
||||
moderate: 'badge-warning',
|
||||
slow: 'badge-danger',
|
||||
};
|
||||
|
||||
return performanceClasses[this.estimatedPerformance] || 'badge-secondary';
|
||||
}
|
||||
|
||||
getQuerySummary() {
|
||||
const parts = [];
|
||||
|
||||
parts.push(`${this.totalSelectedColumns} columns from ${this.tableLabel}`);
|
||||
|
||||
if (this.hasJoins) {
|
||||
parts.push(`${this.joinedTables.length} joins`);
|
||||
}
|
||||
|
||||
if (this.hasConditions) {
|
||||
parts.push(`${this.conditionsCount} conditions`);
|
||||
}
|
||||
|
||||
if (this.hasGrouping) {
|
||||
parts.push('grouped');
|
||||
}
|
||||
|
||||
if (this.hasSorting) {
|
||||
parts.push('sorted');
|
||||
}
|
||||
|
||||
if (this.hasLimit) {
|
||||
parts.push(`limited to ${this.query_config.limit} rows`);
|
||||
}
|
||||
|
||||
return parts.join(', ');
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ export default class RoleModel extends Model {
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAt() {
|
||||
return format(this.updated_at, 'PPP p');
|
||||
return format(this.updated_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAtShort() {
|
||||
@@ -50,7 +50,7 @@ export default class RoleModel extends Model {
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAt() {
|
||||
return format(this.created_at, 'PPP p');
|
||||
return format(this.created_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAtShort() {
|
||||
|
||||
@@ -23,6 +23,7 @@ export default class UserModel extends Model {
|
||||
@attr('string') timezone;
|
||||
@attr('string') country;
|
||||
@attr('string') ip_address;
|
||||
@attr('string') aws_customer_id;
|
||||
@attr('string') slug;
|
||||
@attr('string') role_name;
|
||||
@attr('string') type;
|
||||
@@ -185,7 +186,7 @@ export default class UserModel extends Model {
|
||||
if (!isValid(this.updated_at)) {
|
||||
return '-';
|
||||
}
|
||||
return format(this.updated_at, 'PPP p');
|
||||
return format(this.updated_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('updated_at') get updatedAtShort() {
|
||||
@@ -206,7 +207,7 @@ export default class UserModel extends Model {
|
||||
if (!isValid(this.created_at)) {
|
||||
return '-';
|
||||
}
|
||||
return format(this.created_at, 'PPP p');
|
||||
return format(this.created_at, 'yyyy-MM-dd HH:mm');
|
||||
}
|
||||
|
||||
@computed('created_at') get createdAtShort() {
|
||||
|
||||
@@ -3,6 +3,17 @@ import { inject as service } from '@ember/service';
|
||||
|
||||
export default class OnboardIndexRoute extends Route {
|
||||
@service store;
|
||||
@service('onboarding-orchestrator') orchestrator;
|
||||
|
||||
queryParams = {
|
||||
step: { refreshModel: false },
|
||||
session: { refreshModel: false },
|
||||
code: { refreshModel: false },
|
||||
};
|
||||
|
||||
beforeModel() {
|
||||
this.orchestrator.start();
|
||||
}
|
||||
|
||||
model() {
|
||||
return this.store.findRecord('brand', 1);
|
||||
|
||||
13
console/app/serializers/activity.js
Normal file
13
console/app/serializers/activity.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import ApplicationSerializer from '@fleetbase/ember-core/serializers/application';
|
||||
import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';
|
||||
|
||||
export default class CategorySerializer extends ApplicationSerializer.extend(EmbeddedRecordsMixin) {
|
||||
/**
|
||||
* Embedded relationship attributes
|
||||
*
|
||||
* @var {Object}
|
||||
*/
|
||||
get attrs() {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
4
console/app/serializers/alert.js
Normal file
4
console/app/serializers/alert.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import ApplicationSerializer from '@fleetbase/ember-core/serializers/application';
|
||||
import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';
|
||||
|
||||
export default class AlertSerializer extends ApplicationSerializer.extend(EmbeddedRecordsMixin) {}
|
||||
4
console/app/serializers/report.js
Normal file
4
console/app/serializers/report.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import ApplicationSerializer from '@fleetbase/ember-core/serializers/application';
|
||||
import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';
|
||||
|
||||
export default class ReportSerializer extends ApplicationSerializer.extend(EmbeddedRecordsMixin) {}
|
||||
39
console/app/services/onboarding-context.js
Normal file
39
console/app/services/onboarding-context.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import Service, { inject as service } from '@ember/service';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
|
||||
export default class OnboardingContextService extends Service {
|
||||
@service appCache;
|
||||
@tracked data = {};
|
||||
|
||||
get(key) {
|
||||
return this.data[key] ?? this.appCache.get(`onboarding:context:${key}`);
|
||||
}
|
||||
|
||||
getFromCache(key) {
|
||||
return this.appCache.get(`onboarding:context:${key}`);
|
||||
}
|
||||
|
||||
set(key, value, options = {}) {
|
||||
this.data = { ...this.data, [key]: value };
|
||||
if (options?.persist === true) {
|
||||
this.appCache.set(`onboarding:context:${key}`, value);
|
||||
}
|
||||
}
|
||||
|
||||
persist(key, value) {
|
||||
this.set(key, value, { persist: true });
|
||||
}
|
||||
|
||||
del(key) {
|
||||
const { [key]: _drop, ...rest } = this.data; // eslint-disable-line no-unused-vars
|
||||
this.data = rest;
|
||||
this.appCache.set(`onboarding:context:${key}`, undefined);
|
||||
}
|
||||
|
||||
reset() {
|
||||
for (let key in this.data) {
|
||||
this.appCache.set(`onboarding:context:${key}`, undefined);
|
||||
}
|
||||
this.data = {};
|
||||
}
|
||||
}
|
||||
71
console/app/services/onboarding-orchestrator.js
Normal file
71
console/app/services/onboarding-orchestrator.js
Normal file
@@ -0,0 +1,71 @@
|
||||
import Service from '@ember/service';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
|
||||
export default class OnboardingOrchestratorService extends Service {
|
||||
@service onboardingRegistry;
|
||||
@service onboardingContext;
|
||||
|
||||
@tracked flow = null;
|
||||
@tracked current = null;
|
||||
@tracked history = [];
|
||||
@tracked sessionId = null;
|
||||
|
||||
start(flowId = null, opts = {}) {
|
||||
const flow = this.onboardingRegistry.getFlow(flowId ?? this.onboardingRegistry.defaultFlow);
|
||||
if (!flow) throw new Error(`Onboarding flow '${flowId}' not found`);
|
||||
this.flow = flow;
|
||||
this.sessionId = opts.sessionId || null;
|
||||
this.history = [];
|
||||
this.goto(flow.entry);
|
||||
}
|
||||
|
||||
async goto(stepId) {
|
||||
if (!this.flow) throw new Error('No active onboarding flow');
|
||||
const step = this.flow.steps.find((s) => s.id === stepId);
|
||||
if (!step) throw new Error(`Step '${stepId}' not found`);
|
||||
|
||||
if (typeof step.guard === 'function' && !step.guard(this.onboardingContext)) {
|
||||
return this.next();
|
||||
}
|
||||
|
||||
if (typeof step.beforeEnter === 'function') {
|
||||
await step.beforeEnter(this.onboardingContext);
|
||||
}
|
||||
|
||||
this.current = step;
|
||||
}
|
||||
|
||||
async next() {
|
||||
if (!this.flow || !this.current) return;
|
||||
|
||||
const leaving = this.current;
|
||||
if (typeof leaving.afterLeave === 'function') {
|
||||
await leaving.afterLeave(this.onboardingContext);
|
||||
}
|
||||
|
||||
if (!this.history.includes(leaving)) this.history.push(leaving);
|
||||
|
||||
let nextId;
|
||||
if (typeof leaving.next === 'function') {
|
||||
nextId = leaving.next(this.onboardingContext);
|
||||
} else {
|
||||
nextId = leaving.next;
|
||||
}
|
||||
|
||||
if (!nextId) {
|
||||
this.current = null; // finished
|
||||
return;
|
||||
}
|
||||
|
||||
return this.goto(nextId);
|
||||
}
|
||||
|
||||
async back() {
|
||||
if (!this.flow || this.history.length === 0) return;
|
||||
const prev = this.history[this.history.length - 1];
|
||||
if (prev && prev.allowBack === false) return;
|
||||
this.history = this.history.slice(0, -1);
|
||||
await this.goto(prev.id);
|
||||
}
|
||||
}
|
||||
31
console/app/services/onboarding-registry.js
Normal file
31
console/app/services/onboarding-registry.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import Service from '@ember/service';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
|
||||
export default class OnboardingRegistryService extends Service {
|
||||
flows = new Map();
|
||||
@tracked defaultFlow = 'default@v1';
|
||||
|
||||
useFlow(flowId) {
|
||||
this.defaultFlow = flowId;
|
||||
}
|
||||
|
||||
registerFlow(flow) {
|
||||
if (!flow || !flow.id || !flow.entry || !Array.isArray(flow.steps)) {
|
||||
throw new Error('Invalid FlowDef: id, entry, steps are required');
|
||||
}
|
||||
const ids = new Set(flow.steps.map((s) => s.id));
|
||||
if (!ids.has(flow.entry)) {
|
||||
throw new Error(`Flow '${flow.id}' entry '${flow.entry}' not found in steps`);
|
||||
}
|
||||
for (const s of flow.steps) {
|
||||
if (typeof s.next === 'string' && s.next && !ids.has(s.next)) {
|
||||
throw new Error(`Flow '${flow.id}' step '${s.id}' has unknown next '${s.next}'`);
|
||||
}
|
||||
}
|
||||
this.flows.set(flow.id, flow);
|
||||
}
|
||||
|
||||
getFlow(id) {
|
||||
return this.flows.get(id);
|
||||
}
|
||||
}
|
||||
114
console/app/services/user-verification.js
Normal file
114
console/app/services/user-verification.js
Normal file
@@ -0,0 +1,114 @@
|
||||
import Service, { inject as service } from '@ember/service';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
import { action } from '@ember/object';
|
||||
import { later } from '@ember/runloop';
|
||||
import { task } from 'ember-concurrency';
|
||||
|
||||
export default class UserVerificationService extends Service {
|
||||
@service fetch;
|
||||
@service notifications;
|
||||
@service modalsManager;
|
||||
@service currentUser;
|
||||
@service router;
|
||||
@service session;
|
||||
@service intl;
|
||||
@tracked token;
|
||||
@tracked code;
|
||||
@tracked ready;
|
||||
@tracked waiting = false;
|
||||
|
||||
@action start(options = {}) {
|
||||
this.#wait(options?.timeout ?? 75000);
|
||||
}
|
||||
|
||||
@action didntReceiveCode() {
|
||||
this.waiting = true;
|
||||
}
|
||||
|
||||
@action validateInput(event) {
|
||||
const value = event instanceof HTMLElement ? event.value : (event?.target?.value ?? '');
|
||||
this.ready = value?.length > 5;
|
||||
}
|
||||
|
||||
@action resendBySms() {
|
||||
this.modalsManager.show('modals/verify-by-sms', {
|
||||
title: 'Verify Account by Phone',
|
||||
acceptButtonText: 'Send',
|
||||
phone: this.currentUser.phone,
|
||||
confirm: async (modal) => {
|
||||
modal.startLoading();
|
||||
const phone = modal.getOption('phone');
|
||||
if (!phone) {
|
||||
this.notifications.error('No phone number provided.');
|
||||
}
|
||||
|
||||
try {
|
||||
await this.fetch.post('onboard/send-verification-sms', { phone, session: this.hello });
|
||||
this.notifications.success('Verification code SMS sent!');
|
||||
modal.done();
|
||||
} catch (error) {
|
||||
this.notifications.serverError(error);
|
||||
modal.stopLoading();
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@action resendEmail() {
|
||||
this.modalsManager.show('modals/resend-verification-email', {
|
||||
title: 'Resend Verification Code',
|
||||
acceptButtonText: 'Send',
|
||||
email: this.currentUser.email,
|
||||
confirm: async (modal) => {
|
||||
modal.startLoading();
|
||||
const email = modal.getOption('email');
|
||||
if (!email) {
|
||||
this.notifications.error('No email number provided.');
|
||||
}
|
||||
|
||||
try {
|
||||
await this.fetch.post('onboard/send-verification-email', { email, session: this.hello });
|
||||
this.notifications.success('Verification code email sent!');
|
||||
modal.done();
|
||||
} catch (error) {
|
||||
this.notifications.serverError(error);
|
||||
modal.stopLoading();
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@task *verifyCode() {
|
||||
try {
|
||||
const { status, token } = yield this.fetch.post('auth/verify-email', { token: this.token, code: this.code, email: this.email, authenticate: true });
|
||||
if (status === 'ok') {
|
||||
this.notifications.success('Email successfully verified!');
|
||||
|
||||
if (token) {
|
||||
this.notifications.info(`Welcome to ${this.intl.t('app.name')}`);
|
||||
this.session.manuallyAuthenticate(token);
|
||||
|
||||
return this.router.transitionTo('console');
|
||||
}
|
||||
|
||||
return this.router.transitionTo('auth.login');
|
||||
}
|
||||
} catch (error) {
|
||||
this.notifications.serverError(error);
|
||||
}
|
||||
}
|
||||
|
||||
setToken(token) {
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
setCode(code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
#wait(timeout = 75000) {
|
||||
return later(this, () => {
|
||||
this.waiting = true;
|
||||
}, timeout);
|
||||
}
|
||||
}
|
||||
@@ -67,11 +67,3 @@ body.console-admin-organizations-index-index .next-table-wrapper > table {
|
||||
body[data-theme='dark'] #boot-loader > .loader-container > .loading-message {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/** hotfix: ember-power-select-trigger broken padding after upgrade - @todo move to ember-ui */
|
||||
body.fleetbase-console .ember-power-select-trigger {
|
||||
padding-top: 0.5rem;
|
||||
padding-right: 2.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
padding-left: 0.75rem;
|
||||
}
|
||||
@@ -1,7 +1,16 @@
|
||||
{{page-title (t "app.name")}}
|
||||
<Layout::Container>
|
||||
<Layout::Header @brand={{@model}} @menuItems={{this.menuItems}} @organizationMenuItems={{this.organizationMenuItems}} @userMenuItems={{this.userMenuItems}} @onAction={{this.onAction}} @showSidebarToggle={{true}} @sidebarToggleEnabled={{this.sidebarToggleEnabled}} @onSidebarToggle={{this.onSidebarToggle}} />
|
||||
<Layout::Main>
|
||||
<Layout::Header
|
||||
@brand={{@model}}
|
||||
@menuItems={{this.menuItems}}
|
||||
@organizationMenuItems={{this.organizationMenuItems}}
|
||||
@userMenuItems={{this.userMenuItems}}
|
||||
@onAction={{this.onAction}}
|
||||
@showSidebarToggle={{true}}
|
||||
@sidebarToggleEnabled={{true}}
|
||||
@onSidebarToggle={{this.onSidebarToggle}}
|
||||
/>
|
||||
<Layout::Main class={{this.currentRouteClass}}>
|
||||
<Layout::Sidebar @onSetup={{this.setSidebarContext}}>
|
||||
<div class="next-sidebar-content-inner">
|
||||
<div role="menu" id="sidebar-menu-items">
|
||||
@@ -11,13 +20,21 @@
|
||||
<Layout::Section>
|
||||
{{outlet}}
|
||||
</Layout::Section>
|
||||
<ResourceContextPanel />
|
||||
</Layout::Main>
|
||||
<Layout::MobileNavbar @brand={{@model}} @user={{this.user}} @organizations={{this.organizations}} @menuItems={{this.menuItems}} @extensions={{this.extensions}} @onAction={{this.onAction}} />
|
||||
<Layout::MobileNavbar
|
||||
@brand={{@model}}
|
||||
@user={{this.user}}
|
||||
@organizations={{this.organizations}}
|
||||
@menuItems={{this.menuItems}}
|
||||
@extensions={{this.extensions}}
|
||||
@onAction={{this.onAction}}
|
||||
/>
|
||||
</Layout::Container>
|
||||
<ChatContainer />
|
||||
<ConsoleWormhole />
|
||||
<ImpersonatorTray />
|
||||
{{!-- template-lint-disable no-potential-path-strings --}}
|
||||
{{! template-lint-disable no-potential-path-strings }}
|
||||
<RegistryYield @registry="@fleetbase/console" as |RegistryComponent|>
|
||||
<RegistryComponent @controller={{this}} />
|
||||
</RegistryYield>
|
||||
</RegistryYield>
|
||||
@@ -4,7 +4,7 @@
|
||||
<Layout::Section::Body class="overflow-y-scroll h-full">
|
||||
<div class="container mx-auto h-screen">
|
||||
<div class="max-w-3xl my-10 mx-auto space-y-6">
|
||||
<ContentPanel @title="Change Password" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title="Change Password" @open={{true}} @wrapperClass="bordered-classic">
|
||||
<form id="change-password-form" aria-label="change-password" {{on "submit" (perform this.changePassword)}}>
|
||||
<legend class="mb-3">Change Password</legend>
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-4">
|
||||
@@ -16,7 +16,7 @@
|
||||
</ContentPanel>
|
||||
|
||||
{{#if this.isSystemTwoFaEnabled}}
|
||||
<ContentPanel @title="2FA Settings" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title="2FA Settings" @open={{true}} @wrapperClass="bordered-classic">
|
||||
<div class="mb-3">
|
||||
{{#if this.loadUserTwoFaSettings.isIdle}}
|
||||
<TwoFaSettings @twoFaMethods={{this.methods}} @twoFaSettings={{this.twoFaSettings}} @onTwoFaToggled={{this.onTwoFaToggled}} @onTwoFaMethodSelected={{this.onTwoFaMethodSelected}} />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<Layout::Section::Body class="overflow-y-scroll h-full">
|
||||
<div class="container mx-auto h-screen">
|
||||
<div class="max-w-3xl my-10 mx-auto">
|
||||
<ContentPanel @title={{t "common.your-profile"}} @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title={{t "common.your-profile"}} @open={{true}} @wrapperClass="bordered-classic">
|
||||
<form class="flex flex-col md:flex-row" {{on "submit" (perform this.saveProfile)}}>
|
||||
<div class="w-32 flex flex-col justify-center mb-6 mr-6">
|
||||
<Image src={{this.user.avatar_url}} @fallbackSrc={{config "defaultValues.userImage"}} alt={{this.user.name}} class="w-32 h-32 rounded-md" />
|
||||
@@ -38,7 +38,7 @@
|
||||
</InputGroup>
|
||||
</div>
|
||||
<div class="mt-3 flex items-center justify-end">
|
||||
<Button @buttonType="submit" @type="primary" @size="lg" @icon="save" @text={{t "common.save-button-text"}} @onClick={{perform this.saveProfile}} @isLoading={{not this.saveProfile.isIdle}} />
|
||||
<Button @buttonType="submit" @type="primary" @size="lg" @icon="save" @text={{t "common.save-changes"}} @onClick={{perform this.saveProfile}} @isLoading={{not this.saveProfile.isIdle}} />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="flex flex-row justify-end">
|
||||
<Button @type="primary" @icon="plus" @text="Create Organization" @onClick={{this.createOrganization}} />
|
||||
</div>
|
||||
<ContentPanel @title="Your Organizations" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title="Your Organizations" @open={{true}} @wrapperClass="bordered-classic">
|
||||
<div class="space-y-2">
|
||||
{{#each @model as |organization|}}
|
||||
<div class="grid grid-cols-3 border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900 rounded-lg px-3 py-2 items-center">
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{{page-title "Admin"}}
|
||||
|
||||
<EmberWormhole @to="sidebar-menu-items">
|
||||
<Layout::Sidebar::Item @route="console.admin.index" @icon="rectangle-list">{{t "common.overview"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.organizations" @icon="building">{{t "common.organizations"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.branding" @icon="palette">{{t "common.branding"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.two-fa-settings" @icon="shield-halved">{{t "common.2fa-config"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.index" @icon="rectangle-list">{{t "console.admin.menu.overview"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.organizations" @icon="building">{{t "console.admin.menu.organizations"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.branding" @icon="palette">{{t "console.admin.menu.branding"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.two-fa-settings" @icon="shield-halved">{{t "console.admin.menu.2fa-config"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.schedule-monitor" @icon="calendar-check">{{t "console.admin.schedule-monitor.schedule-monitor"}}</Layout::Sidebar::Item>
|
||||
{{#each this.universe.adminMenuItems as |menuItem|}}
|
||||
<Layout::Sidebar::Item
|
||||
@@ -25,12 +25,12 @@
|
||||
</Layout::Sidebar::Panel>
|
||||
{{/each}}
|
||||
<Layout::Sidebar::Panel @open={{true}} @title="System Config">
|
||||
<Layout::Sidebar::Item @route="console.admin.config.services" @icon="bell-concierge">{{t "common.services"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.config.mail" @icon="envelope">{{t "common.mail"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.config.filesystem" @icon="hard-drive">{{t "common.filesystem"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.config.queue" @icon="layer-group">{{t "common.queue"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.config.socket" @icon="plug">{{t "common.socket"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.config.notification-channels" @icon="tower-broadcast">{{t "common.push-notifications"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.config.services" @icon="bell-concierge">{{t "console.admin.menu.services"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.config.mail" @icon="envelope">{{t "console.admin.menu.mail"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.config.filesystem" @icon="hard-drive">{{t "console.admin.menu.filesystem"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.config.queue" @icon="layer-group">{{t "console.admin.menu.queue"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.config.socket" @icon="plug">{{t "console.admin.menu.socket"}}</Layout::Sidebar::Item>
|
||||
<Layout::Sidebar::Item @route="console.admin.config.notification-channels" @icon="tower-broadcast">{{t "console.admin.menu.push-notifications"}}</Layout::Sidebar::Item>
|
||||
</Layout::Sidebar::Panel>
|
||||
</EmberWormhole>
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{{page-title (t "console.admin.branding.title")}}
|
||||
<Layout::Section::Header @title={{t "console.admin.branding.title"}}>
|
||||
<Button @type="primary" @size="sm" @icon="save" @text={{t "common.save-button-text"}} @onClick={{this.save}} @disabled={{this.isLoading}} @isLoading={{this.isLoading}} />
|
||||
<Button @type="primary" @size="sm" @icon="save" @text={{t "common.save-changes"}} @onClick={{this.save}} @disabled={{this.isLoading}} @isLoading={{this.isLoading}} />
|
||||
</Layout::Section::Header>
|
||||
|
||||
<Layout::Section::Body class="overflow-y-scroll h-full">
|
||||
<div class="container mx-auto h-screen">
|
||||
<div class="max-w-3xl my-10 mx-auto space-y-6">
|
||||
<ContentPanel @title={{t "console.admin.branding.title"}} @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title={{t "console.admin.branding.title"}} @open={{true}} @wrapperClass="bordered-classic">
|
||||
<form class="flex flex-col" {{on "submit" this.save}}>
|
||||
<div class="input-group">
|
||||
<label>{{t "console.admin.branding.icon-text"}}</label>
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
{{page-title (concat (t "console.admin.schedule-monitor.schedule-monitor") " - " @model.name)}}
|
||||
<Overlay @isOpen={{true}} @onLoad={{this.setOverlayContext}} @position="right" @noBackdrop={{true}} @fullHeight={{true}} @width="600px" @isResizable={{true}}>
|
||||
<Overlay::Header @title={{concat (t "console.admin.schedule-monitor.task-logs-for") @model.name}} @titleClass="max-w-400px truncate" @hideStatusDot={{true}} @titleWrapperClass="leading-5">
|
||||
<div class="flex flex-1 justify-end">
|
||||
<Button @type="default" @icon="times" @helpText={{t "common.close-and-save"}} @onClick={{this.onPressClose}} />
|
||||
</div>
|
||||
<:actions>
|
||||
<div class="flex flex-1 justify-end">
|
||||
<Button @type="default" @icon="times" @helpText={{t "common.close"}} @onClick={{this.onPressClose}} />
|
||||
</div>
|
||||
</:actions>
|
||||
</Overlay::Header>
|
||||
|
||||
<Overlay::Body>
|
||||
<div class="p-4">
|
||||
<div class="px-3 py-2">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<div class="text-sm">{{t "console.admin.schedule-monitor.showing-last-count" count=20}}</div>
|
||||
<Button @size="xs" @icon="arrows-rotate" @onClick={{perform this.reload @model}} @isLoading={{not this.reload.isIdle}} />
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{{page-title "2FA Config"}}
|
||||
<Layout::Section::Header @title="2FA Config">
|
||||
<Button @type="primary" @size="sm" @icon="save" @text="Save Changes" @onClick={{this.saveSettings}} @disabled={{this.isLoading}} @isLoading={{this.isLoading}} />
|
||||
<Button @type="primary" @size="sm" @icon="save" @text={{t "common.save-changes"}} @onClick={{this.saveSettings}} @disabled={{this.isLoading}} @isLoading={{this.isLoading}} />
|
||||
</Layout::Section::Header>
|
||||
|
||||
<Layout::Section::Body class="overflow-y-scroll h-full">
|
||||
<div class="container mx-auto h-screen">
|
||||
<div class="max-w-3xl my-10 mx-auto space-y-4">
|
||||
<ContentPanel @title="2FA Config" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title="2FA Config" @open={{true}} @wrapperClass="bordered-classic">
|
||||
{{#if this.loadSystemTwoFaConfig.isIdle}}
|
||||
<TwoFaSettings
|
||||
@showEnforceOption={{true}}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{page-title "Dashboard"}}
|
||||
<Layout::Section::Body class="overflow-y-scroll h-full">
|
||||
<TwoFaEnforcementAlert />
|
||||
<Dashboard @sidebar={{this.sidebarContext}} class="flex items-center justify-between mb-4 mt-6 px-14" />
|
||||
<Dashboard @extension="core" @createWrapperClass="px-10" class="flex items-center justify-between mb-4 mt-6 px-14" />
|
||||
<Spacer @height="300px" />
|
||||
</Layout::Section::Body>
|
||||
<div id="console-home-wormhole" />
|
||||
@@ -3,7 +3,7 @@
|
||||
<Layout::Section::Body class="overflow-y-scroll h-full">
|
||||
<div class="container mx-auto h-screen">
|
||||
<div class="max-w-3xl my-10 mx-auto space-y-6">
|
||||
<ContentPanel @title={{t "console.settings.index.title"}} @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title={{t "console.settings.index.title"}} @open={{true}} @wrapperClass="bordered-classic">
|
||||
<form {{on "submit" (perform this.saveSettings)}}>
|
||||
<InputGroup @name={{t "console.settings.index.organization-name"}} @value={{@model.name}} />
|
||||
<InputGroup @name={{t "console.settings.index.organization-description"}} @value={{@model.description}} />
|
||||
@@ -18,12 +18,12 @@
|
||||
</InputGroup>
|
||||
<InputGroup @name={{t "console.settings.index.organization-id"}} @value={{@model.public_id}} @disabled={{true}} />
|
||||
<div class="mt-3 flex items-center justify-end">
|
||||
<Button @buttonType="submit" @type="primary" @size="lg" @icon="save" @text="{{t "common.save-button-text"}}" @isLoading={{this.saveSettings.isRunning}} />
|
||||
<Button @buttonType="submit" @type="primary" @size="lg" @icon="save" @text="{{t "common.save-changes"}}" @isLoading={{this.saveSettings.isRunning}} />
|
||||
</div>
|
||||
</form>
|
||||
</ContentPanel>
|
||||
|
||||
<ContentPanel @title={{t "console.settings.index.organization-branding"}} @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title={{t "console.settings.index.organization-branding"}} @open={{true}} @wrapperClass="bordered-classic">
|
||||
<InputGroup @name={{t "console.settings.index.logo"}} @helpText={{t "console.settings.index.logo-help-text"}}>
|
||||
<div class="flex flex-row items-center">
|
||||
<Image src={{@model.logo_url}} @fallbackSrc={{config "defaultValues.placeholderImage"}} alt={{concat @model.name " logo"}} class="h-20 w-64 border dark:border-gray-900 rounded-md mr-4" />
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{{page-title "Notifications"}}
|
||||
<Layout::Section::Header @title={{t "common.notifications"}}>
|
||||
<Button @type="primary" @size="sm" @icon="save" @text={{t "common.save-button-text"}} @onClick={{perform this.saveSettings}} @disabled={{this.saveSettings.isRunning}} @isLoading={{or this.saveSettings.isRunning this.getSettings.isRunning}} />
|
||||
<Button @type="primary" @size="sm" @icon="save" @text={{t "common.save-changes"}} @onClick={{perform this.saveSettings}} @disabled={{this.saveSettings.isRunning}} @isLoading={{or this.saveSettings.isRunning this.getSettings.isRunning}} />
|
||||
</Layout::Section::Header>
|
||||
|
||||
<Layout::Section::Body class="overflow-y-scroll h-full">
|
||||
<div class="container mx-auto h-screen">
|
||||
<div class="max-w-3xl my-10 mx-auto space-y-4">
|
||||
{{#each-in this.groupedNotifications as |groupName notifications|}}
|
||||
<ContentPanel @title={{concat (smart-humanize groupName) " " (t "console.admin.notifications.notification-settings") }} @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title={{concat (smart-humanize groupName) " " (t "console.admin.notifications.notification-settings") }} @open={{true}} @wrapperClass="bordered-classic">
|
||||
{{#each notifications as |notification|}}
|
||||
<InputGroup @name={{titleize notification.name}} @helpText={{notification.description}}>
|
||||
<div class="fleetbase-model-select fleetbase-power-select ember-model-select">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<Layout::Section::Body class="overflow-y-scroll h-full">
|
||||
<div class="container mx-auto h-screen">
|
||||
<div class="max-w-3xl my-10 mx-auto space-y-6">
|
||||
<ContentPanel @title="2FA Settings" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
||||
<ContentPanel @title="2FA Settings" @open={{true}} @wrapperClass="bordered-classic">
|
||||
<div class="mb-3">
|
||||
{{#if this.loadCompanyTwoFaSettings.isIdle}}
|
||||
<TwoFaSettings
|
||||
|
||||
@@ -1,38 +1 @@
|
||||
<div class="bg-white dark:bg-gray-800 py-5 px-4 shadow rounded-lg w-full">
|
||||
<div class="mb-4">
|
||||
<Image src={{@model.logo_url}} @fallbackSrc="/images/fleetbase-logo-svg.svg" alt={{t "app.name"}} height="56" class="h-10 object-contain mx-auto" />
|
||||
<div class="mt-2">
|
||||
<h2 class="text-center text-lg font-extrabold text-gray-900 dark:text-white truncate">
|
||||
{{t "onboard.index.title"}}
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex px-3 py-2 mb-4 rounded-md shadow-sm bg-blue-200">
|
||||
<div>
|
||||
<FaIcon @icon="hand-spock" @size="lg" class="text-blue-900 mr-4" />
|
||||
</div>
|
||||
<p class="flex-1 text-sm text-blue-900 dark:text-blue-900">
|
||||
{{t "onboard.index.welcome-title" htmlSafe=true companyName=(t "app.name")}}
|
||||
{{t "onboard.index.welcome-text"}}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form {{on "submit" this.startOnboard}}>
|
||||
{{#if this.error}}
|
||||
<InfoBlock @icon="exclamation-triangle" @text={{this.error}} class="mb-6 px-3 py-2 bg-red-300 text-red-900" @textClass="text-red-900" />
|
||||
{{/if}}
|
||||
<InputGroup @name={{t "onboard.index.full-name"}} @value={{this.name}} @helpText={{t "onboard.index.full-name-help-text"}} @inputClass="input-lg" />
|
||||
<InputGroup @name={{t "onboard.index.your-email"}} @type="email" @value={{this.email}} @helpText={{t "onboard.index.your-email-help-text"}} @inputClass="input-lg" />
|
||||
<InputGroup @name={{t "onboard.index.phone"}} @helpText={{t "onboard.index.phone-help-text"}}>
|
||||
<PhoneInput @onInput={{fn (mut this.phone)}} class="form-input input-lg w-full" />
|
||||
</InputGroup>
|
||||
<InputGroup @name={{t "onboard.index.organization-name"}} @value={{this.organization_name}} @helpText={{t "onboard.index.organization-help-text"}} @inputClass="input-lg" />
|
||||
<InputGroup @name={{t "onboard.index.password"}} @value={{this.password}} @type="password" @helpText={{t "onboard.index.password-help-text"}} @inputClass="input-lg" />
|
||||
<InputGroup @name={{t "onboard.index.confirm-password"}} @value={{this.password_confirmation}} @type="password" @helpText={{t "onboard.index.confirm-password-help-text"}} @inputClass="input-lg" />
|
||||
|
||||
<div class="flex items-center justify-end mt-5">
|
||||
<Button @icon="check" @iconPrefix="fas" @type="primary" @size="lg" @text={{t "onboard.index.continue-button-text"}} @isLoading={{this.isLoading}} @disabled={{this.readyToSubmit}} @onClick={{this.startOnboard}} />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<Onboarding::Yield @step={{this.step}} @session={{this.session}} @code={{this.code}} @brand={{@model}} />
|
||||
46
console/app/transforms/array.js
Normal file
46
console/app/transforms/array.js
Normal file
@@ -0,0 +1,46 @@
|
||||
import Transform from '@ember-data/serializer/transform';
|
||||
import { isArray } from '@ember/array';
|
||||
|
||||
export default class ArrayTransform extends Transform {
|
||||
deserialize(serialized) {
|
||||
if (serialized === null || serialized === undefined) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (isArray(serialized)) {
|
||||
return serialized;
|
||||
}
|
||||
|
||||
if (typeof serialized !== 'string') {
|
||||
return Array.from(serialized);
|
||||
}
|
||||
|
||||
try {
|
||||
return JSON.parse(serialized);
|
||||
} catch (e) {
|
||||
// Fallback: return empty array if parsing fails
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
serialize(deserialized) {
|
||||
if (deserialized === null || deserialized === undefined) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (isArray(deserialized)) {
|
||||
return deserialized;
|
||||
}
|
||||
|
||||
if (typeof deserialized !== 'string') {
|
||||
return Array.from(deserialized);
|
||||
}
|
||||
|
||||
// Fallback: attempt to parse if it’s a string
|
||||
try {
|
||||
return JSON.parse(deserialized);
|
||||
} catch (e) {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
36
console/app/transforms/object.js
Normal file
36
console/app/transforms/object.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import Transform from '@ember-data/serializer/transform';
|
||||
import isObject from '@fleetbase/ember-core/utils/is-object';
|
||||
|
||||
export default class ObjectTransform extends Transform {
|
||||
deserialize(serialized) {
|
||||
if (!serialized) {
|
||||
return {};
|
||||
}
|
||||
|
||||
if (isObject(serialized)) {
|
||||
return serialized;
|
||||
}
|
||||
|
||||
try {
|
||||
return JSON.parse(serialized);
|
||||
} catch {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
serialize(deserialized) {
|
||||
if (!deserialized) {
|
||||
return {};
|
||||
}
|
||||
|
||||
if (isObject(deserialized)) {
|
||||
return deserialized;
|
||||
}
|
||||
|
||||
try {
|
||||
return JSON.parse(deserialized);
|
||||
} catch {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
}
|
||||
160
console/app/utils/router-refresh-patch.js
Normal file
160
console/app/utils/router-refresh-patch.js
Normal file
@@ -0,0 +1,160 @@
|
||||
import { debug } from '@ember/debug';
|
||||
/**
|
||||
* Fleetbase Router Refresh Bug Fix Utility
|
||||
*
|
||||
* This utility patches the Ember.js router refresh bug that causes
|
||||
* "missing params" errors when transitioning to nested routes with
|
||||
* dynamic segments while query parameters with refreshModel: true
|
||||
* are present.
|
||||
*
|
||||
* Bug: https://github.com/emberjs/ember.js/issues/19260
|
||||
*
|
||||
* @author Fleetbase Pte Ltd <hello@fleetbase.io>
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Applies the router refresh bug fix patch
|
||||
* @param {Application} application - The Ember application instance
|
||||
*/
|
||||
export function patchRouterRefresh(application) {
|
||||
if (!application || typeof application.lookup !== 'function') {
|
||||
debug('[Fleetbase Router Patch] Invalid application instance provided');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const router = application.lookup('router:main');
|
||||
|
||||
if (!router || !router._routerMicrolib) {
|
||||
debug('[Fleetbase Router Patch] Router not found or invalid');
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if already patched
|
||||
if (router._routerMicrolib._fleetbaseRefreshPatched) {
|
||||
debug('[Fleetbase Router Patch] Already applied, skipping');
|
||||
return;
|
||||
}
|
||||
|
||||
const originalRefresh = router._routerMicrolib.refresh.bind(router._routerMicrolib);
|
||||
|
||||
router._routerMicrolib.refresh = function (pivotRoute) {
|
||||
const previousTransition = this.activeTransition;
|
||||
const state = previousTransition ? previousTransition[this.constructor.STATE_SYMBOL] : this.state;
|
||||
const routeInfos = state.routeInfos;
|
||||
|
||||
if (pivotRoute === undefined) {
|
||||
pivotRoute = routeInfos[0].route;
|
||||
}
|
||||
|
||||
const name = routeInfos[routeInfos.length - 1].name;
|
||||
const currentRouteInfo = routeInfos[routeInfos.length - 1];
|
||||
|
||||
// Extract current dynamic segment parameters
|
||||
const contexts = [];
|
||||
if (currentRouteInfo && currentRouteInfo.params) {
|
||||
const handlers = this.recognizer.handlersFor(name);
|
||||
const targetHandler = handlers[handlers.length - 1];
|
||||
|
||||
if (targetHandler && targetHandler.names && targetHandler.names.length > 0) {
|
||||
targetHandler.names.forEach((paramName) => {
|
||||
if (currentRouteInfo.params[paramName] !== undefined) {
|
||||
contexts.push(currentRouteInfo.params[paramName]);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const NamedTransitionIntent = this.constructor.NamedTransitionIntent;
|
||||
const intent = new NamedTransitionIntent(
|
||||
this,
|
||||
name,
|
||||
pivotRoute,
|
||||
contexts, // Preserve dynamic segments instead of empty array
|
||||
this._changedQueryParams || state.queryParams
|
||||
);
|
||||
|
||||
const newTransition = this.transitionByIntent(intent, false);
|
||||
|
||||
if (previousTransition && previousTransition.urlMethod === 'replace') {
|
||||
newTransition.method(previousTransition.urlMethod);
|
||||
}
|
||||
|
||||
return newTransition;
|
||||
};
|
||||
|
||||
// Mark as patched
|
||||
router._routerMicrolib._fleetbaseRefreshPatched = true;
|
||||
|
||||
debug('[Fleetbase Router Patch] Successfully applied router refresh bug fix');
|
||||
} catch (error) {
|
||||
debug('[Fleetbase Router Patch] Failed to apply patch: ' + error.message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Alternative error suppression approach for cases where patching fails
|
||||
* @param {Application} application - The Ember application instance
|
||||
*/
|
||||
export function suppressRouterRefreshErrors(application) {
|
||||
if (!application) {
|
||||
debug('[Fleetbase Router Patch] Invalid application instance for error suppression');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
// Global error handler for unhandled promise rejections
|
||||
window.addEventListener('unhandledrejection', (event) => {
|
||||
const error = event.reason;
|
||||
if (error?.message?.includes("You didn't provide enough string/numeric parameters to satisfy all of the dynamic segments")) {
|
||||
debug('[Fleetbase Router Patch] Suppressed known Ember route refresh bug:', error.message);
|
||||
event.preventDefault(); // Prevent the error from being logged
|
||||
}
|
||||
});
|
||||
|
||||
// Ember.js error handler
|
||||
if (window.Ember) {
|
||||
const originalEmberError = window.Ember.onerror;
|
||||
|
||||
window.Ember.onerror = function (error) {
|
||||
if (error?.message?.includes("You didn't provide enough string/numeric parameters to satisfy all of the dynamic segments")) {
|
||||
debug('[Fleetbase Router Patch] Suppressed known Ember route refresh bug:', error.message);
|
||||
return; // Suppress the error
|
||||
}
|
||||
|
||||
// Let other errors through
|
||||
if (originalEmberError) {
|
||||
return originalEmberError(error);
|
||||
}
|
||||
throw error;
|
||||
};
|
||||
}
|
||||
|
||||
debug('[Fleetbase Router Patch] Error suppression handlers installed');
|
||||
} catch (error) {
|
||||
debug('[Fleetbase Router Patch] Failed to install error suppression: ' + error.message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Main function to apply the complete router fix
|
||||
* @param {Application} application - The Ember application instance
|
||||
* @param {Object} options - Configuration options
|
||||
* @param {boolean} options.suppressErrors - Whether to also install error suppression (default: true)
|
||||
*/
|
||||
export default function applyRouterFix(application, options = {}) {
|
||||
const { suppressErrors = true } = options;
|
||||
|
||||
debug('[Fleetbase Router Patch] Applying Ember router refresh bug fix...');
|
||||
|
||||
// Apply the main patch
|
||||
patchRouterRefresh(application);
|
||||
|
||||
// Optionally install error suppression as fallback
|
||||
if (suppressErrors) {
|
||||
suppressRouterRefreshErrors(application);
|
||||
}
|
||||
|
||||
debug('[Fleetbase Router Patch] Router fix application complete');
|
||||
}
|
||||
@@ -23,7 +23,7 @@ module.exports = function (environment) {
|
||||
APP: {
|
||||
autoboot: false,
|
||||
extensions: asArray(getenv('EXTENSIONS')),
|
||||
disableRuntimeConfig: toBoolean(getenv('DISABLE_RUNTIME_CONFIG'))
|
||||
disableRuntimeConfig: toBoolean(getenv('DISABLE_RUNTIME_CONFIG')),
|
||||
},
|
||||
|
||||
API: {
|
||||
@@ -49,7 +49,8 @@ module.exports = function (environment) {
|
||||
|
||||
defaultValues: {
|
||||
categoryImage: getenv('DEFAULT_CATEGORY_IMAGE', 'https://flb-assets.s3.ap-southeast-1.amazonaws.com/images/fallback-placeholder-1.png'),
|
||||
placeholderImage: getenv('DEFAULT_PLACEHOLDER_IMAGE', 'https://flb-assets.s3.ap-southeast-1.amazonaws.com/images/fallback-placeholder-2.png'),
|
||||
placeholderImage: getenv('DEFAULT_PLACEHOLDER_IMAGE', 'https://flb-assets.s3.ap-southeast-1.amazonaws.com/static/image-file-icon.png'),
|
||||
placeholderImageOld: getenv('DEFAULT_PLACEHOLDER_IMAGE_OLD', 'https://flb-assets.s3.ap-southeast-1.amazonaws.com/images/fallback-placeholder-2.png'),
|
||||
driverImage: getenv('DEFAULT_DRIVER_IMAGE', 'https://s3.ap-southeast-1.amazonaws.com/flb-assets/static/no-avatar.png'),
|
||||
userImage: getenv('DEFAULT_USER_IMAGE', 'https://s3.ap-southeast-1.amazonaws.com/flb-assets/static/no-avatar.png'),
|
||||
contactImage: getenv('DEFAULT_CONTACT_IMAGE', 'https://s3.ap-southeast-1.amazonaws.com/flb-assets/static/no-avatar.png'),
|
||||
|
||||
@@ -53,7 +53,7 @@ module.exports = function (defaults) {
|
||||
},
|
||||
filter: {
|
||||
enabled: true,
|
||||
plugins: [postcssAtRulesVariables, postcssMixins, postcssEach, postcssConditionals, tailwind('./tailwind.js')],
|
||||
plugins: [postcssAtRulesVariables, postcssMixins, postcssEach, postcssConditionals, tailwind('./tailwind.config.js')],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@fleetbase/console",
|
||||
"version": "0.7.5",
|
||||
"version": "0.7.18",
|
||||
"private": true,
|
||||
"description": "Modular logistics and supply chain operating system (LSOS)",
|
||||
"repository": "https://github.com/fleetbase/fleetbase",
|
||||
@@ -29,15 +29,22 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@ember/legacy-built-in-components": "^0.4.2",
|
||||
"@fleetbase/dev-engine": "^0.2.9",
|
||||
"@fleetbase/billing-engine": "link:../packages/billing",
|
||||
"@fleetbase/dev-engine": "^0.2.10",
|
||||
"@fleetbase/ember-core": "latest",
|
||||
"@fleetbase/ember-ui": "latest",
|
||||
"@fleetbase/ember-ui": "^0.3.9",
|
||||
"@fleetbase/fleetops-data": "latest",
|
||||
"@fleetbase/fleetops-engine": "^0.6.14",
|
||||
"@fleetbase/iam-engine": "^0.1.3",
|
||||
"@fleetbase/fleetops-engine": "link:../packages/fleetops",
|
||||
"@fleetbase/fliit-engine": "link:../packages/fliit",
|
||||
"@fleetbase/iam-engine": "^0.1.4",
|
||||
"@fleetbase/internals-engine": "link:../packages/internals",
|
||||
"@fleetbase/leaflet-routing-machine": "^3.2.17",
|
||||
"@fleetbase/registry-bridge-engine": "^0.0.19",
|
||||
"@fleetbase/storefront-engine": "^0.4.0",
|
||||
"@fleetbase/registry-bridge-engine": "^0.1.0",
|
||||
"@fleetbase/storefront-engine": "link:../packages/storefront",
|
||||
"@formatjs/intl-datetimeformat": "^6.18.2",
|
||||
"@formatjs/intl-numberformat": "^8.15.6",
|
||||
"@formatjs/intl-pluralrules": "^5.4.6",
|
||||
"@formatjs/intl-relativetimeformat": "^11.4.13",
|
||||
"@fortawesome/ember-fontawesome": "^2.0.0",
|
||||
"ember-changeset": "4.1.2",
|
||||
"ember-changeset-validations": "4.1.2",
|
||||
@@ -46,6 +53,7 @@
|
||||
"ember-concurrency-decorators": "^2.0.3",
|
||||
"ember-intl": "6.3.2",
|
||||
"ember-math-helpers": "^2.18.2",
|
||||
"ember-maybe-in-element": "^2.1.0",
|
||||
"ember-prism": "^0.13.0",
|
||||
"ember-radio-button": "3.0.0-beta.1",
|
||||
"ember-tag-input": "^3.1.0",
|
||||
|
||||
4758
console/pnpm-lock.yaml
generated
4758
console/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,7 @@ Router.map(function () {
|
||||
this.route('virtual', { path: '/:slug' });
|
||||
this.route('install');
|
||||
this.route('onboard', function () {
|
||||
this.route('verify-email');
|
||||
this.route('index', { path: '/' });
|
||||
});
|
||||
this.route('auth', function () {
|
||||
this.route('login', { path: '/' });
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
darkMode: ['class', '[data-theme="dark"]'],
|
||||
content: [
|
||||
'./app/**/*.{hbs,js}',
|
||||
'./node_modules/@fleetbase/ember-ui/addon/**/*.{hbs,js}',
|
||||
'./node_modules/@fleetbase/ember-ui/addon/templates/*.{hbs,js}',
|
||||
'./node_modules/@fleetbase/ember-ui/addon/templates/**/*.{hbs,js}',
|
||||
'./node_modules/@fleetbase/ember-ui/addon/components/*.{hbs,js}',
|
||||
'./node_modules/@fleetbase/ember-ui/addon/components/**/*.{hbs,js}',
|
||||
'./node_modules/@fleetbase/ember-core/addon/**/*.{hbs,js}',
|
||||
'./node_modules/@fleetbase/fleetops-engine/addon/**/*.{hbs,js}',
|
||||
'./node_modules/@fleetbase/storefront-engine/addon/**/*.{hbs,js}',
|
||||
'./node_modules/@fleetbase/*-engine/addon/**/*.{hbs,js}',
|
||||
'./node_modules/**/*-engine/addon/**/*.{hbs,js}',
|
||||
'../packages/*-engine/addon/**/*.{hbs,js}',
|
||||
content: {
|
||||
relative: true,
|
||||
files: [
|
||||
'./app/**/*.{hbs,js}',
|
||||
'./node_modules/.pnpm/@fleetbase+*/**/addon/**/*.{hbs,js}',
|
||||
'./node_modules/@fleetbase+*/addon/**/*.{hbs,js}',
|
||||
'./node_modules/@fleetbase/ember-ui/addon/templates/**/*.{hbs,js}',
|
||||
'./node_modules/@fleetbase/ember-ui/addon/components/**/*.{hbs,js}',
|
||||
'./node_modules/**/*-engine/addon/**/*.{hbs,js}',
|
||||
],
|
||||
},
|
||||
safelist: [
|
||||
{
|
||||
pattern: /(py|px|mx|my|gap)-[1-9][0-9]?/,
|
||||
},
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
@@ -94,7 +96,22 @@ module.exports = {
|
||||
86: '30rem',
|
||||
},
|
||||
spacing: {
|
||||
70: '18rem',
|
||||
6: '1.5rem',
|
||||
8: '2rem',
|
||||
10: '2.5rem',
|
||||
12: '3rem',
|
||||
16: '4rem',
|
||||
20: '5rem',
|
||||
24: '6rem',
|
||||
32: '8rem',
|
||||
40: '10rem',
|
||||
44: '11rem',
|
||||
48: '12rem',
|
||||
52: '13rem',
|
||||
56: '14rem',
|
||||
60: '15rem',
|
||||
64: '16rem',
|
||||
72: '18rem',
|
||||
74: '22rem',
|
||||
78: '26rem',
|
||||
82: '28rem',
|
||||
|
||||
26
console/tests/integration/components/onboarding/form-test.js
Normal file
26
console/tests/integration/components/onboarding/form-test.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupRenderingTest } from '@fleetbase/console/tests/helpers';
|
||||
import { render } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | onboarding/form', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.set('myAction', function(val) { ... });
|
||||
|
||||
await render(hbs`<Onboarding::Form />`);
|
||||
|
||||
assert.dom().hasText('');
|
||||
|
||||
// Template block usage:
|
||||
await render(hbs`
|
||||
<Onboarding::Form>
|
||||
template block text
|
||||
</Onboarding::Form>
|
||||
`);
|
||||
|
||||
assert.dom().hasText('template block text');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupRenderingTest } from '@fleetbase/console/tests/helpers';
|
||||
import { render } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | onboarding/verify-email', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.set('myAction', function(val) { ... });
|
||||
|
||||
await render(hbs`<Onboarding::VerifyEmail />`);
|
||||
|
||||
assert.dom().hasText('');
|
||||
|
||||
// Template block usage:
|
||||
await render(hbs`
|
||||
<Onboarding::VerifyEmail>
|
||||
template block text
|
||||
</Onboarding::VerifyEmail>
|
||||
`);
|
||||
|
||||
assert.dom().hasText('template block text');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupRenderingTest } from '@fleetbase/console/tests/helpers';
|
||||
import { render } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | onboarding/yield', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.set('myAction', function(val) { ... });
|
||||
|
||||
await render(hbs`<Onboarding::Yield />`);
|
||||
|
||||
assert.dom().hasText('');
|
||||
|
||||
// Template block usage:
|
||||
await render(hbs`
|
||||
<Onboarding::Yield>
|
||||
template block text
|
||||
</Onboarding::Yield>
|
||||
`);
|
||||
|
||||
assert.dom().hasText('template block text');
|
||||
});
|
||||
});
|
||||
37
console/tests/unit/initializers/load-intl-polyfills-test.js
Normal file
37
console/tests/unit/initializers/load-intl-polyfills-test.js
Normal file
@@ -0,0 +1,37 @@
|
||||
import Application from '@ember/application';
|
||||
|
||||
import config from '@fleetbase/console/config/environment';
|
||||
import { initialize } from '@fleetbase/console/initializers/load-intl-polyfills';
|
||||
import { module, test } from 'qunit';
|
||||
import Resolver from 'ember-resolver';
|
||||
import { run } from '@ember/runloop';
|
||||
|
||||
module('Unit | Initializer | load-intl-polyfills', function (hooks) {
|
||||
hooks.beforeEach(function () {
|
||||
this.TestApplication = class TestApplication extends Application {
|
||||
modulePrefix = config.modulePrefix;
|
||||
podModulePrefix = config.podModulePrefix;
|
||||
Resolver = Resolver;
|
||||
};
|
||||
|
||||
this.TestApplication.initializer({
|
||||
name: 'initializer under test',
|
||||
initialize,
|
||||
});
|
||||
|
||||
this.application = this.TestApplication.create({
|
||||
autoboot: false,
|
||||
});
|
||||
});
|
||||
|
||||
hooks.afterEach(function () {
|
||||
run(this.application, 'destroy');
|
||||
});
|
||||
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it works', async function (assert) {
|
||||
await this.application.boot();
|
||||
|
||||
assert.ok(true);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,39 @@
|
||||
import Application from '@ember/application';
|
||||
|
||||
import config from '@fleetbase/console/config/environment';
|
||||
import { initialize } from '@fleetbase/console/instance-initializers/register-default-onboarding-flow';
|
||||
import { module, test } from 'qunit';
|
||||
import Resolver from 'ember-resolver';
|
||||
import { run } from '@ember/runloop';
|
||||
|
||||
module('Unit | Instance Initializer | register-default-onboarding-flow', function (hooks) {
|
||||
hooks.beforeEach(function () {
|
||||
this.TestApplication = class TestApplication extends Application {
|
||||
modulePrefix = config.modulePrefix;
|
||||
podModulePrefix = config.podModulePrefix;
|
||||
Resolver = Resolver;
|
||||
};
|
||||
|
||||
this.TestApplication.instanceInitializer({
|
||||
name: 'initializer under test',
|
||||
initialize,
|
||||
});
|
||||
|
||||
this.application = this.TestApplication.create({
|
||||
autoboot: false,
|
||||
});
|
||||
|
||||
this.instance = this.application.buildInstance();
|
||||
});
|
||||
hooks.afterEach(function () {
|
||||
run(this.instance, 'destroy');
|
||||
run(this.application, 'destroy');
|
||||
});
|
||||
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it works', async function (assert) {
|
||||
await this.instance.boot();
|
||||
|
||||
assert.ok(true);
|
||||
});
|
||||
});
|
||||
14
console/tests/unit/models/activity-test.js
Normal file
14
console/tests/unit/models/activity-test.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
import { setupTest } from '@fleetbase/console/tests/helpers';
|
||||
|
||||
module('Unit | Model | activity', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let store = this.owner.lookup('service:store');
|
||||
let model = store.createRecord('activity', {});
|
||||
assert.ok(model);
|
||||
});
|
||||
});
|
||||
14
console/tests/unit/models/alert-test.js
Normal file
14
console/tests/unit/models/alert-test.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
import { setupTest } from '@fleetbase/console/tests/helpers';
|
||||
|
||||
module('Unit | Model | alert', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let store = this.owner.lookup('service:store');
|
||||
let model = store.createRecord('alert', {});
|
||||
assert.ok(model);
|
||||
});
|
||||
});
|
||||
14
console/tests/unit/models/report-test.js
Normal file
14
console/tests/unit/models/report-test.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
import { setupTest } from '@fleetbase/console/tests/helpers';
|
||||
|
||||
module('Unit | Model | report', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let store = this.owner.lookup('service:store');
|
||||
let model = store.createRecord('report', {});
|
||||
assert.ok(model);
|
||||
});
|
||||
});
|
||||
24
console/tests/unit/serializers/activity-test.js
Normal file
24
console/tests/unit/serializers/activity-test.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
import { setupTest } from '@fleetbase/console/tests/helpers';
|
||||
|
||||
module('Unit | Serializer | activity', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let store = this.owner.lookup('service:store');
|
||||
let serializer = store.serializerFor('activity');
|
||||
|
||||
assert.ok(serializer);
|
||||
});
|
||||
|
||||
test('it serializes records', function (assert) {
|
||||
let store = this.owner.lookup('service:store');
|
||||
let record = store.createRecord('activity', {});
|
||||
|
||||
let serializedRecord = record.serialize();
|
||||
|
||||
assert.ok(serializedRecord);
|
||||
});
|
||||
});
|
||||
24
console/tests/unit/serializers/alert-test.js
Normal file
24
console/tests/unit/serializers/alert-test.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
import { setupTest } from '@fleetbase/console/tests/helpers';
|
||||
|
||||
module('Unit | Serializer | alert', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let store = this.owner.lookup('service:store');
|
||||
let serializer = store.serializerFor('alert');
|
||||
|
||||
assert.ok(serializer);
|
||||
});
|
||||
|
||||
test('it serializes records', function (assert) {
|
||||
let store = this.owner.lookup('service:store');
|
||||
let record = store.createRecord('alert', {});
|
||||
|
||||
let serializedRecord = record.serialize();
|
||||
|
||||
assert.ok(serializedRecord);
|
||||
});
|
||||
});
|
||||
24
console/tests/unit/serializers/report-test.js
Normal file
24
console/tests/unit/serializers/report-test.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
import { setupTest } from '@fleetbase/console/tests/helpers';
|
||||
|
||||
module('Unit | Serializer | report', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let store = this.owner.lookup('service:store');
|
||||
let serializer = store.serializerFor('report');
|
||||
|
||||
assert.ok(serializer);
|
||||
});
|
||||
|
||||
test('it serializes records', function (assert) {
|
||||
let store = this.owner.lookup('service:store');
|
||||
let record = store.createRecord('report', {});
|
||||
|
||||
let serializedRecord = record.serialize();
|
||||
|
||||
assert.ok(serializedRecord);
|
||||
});
|
||||
});
|
||||
12
console/tests/unit/services/onboarding-context-test.js
Normal file
12
console/tests/unit/services/onboarding-context-test.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from '@fleetbase/console/tests/helpers';
|
||||
|
||||
module('Unit | Service | onboarding-context', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let service = this.owner.lookup('service:onboarding-context');
|
||||
assert.ok(service);
|
||||
});
|
||||
});
|
||||
12
console/tests/unit/services/onboarding-orchestrator-test.js
Normal file
12
console/tests/unit/services/onboarding-orchestrator-test.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from '@fleetbase/console/tests/helpers';
|
||||
|
||||
module('Unit | Service | onboarding-orchestrator', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let service = this.owner.lookup('service:onboarding-orchestrator');
|
||||
assert.ok(service);
|
||||
});
|
||||
});
|
||||
12
console/tests/unit/services/onboarding-registry-test.js
Normal file
12
console/tests/unit/services/onboarding-registry-test.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from '@fleetbase/console/tests/helpers';
|
||||
|
||||
module('Unit | Service | onboarding-registry', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let service = this.owner.lookup('service:onboarding-registry');
|
||||
assert.ok(service);
|
||||
});
|
||||
});
|
||||
12
console/tests/unit/services/user-verification-test.js
Normal file
12
console/tests/unit/services/user-verification-test.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from '@fleetbase/console/tests/helpers';
|
||||
|
||||
module('Unit | Service | user-verification', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let service = this.owner.lookup('service:user-verification');
|
||||
assert.ok(service);
|
||||
});
|
||||
});
|
||||
13
console/tests/unit/transforms/array-test.js
Normal file
13
console/tests/unit/transforms/array-test.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
import { setupTest } from '@fleetbase/console/tests/helpers';
|
||||
|
||||
module('Unit | Transform | array', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let transform = this.owner.lookup('transform:array');
|
||||
assert.ok(transform);
|
||||
});
|
||||
});
|
||||
13
console/tests/unit/transforms/object-test.js
Normal file
13
console/tests/unit/transforms/object-test.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
import { setupTest } from '@fleetbase/console/tests/helpers';
|
||||
|
||||
module('Unit | Transform | object', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let transform = this.owner.lookup('transform:object');
|
||||
assert.ok(transform);
|
||||
});
|
||||
});
|
||||
10
console/tests/unit/utils/router-refresh-patch-test.js
Normal file
10
console/tests/unit/utils/router-refresh-patch-test.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import routerRefreshPatch from '@fleetbase/console/utils/router-refresh-patch';
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
module('Unit | Utility | router-refresh-patch', function () {
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it works', function (assert) {
|
||||
let result = routerRefreshPatch();
|
||||
assert.ok(result);
|
||||
});
|
||||
});
|
||||
754
console/translations/ar-ae.yaml
Normal file
754
console/translations/ar-ae.yaml
Normal file
@@ -0,0 +1,754 @@
|
||||
app:
|
||||
name: Fleetbase
|
||||
common:
|
||||
new: جديد
|
||||
create: إنشاء
|
||||
add: إضافة
|
||||
edit: تعديل
|
||||
update: تحديث
|
||||
save: حفظ
|
||||
save-changes: حفظ التغييرات
|
||||
delete: حذف
|
||||
delete-selected: حذف المحدد
|
||||
delete-selected-count: حذف {count} المحدد
|
||||
remove: إزالة
|
||||
cancel: إلغاء
|
||||
confirm: تأكيد
|
||||
close: إغلاق
|
||||
open: فتح
|
||||
view: عرض
|
||||
preview: معاينة
|
||||
upload: رفع
|
||||
download: تنزيل
|
||||
import: استيراد
|
||||
export: تصدير
|
||||
print: طباعة
|
||||
duplicate: تكرار
|
||||
copy: نسخ
|
||||
paste: لصق
|
||||
share: مشاركة
|
||||
refresh: تحديث
|
||||
reset: إعادة تعيين
|
||||
retry: إعادة المحاولة
|
||||
back: عودة
|
||||
next: التالي
|
||||
previous: السابق
|
||||
submit: إرسال
|
||||
apply: تطبيق
|
||||
continue: متابعة
|
||||
proceed: المتابعة
|
||||
select: تحديد
|
||||
deselect: إلغاء التحديد
|
||||
search: بحث
|
||||
filter: تصفية
|
||||
sort: فرز
|
||||
view-all: عرض الكل
|
||||
clear: مسح
|
||||
done: تم
|
||||
finish: إنهاء
|
||||
skip: تخطي
|
||||
method: طريقة
|
||||
bulk-delete: حذف جماعي
|
||||
bulk-delete-resource: حذف جماعي {resource}
|
||||
bulk-cancel: إلغاء جماعي
|
||||
bulk-cancel-resource: إلغاء جماعي {resource}
|
||||
bulk-actions: إجراءات جماعية
|
||||
column: عمود
|
||||
row: صف
|
||||
table: جدول
|
||||
list: قائمة
|
||||
grid: شبكة
|
||||
form: نموذج
|
||||
field: حقل
|
||||
section: قسم
|
||||
panel: لوحة
|
||||
card: بطاقة
|
||||
tab: تبويب
|
||||
modal: نافذة منبثقة
|
||||
dialog: حوار
|
||||
menu: قائمة
|
||||
dropdown: قائمة منسدلة
|
||||
tooltip: تلميح
|
||||
sidebar: الشريط الجانبي
|
||||
toolbar: شريط الأدوات
|
||||
footer: تذييل
|
||||
header: رأس الصفحة
|
||||
title: عنوان
|
||||
subtitle: عنوان فرعي
|
||||
description: وصف
|
||||
placeholder: عنصر نائب
|
||||
label: تسمية
|
||||
button: زر
|
||||
icon: أيقونة
|
||||
avatar: صورة رمزية
|
||||
link: رابط
|
||||
badge: شارة
|
||||
tag: وسم
|
||||
banner: لافتة
|
||||
step: خطوة
|
||||
progress: تقدم
|
||||
map: خريطة
|
||||
board: لوحة
|
||||
loading: جارٍ التحميل
|
||||
loading-resource: جارٍ تحميل {resource}
|
||||
saving: جارٍ الحفظ
|
||||
processing: جارٍ المعالجة
|
||||
fetching: جارٍ الجلب
|
||||
updating: جارٍ التحديث
|
||||
uploading: جارٍ الرفع
|
||||
completed: مكتمل
|
||||
success: نجاح
|
||||
failed: فشل
|
||||
error: خطأ
|
||||
warning: تحذير
|
||||
info: معلومات
|
||||
ready: جاهز
|
||||
active: نشط
|
||||
inactive: غير نشط
|
||||
enabled: مفعل
|
||||
disabled: معطل
|
||||
online: متصل
|
||||
offline: غير متصل
|
||||
pending: قيد الانتظار
|
||||
archived: مؤرشف
|
||||
hidden: مخفي
|
||||
visible: مرئي
|
||||
empty: فارغ
|
||||
not-found: غير موجود
|
||||
no-results: لا توجد نتائج
|
||||
try-again: حاول مرة أخرى
|
||||
are-you-sure: هل أنت متأكد؟
|
||||
changes-saved: تم حفظ التغييرات بنجاح.
|
||||
saved-successfully: تم حفظ التغييرات بنجاح.
|
||||
field-saved: '{field} تم حفظه بنجاح.'
|
||||
changes-discarded: تم تجاهل التغييرات.
|
||||
delete-confirm: هل أنت متأكد أنك تريد حذف هذا العنصر؟
|
||||
action-successful: تم تنفيذ الإجراء بنجاح.
|
||||
action-failed: فشل الإجراء. يرجى المحاولة مرة أخرى.
|
||||
something-went-wrong: حدث خطأ ما.
|
||||
please-wait: يرجى الانتظار...
|
||||
sign-in: تسجيل الدخول
|
||||
sign-out: تسجيل الخروج
|
||||
sign-up: إنشاء حساب
|
||||
log-in: تسجيل الدخول
|
||||
log-out: تسجيل الخروج
|
||||
register: تسجيل
|
||||
forgot-password: نسيت كلمة المرور
|
||||
reset-password: إعادة تعيين كلمة المرور
|
||||
change-password: تغيير كلمة المرور
|
||||
password: كلمة المرور
|
||||
confirm-password: تأكيد كلمة المرور
|
||||
email: البريد الإلكتروني
|
||||
username: اسم المستخدم
|
||||
remember-me: تذكرني
|
||||
welcome: مرحباً
|
||||
welcome-back: مرحباً بعودتك
|
||||
profile: الملف الشخصي
|
||||
account: الحساب
|
||||
settings: الإعدادات
|
||||
preferences: التفضيلات
|
||||
record: سجل
|
||||
records: سجلات
|
||||
item: عنصر
|
||||
items: عناصر
|
||||
entry: إدخال
|
||||
entries: إدخالات
|
||||
id: المعرف
|
||||
name: الاسم
|
||||
type: النوع
|
||||
category: الفئة
|
||||
overview: نظرة عامة
|
||||
value: القيمة
|
||||
amount: المبلغ
|
||||
price: السعر
|
||||
quantity: الكمية
|
||||
status: الحالة
|
||||
date: التاريخ
|
||||
date-created: تاريخ الإنشاء
|
||||
date-updated: تاريخ التحديث
|
||||
time: الوقت
|
||||
created-at: تم الإنشاء في
|
||||
updated-at: تم التحديث في
|
||||
expired-at: انتهت صلاحيتها في
|
||||
last-seen-at: آخر ظهور في
|
||||
last-modified: آخر تعديل
|
||||
last-modified-data: 'آخر تعديل: {date}'
|
||||
actions: الإجراءات
|
||||
details: تفاصيل
|
||||
notes: ملاحظات
|
||||
reference: مرجع
|
||||
filter-by: تصفية حسب
|
||||
sort-by: ترتيب حسب
|
||||
ascending: تصاعدي
|
||||
descending: تنازلي
|
||||
all: الكل
|
||||
none: لا شيء
|
||||
select-all: تحديد الكل
|
||||
deselect-all: إلغاء تحديد الكل
|
||||
show-more: عرض المزيد
|
||||
show-less: عرض أقل
|
||||
page: صفحة
|
||||
of: من
|
||||
total: الإجمالي
|
||||
items-per-page: العناصر في كل صفحة
|
||||
showing: عرض
|
||||
to: إلى
|
||||
results: النتائج
|
||||
load-more: تحميل المزيد
|
||||
no-more-results: لا مزيد من النتائج
|
||||
today: اليوم
|
||||
yesterday: أمس
|
||||
tomorrow: غدًا
|
||||
day: يوم
|
||||
week: أسبوع
|
||||
month: شهر
|
||||
year: سنة
|
||||
date-range: نطاق التاريخ
|
||||
start-date: تاريخ البدء
|
||||
end-date: تاريخ الانتهاء
|
||||
time-zone: المنطقة الزمنية
|
||||
system: النظام
|
||||
dashboard: لوحة التحكم
|
||||
home: الرئيسية
|
||||
analytics: التحليلات
|
||||
reports: التقارير
|
||||
logs: السجلات
|
||||
help: مساعدة
|
||||
support: الدعم
|
||||
contact: اتصال
|
||||
documentation: التوثيق
|
||||
language: اللغة
|
||||
version: الإصدار
|
||||
theme: الثيم
|
||||
light-mode: الوضع الفاتح
|
||||
dark-mode: الوضع الداكن
|
||||
update-available: تحديث متوفر
|
||||
install-update: تثبيت التحديث
|
||||
maintenance-mode: وضع الصيانة
|
||||
notification: إشعار
|
||||
notifications: الإشعارات
|
||||
mark-as-read: وضع كمقروء
|
||||
mark-all-as-read: وضع الكل كمقروء
|
||||
clear-notifications: مسح الإشعارات
|
||||
company: شركة
|
||||
companies: شركات
|
||||
user: مستخدم
|
||||
users: مستخدمون
|
||||
role: دور
|
||||
roles: أدوار
|
||||
permission: إذن
|
||||
permissions: أذونات
|
||||
group: مجموعة
|
||||
groups: مجموعات
|
||||
unauthorized: غير مصرح
|
||||
forbidden: ممنوع
|
||||
resource-not-found: المورد غير موجود
|
||||
server-error: خطأ في الخادم
|
||||
validation-error: خطأ في التحقق
|
||||
timeout-error: انتهت مهلة الطلب
|
||||
network-error: خطأ في الشبكة
|
||||
unknown-error: خطأ غير معروف
|
||||
file: ملف
|
||||
files: ملفات
|
||||
folder: مجلد
|
||||
folders: مجلدات
|
||||
upload-file: رفع ملف
|
||||
upload-files: رفع ملفات
|
||||
upload-image: رفع صورة
|
||||
upload-image-supported: يدعم PNG و JPEG و GIF
|
||||
choose-file: اختر ملف
|
||||
choose-files: اختر ملفات
|
||||
drag-and-drop: اسحب وأفلت
|
||||
download-file: تحميل ملف
|
||||
file-size: حجم الملف
|
||||
file-type: نوع الملف
|
||||
confirm-delete: تأكيد الحذف
|
||||
confirm-action: تأكيد الإجراء
|
||||
confirm-exit: تأكيد الخروج
|
||||
confirm-and-save-changes: تأكيد وحفظ التغييرات
|
||||
are-you-sure-exit: هل أنت متأكد أنك تريد الخروج؟
|
||||
unsaved-changes-warning: لديك تغييرات غير محفوظة.
|
||||
connected: متصل
|
||||
disconnected: غير متصل
|
||||
reconnecting: إعادة الاتصال
|
||||
connection-lost: انقطع الاتصال
|
||||
connection-restored: تم استعادة الاتصال
|
||||
show: عرض
|
||||
hide: إخفاء
|
||||
expand: توسيع
|
||||
collapse: طي
|
||||
enable: تمكين
|
||||
disable: تعطيل
|
||||
minimize: تصغير
|
||||
maximize: تكبير
|
||||
restore: استعادة
|
||||
zoom-in: تكبير
|
||||
zoom-out: تصغير
|
||||
fullscreen: شاشة كاملة
|
||||
exit-fullscreen: خروج من الشاشة الكاملة
|
||||
true: 'true'
|
||||
false: 'false'
|
||||
ok: موافق
|
||||
none-available: لا يوجد
|
||||
default: افتراضي
|
||||
custom: مخصص
|
||||
general: عام
|
||||
advanced: متقدم
|
||||
placeholder-text: أدخل النص هنا...
|
||||
learn-more: تعرف على المزيد
|
||||
view-resource: عرض {resource}
|
||||
view-resource-details: عرض تفاصيل {resource}
|
||||
create-a-new-resource: إنشاء {resource} جديد
|
||||
create-new-resource: إنشاء {resource} جديد
|
||||
search-resource: بحث في {resource}
|
||||
new-resource: '{resource} جديد'
|
||||
update-resource: تحديث {resource}
|
||||
save-resource-changes: حفظ تغييرات {resource}
|
||||
creating-resource: إنشاء {resource}
|
||||
cancel-resource: إلغاء {resource}
|
||||
delete-resource: حذف {resource}
|
||||
delete-resource-name: 'حذف: {resourceName}'
|
||||
delete-resource-named: حذف {resource} ({resourceName})
|
||||
delete-resource-prompt: لا يمكن التراجع عن هذا الإجراء. بمجرد الحذف، سيتم إزالة
|
||||
السجل نهائيًا.
|
||||
delete-cannot-be-undone: لا يمكن التراجع عن هذا الإجراء. بمجرد الحذف، سيتم إزالة
|
||||
السجل نهائيًا.
|
||||
create-resource: إنشاء {resource}
|
||||
edit-resource: تعديل {resource}
|
||||
edit-resource-details: تعديل تفاصيل {resource}
|
||||
edit-resource-type-name: 'تعديل {resource}: {resourceName}'
|
||||
edit-resource-name: 'تعديل: {resourceName}'
|
||||
config: الإعدادات
|
||||
select-field: اختر {field}
|
||||
columns: الأعمدة
|
||||
metadata: البيانات الوصفية
|
||||
meta: ميتا
|
||||
resource-created-success: تم إنشاء {resource} جديد بنجاح.
|
||||
resource-created-success-name: تم إنشاء {resource} جديد ({resourceName}) بنجاح.
|
||||
resource-updated-success: تم تحديث {resource} ({resourceName}) بنجاح.
|
||||
resource-action-success: تم {action} {resource} ({resourceName}) بنجاح.
|
||||
resource-deleted-success: تم حذف {resource} ({resourceName}) بنجاح.
|
||||
resource-deleted: تم حذف {resource} ({resourceName}).
|
||||
continue-without-saving: المتابعة بدون حفظ؟
|
||||
continue-without-saving-prompt: لديك تغييرات غير محفوظة على هذا {resource}. المتابعة
|
||||
ستتجاهلها. انقر متابعة للمتابعة.
|
||||
resource:
|
||||
alert: تنبيه
|
||||
alerts: تنبيهات
|
||||
brand: علامة تجارية
|
||||
brands: علامات تجارية
|
||||
category: فئة
|
||||
categories: فئات
|
||||
chat-attachment: مرفق المحادثة
|
||||
chat-attachments: مرفقات المحادثة
|
||||
chat-channel: قناة المحادثة
|
||||
chat-channels: قنوات المحادثة
|
||||
chat-log: سجل المحادثة
|
||||
chat-logs: سجلات المحادثة
|
||||
chat-message: رسالة المحادثة
|
||||
chat-messages: رسائل المحادثة
|
||||
chat-participant: مشارك المحادثة
|
||||
chat-participants: مشاركو المحادثة
|
||||
chat-receipt: إيصال المحادثة
|
||||
chat-receipts: إيصالات المحادثة
|
||||
comment: تعليق
|
||||
comments: تعليقات
|
||||
company: شركة
|
||||
companies: شركات
|
||||
custom-field-value: قيمة الحقل المخصص
|
||||
custom-field-values: قيم الحقول المخصصة
|
||||
custom-field: حقل مخصص
|
||||
custom-fields: حقول مخصصة
|
||||
dashboard-widget: أداة لوحة التحكم
|
||||
dashboard-widgets: أدوات لوحة التحكم
|
||||
dashboard: لوحة التحكم
|
||||
dashboards: لوحات التحكم
|
||||
extension: امتداد
|
||||
extensions: امتدادات
|
||||
file: ملف
|
||||
files: ملفات
|
||||
group: مجموعة
|
||||
groups: مجموعات
|
||||
notification: إشعار
|
||||
notifications: إشعارات
|
||||
permission: إذن
|
||||
permissions: أذونات
|
||||
policy: سياسة
|
||||
policies: سياسات
|
||||
report: تقرير
|
||||
reports: تقارير
|
||||
role: دور
|
||||
roles: أدوار
|
||||
setting: إعداد
|
||||
settings: إعدادات
|
||||
transaction: معاملة
|
||||
transactions: معاملات
|
||||
user-device: جهاز المستخدم
|
||||
user-devices: أجهزة المستخدم
|
||||
user: مستخدم
|
||||
users: مستخدمون
|
||||
dropzone:
|
||||
file: ملف
|
||||
drop-to-upload: اسحب للإفلات للتحميل
|
||||
invalid: غير صالح
|
||||
files-ready-for-upload: '{numOfFiles} جاهزة للتحميل.'
|
||||
upload-images-videos: تحميل الصور والفيديوهات
|
||||
upload-documents: تحميل المستندات
|
||||
upload-documents-files: تحميل المستندات والملفات
|
||||
upload-avatar-files: تحميل الصور الرمزية المخصصة
|
||||
dropzone-supported-images-videos: اسحب وأفلت ملفات الصور والفيديوهات على هذه المنطقة
|
||||
dropzone-supported-avatars: اسحب وأفلت ملفات SVG أو PNG
|
||||
dropzone-supported-files: اسحب وأفلت الملفات على هذه المنطقة
|
||||
or-select-button-text: أو اختر ملفات للتحميل.
|
||||
upload-queue: قائمة انتظار التحميل
|
||||
uploading: جارٍ التحميل...
|
||||
two-fa-enforcement-alert:
|
||||
message: لتعزيز أمان حسابك، تطلب مؤسستك تفعيل المصادقة الثنائية (2FA). قم بتمكين
|
||||
2FA في إعدادات حسابك للحصول على طبقة إضافية من الحماية.
|
||||
button-text: إعداد 2FA
|
||||
comment-thread:
|
||||
publish-comment-button-text: نشر التعليق
|
||||
publish-reply-button-text: نشر الرد
|
||||
reply-comment-button-text: رد
|
||||
edit-comment-button-text: تعديل
|
||||
delete-comment-button-text: حذف
|
||||
comment-published-ago: منذ {createdAgo}
|
||||
comment-input-placeholder: أدخل تعليقًا جديدًا...
|
||||
comment-reply-placeholder: أدخل ردك...
|
||||
comment-input-empty-notification: لا يمكنك نشر تعليقات فارغة...
|
||||
comment-min-length-notification: يجب أن يكون التعليق مكونًا من حرفين على الأقل
|
||||
dashboard:
|
||||
select-dashboard: اختر لوحة التحكم
|
||||
create-new-dashboard: إنشاء لوحة تحكم جديدة
|
||||
create-a-new-dashboard: إنشاء لوحة تحكم جديدة
|
||||
confirm-create-dashboard: إنشاء لوحة التحكم!
|
||||
edit-layout: تعديل التخطيط
|
||||
add-widgets: إضافة الأدوات
|
||||
delete-dashboard: حذف لوحة التحكم
|
||||
save-dashboard: حفظ لوحة التحكم
|
||||
you-cannot-delete-this-dashboard: لا يمكنك حذف هذه اللوحة.
|
||||
are-you-sure-you-want-delete-dashboard: هل أنت متأكد من حذف {dashboardName}؟
|
||||
dashboard-widget-panel:
|
||||
widget-name: أداة {widgetName}
|
||||
select-widgets: اختر الأدوات
|
||||
close-and-save: إغلاق وحفظ
|
||||
filters-picker:
|
||||
filters: الفلاتر
|
||||
filter-data: تصفية البيانات
|
||||
visible-column-picker:
|
||||
select-viewable-columns: اختر الأعمدة المرئية
|
||||
customize-columns: تخصيص الأعمدة
|
||||
component:
|
||||
file:
|
||||
dropdown-label: إجراءات الملف
|
||||
import-modal:
|
||||
loading-message: جارٍ معالجة الاستيراد...
|
||||
drop-upload: أسقط للتحميل
|
||||
invalid: غير صالح
|
||||
ready-upload: جاهز للتحميل.
|
||||
upload-spreadsheets: تحميل جداول البيانات
|
||||
drag-drop: اسحب وأفلت ملفات جداول البيانات على هذه المنطقة
|
||||
button-text: أو اختر جداول البيانات للتحميل
|
||||
spreadsheets: جداول البيانات
|
||||
upload-queue: قائمة انتظار التحميل
|
||||
dropzone:
|
||||
file: ملف
|
||||
drop-to-upload: أسقط للتحميل
|
||||
invalid: غير صالح
|
||||
files-ready-for-upload: '{numOfFiles} جاهز للتحميل.'
|
||||
upload-images-videos: تحميل الصور والفيديوهات
|
||||
upload-documents: تحميل المستندات
|
||||
upload-documents-files: تحميل المستندات والملفات
|
||||
upload-avatar-files: تحميل الصور الرمزية المخصصة
|
||||
dropzone-supported-images-videos: اسحب وأفلت ملفات الصور والفيديو على هذه المنطقة
|
||||
dropzone-supported-avatars: اسحب وأفلت ملفات SVG أو PNG
|
||||
dropzone-supported-files: اسحب وأفلت الملفات على هذه المنطقة
|
||||
or-select-button-text: أو اختر الملفات للتحميل.
|
||||
upload-queue: قائمة انتظار التحميل
|
||||
uploading: جارٍ التحميل...
|
||||
two-fa-enforcement-alert:
|
||||
message: لتعزيز أمان حسابك، تتطلب مؤسستك المصادقة الثنائية (2FA). قم بتمكين 2FA
|
||||
في إعدادات حسابك لطبقة إضافية من الحماية.
|
||||
button-text: إعداد 2FA
|
||||
comment-thread:
|
||||
publish-comment-button-text: نشر التعليق
|
||||
publish-reply-button-text: نشر الرد
|
||||
reply-comment-button-text: رد
|
||||
edit-comment-button-text: تعديل
|
||||
delete-comment-button-text: حذف
|
||||
comment-published-ago: منذ {createdAgo}
|
||||
comment-input-placeholder: أدخل تعليقًا جديدًا...
|
||||
comment-reply-placeholder: أدخل ردك...
|
||||
comment-input-empty-notification: لا يمكنك نشر تعليقات فارغة...
|
||||
comment-min-length-notification: يجب أن يكون التعليق على الأقل 2 حرف
|
||||
dashboard:
|
||||
select-dashboard: اختر لوحة التحكم
|
||||
create-new-dashboard: إنشاء لوحة تحكم جديدة
|
||||
create-a-new-dashboard: إنشاء لوحة تحكم جديدة
|
||||
confirm-create-dashboard: إنشاء لوحة التحكم!
|
||||
edit-layout: تعديل التخطيط
|
||||
add-widgets: إضافة الأدوات
|
||||
delete-dashboard: حذف لوحة التحكم
|
||||
save-dashboard: حفظ لوحة التحكم
|
||||
you-cannot-delete-this-dashboard: لا يمكنك حذف هذه اللوحة.
|
||||
are-you-sure-you-want-delete-dashboard: هل أنت متأكد من حذف {dashboardName}؟
|
||||
dashboard-widget-panel:
|
||||
widget-name: أداة {widgetName}
|
||||
select-widgets: اختر الأدوات
|
||||
close-and-save: إغلاق وحفظ
|
||||
services:
|
||||
dashboard-service:
|
||||
create-dashboard-success-notification: تم إنشاء لوحة التحكم الجديدة `{dashboardName}`
|
||||
بنجاح.
|
||||
delete-dashboard-success-notification: تم حذف لوحة التحكم `{dashboardName}`.
|
||||
auth:
|
||||
verification:
|
||||
header-title: التحقق من الحساب
|
||||
title: تحقق من عنوان بريدك الإلكتروني
|
||||
message-text: <strong>اقتربنا من الانتهاء!</strong><br> تحقق من بريدك الإلكتروني
|
||||
للحصول على رمز التحقق.
|
||||
verification-code-text: أدخل رمز التحقق الذي استلمته عبر البريد الإلكتروني.
|
||||
verification-input-label: رمز التحقق
|
||||
verify-button-text: تحقق واستمر
|
||||
didnt-receive-a-code: لم تستلم رمزًا بعد؟
|
||||
not-sent:
|
||||
message: لم تستلم رمزًا بعد؟
|
||||
alternative-choice: استخدم الخيارات البديلة أدناه للتحقق من حسابك.
|
||||
resend-email: إعادة إرسال البريد الإلكتروني
|
||||
send-by-sms: إرسال عبر الرسائل النصية
|
||||
two-fa:
|
||||
verify-code:
|
||||
verification-code: رمز التحقق
|
||||
check-title: تحقق من بريدك الإلكتروني أو هاتفك
|
||||
check-subtitle: لقد أرسلنا لك رمز تحقق. أدخل الرمز أدناه لإكمال عملية تسجيل
|
||||
الدخول.
|
||||
expired-help-text: رمز التحقق الخاص بالمصادقة الثنائية قد انتهت صلاحيته. يمكنك
|
||||
طلب رمز جديد إذا كنت بحاجة إلى مزيد من الوقت.
|
||||
resend-code: إعادة إرسال الرمز
|
||||
verify-code: تحقق من الرمز
|
||||
cancel-two-factor: إلغاء المصادقة الثنائية
|
||||
invalid-session-error-notification: جلسة غير صالحة. يرجى المحاولة مرة أخرى.
|
||||
verification-successful-notification: تم التحقق بنجاح!
|
||||
verification-code-expired-notification: انتهت صلاحية رمز التحقق. يرجى طلب رمز
|
||||
جديد.
|
||||
verification-code-failed-notification: فشل التحقق. يرجى المحاولة مرة أخرى.
|
||||
resend-code:
|
||||
verification-code-resent-notification: تم إرسال رمز تحقق جديد.
|
||||
verification-code-resent-error-notification: حدث خطأ أثناء إعادة إرسال رمز التحقق.
|
||||
يرجى المحاولة مرة أخرى.
|
||||
forgot-password:
|
||||
success-message: تحقق من بريدك الإلكتروني للمتابعة!
|
||||
is-sent:
|
||||
title: اقتربنا من الانتهاء!
|
||||
message: <strong>تحقق من بريدك الإلكتروني!</strong><br> لقد أرسلنا لك رابطًا
|
||||
سحريًا إلى بريدك الإلكتروني يسمح لك بإعادة تعيين كلمة المرور. الرابط ينتهي
|
||||
خلال 15 دقيقة.
|
||||
not-sent:
|
||||
title: هل نسيت كلمة المرور؟
|
||||
message: <strong>لا تقلق، نحن هنا لمساعدتك.</strong><br> أدخل البريد الإلكتروني
|
||||
الذي تستخدمه لتسجيل الدخول إلى {appName} وسنرسل لك رابطًا آمنًا لإعادة تعيين
|
||||
كلمة المرور.
|
||||
form:
|
||||
email-label: عنوان بريدك الإلكتروني
|
||||
submit-button: حسنًا، أرسل لي رابطًا سحريًا!
|
||||
nevermind-button: لا بأس
|
||||
login:
|
||||
title: تسجيل الدخول إلى حسابك
|
||||
no-identity-notification: هل نسيت إدخال بريدك الإلكتروني؟
|
||||
no-password-notification: هل نسيت إدخال كلمة المرور؟
|
||||
unverified-notification: يجب التحقق من حسابك للمتابعة.
|
||||
password-reset-required: مطلوب إعادة تعيين كلمة المرور للمتابعة.
|
||||
failed-attempt:
|
||||
message: <strong>هل نسيت كلمة المرور؟</strong><br> اضغط الزر أدناه لإعادة تعيين
|
||||
كلمة المرور.
|
||||
button-text: حسنًا، ساعدني في إعادة التعيين!
|
||||
form:
|
||||
email-label: عنوان البريد الإلكتروني
|
||||
password-label: كلمة المرور
|
||||
remember-me-label: تذكرني
|
||||
forgot-password-label: هل نسيت كلمة المرور؟
|
||||
sign-in-button: تسجيل الدخول
|
||||
create-account-button: إنشاء حساب جديد
|
||||
slow-connection-message: تواجه مشاكل في الاتصال.
|
||||
reset-password:
|
||||
success-message: تم إعادة تعيين كلمة المرور! قم بتسجيل الدخول للمتابعة.
|
||||
invalid-verification-code: رابط إعادة تعيين كلمة المرور هذا غير صالح أو منتهي
|
||||
الصلاحية.
|
||||
title: إعادة تعيين كلمة المرور
|
||||
form:
|
||||
code:
|
||||
label: رمز إعادة التعيين الخاص بك
|
||||
help-text: رمز التحقق الذي استلمته في بريدك الإلكتروني.
|
||||
password:
|
||||
label: كلمة المرور الجديدة
|
||||
help-text: أدخل كلمة مرور لا تقل عن 6 أحرف للمتابعة.
|
||||
confirm-password:
|
||||
label: تأكيد كلمة المرور الجديدة
|
||||
help-text: أدخل كلمة مرور لا تقل عن 6 أحرف للمتابعة.
|
||||
submit-button: إعادة تعيين كلمة المرور
|
||||
back-button: عودة
|
||||
console:
|
||||
create-or-join-organization:
|
||||
modal-title: إنشاء أو الانضمام إلى منظمة
|
||||
join-success-notification: لقد انضممت إلى منظمة جديدة!
|
||||
create-success-notification: لقد أنشأت منظمة جديدة!
|
||||
switch-organization:
|
||||
modal-title: هل أنت متأكد أنك تريد التبديل إلى المنظمة {organizationName}؟
|
||||
modal-body: بتأكيدك سيظل حسابك مسجلاً للدخول، لكن المنظمة الأساسية الخاصة بك ستتغير.
|
||||
modal-accept-button-text: نعم، أريد التبديل إلى المنظمة
|
||||
success-notification: لقد قمت بتبديل المنظمات
|
||||
account:
|
||||
index:
|
||||
upload-new: تحميل جديد
|
||||
phone: رقم هاتفك.
|
||||
photos: الصور
|
||||
timezone: اختر منطقتك الزمنية.
|
||||
admin:
|
||||
menu:
|
||||
overview: نظرة عامة
|
||||
organizations: المنظمات
|
||||
branding: العلامة التجارية
|
||||
2fa-config: إعداد التحقق بخطوتين
|
||||
schedule-monitor: مراقبة الجدول
|
||||
services: الخدمات
|
||||
mail: البريد
|
||||
filesystem: نظام الملفات
|
||||
queue: الطابور
|
||||
socket: المقبس
|
||||
push-notifications: الإشعارات الفورية
|
||||
schedule-monitor:
|
||||
schedule-monitor: مراقب الجدول
|
||||
task-logs-for: 'سجلات المهام لـ: '
|
||||
showing-last-count: عرض آخر {count} سجلات
|
||||
name: الاسم
|
||||
type: النوع
|
||||
timezone: المنطقة الزمنية
|
||||
last-started: آخر بدء
|
||||
last-finished: آخر انتهاء
|
||||
last-failure: آخر فشل
|
||||
date: التاريخ
|
||||
memory: الذاكرة
|
||||
runtime: مدة التشغيل
|
||||
output: المخرجات
|
||||
no-output: لا توجد مخرجات
|
||||
config:
|
||||
database:
|
||||
title: تكوين قاعدة البيانات
|
||||
filesystem:
|
||||
title: تكوين نظام الملفات
|
||||
mail:
|
||||
title: تكوين البريد
|
||||
notification-channels:
|
||||
title: تكوين الإشعارات الفورية
|
||||
queue:
|
||||
title: تكوين الطابور
|
||||
services:
|
||||
title: تكوين الخدمات
|
||||
socket:
|
||||
title: تكوين المقبس
|
||||
branding:
|
||||
title: العلامة التجارية
|
||||
icon-text: الأيقونة
|
||||
upload-new: تحميل جديد
|
||||
reset-default: إعادة التعيين إلى الافتراضي
|
||||
logo-text: الشعار
|
||||
theme: الثيم الافتراضي
|
||||
index:
|
||||
total-users: إجمالي المستخدمين
|
||||
total-organizations: إجمالي المؤسسات
|
||||
total-transactions: إجمالي المعاملات
|
||||
notifications:
|
||||
title: الإشعارات
|
||||
notification-settings: إعدادات الإشعارات
|
||||
organizations:
|
||||
index:
|
||||
title: المؤسسات
|
||||
owner-name-column: المالك
|
||||
owner-phone-column: هاتف المالك
|
||||
owner-email-column: هاتف المالك
|
||||
users-count-column: المستخدمون
|
||||
phone-column: الهاتف
|
||||
email-column: البريد الإلكتروني
|
||||
users:
|
||||
title: المستخدمون
|
||||
settings:
|
||||
index:
|
||||
title: إعدادات المؤسسة
|
||||
organization-name: اسم المؤسسة
|
||||
organization-description: وصف المؤسسة
|
||||
organization-phone: رقم هاتف المؤسسة
|
||||
organization-currency: عملة المؤسسة
|
||||
organization-id: معرف المؤسسة
|
||||
organization-branding: العلامة التجارية للمنظمة
|
||||
logo: الشعار
|
||||
logo-help-text: شعار لمنظمتك.
|
||||
upload-new-logo: تحميل شعار جديد
|
||||
backdrop: الخلفية
|
||||
backdrop-help-text: لافتة اختيارية أو صورة خلفية لمنظمتك.
|
||||
upload-new-backdrop: تحميل خلفية جديدة
|
||||
organization-timezone: اختر المنطقة الزمنية الافتراضية لمنظمتك.
|
||||
select-timezone: اختر المنطقة الزمنية.
|
||||
extensions:
|
||||
title: الإضافات قادمة قريبًا!
|
||||
message: يرجى العودة في الإصدارات القادمة بينما نستعد لإطلاق مستودع الإضافات والسوق.
|
||||
notifications:
|
||||
select-all: تحديد الكل
|
||||
mark-as-read: وضع علامة كمقروء
|
||||
received: 'تم الاستلام:'
|
||||
message: لا توجد إشعارات للعرض.
|
||||
invite:
|
||||
for-users:
|
||||
invitation-message: لقد تمت دعوتك للانضمام إلى {companyName}
|
||||
invitation-sent-message: لقد تمت دعوتك للانضمام إلى منظمة {companyName} على {appName}.
|
||||
لقبول هذه الدعوة، أدخل رمز الدعوة الذي تلقيته عبر البريد الإلكتروني واضغط متابعة.
|
||||
invitation-code-sent-text: رمز الدعوة الخاص بك
|
||||
accept-invitation-text: قبول الدعوة
|
||||
onboard:
|
||||
index:
|
||||
title: إنشاء حسابك
|
||||
welcome-title: <strong>مرحبًا بك في {companyName}!</strong><br />
|
||||
welcome-text: أكمل التفاصيل المطلوبة أدناه للبدء.
|
||||
full-name: الاسم الكامل
|
||||
full-name-help-text: اسمك الكامل
|
||||
your-email: عنوان البريد الإلكتروني
|
||||
your-email-help-text: عنوان بريدك الإلكتروني
|
||||
phone: رقم الهاتف
|
||||
phone-help-text: رقم هاتفك
|
||||
organization-name: اسم المنظمة
|
||||
organization-help-text: اسم منظمتك، سيتم إدارة جميع خدماتك ومواردك تحت هذه المنظمة،
|
||||
لاحقًا يمكنك إنشاء العديد من المنظمات كما تريد أو تحتاج.
|
||||
password: أدخل كلمة المرور
|
||||
password-help-text: كلمة مرورك، تأكد من أنها قوية.
|
||||
confirm-password: تأكيد كلمة المرور
|
||||
confirm-password-help-text: فقط لتأكيد كلمة المرور التي أدخلتها أعلاه.
|
||||
continue-button-text: متابعة
|
||||
verify-email:
|
||||
header-title: التحقق من الحساب
|
||||
title: تحقق من عنوان بريدك الإلكتروني
|
||||
message-text: <strong>اقتربنا من الانتهاء!</strong><br> تحقق من بريدك الإلكتروني
|
||||
للحصول على رمز التحقق.
|
||||
verification-code-text: أدخل رمز التحقق الذي تلقيته عبر البريد الإلكتروني.
|
||||
verification-input-label: رمز التحقق
|
||||
verify-button-text: تحقق وواصل
|
||||
didnt-receive-a-code: لم تستلم رمزًا بعد؟
|
||||
not-sent:
|
||||
message: لم تستلم رمزًا بعد؟
|
||||
alternative-choice: استخدم الخيارات البديلة أدناه للتحقق من حسابك.
|
||||
resend-email: إعادة إرسال البريد الإلكتروني
|
||||
send-by-sms: الإرسال عبر الرسائل النصية
|
||||
install:
|
||||
installer-header: المثبت
|
||||
failed-message-sent: فشل التثبيت! اضغط الزر أدناه لإعادة محاولة التثبيت.
|
||||
retry-install: إعادة محاولة التثبيت
|
||||
start-install: بدء التثبيت
|
||||
layout:
|
||||
header:
|
||||
menus:
|
||||
organization:
|
||||
settings: إعدادات المنظمة
|
||||
create-or-join: إنشاء أو الانضمام إلى المنظمات
|
||||
explore-extensions: استكشاف الإضافات
|
||||
user:
|
||||
view-profile: عرض الملف الشخصي
|
||||
keyboard-shortcuts: عرض اختصارات لوحة المفاتيح
|
||||
changelog: سجل التغييرات
|
||||
@@ -1,364 +0,0 @@
|
||||
app:
|
||||
name: Fleetbase
|
||||
terms:
|
||||
new: جديد
|
||||
sort: ترتيب
|
||||
filter: تصفية
|
||||
columns: أعمدة
|
||||
settings: إعدادات
|
||||
home: الصفحة الرئيسية
|
||||
admin: مشرف
|
||||
logout: تسجيل الخروج
|
||||
dashboard: لوحة القيادة
|
||||
search: بحث
|
||||
search-input: إدخال البحث
|
||||
common:
|
||||
confirm: تأكيد
|
||||
edit: تحرير
|
||||
save: حفظ
|
||||
save-changes: حفظ التغييرات
|
||||
cancel: إلغاء
|
||||
2fa-config: تكوين المصادقة الثنائية
|
||||
account: حساب
|
||||
admin: مشرف
|
||||
branding: العلامة التجارية
|
||||
columns: أعمدة
|
||||
dashboard: لوحة القيادة
|
||||
date-of-birth: تاريخ الميلاد
|
||||
delete: حذف
|
||||
email: البريد الإلكتروني
|
||||
filesystem: نظام الملفات
|
||||
filter: تصفية
|
||||
home: الصفحة الرئيسية
|
||||
logout: تسجيل الخروج
|
||||
mail: بريد
|
||||
name: اسم
|
||||
new: جديد
|
||||
notification-channels: قنوات الإشعارات
|
||||
notifications: إشعارات
|
||||
organization: منظمة
|
||||
organizations: منظمات
|
||||
overview: نظرة عامة
|
||||
phone: رقم هاتفك
|
||||
profile: الملف الشخصي
|
||||
queue: قائمة الانتظار
|
||||
save-button-text: حفظ التغييرات
|
||||
search-input: إدخال البحث
|
||||
search: بحث
|
||||
services: خدمات
|
||||
settings: إعدادات
|
||||
socket: مقبس
|
||||
sort: ترتيب
|
||||
two-factor: المصادقة الثنائية
|
||||
uploading: جارٍ التحميل...
|
||||
your-profile: ملفك الشخصي
|
||||
created-at: تم الإنشاء في
|
||||
country: البلد
|
||||
phone-number: الهاتف
|
||||
status: الحالة
|
||||
close-and-save: إغلاق وحفظ
|
||||
users: المستخدمون
|
||||
changelog: سجل التغييرات
|
||||
ok: موافق
|
||||
select-file: اختر ملف
|
||||
back: رجوع
|
||||
next: التالي
|
||||
continue: متابعة
|
||||
done: تم
|
||||
export: تصدير
|
||||
reload: إعادة تحميل
|
||||
reload-data: إعادة تحميل البيانات
|
||||
unauthorized: غير مصرح
|
||||
unauthorized-to: غير مصرح لـ
|
||||
unauthorized-access: وصول غير مصرح
|
||||
unauthorized-access-message: وصول غير مصرح، يجب عليك طلب الأذونات للوصول.
|
||||
permissions-required-for-changes: ليس لديك الأذونات المطلوبة لإجراء التغييرات.
|
||||
push-notifications: إشعارات الدفع
|
||||
component:
|
||||
file:
|
||||
dropdown-label: إجراءات الملف
|
||||
import-modal:
|
||||
loading-message: جارٍ معالجة الاستيراد...
|
||||
drop-upload: إسقاط للتحميل
|
||||
invalid: غير صالح
|
||||
ready-upload: جاهز للتحميل.
|
||||
upload-spreadsheets: تحميل جداول البيانات
|
||||
drag-drop: اسحب وأفلت ملفات جداول البيانات في منطقة الإسقاط هذه
|
||||
button-text: أو اختر جداول البيانات للتحميل
|
||||
spreadsheets: جداول البيانات
|
||||
upload-queue: قائمة انتظار التحميل
|
||||
dropzone:
|
||||
file: ملف
|
||||
drop-to-upload: إسقاط للتحميل
|
||||
invalid: غير صالح
|
||||
files-ready-for-upload: >-
|
||||
{numOfFiles} جاهز للتحميل.
|
||||
upload-images-videos: تحميل الصور ومقاطع الفيديو
|
||||
upload-documents: تحميل المستندات
|
||||
upload-documents-files: تحميل المستندات والملفات
|
||||
upload-avatar-files: تحميل الصور الرمزية المخصصة
|
||||
dropzone-supported-images-videos: اسحب وأفلت ملفات الصور والفيديو في منطقة الإسقاط هذه
|
||||
dropzone-supported-avatars: اسحب وأفلت ملفات SVG أو PNG
|
||||
dropzone-supported-files: اسحب وأفلت الملفات في منطقة الإسقاط هذه
|
||||
or-select-button-text: أو اختر الملفات للتحميل.
|
||||
upload-queue: قائمة انتظار التحميل
|
||||
uploading: جارٍ التحميل...
|
||||
two-fa-enforcement-alert:
|
||||
message: لتعزيز أمان حسابك، تتطلب مؤسستك المصادقة الثنائية (2FA). قم بتمكين المصادقة الثنائية في إعدادات حسابك للحصول على طبقة إضافية من الحماية.
|
||||
button-text: إعداد المصادقة الثنائية
|
||||
comment-thread:
|
||||
publish-comment-button-text: نشر التعليق
|
||||
publish-reply-button-text: نشر الرد
|
||||
reply-comment-button-text: رد
|
||||
edit-comment-button-text: تحرير
|
||||
delete-comment-button-text: حذف
|
||||
comment-published-ago: >-
|
||||
{createdAgo} منذ
|
||||
comment-input-placeholder: أدخل تعليقًا جديدًا...
|
||||
comment-reply-placeholder: أدخل ردك...
|
||||
comment-input-empty-notification: لا يمكنك نشر تعليقات فارغة...
|
||||
comment-min-length-notification: يجب أن يكون التعليق على الأقل 2 حرف
|
||||
dashboard:
|
||||
select-dashboard: اختر لوحة القيادة
|
||||
create-new-dashboard: إنشاء لوحة قيادة جديدة
|
||||
create-a-new-dashboard: إنشاء لوحة قيادة جديدة
|
||||
confirm-create-dashboard: إنشاء لوحة القيادة!
|
||||
edit-layout: تحرير التخطيط
|
||||
add-widgets: إضافة عناصر واجهة
|
||||
delete-dashboard: حذف لوحة القيادة
|
||||
save-dashboard: حفظ لوحة القيادة
|
||||
you-cannot-delete-this-dashboard: لا يمكنك حذف هذه اللوحة.
|
||||
are-you-sure-you-want-delete-dashboard: هل أنت متأكد من حذف {dashboardName}؟
|
||||
dashboard-widget-panel:
|
||||
widget-name: >-
|
||||
عنصر واجهة {widgetName}
|
||||
select-widgets: اختر عناصر الواجهة
|
||||
close-and-save: إغلاق وحفظ
|
||||
services:
|
||||
dashboard-service:
|
||||
create-dashboard-success-notification: تم إنشاء لوحة القيادة الجديدة `{dashboardName}` بنجاح.
|
||||
delete-dashboard-success-notification: تم حذف لوحة القيادة `{dashboardName}`.
|
||||
auth:
|
||||
verification:
|
||||
header-title: التحقق من الحساب
|
||||
title: تحقق من عنوان بريدك الإلكتروني
|
||||
message-text: <strong>اقتربت من الانتهاء!</strong><br> تحقق من بريدك الإلكتروني للحصول على رمز التحقق.
|
||||
verification-code-text: أدخل رمز التحقق الذي تلقيته عبر البريد الإلكتروني.
|
||||
verification-input-label: رمز التحقق
|
||||
verify-button-text: تحقق واستمر
|
||||
didnt-receive-a-code: لم تتلق رمزًا بعد؟
|
||||
not-sent:
|
||||
message: لم تتلق رمزًا بعد؟
|
||||
alternative-choice: استخدم الخيارات البديلة أدناه للتحقق من حسابك.
|
||||
resend-email: إعادة إرسال البريد الإلكتروني
|
||||
send-by-sms: إرسال عبر الرسائل القصيرة
|
||||
two-fa:
|
||||
verify-code:
|
||||
verification-code: رمز التحقق
|
||||
check-title: تحقق من بريدك الإلكتروني أو هاتفك
|
||||
check-subtitle: لقد أرسلنا لك رمز تحقق. أدخل الرمز أدناه لإكمال عملية تسجيل الدخول.
|
||||
expired-help-text: انتهت صلاحية رمز المصادقة الثنائية الخاص بك. يمكنك طلب رمز آخر إذا كنت بحاجة إلى مزيد من الوقت.
|
||||
resend-code: إعادة إرسال الرمز
|
||||
verify-code: تحقق من الرمز
|
||||
cancel-two-factor: إلغاء المصادقة الثنائية
|
||||
invalid-session-error-notification: جلسة غير صالحة. حاول مرة أخرى.
|
||||
verification-successful-notification: تم التحقق بنجاح!
|
||||
verification-code-expired-notification: انتهت صلاحية رمز التحقق. يرجى طلب رمز جديد.
|
||||
verification-code-failed-notification: فشل التحقق. حاول مرة أخرى.
|
||||
resend-code:
|
||||
verification-code-resent-notification: تم إرسال رمز التحقق الجديد.
|
||||
verification-code-resent-error-notification: خطأ في إعادة إرسال رمز التحقق. حاول مرة أخرى.
|
||||
forgot-password:
|
||||
success-message: تحقق من بريدك الإلكتروني للمتابعة!
|
||||
is-sent:
|
||||
title: اقتربت من الانتهاء!
|
||||
message: <strong>تحقق من بريدك الإلكتروني!</strong><br> لقد أرسلنا لك رابطًا سحريًا إلى بريدك الإلكتروني سيسمح لك بإعادة تعيين كلمة المرور الخاصة بك. ينتهي صلاحية الرابط في 15 دقيقة.
|
||||
not-sent:
|
||||
title: هل نسيت كلمة المرور؟
|
||||
message: <strong>لا تقلق، نحن هنا لمساعدتك.</strong><br> أدخل البريد الإلكتروني الذي تستخدمه لتسجيل الدخول إلى {appName} وسنرسل لك رابطًا آمنًا لإعادة تعيين كلمة المرور الخاصة بك.
|
||||
form:
|
||||
email-label: عنوان بريدك الإلكتروني
|
||||
submit-button: حسنًا، أرسل لي رابطًا سحريًا!
|
||||
nevermind-button: لا تهتم
|
||||
login:
|
||||
title: تسجيل الدخول إلى حسابك
|
||||
no-identity-notification: هل نسيت إدخال بريدك الإلكتروني؟
|
||||
no-password-notification: هل نسيت إدخال كلمة المرور الخاصة بك؟
|
||||
unverified-notification: يجب التحقق من حسابك للمتابعة.
|
||||
password-reset-required: مطلوب إعادة تعيين كلمة المرور للمتابعة.
|
||||
failed-attempt:
|
||||
message: <strong>هل نسيت كلمة المرور الخاصة بك؟</strong><br> انقر على الزر أدناه لإعادة تعيين كلمة المرور الخاصة بك.
|
||||
button-text: حسنًا، ساعدني في إعادة التعيين!
|
||||
form:
|
||||
email-label: عنوان البريد الإلكتروني
|
||||
password-label: كلمة المرور
|
||||
remember-me-label: تذكرني
|
||||
forgot-password-label: هل نسيت كلمة المرور الخاصة بك؟
|
||||
sign-in-button: تسجيل الدخول
|
||||
create-account-button: إنشاء حساب جديد
|
||||
slow-connection-message: تواجه مشكلات في الاتصال.
|
||||
reset-password:
|
||||
success-message: تم إعادة تعيين كلمة المرور الخاصة بك! تسجيل الدخول للمتابعة.
|
||||
invalid-verification-code: هذا الرابط لإعادة تعيين كلمة المرور غير صالح أو منتهي الصلاحية.
|
||||
title: إعادة تعيين كلمة المرور الخاصة بك
|
||||
form:
|
||||
code:
|
||||
label: رمز إعادة التعيين الخاص بك
|
||||
help-text: رمز التحقق الذي تلقيته في بريدك الإلكتروني.
|
||||
password:
|
||||
label: كلمة مرور جديدة
|
||||
help-text: أدخل كلمة مرور لا تقل عن 6 أحرف للمتابعة.
|
||||
confirm-password:
|
||||
label: تأكيد كلمة المرور الجديدة
|
||||
help-text: أدخل كلمة مرور لا تقل عن 6 أحرف للمتابعة.
|
||||
submit-button: إعادة تعيين كلمة المرور
|
||||
back-button: رجوع
|
||||
console:
|
||||
create-or-join-organization:
|
||||
modal-title: إنشاء أو الانضمام إلى منظمة
|
||||
join-success-notification: لقد انضممت إلى منظمة جديدة!
|
||||
create-success-notification: لقد أنشأت منظمة جديدة!
|
||||
switch-organization:
|
||||
modal-title: هل أنت متأكد أنك تريد التبديل إلى المنظمة {organizationName}؟
|
||||
modal-body: من خلال التأكيد، سيظل حسابك مسجلاً الدخول، ولكن سيتم تبديل المنظمة الأساسية الخاصة بك.
|
||||
modal-accept-button-text: نعم، أريد التبديل إلى المنظمة
|
||||
success-notification: لقد قمت بتبديل المنظمات
|
||||
account:
|
||||
index:
|
||||
upload-new: تحميل جديد
|
||||
phone: رقم هاتفك.
|
||||
photos: الصور
|
||||
admin:
|
||||
schedule-monitor:
|
||||
schedule-monitor: مراقب الجدول
|
||||
task-logs-for: >-
|
||||
سجلات المهام لـ:
|
||||
showing-last-count: عرض آخر {count} سجلات
|
||||
name: الاسم
|
||||
type: النوع
|
||||
timezone: المنطقة الزمنية
|
||||
last-started: آخر بدء
|
||||
last-finished: آخر انتهاء
|
||||
last-failure: آخر فشل
|
||||
date: التاريخ
|
||||
memory: الذاكرة
|
||||
runtime: وقت التشغيل
|
||||
output: المخرجات
|
||||
no-output: لا توجد مخرجات
|
||||
config:
|
||||
database:
|
||||
title: تكوين قاعدة البيانات
|
||||
filesystem:
|
||||
title: تكوين نظام الملفات
|
||||
mail:
|
||||
title: تكوين البريد
|
||||
notification-channels:
|
||||
title: تكوين إشعارات الدفع
|
||||
queue:
|
||||
title: تكوين قائمة الانتظار
|
||||
services:
|
||||
title: تكوين الخدمات
|
||||
socket:
|
||||
title: تكوين المقبس
|
||||
branding:
|
||||
title: العلامة التجارية
|
||||
icon-text: أيقونة
|
||||
upload-new: تحميل جديد
|
||||
reset-default: إعادة التعيين إلى الافتراضي
|
||||
logo-text: شعار
|
||||
theme: السمة الافتراضية
|
||||
index:
|
||||
total-users: إجمالي المستخدمين
|
||||
total-organizations: إجمالي المنظمات
|
||||
total-transactions: إجمالي المعاملات
|
||||
notifications:
|
||||
title: الإشعارات
|
||||
notification-settings: إعدادات الإشعارات
|
||||
organizations:
|
||||
index:
|
||||
title: المنظمات
|
||||
owner-name-column: المالك
|
||||
owner-phone-column: هاتف المالك
|
||||
owner-email-column: بريد المالك
|
||||
users-count-column: المستخدمون
|
||||
phone-column: الهاتف
|
||||
email-column: البريد الإلكتروني
|
||||
users:
|
||||
title: المستخدمون
|
||||
settings:
|
||||
index:
|
||||
title: إعدادات المنظمة
|
||||
organization-name: اسم المنظمة
|
||||
organization-description: وصف المنظمة
|
||||
organization-phone: رقم هاتف المنظمة
|
||||
organization-currency: عملة المنظمة
|
||||
organization-id: معرف المنظمة
|
||||
organization-branding: العلامة التجارية للمنظمة
|
||||
logo: الشعار
|
||||
logo-help-text: شعار منظمتك.
|
||||
upload-new-logo: تحميل شعار جديد
|
||||
backdrop: الخلفية
|
||||
backdrop-help-text: لافتة اختيارية أو صورة خلفية لمنظمتك.
|
||||
upload-new-backdrop: تحميل خلفية جديدة
|
||||
extensions:
|
||||
title: الإضافات قادمة قريبًا!
|
||||
message: يرجى التحقق مرة أخرى في الإصدارات القادمة حيث نستعد لإطلاق مستودع الإضافات والسوق.
|
||||
notifications:
|
||||
select-all: تحديد الكل
|
||||
mark-as-read: تعليم كمقروء
|
||||
received: >-
|
||||
تم الاستلام:
|
||||
message: لا توجد إشعارات لعرضها.
|
||||
invite:
|
||||
for-users:
|
||||
invitation-message: لقد تمت دعوتك للانضمام إلى {companyName}
|
||||
invitation-sent-message: لقد تمت دعوتك للانضمام إلى منظمة {companyName} على {appName}. لقبول هذه الدعوة، أدخل رمز الدعوة الذي تلقيته عبر البريد الإلكتروني وانقر على متابعة.
|
||||
invitation-code-sent-text: رمز الدعوة الخاص بك
|
||||
accept-invitation-text: قبول الدعوة
|
||||
onboard:
|
||||
index:
|
||||
title: أنشئ حسابك
|
||||
welcome-title: <strong>مرحبًا بك في {companyName}!</strong><br />
|
||||
welcome-text: أكمل التفاصيل المطلوبة أدناه للبدء.
|
||||
full-name: الاسم الكامل
|
||||
full-name-help-text: اسمك الكامل
|
||||
your-email: عنوان البريد الإلكتروني
|
||||
your-email-help-text: عنوان بريدك الإلكتروني
|
||||
phone: رقم الهاتف
|
||||
phone-help-text: رقم هاتفك
|
||||
organization-name: اسم المنظمة
|
||||
organization-help-text: اسم منظمتك، سيتم إدارة جميع خدماتك ومواردك تحت هذه المنظمة، لاحقًا يمكنك إنشاء العديد من المنظمات كما تريد أو تحتاج.
|
||||
password: أدخل كلمة مرور
|
||||
password-help-text: كلمة مرورك، تأكد من أنها جيدة.
|
||||
confirm-password: تأكيد كلمة المرور
|
||||
confirm-password-help-text: فقط لتأكيد كلمة المرور التي أدخلتها أعلاه.
|
||||
continue-button-text: متابعة
|
||||
verify-email:
|
||||
header-title: التحقق من الحساب
|
||||
title: تحقق من عنوان بريدك الإلكتروني
|
||||
message-text: <strong>اقتربت من الانتهاء!</strong><br> تحقق من بريدك الإلكتروني للحصول على رمز التحقق.
|
||||
verification-code-text: أدخل رمز التحقق الذي تلقيته عبر البريد الإلكتروني.
|
||||
verification-input-label: رمز التحقق
|
||||
verify-button-text: تحقق واستمر
|
||||
didnt-receive-a-code: لم تتلق رمزًا بعد؟
|
||||
not-sent:
|
||||
message: لم تتلق رمزًا بعد؟
|
||||
alternative-choice: استخدم الخيارات البديلة أدناه للتحقق من حسابك.
|
||||
resend-email: إعادة إرسال البريد الإلكتروني
|
||||
send-by-sms: إرسال عبر الرسائل القصيرة
|
||||
install:
|
||||
installer-header: المثبت
|
||||
failed-message-sent: فشل التثبيت! انقر على الزر أدناه لإعادة محاولة التثبيت.
|
||||
retry-install: إعادة محاولة التثبيت
|
||||
start-install: بدء التثبيت
|
||||
layout:
|
||||
header:
|
||||
menus:
|
||||
organization:
|
||||
settings: إعدادات المنظمة
|
||||
create-or-join: إنشاء أو الانضمام إلى المنظمات
|
||||
explore-extensions: استكشاف الإضافات
|
||||
user:
|
||||
view-profile: عرض الملف الشخصي
|
||||
keyboard-shortcuts: عرض اختصارات لوحة المفاتيح
|
||||
changelog: سجل التغييرات
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user