Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
aed85dc
fix: Add schoolNoRegisterNoRegister module
Oct 24, 2023
9a39d73
fix: Update app version
Oct 25, 2023
57c4903
feat: Update gitignore
Oct 25, 2023
90666c9
fix: Update environments
Oct 25, 2023
0c1b086
fix: import from enviroment
Oct 25, 2023
453a1f6
refactor: Set back the scheduler.initite to app
Oct 27, 2023
579f8fd
fix: Possible null value
Oct 27, 2023
156748d
feat: in development use development api
Oct 27, 2023
cff039c
fix: Update data with proper giga_id school
Oct 31, 2023
2983c7e
fix: Change null to undefined to the set(schoolId) on homePage
Nov 1, 2023
9743717
refactor: Move logic to Home page and add loading
Nov 1, 2023
ee45b92
refactor: Fix error when api call take to long in reponse
Nov 6, 2023
5b54c87
refactor: Extract removeUnregister Schools logic from home
Nov 6, 2023
7b4bc8d
fix: Fix request wrng id on home.page.ts to check gigaID
Nov 6, 2023
f4435db
feat: Add the getAllWrongGigaId and checkRightGigaIdSlow
Nov 7, 2023
2d0f288
refactor: Use checkRightGigaIdSlow to get the rightGiagaId
Nov 7, 2023
3f72f95
fix: Fix the PCDC version on electron package.json
Nov 7, 2023
fd054b4
fix: use checkRightGigaId to get the rightGigaId
Nov 7, 2023
6b8bdbb
fix: Set api endpoint
Nov 9, 2023
d04fc26
Merge branch 'release_fix/1.0.5' into release/1.0.6/v2
Nov 15, 2023
ea0f279
fix: Fix filtering and set scholInfo
Nov 17, 2023
8d1c82a
fix: Fix bug not working when reset after removed the school whitout …
Nov 17, 2023
da468ee
feat: Add localtimestamp
Nov 28, 2023
aac94e7
fix: Upload local time with the measurement
Dec 4, 2023
8b8abf5
fix: fix endpoint for get registred schools
Dec 22, 2023
bdb775c
feat: Add component for change app language
Jan 1, 2024
d6f75d1
feat: Internazionalize more pages of the app
Jan 1, 2024
b8a0409
feat: Internazionalice remaining pages
Jan 2, 2024
2a6f40f
fix: Add some keys to translate file
Jan 3, 2024
a881030
feat: Add spain and portugease translation files
Jan 3, 2024
b39fc18
fix: Get use the app languaje on every page
Jan 3, 2024
cae1f64
fix: Fix missing default lang on initial render
Jan 3, 2024
e613294
fix: Check if the schools if registred instead of if exist
Jan 8, 2024
ed33b6e
fix: Save settings
Jan 8, 2024
66b3c7e
feat: Update translation file
Feb 5, 2024
5aace26
feat: Change color of text on search school page
Feb 5, 2024
b9e43a7
fix: Change TimestampLocal for timestampLocal
Feb 12, 2024
474148b
fix: Set correct case to timestamplocal
Feb 13, 2024
22a17e4
Merge pull request #8 from unicef/release/1.0.7/v1
Victor1Ja Feb 16, 2024
e3caaa3
feat: Add russian support
Apr 3, 2024
f361692
docs: Change app version
Apr 15, 2024
1bab822
Add Daily measurement starting the day
Apr 15, 2024
4b81ff0
Change fro getMilliseconds to getTime
Apr 15, 2024
e5e0b66
Use getDate instead of getDay to check if the last measurement was do…
Apr 15, 2024
a2f3637
Add french translation
Apr 29, 2024
8796a0f
Add featureflag
May 1, 2024
56f1bc5
Save version
May 2, 2024
cbf7886
Add test mode
May 6, 2024
a6b30ab
Add feature flags
May 7, 2024
733d804
Add french translation
Apr 29, 2024
de83a70
feat: Add russian support
Apr 3, 2024
d19cc23
Update Versions
May 13, 2024
fdc4e49
Add publish flag
May 13, 2024
ca07ed5
Merge pull request #12 from unicef/release/1.0.8v0
Victor1Ja May 13, 2024
d4ca0cb
fix settings get features feature
Jun 10, 2024
f55f3b8
add note to measurement
Jun 17, 2024
7bc736a
retry speed test if connection is not available
Jul 11, 2024
7cc95aa
Merge branch 'release/1.0.10' into release/1.0.9
Jul 11, 2024
05074f9
Add measurementOfReconnect if a measure fail for lack of internet
Jul 16, 2024
9d6aa0c
fix typo
Jul 29, 2024
fe392fd
Fix Notes bug
Aug 1, 2024
a058814
remove console logs
Aug 1, 2024
a13dd46
set next measurement depending of previous one
Aug 5, 2024
19b654f
Add make option
Aug 5, 2024
3f3250d
upgrade version of the app
Aug 5, 2024
e6dfcb9
upgrade to ndt7
vipulbhavsar94 Sep 8, 2024
688453b
Add build app command
Sep 10, 2024
06dbfff
Set sentry dsn
Sep 11, 2024
17799db
Broadcast measurement status and data
Sep 11, 2024
a892a87
Fix start Test page to show test status
Sep 11, 2024
b56361e
parse ndt7 values to the mesurement schema
Sep 11, 2024
c8b6b1c
ad key to translation file
Sep 11, 2024
14b0b07
Merge branch 'ndt7' into release/1.0.9
Sep 11, 2024
545b7dd
feat: Update data usage in UploadService and MeasurementClientService
Sep 16, 2024
8172bb0
chore: Update package and app version to 1.0.9
Sep 17, 2024
cc13eca
set windows size for dev and not dev env
Sep 17, 2024
fb05ed4
Self hosting changes (#14)
adityaa-nagarro Sep 23, 2024
898f939
feat: Fix translation issue in search country page
Sep 23, 2024
e6a3072
refactor: Update UUID retrieval in MeasurementClientService
Sep 26, 2024
70e0b16
Update environment configuration and header component
Sep 26, 2024
5359291
Add build:electron-publish script and fix failover in access network …
Victor1Ja Oct 14, 2024
97a18c0
Fix schedular and refactor (#17)
vipulbhavsar94 Oct 14, 2024
777d145
refactor: Move upload section in starttest page HTML
Oct 14, 2024
3186eb8
Update search school page to search by school ID and country code
Oct 14, 2024
97a9d67
startup schedule (#18)
vipulbhavsar94 Oct 22, 2024
65a09a1
refactor: Comment data usage fields in upload service
Oct 22, 2024
719d2bf
chore: Refactor schedule service to improve startup test scheduling a…
Oct 23, 2024
0c694d4
Update header component to use new app name and suffix
Nov 6, 2024
4b1fed3
Update mlab service to return cached answer if available
Nov 8, 2024
6f44800
refactor: Update mlab service to remove cache
Nov 12, 2024
d66a678
Update package and environment versions to 1.0.10
Nov 12, 2024
f451084
Merge pull request #19 from unicef/release/1.0.9
Victor1Ja Nov 12, 2024
cbed42c
refactor: Update token assignment in environment.ts
Nov 12, 2024
d796aca
refactor: Improve error handling in getNetInfo method
Nov 13, 2024
4b6b714
refactor: Standardize data format in NetworkService
Nov 13, 2024
3d810a6
refactor: Update download and upload measurements in UploadService
Nov 13, 2024
67c1e38
refactor: Correct upload and download measurements in StarttestPage
Nov 13, 2024
5db36fb
refactor: Update NetworkService to include ASN information in IpInfoData
Nov 13, 2024
63bf966
Merge pull request #20 from unicef/release/1.0.10
Victor1Ja Nov 14, 2024
4179a9b
chore: add env example
Feb 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ npm-debug.log*
/platforms
/plugins
/www

_environment.prod.ts
electron/electron-builder.env
src/environments/_environment.prod.ts
5 changes: 5 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Semaphore:

1. [ ] Change from the default daily semaphore to custom semaphore, setting by default two semaphores per day. This will allow us to have better control over the semaphore and to be able to set the semaphore to be used in the future.
Ideally with be good to use a priority or set to store the semaphores and remove any semaphore that was used or is in the past.

3 changes: 2 additions & 1 deletion electron/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ node_modules
build
dist
logs
out
out
*.env
4 changes: 2 additions & 2 deletions electron/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions electron/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "unicef-pdca",
"version": "1.0.4",
"version": "1.0.10",
"description": "Unicef Project Connect Daily Check App",
"author": {
"name": "Unicef"
Expand All @@ -18,7 +18,8 @@
"electron:start-live": "node ./live-runner.js",
"electron:start": "npm run build && electron --inspect=5858 ./",
"electron:pack": "npm run build && electron-builder build --dir -c ./electron-builder.config.json",
"electron:make": "npm run build && electron-builder build -c ./electron-builder.config.json -p always --x64 --ia32"
"electron:make": "npm run build && electron-builder build -c ./electron-builder.config.json -p always --x64 --ia32",
"electron:make-not-publish": "npm run build && electron-builder build -c ./electron-builder.config.json always --x64 --ia32"
},
"dependencies": {
"@capacitor-community/electron": "^4.1.0",
Expand All @@ -42,4 +43,4 @@
"capacitor",
"electron"
]
}
}
45 changes: 21 additions & 24 deletions electron/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ unhandled({
}
});

