From 7a6de329b5c1317bde89f8b65589bd94222fbe9a Mon Sep 17 00:00:00 2001 From: Faiz Hashmi Date: Mon, 13 Jul 2026 16:04:17 +0300 Subject: [PATCH] latest version v9.4 --- .gitignore | 7 + README.md | 122 +++++++++++++++++- lib/constants/app_constants.dart | 2 +- .../components/priority_tickets_sidelist.dart | 3 + .../main_queue_screen/main_queue_screen.dart | 19 --- 5 files changed, 132 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index 29a3a50..9ffe718 100644 --- a/.gitignore +++ b/.gitignore @@ -10,8 +10,11 @@ .svn/ migrate_working_dir/ + + # IntelliJ related *.iml + *.ipr *.iws .idea/ @@ -41,3 +44,7 @@ app.*.map.json /android/app/debug /android/app/profile /android/app/release + + +/qline_scripts/apks +/qline_scripts/logs diff --git a/README.md b/README.md index 4fec063..eff007c 100644 --- a/README.md +++ b/README.md @@ -78,4 +78,124 @@ Pull requests are welcome. For major changes, please open an issue first to disc ## License -This project is licensed under the MIT License. \ No newline at end of file +This project is licensed under the MIT License. + + + + + + + +# Queuing System Shell Scripts + +This repository contains a set of shell scripts for managing Android devices running the HMG QLine application in a multi-device hospital environment. The scripts automate deployment, logging, restarting, and uninstallation tasks for efficient device management. + +## Features +- **Deploy APKs:** Install and launch specific versions of the QLine app on multiple devices. +- **Restart App:** Force-stop and relaunch the QLine app on all connected devices. +- **Uninstall App:** Remove the QLine app from all connected devices. +- **Extract Logs:** Pull log files from devices for troubleshooting and analysis. +- **Device Connection:** Automatically connect to devices over Wi-Fi using IP addresses. + +## Folder Structure +``` +queuing_system/ +├── apks/ # APK files for different QLine app versions +├── logs/ # Data logs from devices +├── connect_devices.sh # Script to connect to devices +├── deploy_qline.sh # Script to deploy APKs +├── device_ips.txt # List of device IP addresses +├── extract_logs.sh # Script to extract logs from devices +├── restart_qline.sh # Script to restart the app on devices +├── uninstall_qline.sh # Script to uninstall the app +``` + +## Getting Started +1. **Clone the repository:** + ```bash + git clone + cd queuing_system + ``` +2. **Configure device IPs:** + - Add device IPs to a file (e.g., `device_ips_all.txt`), one per line. +3. **Prepare APKs:** + - Place APK files in the `apks/` folder, named as per the versioning scheme. +4. **Run scripts:** + - Make scripts executable: `chmod +x *.sh` + - Example: Deploy APKs + ```bash + ./deploy_qline.sh + ``` + - Example: Extract logs from a device + ```bash + sh extract_logs.sh -ip + ``` + +## Script Commands (One by One) +Use the commands below with the appropriate IP list file. + +### Connect Devices +```bash +sh connect_devices.sh -ipfile device_ips_all.txt +``` + +### Deploy QLine APK +```bash +sh deploy_qline.sh -ipfile device_ips_all.txt -version 9.2 +``` + +**Deploy to Single IP:** +```bash +echo "10.70.6.143" > temp_ip.txt +sh deploy_qline.sh -ipfile temp_ip.txt -version 9.2 +rm temp_ip.txt +``` + +### Restart QLine App +```bash +sh restart_qline.sh -ipfile device_ips_all.txt +``` + +### Uninstall QLine App +```bash +sh uninstall_qline.sh -ipfile device_ips_all.txt +``` + +### Extract Logs (Single Device) +```bash +sh extract_logs.sh -ip +``` + +### Extract Logs (All Devices) +```bash +sh extract_all_logs.sh -ipfile device_ips_all.txt +``` + +### Clear Logs (Single Device) +```bash +sh clear_logs.sh -ip +``` + +### Clear Logs (All Devices) +```bash +sh clear_logs_all.sh -ipfile device_ips_all.txt +``` + +### Kill QLine App (All Devices) +```bash +sh kill_qline.sh -ipfile device_ips_all.txt +``` + +## Requirements +- macOS (tested) +- Android SDK Platform Tools (adb) +- Wi-Fi connection to devices + +## Notes +- Ensure all devices are on the same Wi-Fi network (`Cloud Solutions`). +- APKs and logs are ignored from version control via `.gitignore`. +- Scripts are designed for hospital multi-floor deployments but can be adapted for other environments. + +## License +MIT License + diff --git a/lib/constants/app_constants.dart b/lib/constants/app_constants.dart index 3661f69..e757e94 100644 --- a/lib/constants/app_constants.dart +++ b/lib/constants/app_constants.dart @@ -187,7 +187,7 @@ class ApiConstants { static String baseUrlUat = 'https://ms.hmg.com/nscapi'; // UAT static String baseUrlDev = 'https://ms.hmg.com/nscapi2'; // DEV - static String baseUrl = baseUrlDev; + static String baseUrl = baseUrlUat; // static String baseUrl = baseUrlDev; static String baseUrlHub = '$baseUrl/PatientCallingHub'; static String baseUrlApi = '$baseUrl/api'; diff --git a/lib/views/main_queue_screen/components/priority_tickets_sidelist.dart b/lib/views/main_queue_screen/components/priority_tickets_sidelist.dart index ca66345..a92d83c 100644 --- a/lib/views/main_queue_screen/components/priority_tickets_sidelist.dart +++ b/lib/views/main_queue_screen/components/priority_tickets_sidelist.dart @@ -150,6 +150,9 @@ class PriorityTicketsWithSideSection extends StatelessWidget { if (showThankyouMessage) ...[ showThankyouWidget(), ] else ...[ + // if (globalConfigurationsModel.isFromTakhasusiMain) ...[ + // SizedBox(height: SizeConfig.getHeightMultiplier()! * 0.1), + // ], Expanded( flex: !globalConfigurationsModel.isRssFeedReq && (screenOrientationEnum == ScreenOrientationEnum.landscapeLeft || screenOrientationEnum == ScreenOrientationEnum.landscapeRight) ? 6 : 4, // flex: !globalConfigurationsModel.isRssFeedReq && (screenOrientationEnum == ScreenOrientationEnum.landscapeLeft || screenOrientationEnum == ScreenOrientationEnum.landscapeRight) ? 6 : 4, diff --git a/lib/views/main_queue_screen/main_queue_screen.dart b/lib/views/main_queue_screen/main_queue_screen.dart index 89608d8..529f8f6 100644 --- a/lib/views/main_queue_screen/main_queue_screen.dart +++ b/lib/views/main_queue_screen/main_queue_screen.dart @@ -150,25 +150,6 @@ class _MainQueueScreenState extends State { builder: (BuildContext context, ScreenConfigViewModel screenConfigVM, Widget? child) { return Column( children: [ - // if (screenConfigVM.globalConfigurationsModel.screenTypeEnum != ScreenTypeEnum.roomLevelScreen) ...[ - // Expanded( - // flex: getFlexForScreenTypes(screenConfigVM), - // child: Padding( - // padding: const EdgeInsets.symmetric(horizontal: 20), - // child: Row( - // children: [ - // if (screenConfigVM.globalConfigurationsModel.isWeatherReq) ...[ - // getWeatherWidget(screenConfigVM), - // ], - // const SizedBox(width: 20), - // if (screenConfigVM.globalConfigurationsModel.isPrayerTimeReq) ...[ - // getPrayerWidget(screenConfigVM), - // ], - // ], - // ), - // ), - // ) - // ], Expanded( flex: 10, child: Padding(