Sentry.init({ dsn: "https://9a70105db9fb49e3ab0a9bdbd585ce8a@o4504957350445056.ingest.sentry.io/4504957357981696" });

//New ICTD Sentry
//Sentry.init({dsn: 'https://[email protected]/47'});
Sentry.init({ dsn: "https://[email protected]/47" });

let isQuiting = false;
let mainWindow = null;
Expand Down Expand Up @@ -131,9 +128,9 @@ if (!gotTheLock) {
if (!isDownloaded) {
isDownloaded = true;
try {
// autoUpdater.quitAndInstall(true, true)
// autoUpdater.quitAndInstall(true, true)

//for auto update comment the below codes, and uncomment the above line of code
//for auto update comment the below codes, and uncomment the above line of code


const dialogOpts = {
Expand All @@ -148,7 +145,7 @@ if (!gotTheLock) {
})


//throw new Error("opps there is unexpected error")
//throw new Error("opps there is unexpected error")
} catch (error) {
console.error('Error during update installation:', error);
const dialogOpts = {
Expand All @@ -168,24 +165,24 @@ if (!gotTheLock) {


});
/*
autoUpdater.on('error', (error) => {
console.error('Update Error:', error);
/*
autoUpdater.on('error', (error) => {
console.error('Update Error:', error);

const dialogOpts = {
type: 'info',
buttons: ['Restart / Reinicie / Перезапустить', 'Later / Después / Позже'],
title: 'PCDC Update',

message: `A new version of PCDC has been downloaded. Restart the application to apply the updates.\n\nUna nueva version de PCDC ha sido descargada. Reinicie la aplicación para aplicar los cambios.\n\nБыла загружена новая версия PCDC. Перезапустите приложение, чтобы применить обновления.`
};
dialog.showMessageBox(dialogOpts).then((returnValue) => {
if (returnValue.response === 0) autoUpdater.quitAndInstall(false, true)
})

const dialogOpts = {
type: 'info',
buttons: ['Restart / Reinicie / Перезапустить', 'Later / Después / Позже'],
title: 'PCDC Update',

message: `A new version of PCDC has been downloaded. Restart the application to apply the updates.\n\nUna nueva version de PCDC ha sido descargada. Reinicie la aplicación para aplicar los cambios.\n\nБыла загружена новая версия PCDC. Перезапустите приложение, чтобы применить обновления.`
};
dialog.showMessageBox(dialogOpts).then((returnValue) => {
if (returnValue.response === 0) autoUpdater.quitAndInstall(false, true)
})

});

*/
});

*/



Expand Down
34 changes: 18 additions & 16 deletions electron/src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,17 @@ export class ElectronCapacitorApp {
private TrayIcon: Tray | null = null;
private CapacitorFileConfig: CapacitorElectronConfig;
private TrayMenuTemplate: (MenuItem | MenuItemConstructorOptions)[] = [
new MenuItem({ label: 'Open', click: function(){
this.MainWindow.show();
}
new MenuItem({
label: 'Open', click: function () {
this.MainWindow.show();
}
}),
new MenuItem({ label: 'Quit App', click: function(){
new MenuItem({
label: 'Quit App', click: function () {
isQuiting = true;
app.quit();
this.MainWindow.close();
}
}
}),
];
private AppMenuBarMenuTemplate: (MenuItem | MenuItemConstructorOptions)[] = [
Expand Down Expand Up @@ -93,7 +95,7 @@ export class ElectronCapacitorApp {
scheme: this.customScheme,
});
}


// Helper function to load in the app.
private async loadMainWindow(thisRef: any) {
Expand Down Expand Up @@ -130,8 +132,8 @@ export class ElectronCapacitorApp {
// titleBarOverlay: true,
maximizable: false,
minimizable: false,
resizable: false,
transparent: true,
resizable: true,
transparent: true,
webPreferences: {
nodeIntegration: true,
contextIsolation: true,
Expand All @@ -140,6 +142,7 @@ export class ElectronCapacitorApp {
preload: preloadPath,
},
});
this.MainWindow.setSize(376, 550);
this.mainWindowState.manage(this.MainWindow);

if (this.CapacitorFileConfig.backgroundColor) {
Expand All @@ -152,8 +155,6 @@ export class ElectronCapacitorApp {
this.SplashScreen.getSplashWindow().close();
}
});


// When the tray icon is enabled, setup the options.
if (this.CapacitorFileConfig.electron?.trayIconAndMenuEnabled) {
this.TrayIcon = new Tray(icon);
Expand Down Expand Up @@ -239,6 +240,7 @@ export class ElectronCapacitorApp {
setTimeout(() => {
if (this.CapacitorFileConfig.electron?.electronIsDev) {
this.MainWindow.webContents.openDevTools();
this.MainWindow.setSize(800, 600);
}
CapElectronEventEmitter.emit('CAPELECTRON_DeeplinkListenerInitialized', '');
}, 400);
Expand All @@ -254,7 +256,7 @@ export class ElectronCapacitorApp {
this.MainWindow.restore();
} else {
this.MainWindow.show();
}
}
this.MainWindow.focus();
}
});
Expand All @@ -266,16 +268,16 @@ export class ElectronCapacitorApp {
});

measureAppAutoLuncher.enable();
measureAppAutoLuncher.isEnabled().then(function(isEnabled){
if(isEnabled){
return;
measureAppAutoLuncher.isEnabled().then(function (isEnabled) {
if (isEnabled) {
return;
}
measureAppAutoLuncher.enable();
})
.catch(function(err){
.catch(function (err) {
// handle error
console.log(err)
});
});
// End of Auto lunching code

}
Expand Down
Loading